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

Re: [jdgamble] include banner in cgi

Quote Reply
Re: [jdgamble] include banner in cgi In reply to
I got it to work without messing with the internal workings of linksSQL and loading the banner locally.

In global.txt I created this sub routine:

Code:
sub banner {
#------------------------------------------------------------------my $ad; if ($ENV{'SCRIPT_NAME'} =~ /nph-build/) {
$ad = '<!--#exec cgi="/cgi-bin/random/ads.cgi" -->';
}
else {
$ad = `/my_full_paths/cgi-bin/random/ads.cgi`;
$ad =~ s,Content-type:\stext/html,,;
}
return $ad;
}


in my dump I added:
'banner' => \&banner,

And in my include_menu template I added <%banner%>. The banner works fine on every page and will change.

If this helps anyone out let me know (I'm curious)...

Meanwhile... I will be working on a way to simply insert php or other perl files into the system using a similar fashion...

Thanks for the suggestions,

- Jonathan

Last edited by:

jdgamble: Jul 29, 2004, 4:11 PM
Subject Author Views Date
Thread include banner in cgi jdgamble 4377 Jul 27, 2004, 10:54 PM
Thread Re: [jdgamble] include banner in cgi
imp 4294 Jul 28, 2004, 2:25 AM
Thread Re: [imp] include banner in cgi
jdgamble 4293 Jul 28, 2004, 5:23 PM
Post Re: [jdgamble] include banner in cgi
imp 4277 Jul 29, 2004, 1:59 AM
Post Re: [jdgamble] include banner in cgi
afinlr 4265 Jul 29, 2004, 7:56 AM
Thread Re: [jdgamble] include banner in cgi
afinlr 4285 Jul 29, 2004, 8:45 AM
Thread Re: [afinlr] include banner in cgi
jdgamble 4288 Jul 29, 2004, 12:46 PM
Thread Re: [jdgamble] include banner in cgi
afinlr 4300 Jul 29, 2004, 1:17 PM
Thread Re: [afinlr] include banner in cgi
jdgamble 4292 Jul 29, 2004, 2:06 PM
Thread Re: [jdgamble] include banner in cgi
jdgamble 4283 Jul 29, 2004, 4:10 PM
Post Re: [jdgamble] include banner in cgi
jdgamble 4262 Jul 29, 2004, 4:18 PM