View Full Version : including SSIs into vBUlletin
Hi, I added the code
<?php
virtual("/centralad/ssirand.cgi?REGION=dating")
?>
into my templates but the script doe snot get executed at all? It works on .php pages, so I'm doing something wrong. Is this how you include ssis into vBUlletin?
I believe something like that can't be parsed trough the templates right now.
Excuse me if I'm wrong...
There is an admin option of:
useadvheader Yes No
Parse header as PHP code. In this case, the header variable must be specifically set in the header template. An example would be this:
//--Start header template--
$header = "<p>This is an advert</p>";
//--End header template
That is what you could use to show your advertising banner...
[Edited by wandrer on 06-03-2000 at 10:20 AM]
I am in the process of migrating to vB 1.1.3 from UBB 5.39c and would be really interested in how (if?) people got SSI working in the templates. Like others, I need to call WebAdverts via virtual("/cgi-bin/ads.pl"). The exact code that was used, where it was inserted (styles, header?) would be quite helpful...thanks!
Steve
This is probably the wrong way to go about this, but, if you need to get it up and running right away, you could just use PHP to INCLUDE a .shtml file, which would contain the code needed to call the banner script. You would probably need to have a different .shtml file for each region, so this may not be the best solution, but it would probably get you up and going right away.
This is what I'm suggesting, specifically:
Where you want the banner, use this code:
<?PHP include "ban_dating.shtml"; ?>
The file "ban_dating.shtml" would consist of a single line that said:
<!--#include virtual="/centralad/ssirand.cgi?REGION=dating"-->
Seems like it would work to me, though I haven't tested it.
If you want information on the issues that some users here have had with CentralAd, check the Chit Chat forum.
I stole and modified this script slightly from what werehere uses on his forum:
<iframe frameborder=0 height=80 marginheight=0 marginwidth=0 scrolling=no src="http://www.atwebsites.com/adserver/ssirand.cgi?REGION=vB" width=468>
<script language="JavaScript"><!--
random = parseInt(Math.random()*1000)
banner = '<A HREF="http://www.atwebsites.com/adserver/redirect.cgi'
banner += '" TARGET="_blank">';
banner += '<IMG SRC="http://www.atwebsites.com/adserver/getimage.cgi?REGION=vB'
banner += '" WIDTH=468 HEIGHT=60'
banner += ' ALT="Click Here!" BORDER=0></A>'
document.write(banner)
// --></script>
<noscript> <a href="http://www.atwebsites.com/adserver/redirect.cgi" target="_blank"><img src="http://www.atwebsites.com/adserver/getimage.cgi?CAMPAIGN=Burst" width=468 height=60 alt="Click Here!" border=0></a>
</noscript> </IFRAME> <!-- End Banner Code -->
It works beautifully. He uses webadverts, and I'm sure he'd be glad to share his code :)
I call a cgi through vB and it works fine! Here's how...
In our header template I've put <!--#include virtual="/<filename>.shtml" -->
(Change <filename> to whatever you want)
Then in the <filename>.shtml, I have the following : <!--#exec cgi="/cgi-bin/<filename>.cgi" -->
(Again change <filename> to whatever you want)
I've also used a similar trick to keep it within two frames, and that works great too :D
[Edited by Ciaran on 06-29-2000 at 11:21 AM]
thanks just what i needed as well... :D
astralight
07-03-2001, 10:24 PM
I tried Ciaran's way but it doesn't work. Upon viewing source, it isn't parsing the SSI.. its there in plain text. :/
Martin's won't work because the ad I have in the footer is rich media... and Central Ad cant serve Rich media through simple IMG and HREF source.
Any other ideas?
Would love to use php include...
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.