Gossamer Forum
Home : Products : Links 2.0 : Customization :

SSI and Subcategories

Quote Reply
SSI and Subcategories
Is somebody know how to solve my problem..
in category.shtml I have declared my SSI as follow



Everything is working well for home anf 1st category but not for the subcategory behind the 1st one. The problem is on the subcategory it doesn't find "WWWAdvertsSSI.cgi" . I have tried many combinaison of path but nothing works !! Please help.

My directory are as follow :

/web
/web/home.shtml
/web/cgi-bin/
/web/category1/
/web/category2/ (hier it 's working)
/web/category2/subcategory1/(hier it 's not working)
/web/category2/subcategory2/(hier it 's not working)



Quote Reply
Re: SSI and Subcategories In reply to
You need to include complete RELATIVE paths to your CGI scripts that
you attempting to "include" via SSI...(as stated a few times in this forum)....

EXAMPLE:

< !--#include virtual="/cgi-bin/somescript.cgi-- >

OR

< !--#exec cgi="/cgi-bin/somescript.cgi-- >

See the BOLDED codes...see the forward slashes???

And also, remove the spaces before and after the arrows, since this forum does
not accept SSI call codes within POSTS, I had to put spaces BEFORE and AFTER.

Regards,

Eliot Lee
Quote Reply
Re: SSI and Subcategories In reply to
thank you for you quick reply but it still doesn't work..any idea ??

Quote Reply
Re: SSI and Subcategories In reply to
May be if you provide the codes you are using, we could help you! Tongue

Regards,

Eliot Lee
Quote Reply
Re: SSI and Subcategories In reply to
thank you for you help!!

here is the code contained in category.shtml to call SSI

<!--#include virtual="../cgi-bin/WWWAdvertsSSI.cgi"

this one is working on home page and 1st page of subcat. Nothing else behind.

If i using the code that you gave nothing is working.

thank you in advance

regards

JML

Quote Reply
Re: SSI and Subcategories In reply to
That is quite strange...because the codes I gave you SHOULD work...check the codes again and make sure that you have saved the template files before re-building your directory files.

Regards,

Eliot Lee
Quote Reply
Re: SSI and Subcategories In reply to
Actually, what happens is that when building the templates, you specify location as "directory/script.cgi" whereas for the other levels, obviously it can't find the location. Therefore the script of header and footer works for some pages but doesn't work on others. For the best example, visit www.khyber.org and you will see there of whats the problem. I haven't figured it out myself because for some reason, my ssi can't recall if i give complete location like http://www.khyber.org/cgi/script.cgi or /data1/virtualave.net/id/public_html/cgi/script.cgi
If it can retrieve the page somehow using complete address then this problem can be solved but till now i haven't figured it out yet :D

Quote Reply
Re: SSI and Subcategories In reply to
whenincluding a virtual just put the /filename in and then make sure this file is in your root folder. It doesnt matter how many levels you go down, you will always get the file you want displayed.



Regards

MDJ1
http://www.isee-multimedia.co.uk
Quote Reply
Re: SSI and Subcategories In reply to
thank you for you reply

What should i write in my category.shtml to be sure that it will work in any sub category

regards

JML

Quote Reply
Re: SSI and Subcategories In reply to
I am back on my ssi problem but what do you mean by relativ path ??

regards

JML

Quote Reply
Re: SSI and Subcategories In reply to
place the following in the shtml file where you want the information to be included

< !--#include virtual="/navigate.txt"-- >

Change the filenameand ext. to your requirements then place the file in the root folder on your account. ie /home/mydomain/public_html

hope this works for you.



Regards

MDJ1
http://www.isee-multimedia.co.uk
Quote Reply
Re: SSI and Subcategories In reply to
Mark...you need to use spaces within SSI call codes...this forum does not support raw SSI call coding...so, you have to use spaces...don't see anything in your post.

Regards,

Eliot Lee
Quote Reply
Re: SSI and Subcategories In reply to
I'm encountering the same issues, but i've sortof tracked the issue down to the .cgi aspects of the Links system. any page that is called through cgi prevents the SSI from working (add.cgi, modify.cgi, etc.) -- the links that point to normal html files (what's new, top rated) work just fine.

note: i've tried using <%include filename%> and even created a new tag in the site_html_templates.pl file and the result is the same: the codes parse as normal html rather than as includes.

Here are the tags i've used:
<%ue_top%> -- custom tag 'hard coded' into site_html_templates.pl
<%include ue_top.txt%> -- standard include to a text file

here are the includes:
< !--#include virtual="/cgi-bin/nav.txt"-- > -- some navigation
< !--#exec cmd="/gs/web/addb/adsource/adreq.pl 00004"-- > -- ad banner
< !--#exec cgi="/cgi-bin/axs/ax.pl"-- > -- site tracker.

What's interesting about the site tracker is that it's coded into the template rather than brought in via a <%include%> or through the custom tag, and it doesn't work either.

again, it's only on the templates that are called via cgi (add.cgi, modify.cgi, etc.)

The real drag is that I designed my layout to use SSI calls for ads as well as some overall site navigation.

:\

feel free to check out the site, it's still pretty bare-bones, but you can view the source on the problematic pages and see that the includes are there.

http://www.unrealengine.com/...inks/pages/Tutorials



Andrew "Hobeaux" Penick
http://www.unrealengine.com
Quote Reply
Re: SSI and Subcategories In reply to
To include other Perl scripts within Perl scripts, you need to use the WebAdverts Mod, which is referenced within this forum.

Regards,

Eliot Lee
Quote Reply
Re: SSI and Subcategories In reply to
the only WebAdverts mod that's available on the resources area (nothing in the faq) does not work with templates, which i'm using.

however, i got lucky and found a post by you on the subject back in May that covered two of my three requests -- ad banners and site tracking.

unfortunately, i don't now how to tweak it to allow an include of a text file. below is what I have:

Code:
%globals = (
date => &get_date,
time => &get_time,
db_cgi_url => $db_cgi_url,
build_root_url => $build_root_url,
site_title => $build_site_title,
css => $build_css_url,
subcatstyle => $subcatstyle,
tracking => \&site_tracking,
ue_nav => \&navigation,
bannerad => \&banner_ad,
banner => ''
);


sub navigation {
#---------------------------------------------------------
# Insert Main Navigation
my $ad = `/home/net/yellow/unreal/public_html/cgi-bin/nav.txt`;
$ad =~s,Content-type:\stext/html,,;
return $ad;
}


sub banner_ad {
#---------------------------------------------------------
# Insert Banner Ad
my $ad = `/gs/web/addb/adsource/adreq.pl 00000`;
$ad =~s,Content-type:\stext/html,,;
return $ad;
}
.
I've also tried putting the text file in the templates directory and various permissions settings but to no avail.

So, to reiterate the dilemma: I'm including a text file which I would like to include yet -another- text file. The methods i've attempted thus far are:

<%ue_nav%>
<include ue_nav%>

hm. perhaps it's just a daft idea to try that. felt it would be easier to maintain a single text file across the entire website rather than two (one for the main site, one for the links site). not a huge issue if it cannot be easily resolved.

on a further note, does anyone know of a tweak to the WebAdverts mod that allows it to work on Templates? I haven't tried tinkering with it yet due to that fact.

Andrew "Hobeaux" Penick
http://www.unrealengine.com
Quote Reply
Re: SSI and Subcategories In reply to
thant you for your reply but it doesn't work...any idea what to do to solve my problem...

regards

Jean Michel

Quote Reply
Re: SSI and Subcategories In reply to
Hi There,

Try adding the following to your root directory.

copy and past the text into notepad or other similar text editor. Upload to the server as mytext.txt etc. and then rename to .htaccess

Code:
AddType text/html .shtml
AddHandler server-parsed .shtml
Options Indexes FollowSymLinks Includes
DirectoryIndex index.shtml index.html


Regards

MDJ1
http://www.isee-multimedia.co.uk