Description: This is a simple rotation tool, which pulls banners (or content) from a private forum and feeds it randomly into a box at the top of your site, just above your menu bar. There is an option to stick a particular banner, rather than using the random rotation, in the event of something you wish to promote, like a special or a sale.
Info/Instructions: This allows you to store, add, edit or delete your banners just by adding or removing them from a "hidden" forum. Simple Interface. Verified instructions work fine for 6.3.
You have no code header section for the banners - although I have not looked at this hack - my suggestion is to check the bits relevant to adding the banners to the tmpl files.
Hey Josh Installed this mod but when I paste HTML it doesn't translate. I see the code appear on top. I verified that HTML is turned on.. amy I missing something?
Yeah, at measurection I actually use it at the top and bottom. You'll see how you simply "include" the file right below the menu bar.... you can do the same before the ubbt_footer.tmpl.
Great.. I just had a few local businesses who asked about putting a small banner on the site.. and about 10 minutes later I see this hack Perfect timing
I have not downloaded this one but if there was something you had to edit when installing the hack in that file I would look at the lines you edited because sometimes the error can be thrown down the page like when parentheses is missed. Now a missing ; or " should be on the line stated.
This is in the instructions
If you wish to use a board keyword other than "banners" you can edit the $boardkeyword variable at the top of the included bannerad.php file.
#### #### Add a config variable ####
In your admin menu, edit the config file. Scroll to the very bottom, into the box of extra/unknown variables, add this: $config['banner'] = '';
Did you edit the banner keyword to something else? Did you add the variable above to the admin control panel?
If you edited the variable in the bannerad.php file make sure you have it like this "newname";
Oh Poo! I've re-hacked the ubbt.inc file from afresh, and it hasnt made any difference. I still get the same error. Help me Oh Knowledgeable ones! lol!
By default the program has a keyword of banners. The one in the install file has banner. I opened the zip and checked. If your line 30 is not what I stated I highly suggest downloading another copy from here.
Make sure you have the banner keyword set with the variable that needs to be set in the config.inc.php file and the one set in the bannerad.php file.
Info/Instructions: This allows you to store, add, edit or delete your banners just by adding or removing them from a "hidden" forum. Simple Interface. Verified instructions work fine for 6.3.
[/]
Is anyone here running this on 6.2? I still cant get it to work omegatron
I took your Mod and instead of putting the display in the ubbt.inc.php file I put it into the header.php include file. This way it shows up on the top right of my screen where I have blank space anyways.
Here is what my /includes/header.php file looks like for anyone else interested. I did change some table properties in the header.php and in the Mod to get this how I wanted it to look. I took out the table properties in the Mod all together since it was going into a table already.
You can look on my website to see how it looks.
Code
<br /><table border="0" cellpadding="1" cellspacing="0" width="95%" class="tablesurround" align="center"> <br /><tr> <br /><td align="center"> <br /><table border="0" cellpadding="1" cellspacing="0" width="100%" class="tableborders" align="center"> <br /><tr> <br /><td align="center"> <br /><table border="0" cellpadding="0" cellspacing="0" width="70%" align="left"> <br /><tr> <br /><img src="http://www.tampainsider.com/images/tampains_logo.gif"><br /></tr> <br /><br /><table border="0" cellpadding="0" cellspacing="0" width="30%"><br /><tr valign="middle"><br /><br /><?<br /> $boardkeyword = "banners";<br /> <br /><br />// -----------------------------------------------<br />// End of variables - do not edit below this line<br /><br /><br /><br />// ---------------<br />// Lets pull a random banner ad - by JoshPet<br /><br /> if ($config['banners']) {<br /> $query = "<br /> SELECT B_Subject,B_Body<br /> FROM {$config['tbprefix']}Posts<br /> WHERE B_Board = '$boardkeyword'<br /> AND B_Number = {$config['banners']}<br /> ";<br /> }<br /> else {<br /> $query = "<br /> SELECT COUNT(*)<br /> FROM {$config['tbprefix']}Posts<br /> WHERE B_Board = '$boardkeyword'<br /> ";<br /> $sth = $dbh -> do_query($query);<br /> list($totalcount) = $dbh -> fetch_array($sth);<br /> $dbh -> finish_sth($sth);<br /><br /> $RandNumber = 0;<br /> if ($totalcount > 1) {<br /> $RandNumber = rand(0,($totalcount -1));<br /> } <br /><br /> $query = "<br /> SELECT B_Subject,B_Body<br /> FROM {$config['tbprefix']}Posts<br /> WHERE B_Board = '$boardkeyword'<br /> LIMIT $RandNumber,1<br /> ";<br /> }<br /> $sth = $dbh -> do_query($query);<br /> list ($Title,$Banner)= $dbh -> fetch_array($sth);<br /> $dbh -> finish_sth($sth);<br /><br /> $html = new html;<br /> list($tbopen,$tbclose) = $this -> table_wrapper();<br /><br />// If we found the banner, we'll send the output<br />// otherwise there just won't be a box.<br />if ($Banner) {<br />echo "<br /><b><font color=\"blue\"><u>Did You Know...</u> - <i>$Banner</i></b></font><br />";<br />}<br />?><br /></tr><br /></table><br />
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.