Announcement

#1 2013-01-20 20:10:41

Behrad
Member
2012-11-23
27

[resolved] GThumb+

Hello every one
Is it possible to use GThumb+ for photos of special album ,not for all albums ?

Offline

 

#2 2013-01-20 22:47:57

flop25
Piwigo Team
2006-07-06
6931

Re: [resolved] GThumb+

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


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#3 2013-01-20 23:09:10

ddtddt
Piwigo Team
Quetigny - France
2007-07-27
6758

Re: [resolved] GThumb+

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


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#4 2013-01-21 10:22:40

Behrad
Member
2012-11-23
27

Re: [resolved] GThumb+

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

 

#5 2013-01-21 10:36:51

flop25
Piwigo Team
2006-07-06
6931

Re: [resolved] GThumb+

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.


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#6 2013-01-21 11:19:02

Behrad
Member
2012-11-23
27

Re: [resolved] GThumb+

Hiii again
Many many thanks Flop25 , It was amazing, and now I should click on "set this topic as resolved" :-)

Offline

 

#7 2013-01-21 19:40:24

flop25
Piwigo Team
2006-07-06
6931

Re: [resolved] GThumb+

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 :

Code:

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

Code:

  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!


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#8 2013-01-23 10:07:27

Behrad
Member
2012-11-23
27

Re: [resolved] GThumb+

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

 

#9 2013-01-23 10:23:47

flop25
Piwigo Team
2006-07-06
6931

Re: [resolved] GThumb+

•﹏• welcome back
It would require to change the plugin itself .  Sponsoring : The theme stripped & columns have such options :-)


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#10 2013-01-23 11:20:04

Behrad
Member
2012-11-23
27

Re: [resolved] GThumb+

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

 

#11 2013-01-23 11:22:22

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3271

Re: [resolved] GThumb+

add a ; after 'global page'

Offline

 

#12 2013-01-23 11:24:36

flop25
Piwigo Team
2006-07-06
6931

Re: [resolved] GThumb+

mistic100 wrote:

add a ; after 'global page'

Sooo quick :-D


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#13 2013-01-23 12:13:15

Behrad
Member
2012-11-23
27

Re: [resolved] GThumb+

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

 

#14 2013-01-23 12:17:36

flop25
Piwigo Team
2006-07-06
6931

Re: [resolved] GThumb+

I'm curious to get it working. Could you send a webmaster account. I swear it ill be quick


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#15 2013-01-23 12:23:27

Behrad
Member
2012-11-23
27

Re: [resolved] GThumb+

flop25 wrote:

I'm curious to get it working. Could you send a webmaster account. I swear it ill be quick

Sent ;)

Offline

 

Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate Piwigo.org © 2002-2019 · Contact