forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 plugins => Topic started by: Timos-Welt on April 08, 2008, 09:24:42 pm

Title: [Solved]: plugin filter question
Post by: Timos-Welt 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
Title: Re: plugin filter question
Post by: Nibbler 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.
Title: Re: plugin filter question
Post by: Timos-Welt on April 08, 2008, 09:29:37 pm
Thanks a lot! :)