Welcome, Guest. Please login or register.
Did you miss your activation email?

 
Advanced search

22744 Posts in 6702 Topics- by 17593 Members - Latest Member: permsk

21-09-2019 01:34:33
JOOM::GALLERY::FORUMArchiveJoomGallery 2.x ACLMiscellaneousLimiting the number of thumbs in the Motiongallery
Pages: [1]
Print
Author Topic: Limiting the number of thumbs in the Motiongallery  (Read 2064 times)
0 Members and 1 Guest are viewing this topic.
hiopsnerevar
Newbie
*
Offline Offline

Posts: 10


View Profile
« on: 11-02-2014 07:52:00 »

Hi! It is not a question but rather a suggestion. The problem is that in my gallery over 2000 images in one category and when I enabled Motiongallery the many requests killed the site. But there is a great hack for limiting the number of thumbs of motiongallery. I just wanted to invite you to finalize and implement it in the gallery. I think it would be grate. The only thing lacking in this setting the number of thumbs through the admin panel.

Open /components/com_joomgallery/views/detail/tmpl/default.php and on line 195 insert:

Code
<?php 
       $database = & JFactory::getDBO();
       $prev_id = $this->image->ordering - '5';
       $next_id = $this->image->ordering + '5';
       $database->setQuery("SELECT * FROM #__joomgallery WHERE ordering BETWEEN ".$prev_id." AND ".$next_id." AND catid = ".$this->image->catid." AND published = 1 AND approved = 1 ORDER BY ordering ASC ");
       $rows = $database->loadObjectList();
?>

next search the code 
Code
if(count($this->images)):
         foreach($this->images as $row): ?>
and replace for
Code
if(count($rows)):
         foreach($rows as $row): ?>
Logged
MrMusic
Administrator
Hero Member
*****
Offline Offline

Posts: 1084



View Profile
« Reply #1 on: 11-02-2014 14:59:33 »

Hi,
... over 2000 images in one category ...

Shocked 
there is no other sensible division?
Logged

From now on there is the support for the JoomGallery here: forum.en.joomgalleryfriends.net
hiopsnerevar
Newbie
*
Offline Offline

Posts: 10


View Profile
« Reply #2 on: 11-02-2014 15:35:51 »

Well, I tried.  Grin But 300-400 images it's too much.
Exemple http://dragonsun.ru/gallery.html my gallery.
http://dragonsun.ru/gallery/vostochnye-drakony.html Category East Dragons - 300 images. If enabled motiongallery - site will be dead. But how you see
http://dragonsun.ru/gallery/vostochnye-drakony/zelenyj-i-chernyj-drakony.html thumbs only 10.

As an option it would be nice instead of Prev\Next arrows display thumbs.  Smile
Logged
Chraneco
Developer-Team
Hero Member
*****
Offline Offline

Posts: 3544


View Profile
« Reply #3 on: 08-10-2015 05:27:29 »

Hi,

a feature very similar to this will be in the next feature release of JoomGallery (configurable in the configuration manager).

Regards
Chraneco
Logged
Pages: [1]
Print
Jump to:  

HOSTED BY SCHWARZKÜNSTLER ®

PROTECTED BY  ZB BLOCK  AND Project Honey Pot
Theme orange-lt created by panic

Bad Behavior has blocked 13167 access attempts in the last 7 days.

maternal