The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
OK so I have a forum and I'm trying to modify my ad column. Basically I can edit the code for this column, which is similar to this:
Code:
<br /> <table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="$stylevar[tablewidth]" align="center"> <tr> <td> <table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" style="width:100%"> <tr align="center"> <td class="tcat"><span class="smallfont"><b>Advertisement</b></span></td> </tr> <tr> <td class="alt1" align="center"> <!-- ads go here --> </td></tr></table></td> </tr> </table> So I'd like to include a PHP script I wrote which will (for the sake of info here) randomly rotate a few ads. Easy script, no big deal. Code:
<?php require("/forums/random.php"); ?> Is there a work around for this, or will I need to resort to rewriting my handy script in javascript? Any help is appreciated!! =) |
#2
|
|||
|
|||
![]()
add: require_once('./random.php'); to you PHPINCLUDE_Start template.
|
#3
|
|||
|
|||
![]()
OK that's cool, but the PHP code I wrote is designed to be placed in the ad column itself, not anywhere else. It actively writes html to the client on page generation...
Even if I wrap the entire PHP code page in a function, I can't execute the function call from the ad column template since the PHP isn't parsed. Any further ideas? Or did I misunderstand your suggestion? Thanks! |
#4
|
|||
|
|||
![]()
POST your .PHP page here, and i'll change it so it can use the templates. BTW https://vborg.vbsupport.ru/showthread.php?t=83052
|
#5
|
|||
|
|||
![]()
ok, this is it
Code:
<!-- google adsense code --> <script type="text/javascript"> <!-- google_ad_client = "pub-0145864971037889"; google_ad_width = 160; google_ad_height = 600; google_ad_format = "160x600_as"; google_ad_type = "text_image"; google_ad_channel =""; google_color_border = "990000"; google_color_bg = "FFFFFF"; google_color_link = "660000"; google_color_url = "000000"; google_color_text = "000000"; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script> <!-- /google adsense code --> <p> <!-- 'other' ads code --> <?php // this is the array of ads; put the HREF and IMG tags on one line so as to keep spacing issues at bay. // you can add more wherever you want, but make sure the LAST element of this array has no comma afterwards. // ALSO IMPORTANT: replace double quotes with single quotes for each HREF/IMG code block given to you; just follow the way these are formatted. $ads = array( "<a href='http://www.dpbolvw.net/click-1685725-10376892' target='_top' ><img src='http://www.tqlkg.com/image-1685725-10376892' width='120' height='600' alt='The Tire Rack - Performance Specialists' border='0'></a>", "<a href='http://www.kqzyfj.com/click-1685725-10356334' target='_top' ><img src='http://www.awltovhc.com/image-1685725-10356334' width='125' height='125' alt='' border='0'></a>", "<a href='http://www.anrdoezrs.net/click-1685725-10278397' target='_top' ><img src='http://www.awltovhc.com/image-1685725-10278397' width='120' height='600' alt='Yahoo! Personals - Give Fate a Nudge!' border='0'></a>", "<a href='http://www.dpbolvw.net/click-1685725-10313648' target='_top' ><img src='http://www.tqlkg.com/image-1685725-10313648' width='120' height='600' alt='' border='0'></a>", "<a href='http://www.anrdoezrs.net/click-1685725-10384367' target='_top' ><img src='http://www.lduhtrp.net/image-1685725-10384367' width='125' height='600' alt='14 Months FREE Hosting at PowWeb!' border='0'></a>", "<a href='http://www.jdoqocy.com/click-1685725-10292668' target='_top' ><img src='http://www.afcyhf.com/image-1685725-10292668' width='125' height='125' alt='Reduce Your Credit Card Payments by 50%' border='0'></a>", "<a href='http://www.jdoqocy.com/click-1685725-5346684' target='_top' ><img src='http://www.afcyhf.com/image-1685725-5346684' width='120' height='240' alt='Find your Sould Mate' border='0'></a>", "<a href='http://www.jdoqocy.com/click-1685725-10374173' target='_top' ><img src='http://www.ftjcfx.com/image-1685725-10374173' width='160' height='600' alt='' border='0'></a>", "<a href='http://www.anrdoezrs.net/click-1685725-10363409' target='_top' ><img src='http://www.awltovhc.com/image-1685725-10363409' width='120' height='90' alt='JC Whitney Brand' border='0'></a>", "<a href='http://www.jdoqocy.com/click-1685725-10378650' target='_top' ><img src='http://www.afcyhf.com/image-1685725-10378650' width='120' height='240' alt='Find Cars for Sale Locally at LiveDealAutos.com' border='0'></a>", "<a href='http://www.jdoqocy.com/click-1685725-10382533' target='_top' ><img src='http://www.awltovhc.com/image-1685725-10382533' width='120' height='600' alt='GoDaddy $3.99 Domain Name Sale' border='0'></a>", "<a href='http://www.anrdoezrs.net/click-1685725-10383588' target='_top' ><img src='http://www.afcyhf.com/image-1685725-10383588' width='125' height='125' alt='$6.95 Web Hosting' border='0'></a>", "<a href='http://www.jdoqocy.com/click-1685725-10296928' target='_top' ><img src='http://www.tqlkg.com/image-1685725-10296928' width='120' height='90' alt='Click here for eBay Motors! ' border='0'></a>", "<a href='http://www.dpbolvw.net/click-1685725-10314239' target='_top' ><img src='http://www.awltovhc.com/image-1685725-10314239' width='125' height='60' alt='Do Even More' border='0'></a>", "<a href='http://www.jdoqocy.com/click-1685725-10382112' target='_top' ><img src='http://www.awltovhc.com/image-1685725-10382112' width='120' height='240' alt='PC-cillin' border='0'></a>" ); $keys = array_rand($ads, 3); // this is ad #1 echo $ads[$keys[0]] . "\n"; echo "<p>"; // ... ad #2 echo $ads[$keys[1]] . "\n"; echo "<p>"; // ad #3! echo $ads[$keys[2]] . "\n"; // feel free to add more/remove some ads by copy/pasting the "echo $ads..." line over and over. // * JUST make sure you change the # in the "$keys = array_rand..." line to reflect the # of ads you want to show. ?> <!-- /'other' ads code --> |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|