Moderated by: FocalMedia Team, Miles, Gerrit, Rian

FocalMedia.Net Forums » Turbo Seek »  Discussions, Suggestions & Tips, Tricks

Page: 1 of 1

« Back to Topic Index Page 3 | Replies: 2

 Author  Topic: Use of SSI or CGI in templates
  Trying

New Member
  

    
Post a Reply To This Topic    Reply With Quotes     Edit Message     View Profile of Trying 
Hi

Hopefully somebody could help me here with these couple of queries:-

1. My understaanding is that you cannot use ssi within the templates - is that correct? (something to do with the parsing?)

2. I used to maintain my menus/text adverts over multiple pages via ssi as it made updating extremely simple. I wish to use the 'defined custom templates' option but do not want to have to update every template when I make an alteration. Temporarily to overcome this I am experimenting with 'html rotate' (pretty good!!!) but I am concerned that in some circumstances this could be problematic i.e. someone has java un-enabled , and hence my navigation menus would fail to show. Therefore is there a way of incorporating an additional cgi script to handle this ?

I am definately a newbie at this but I have experimented with tsbuild and calling an additional script - however it won't run the script and comes back with the following error:-

Can't modify bitwise and in scalar assignment at /home/sites/www.foo.co.uk/web/cgi-bin/plugit.pl line 9, near mainmenu.txt;

As I said I am no expert so I would appreciate any help that you can provide. This is the script I am using:-

*****************************************************
#!/usr/bin/perl


sub PlugIt
{
$plugit=mainmenu.txt;

open (PLUG,$plugit) | | die can't open $plugout;
$plugit=mainmenu.txt;
while ( ){$plugit .=$_;}
close(PLUG);

print Content-type: text/html\n\n;
print $plugit;

}
1;
*******************************************************

and I am calling it by using the following:-

%%plugit%%

Is the script OK? am I calling it correctly? Is it actually possible to do this?

like I said any help would be greatly appreciated - thanks in advance


Total Posts: 12 | Joined: Dec 15, 2002 - 4:23pm | IP Logged

  FocalMedia Team

Moderator
  

    
Post a Reply To This Topic    Reply With Quotes     Edit Message     View Profile of FocalMedia Team 
If you run an HTML generated directory you can use SSI's in generated pages.

Ver 2.0 has built in 'includes' that you can use like SSI's in any templates.

The script should look something like this:
(You need qoutes around the file names.)

*****************************************************
#!/usr/bin/perl


sub PlugIt

{

$plugit="/server/path/to/mainmenu.txt ";



open (PLUG,$plugit) | | die can't open $plugout;

while (defined($line=<PLUG>))

{$plugit = $plugit . $line;}

close(PLUG);



print Content-type: text/html\n\n;

print $plugit;



}




*******************************************************

Miles
Miles


Total Posts: 1453 | Joined: Jul 27, 2002 - 4:28am | IP Logged

  Trying

New Member
  

    
Post a Reply To This Topic    Reply With Quotes     Edit Message     View Profile of Trying 
Many Thanks - Miles!


Total Posts: 12 | Joined: Dec 15, 2002 - 4:23pm | IP Logged


Lock Topic

 

Forum Legend

New Member

Reply to topic

More than 50 posts | Member

Reply to topic with quoted message

More than 100 posts | Full Member

Edit Message

More than 150 posts | Advanced Member

View profile

More than 200 posts | Advanced Member

Email member