Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Adding SSI call tag

Quote Reply
Adding SSI call tag
I want to add random images or test instead of the logo. I can do this using SSI, but how would I add the SSI call tag? I am thinking this would be done as a global? Any insight into how this may be done would be appreciated.
Unimpressed
BTW- I just finished installing gforum and it’s great! (but then again what else would you expect from GT.?)

Quote Reply
Re: [jgkiefer] Adding SSI call tag In reply to
You can define a global variable as a sub, and put the code of the file you would usually call with SSI into the sub.

Example:

1) define global: randomlogo as

Code:
sub { code if file usually called by SSI goes here;}
2) include <%randomlogo%> in your templates.


Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Adding SSI call tag In reply to
Gee that was a quick reply.Shocked

I am not clear on the syntax-

Should it be?

sub { exec cgi="/script/path/script.cgi";}

or

sub { <!--#exec cgi="/script/path/script.cgi" -->;}

Thanks-


Quote Reply
Re: [jgkiefer] Adding SSI call tag In reply to
sub {

my $rand = int(rand(10));
my $result = "<img src=http://www.someurl.com/images/image$rand.gif>";

return $result;

}

Something like that :)

Then name your images, image0.gif, image1.gif etc

Last edited by:

PaulW: Nov 22, 2001, 7:27 AM
Quote Reply
Re: [PaulW] Adding SSI call tag In reply to
Actually I want to call a cgi.

<!--#exec cgi="/script/path/script.cgi" -->

How migjt this be done?
Unsure
Quote Reply
Re: [jgkiefer] Adding SSI call tag In reply to
Hi,

You could do:

randomtag => sub {
return `/full/path/to/script.cgi`;
}

and then put:

<%randomtag%>

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Adding SSI call tag In reply to
Thanks!
Quote Reply
Re: [Alex] Adding SSI call tag In reply to
Alex,
I can't seen to get this global to work. It prints the path instead of calling the program??

Quote Reply
Re: [jgkiefer] Adding SSI call tag In reply to
Did you use backticks, and not quotes.. i.e. `, not '.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [jgkiefer] Adding SSI call tag In reply to
Try:

Code:
randomtag => sub {
return qx|/full/path/to/script.cgi|;
}

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] Adding SSI call tag In reply to
hi

the codes above work fine

but i cannot include html tags.

for ex. it appears like <IMG SRC="mysite/img/img.gif"> in my forum page instead of the real image. The Html code is not accepted.

(the cgi script that i use to include the image in a page works perfectly with ordinary pages or with Gossamer Links)

you see a way to include HTML ?
Quote Reply
Re: [jigme] Adding SSI call tag In reply to
Try using:

my $out = qx|/full/path/to/script.cgi|;
return \$out;

instead of:

return qx|/full/path/to/script.cgi|;

....I don't guarantee it works though as I may have diagnosed the wrong problem Wink

Last edited by:

Paul: Aug 31, 2002, 3:14 PM
Quote Reply
Re: [Paul] Adding SSI call tag In reply to
it half-worked before but it does not work at all now with this new code

thanx for your answer. cheers.
Quote Reply
Re: [jigme] Adding SSI call tag In reply to
I didn't think it would, I just remember that a reference was needed in past cases when html wasn't interpretted properly so just took a wild guess.
Quote Reply
Re: [jgkiefer] Adding SSI call tag In reply to
Hi,

I use the script executer.cgi to emulate SSI calls in my Gforum. It works perfectly. It should work for you too! Wink

François

Last edited by:

Franco: Aug 31, 2002, 9:03 PM