forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 plugins => Topic started by: badmi on September 06, 2007, 02:59:01 pm

Title: restricting plugin to certain albums only
Post by: badmi on September 06, 2007, 02:59:01 pm
Hello,

I want to use the image link plugin that shows text below the intermediate image (bbcode).

How do I restrict the plugin that it only is executed in certain albums, and not in all albums, as it does by default?

Thank you very much for your help!

Regards, badmi
Title: Re: restricting plugin to certain albums only
Post by: PirateZipp on September 07, 2007, 03:10:26 pm
i'm in with this.. will be cool if you can have a chekbox in the album promitions :D

- PirateZipp
Title: Re: restricting plugin to certain albums only
Post by: Stramm on September 07, 2007, 09:02:23 pm
No checkbox but a lil code modif. Add within the function bbcode_add_data right after
Code: [Select]
global $CONFIG;that code
Code: [Select]
$forbidden = array(2,3,4,5,6,7,8);
if (in_array($pic_data['aid'],$forbidden)) {
return $pic_data;
}

In the forbidden array place the album ids of the albums you do not want to show the bbcode data for.
Title: Re: restricting plugin to certain albums only
Post by: PirateZipp on September 07, 2007, 11:56:44 pm
ohh thx..


i hope som1 come up with a checkbox befor me.. (i'm new in php so it gonna take me som time.. but i got the idea of how)
Title: Re: restricting plugin to certain albums only
Post by: badmi on September 12, 2007, 03:56:49 pm
Hi stramm,

thanks a lot, I will try this!

Regards, badmi