Remember me

Now don`t show all images...

7 years 4 months ago #1

  • Mindaugas's Avatar
  • Mindaugas
Hello,
Gallery does not show all photos.

In total there are 23 photo, but shows only 14...
Page: www.petit.lt/vestuvi/vestuvi-fotosesija-gintar-ir-vitalijus
Attachments:

7 years 4 months ago #2

  • Artem's Avatar
  • Artem
  • Posts: 11342
Hello,

Try to disable Page Refresh in the Gallery options.

Regards,

7 years 4 months ago #3

  • Mindaugas's Avatar
  • Mindaugas
does not work...

7 years 4 months ago #4

  • Artem's Avatar
  • Artem
  • Posts: 11342
Hello,

Problem fixed!

Regards,

7 years 4 months ago #5

  • Mindaugas's Avatar
  • Mindaugas
You can tell how? show me how?

Regards,

7 years 4 months ago #6

  • Artem's Avatar
  • Artem
  • Posts: 11342
Hello,

components/com_bagallery/helpers/bagallery.php
Lines: 740 -748
if ($cat != 'category-0') {
                foreach ($catImageCount as $key => $value) {
                    if ($key != $cat) {
                        $start += $value;
                    } else {
                        break;
                    }
                }
            }

Replaced on this
if ($cat != 'category-0') {
                $db = JFactory::getDbo();
                $query = $db->getQuery(true);
                $query->select('imageId')
                    ->from('#__bagallery_items')
                    ->where('`form_id` = '.$id)
                    ->where('`category` = '.$db->quote($cat));
                $db->setQuery($query);
                $items = $db->loadColumn();
                $emptyArray = array();
                foreach ($sorting as $value) {
                    if (in_array($value, $items)) {
                        $emptyArray[] = $value;
                    }
                }
                $start = 0;
                $sorting = $emptyArray;
            }

Regards,
Powered by Kunena Forum