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: [Solved]: plugin filter question  (Read 3501 times)

0 Members and 1 Guest are viewing this topic.

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 808
    • Timos-Welt
[Solved]: plugin filter question
« on: April 08, 2008, 09:24:42 pm »

I'm trying to use the $pic_row filter in a plugin.

What I did: Add a filter.

Code: [Select]
$thisplugin->add_filter('thumb_data','do_title');
The corresponding function (shouldn't do anything ATM but return $pic_row in its original state):

Code: [Select]
function do_title()
{
global $pic_row;
return $pic_row;
}

As far as I understand, the result should be no change. But in fact, the thumbs are gone. Why?

regards
Timo
« Last Edit: April 08, 2008, 10:10:29 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: plugin filter question
« Reply #1 on: April 08, 2008, 09:27:17 pm »

Should be

Code: [Select]
function do_title($pic_row)
{
return $pic_row;
}

What you are filtering is the parameter.
Logged

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 808
    • Timos-Welt
Re: plugin filter question
« Reply #2 on: April 08, 2008, 09:29:37 pm »

Thanks a lot! :)
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.