Gossamer Forum
Quote Reply
GUI Hook

I am currently trying to write a plugin to hook into "gui_post_display_options" since this controls the formatting and logic of the display options on top of each posting.

I am looking at the dispatch code by Gossamer in GUI.pm, specifically in the function draw() around line 191.

my $return = GT::Plugins->dispatch($CFG->{admin_root_path} . '/Plugins/GForum', "gui_$input{draw}", $GUI{$input{draw}}, %input);
$return = $GUI{$input{draw}}->(%input);

My question is this. After you dispatch the plugins in the first line above using the dispatch function and retrieving the output into the variable $return, why do you call $GUI{$input{draw}}->(%input) again on the second line to overwrite whatever is in $return? If you do so, then what is the use of calling dispatch in the first place since it has no way of altering the $return variable.

I have commented this portion of the code in GUI.pm and my plugin works fine now. However I am not sure if I am doing things correctly since I should not be touching the gforum codes in the first place. Please advice. Thanks. Smile


Last edited by:

dauhee: Jan 24, 2004, 10:27 AM
Quote Reply
Re: [dauhee] GUI Hook In reply to
Yes, this appears to be a bug; removing the second line should fix it.

Jason Rhinelander
Gossamer Threads