Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: [Solved]: plugin filter question  (Read 3499 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.