Hello every one
Is it possible to use GThumb+ for photos of special album ,not for all albums ?
Offline
Hello
curently not so easily ; the dev is quite busy to make a new feature, but I recommend you a 'simple' method if you have Php basis. Make the plugin your own : change the URI in main.inc.php. Then find the trigger used, and embed this with a if($page['category']['id']==XX)... well if you have some Php skill or want to learn by the practice as I did
Offline
Behrad wrote:
Hello every one
Is it possible to use GThumb+ for photos of special album ,not for all albums ?
Hi :-)
you want use where exactly
Offline
Hi
Thanks a lot Flop25 , I should try what ever you said sir :-)
Thanks ddtddt
For example , there is 5 albums in my gallery , one of them include general photos (there is no any relation between photos) , so I think it will be good if I could deactivate GThumb+ for that special album because I want to see thumbnails completely separated from each other :)
Last edited by Behrad (2013-01-21 10:24:39)
Offline
If it's for disabling for one album, there might be another solution
Let's try to copy the thumbnails.tpl file of your theme, paste it in the template extension folder (visible at the root of piwigo )
then set a permalink for your album. On the " template " administration page under Configuration, link the pasted file and the permalink.
Offline
Hiii again
Many many thanks Flop25 , It was amazing, and now I should click on "set this topic as resolved" :-)
Offline
Hello
my solution is simple but if the theme evolved you will not have the new tpl files... so let's try a third method ;)
In a personal plugin using the plufin Localfiles editor :
global $page if ($page['category']['permalink']=="SET HERE THE PERMALINK" or $page['category']['permalink']=="SET HERE A SECOND PERMALINK") { add_event_handler('init', 'Anti_gthumb'); } function Anti_gthumb() { remove_event_handler('loc_begin_index', 'GThumb_init', 60); }
OR
add_event_handler('init', 'Anti_gthumb'); function Anti_gthumb() { global $page if ($page['category']['permalink']=="SET HERE THE PERMALINK" or $page['category']['permalink']=="SET HERE A SECOND PERMALINK") { remove_event_handler('loc_begin_index', 'GThumb_init', 60); } }
Don't forget to activate the Personal Plugin and unset the template extension!
Offline
Hi
Thanks flop25 , third method looks better ;)
there is another question if it possible ! GThumb+ has a great feature that doubles the size of the first thumbnail, I wanna know is it possible to double size special photos instead of first one ?
for example vertical images or all images that are less than 360 pixel in width.
Thank you very much :)
Offline
•﹏• welcome back
It would require to change the plugin itself . Sponsoring : The theme stripped & columns have such options :-)
Offline
Hi again
Thanks Flop for your fast reply :)
you know what?! I can't do the third method :(
It is about an hour I'm trying to apply what ever you said in personal plugin , but still I can't make it , I donno whats the problem , I always get this message "Syntax error! File can't be saved."
Offline
add a ; after 'global page'
Offline
mistic100 wrote:
add a ; after 'global page'
Sooo quick :-D
Offline
Hi & Nice to see you Mistic
Thanks Flop and Mistic
Finally I couldn't do it :( I saved the code in personal plugin and activate it , but I got following errors and it didn't work :(
Notice: Undefined index: category in /piwigo/plugins/PersonalPlugin/main.inc.php on line 12
Warning: Cannot modify header information - headers already sent by (output started at /piwigo/plugins/PersonalPlugin/main.inc.php:12) in piwigo/include/page_header.php on line 105
maybe method 2 is good enough for me :D
Offline
I'm curious to get it working. Could you send a webmaster account. I swear it ill be quick
Offline
flop25 wrote:
I'm curious to get it working. Could you send a webmaster account. I swear it ill be quick
Sent ;)
Offline