Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

need shtml to display

Quote Reply
need shtml to display
I am trying to run a banner ad script for links. I got everything working but the ads won't display.

I am using server side includes to display ads and my server requires that my pages end in .shtml for SSI The problem is the ad will not display unless the .shtml page is also displayed in the location field when called upon. If I type in /category/index.shtml, the ad displays, but links does not display the .shtml when building, just the directory itself.

Can I force links to print out the .shtml extension to get the ads working?

Cheers,

mic
Quote Reply
Re: need shtml to display In reply to
If you mean that banners do not appear in the .cgi pages, then you should use the WebAdverts FAQ to include banners in these pages....the FAQ is located in the Resource Center.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: need shtml to display In reply to
That's weird...anyway he means on his directory pages (I assume he's refering to www.cdnbusinessdirectory.com ), but the ads aren't showing on the cgi pages either. Since the ads are added by his server and not controlled by him, I don't see how the WebAdverts mod will help any.

Modifying the following line will add "index.shtml" to your category URLs.

Open site_html_templates.pl (templates) or site_html.pl (non-templates) and go to sub site_html_print_cat

find where it reads:
Code:
$output .= qq|<dl><dt><strong><a class="link" href="$url">$category_name</a></strong> <small class="numlinks">($numlinks)</small> |;
and add $build_index after $url, so it looks like this:
Code:
$output .= qq|<dl><dt><strong><a class="link" href="$url$build_index">$category_name</a></strong> <small class="numlinks">($numlinks)</small> |;

--Drew

[This message has been edited by junko (edited April 21, 2000).]
Quote Reply
Re: need shtml to display In reply to
junko is exactly right, assumptions and all.

However I added that snippet of code like you instructed but it still does not display index.shtml in the categories.

Quote:
# Then we print out the name linked, new if it's new, and popular if its popular.
$output .= qq|<dl><dt><strong><a class="link" href="$url$build_index">$category_name</a></strong> <small class="numlinks">($numlinks)</small> |;

ads work here www.cdnbusinessdirectory.com/Ontario/Living_and_Leisure/index.shtml the ads work

but not here www.cdnbusinessdirectory.com/Ontario/Living_and_Leisure/

same spot in cyberspace though.

mic

[This message has been edited by makker (edited April 21, 2000).]
Quote Reply
Re: need shtml to display In reply to
Well I assumed that would have worked... I've been meaning to update my pages for a while so I guess I might as well tinker with my copy and see why it ain't working.

A few minutes later...
It worked when I tried it on my offline copy. Did you modify the right file? rebuild?

[This message has been edited by junko (edited April 21, 2000).]
Quote Reply
Re: need shtml to display In reply to
That looked good to me too. I thought maybe inserting $build_index after $category_name in that same line of code might work, but I tried that and it didn't work.

Maybe I have to make it part of the globals??? If you figure it out let me know.

mic
Quote Reply
Re: need shtml to display In reply to
I am using templates and modified site_html_templates.pl and rebuilt..no go, the rebuilt again, cleared cache, closed the browser and reopened, still didn't work.

i'm going to look at it a third time. Show me your please, give me your link to the shtml categories
Quote Reply
Re: need shtml to display In reply to
Well, I tried it a third time and the categories are not displying the index.shtml extension.

Here is a copy of a build
Quote:
Building Category: Alberta/Justice_and_Law
Subcategories: 0
Links: 1
Directory: /home/users/cdnbiz/www/Alberta/Justice_and_Law
Filename : /home/users/cdnbiz/www/Alberta/Justice_and_Law/index.shtml

Does that look right to you? Also, I modified the links.cfg to this

Quote:
# The name of an index file.
$build_index = "index.shtml";
# The extension to use for non index files:
$build_extension = ".shtml";

Mic
Quote Reply
Re: need shtml to display In reply to
The link displayed in the admin screen is generated from nph-build.cgi and is not the same as what is built in your category pages.

1)Try adding $build_index to %globals

2)This should have the same effect as my earlier suggestion:

find:
Code:
$url = "$build_root_url/" . &urlencode($subcat) . "/";
change to:
Code:
$url = "$build_root_url/" . &urlencode($subcat) . "/$build_index";

and if that doesn't work either, maybe Eliot could help you figure it out.

--Drew

[This message has been edited by junko (edited April 22, 2000).]
Quote Reply
Re: need shtml to display In reply to
Hi junko,

I tried that last night and it didn't work.

Where do i find Elliot?

thanks for trying

mic
Quote Reply
Re: need shtml to display In reply to
You might want to try adding
DirectoryIndex index.shtml index.html /
to you .htaccess file.
Quote Reply
Re: need shtml to display In reply to
I just answered your duplicate Topic in the Modification Forum...which should be the forum to post problems like this.

Wink

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.