Gossamer Forum
Home : Products : Gossamer Forum : Development, Plugins and Globals :

Re: [Wychwood] Plugins - how toi print out content, and stop "1" showing at bottom of page?

Quote Reply
Re: [Wychwood] Plugins - how toi print out content, and stop "1" showing at bottom of page? In reply to
Hi,

Quote:
As a programmer I'm surprised you don't know the reason for a "1" showing at the bottom of your page.

Normally, it means it getting a "return" of TRUE (i.e the 1) .. but I didn't think that was the case in this.

Quote:
GT::Plugins->action(STOP);

....in the wrong place (i.e. AFTER you have already returned instead of before, so it never gets called).

Ya, that was a silly one =) Its not needed anyway, as the way this plugin uses "actions", so its not actually calling a plugin hook , which is why that function call would normally be use Smile

Quote:
As for the "1", it's probably because you are printing a print.....

print GForum::Template->parse_print('error.html', { error => "FOO" } );

Try:

GForum::Template->parse_print('error.html', { error => "FOO" } );

OMG - you're a star!!!! Works a charm. I can't believe it was so simple.

I tried so many different ways (print, return GT::Template, return 'template', {vars}, and more) - and all it needed was the print taken out.

Thanks again - thats really made my day Smile (not sure why GT couldn't have given some advise too :/)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Subject Author Views Date
Thread Plugins - how toi print out content, and stop "1" showing at bottom of page? Andy 3354 Feb 21, 2008, 4:44 AM
Post Re: [Andy] Plugins - how toi print out content, and stop "1" showing at bottom of page?
Andy 3185 Feb 22, 2008, 8:57 AM
Thread Re: [Andy] Plugins - how toi print out content, and stop "1" showing at bottom of page?
Wychwood 3184 Feb 22, 2008, 10:47 AM
Post Re: [Wychwood] Plugins - how toi print out content, and stop "1" showing at bottom of page?
Andy 3172 Feb 22, 2008, 11:48 PM