Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Poss. dumb Question, re: WebAdverts

Quote Reply
Poss. dumb Question, re: WebAdverts
Hi, if I wanted to use WebAdverts with links, why the heck couldn't I just insert the banner code into the templates, same as I would if I were doing any other html page?

--Sangi,
the moronic voice of reason Wink

------------------

--Sanguinarius
The Real Vampire Directory
www.sanguinarius.org/cgi-bin/links/pages/
Quote Reply
Re: Poss. dumb Question, re: WebAdverts In reply to
It will work fine on non-cgi pages, like home.html, category.html, new.html, cool.html, etc.

BUT for cgi pages, like add, modify, rate, and search, the SSI codes DO NOT work, because you cannot use standard SSI calls within cgi scripts!

Get it? Got it? good!

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. Smile
----------------------










[This message has been edited by Eliot (edited February 06, 2000).]
Quote Reply
Re: Poss. dumb Question, re: WebAdverts In reply to
I thought the SSI ones had to be used with .shtml pages. I'm seeting up a banner exchange and was planning on using the img tags. Now I'm confused.

Blargh. I guess I muck around with it and if something doesn't work the way it should, drag my scrawny lil butt backe here(and search first *lol*) for help.

Fangs..er, thanks! Wink

------------------

--Sanguinarius
The Real Vampire Directory
www.sanguinarius.org/cgi-bin/links/pages/
Quote Reply
Re: Poss. dumb Question, re: WebAdverts In reply to
Uh...right for the category pages, new page, top rate page, cool page, and home page, you can use SSI calls in .shtml or .html pages (depending if your server allows SSI calls in .html pages).

But the template pages that are used to create the .cgi pages, like the following:

add.cgi

add.html, add_error.html, and add_success.html

modify.cgi

modify.html, modify_error.html, and modify_success.html

rate.cgi

rate.html, rate_error.html, and rate_success.html

search.cgi

search.html, search_error.html, and
search_results.html

YOU CANNOT USE SSI CALLS. You have to use the WebAdverts Mod, or use something like INFRAMES to print the banners in these pages.

I REALLY don't know how to make this more clear for you.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Poss. dumb Question, re: WebAdverts In reply to
So the SSI calls, are they different or the same as the IMG calls?

Like, on a "typical" banner exchange the code is:

Quote:
<!-- Begin VITAE-Link Code --><A HREF="http://www.thecoven.org/vitaelink.htm"><IMG SRC="http://www.thecoven.org/vitaelink.gif" HEIGHT=60 WIDTH=60 ALT="VITAE-Link: Vampire Banner Exchange Network"></A><A
HREF="http://www.thecoven.org/cgi-bin/vitaelink/ads.cgi?advert=NonSSI&page=16"><IMG
SRC="http://www.thecoven.org/cgi-bin/vitaelink/ads.cgi?ID=Sanguinarius&page=16" HEIGHT=60 WIDTH=468 ALT="VITAE-Link: Vampire Banner Exchange Network"></A><BR><SMALL><A HREF="http://www.thecoven.org/vitaelink.htm">VITAE-Link: Vampire Banner Exchange Network</A></SMALL><!-- End VITAE-Link Code -->

I know he's using WebAdverts...

It says NonSSI...I think that's what I want to use?
Quote Reply
Re: Poss. dumb Question, re: WebAdverts In reply to
You can use the non-ssi option in the home.html file. HOWEVER you need to have different page numbers and that is why you cannot use the img tag for the Banner program in the category.html file!

The non-ssi codes can be used in the rate.cgi, modify.cgi, and add.cgi files, HOWEVER they cannot be used in the search.cgi files due to spanning result pages.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Poss. dumb Question, re: WebAdverts In reply to
I just finished setting up Webadverts to run with links 2.0. I was hoping to use the site_html.pl file but could not get it to take the varialble $banner = \&insertadvert which I set in the site_html_template.pl global file.

So what I did was switch to $build_use_templates = 1;
and used <%banner%> in my cgi-generated pages and <img src=/ad.pl?blah blah blah> directive in the other templates. Seems to work.

I would have liked to do this all in the site_html.pl file though if someone has any suggestions. Can you define $banner = \&insertadvert in the biggining and then use $banner in site_html.pl? I could not get that to work...

Rob
-----
Quote Reply
Re: Poss. dumb Question, re: WebAdverts In reply to
You should be able to.

What codes are you using in the insertadverts sub-routine?

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Poss. dumb Question, re: WebAdverts In reply to
That was fast ;-)

Here is the site_html_template.pl sub:sub insertadvert {
my $ad = `/path/to/dc_ads.pl`;
$ad =~ s,Content-type:\stext/html,,;
return $ad;
}

$banner output resulted in text numbers

Rob
-----
Quote Reply
Re: Poss. dumb Question, re: WebAdverts In reply to
If I am using the following code will it work?

Quote:
<!-- Begin Vampyre Nation Banner Exchange Code -->
<P><CENTER>
<SCRIPT LANGUAGE="JavaScript"><!--
random = parseInt(Math.random()*1000)
banner = '<A HREF="http://directory.vampyrenation.com/cgi-bin/webadverts/ads.pl?member=directory;banner=NonSSI;'
banner += 'page=' + random + '" TARGET="_blank">';
banner += '<IMG SRC="http://directory.vampyrenation.com/cgi-bin/webadverts/ads.pl?member=directory;'
banner += 'page=' + random + '" WIDTH=468 HEIGHT=60'
banner += ' ALT="Vampyre Nation Banner Exchange" BORDER=2></A>'
document.write(banner)
// -->
</SCRIPT>
<BR><SMALL><A HREF="http://directory.vampyrenation.com/banner.htm" TARGET="_blank">Vampyre Nation Banner Exchange</A></SMALL>
</CENTER>
<!-- End Vampyre Nation Banner Exchange Code -->
Quote Reply
Re: Poss. dumb Question, re: WebAdverts In reply to
RobZ,

Uh...You need to change the following codes:

Code:
my $ad = `/path/to/dc_ads.pl`;

Change the /path/to/ to YOUR absolute path!

Sanguinarius

I am not sure...Have you tried it? One thing I would change is the _blank value in the target attribute to something like _banwin. AS I have mentioned in many Threads, using _blank is a poor decision, because you will crash user's browsers.

Regards,

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Poss. dumb Question, re: WebAdverts In reply to
Can I change it to _top ?

I never have quite understood the different _things. About all I know is that _top gets rid of frames and Parent opens it in a new window.

--the ignorant webwiz
Quote Reply
Re: Poss. dumb Question, re: WebAdverts In reply to
Eliot,
>Change the /path/to/ to YOUR absolute path!

Yes I know that ;-) my actual path was to long to type here. What about symbolic links? I do have some short cuts. I will try with those symlinks.

Thanks again.
Rob
----

Quote Reply
Re: Poss. dumb Question, re: WebAdverts In reply to
Symbolic links will not work. It has to be the complete ABSOLUTE PATH to your ads.pl file.

You can change the target to anything you like, however, I would recommend against _blank, because it will open MANY new windows.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------