Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: restricting plugin to certain albums only  (Read 4228 times)

0 Members and 1 Guest are viewing this topic.

badmi

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
restricting plugin to certain albums only
« 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
Logged

PirateZipp

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 34
  • Hotimage.dk
    • HotImage
Re: restricting plugin to certain albums only
« Reply #1 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
Logged
.

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: restricting plugin to certain albums only
« Reply #2 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.

PirateZipp

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 34
  • Hotimage.dk
    • HotImage
Re: restricting plugin to certain albums only
« Reply #3 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)
Logged
.

badmi

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: restricting plugin to certain albums only
« Reply #4 on: September 12, 2007, 03:56:49 pm »

Hi stramm,

thanks a lot, I will try this!

Regards, badmi
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.