Hi,
I'm trying to write something that works with:
gforum.cgi?action=guestbook
Now, this works fine:
# -----------------------------------------------------------------------------
# This subroutine will be called whenever the hook 'main' is run. You
# should call GT::Plugins->action(STOP) if you don't want the regular
# 'main' code to run, otherwise the code will continue as normal.
#
my (@args) = @_;
# Do something useful here
if ($IN->param('action') eq "guestbook") {
use GForum::Template;
my $do = $IN->param('do');
if (!$do) {
print $IN->header();
print GForum::Template->parse_print('error.html', { error => "FOO" } );
exit;
}
GT::Plugins->action(STOP);
}
return @args;
}
(the error.html bit is just to test the GForum::Template parsing bits :))
However, at the bottom of the page it shows:
I've attached a screenshot.
I've also tried:
# -----------------------------------------------------------------------------
# This subroutine will be called whenever the hook 'main' is run. You
# should call GT::Plugins->action(STOP) if you don't want the regular
# 'main' code to run, otherwise the code will continue as normal.
#
my (@args) = @_;
# Do something useful here
if ($IN->param('action') eq "guestbook") {
use GForum::Template;
my $do = $IN->param('do');
if (!$do) {
print $IN->header();
return GForum::Template->parse_print('error.html', { error => "FOO" } );
}
GT::Plugins->action(STOP);
}
return @args;
}
..but that prints out error.html, and then shows the normal page
Whats the correct way for printing out in GForum? I remember doing some stuff with PMManager back in 2004 - but all I can see in there, is stuff like:
return GForum::Template->parse_print('pmmanager_folder_page_sent.html', { pm_list => \@pms, %$vars } );
..and somehow, that seems to work right - so I'm not sure what I'm doing wrong :(
TIA for any suggestions .. in the mean time, I'll keep playing here =)
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
I'm trying to write something that works with:
gforum.cgi?action=guestbook
Now, this works fine:
Code:
sub main { # -----------------------------------------------------------------------------
# This subroutine will be called whenever the hook 'main' is run. You
# should call GT::Plugins->action(STOP) if you don't want the regular
# 'main' code to run, otherwise the code will continue as normal.
#
my (@args) = @_;
# Do something useful here
if ($IN->param('action') eq "guestbook") {
use GForum::Template;
my $do = $IN->param('do');
if (!$do) {
print $IN->header();
print GForum::Template->parse_print('error.html', { error => "FOO" } );
exit;
}
GT::Plugins->action(STOP);
}
return @args;
}
(the error.html bit is just to test the GForum::Template parsing bits :))
However, at the bottom of the page it shows:
Quote:
1I've attached a screenshot.
I've also tried:
Code:
sub main { # -----------------------------------------------------------------------------
# This subroutine will be called whenever the hook 'main' is run. You
# should call GT::Plugins->action(STOP) if you don't want the regular
# 'main' code to run, otherwise the code will continue as normal.
#
my (@args) = @_;
# Do something useful here
if ($IN->param('action') eq "guestbook") {
use GForum::Template;
my $do = $IN->param('do');
if (!$do) {
print $IN->header();
return GForum::Template->parse_print('error.html', { error => "FOO" } );
}
GT::Plugins->action(STOP);
}
return @args;
}
..but that prints out error.html, and then shows the normal page
Whats the correct way for printing out in GForum? I remember doing some stuff with PMManager back in 2004 - but all I can see in there, is stuff like:
return GForum::Template->parse_print('pmmanager_folder_page_sent.html', { pm_list => \@pms, %$vars } );
..and somehow, that seems to work right - so I'm not sure what I'm doing wrong :(
TIA for any suggestions .. in the mean time, I'll keep playing here =)
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates

