UBB.Dev
Posted By: JoshPet [6.2] Banner Ad Rotator - 02/24/2003 11:04 AM
Mod Name: Banner Ad Rotator 1.0

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.

Since this simply pulls post content... it could be used for anything... random quotes, joke of the day, etc... it simply pulls the post body... text or images.

Author: JoshPet of www.joshuapettit.com
        For discussion and bug reports go to www.ubbdev.com

Credits: Commissioned by www.drugbuyers.com

Demo: www.measurection.com

Date: 2/24/03

Working Under: 6.2

Files Modified: ubbt.inc.php

New Files: bannerad.php

Database Modifications: None

Notes: This allows you to store, add, edit or delete your banners just by adding or removing them from a forum. Simple interface.


Attached File
70615-BannerAdRotator1.0.zip  (45 downloads)
Posted By: smilesforu Re: [6.2] Banner Ad Rotator - 02/24/2003 11:16 AM
cool mod... can it be turned off and on?
Posted By: JoshPet Re: [6.2] Banner Ad Rotator - 02/24/2003 5:08 PM
If the "banner" forum is empty nothing will appear.
Posted By: smilesforu Re: [6.2] Banner Ad Rotator - 02/25/2003 3:10 AM
Cool I can just move them to a hidden forum... Thanks Josh another great mod
Posted By: caspe7_dup1 Re: [6.2] Banner Ad Rotator - 03/02/2003 11:07 PM
For some reason i'm getting this "Parse error: parse error in /www/prowrestlingforum.com/threads/bannerad.php on line 92"
Posted By: JoshPet Re: [6.2] Banner Ad Rotator - 03/02/2003 11:16 PM
I can't see why there would be a parse error there. It's in the echo of the output, and halfway through it at that.

Did you do any editing?
Posted By: caspe7_dup1 Re: [6.2] Banner Ad Rotator - 03/02/2003 11:30 PM
Nope, i've installed it twice just to make sure that I didn't mess up the first time

Well i've installed mods (not part of this)
Posted By: Kel Re: [6.2] Banner Ad Rotator - 03/11/2003 7:09 AM
I'm getting it too. Have done the hack twice.

[]Parse error: parse error, unexpected $ in my directory/ubbthreads/bannerad.php on line 92
[/]Funny thing is... there is no $ on line 92. There is one on line 91 but it's a necessary one.
Posted By: Kel Re: [6.2] Banner Ad Rotator - 03/11/2003 6:36 PM
Any feedback on this yet?
Posted By: JoshPet Re: [6.2] Banner Ad Rotator - 03/11/2003 6:39 PM
Ah I missed this.

Maybe making a template for it will solve the issue.

I'll look at this in a bit when I get time and see if that solves it.
Posted By: Kel Re: [6.2] Banner Ad Rotator - 03/11/2003 6:46 PM
Thank you, I appreciate it..

I was all set to go with this... even had the first banner of "This space for rent" all made up.
Posted By: Kel Re: [6.2] Banner Ad Rotator - 03/19/2003 2:42 AM
Hate to be a PITA on this... but I really, really need this one... really!

Any chance of figuring out what that parse error means and how to fix it? Please? (if I could find a begging smilie, I'd insert it here)
Posted By: JoshPet Re: [6.2] Banner Ad Rotator - 03/19/2003 2:43 AM
Ah I'd forgotten. I"ll take a look in a bit.
Posted By: Kel Re: [6.2] Banner Ad Rotator - 03/19/2003 2:44 AM
Thanks much!!!
Posted By: caspe7_dup1 Re: [6.2] Banner Ad Rotator - 03/19/2003 2:52 AM
thanks, I'm waiting for the fix too.
Posted By: JoshPet Re: [6.2] Banner Ad Rotator - 03/19/2003 2:53 AM
Sasha, caspe7... I'm kind of stumped on this...as the error is within the HTML. But I changed this to use a template instead.

Try this and see if it works (attached to this post). Let me know. This has a template file to be put in /templates/default directory.

Attached File
Posted By: Kel Re: [6.2] Banner Ad Rotator - 03/19/2003 2:59 AM
I'm trying it. I'll report back in a few minutes.

Posted By: Kel Re: [6.2] Banner Ad Rotator - 03/19/2003 3:27 AM
Now I have this error:

[]Parse error: parse error, unexpected $ in my directory/ubbthreads/templates/default/banner.tmpl on line 17[/]
Posted By: JoshPet Re: [6.2] Banner Ad Rotator - 03/19/2003 8:46 AM
I'm stumped why this doesn't work for some people. I called in the calvary here.

One last thing you could try. The couple of variables in the Template file... place them inside brackets, like this {$banner}

Worth a shot.
Posted By: JoshPet Re: [6.2] Banner Ad Rotator - 03/19/2003 9:40 AM
Dave_L posted something for you to try in that other thread. Me testing does no good.... because it always worked for me.

I posted in the PHP board because I figurd I'd done something wrong.... but If I did Dave_L didn't notice it. But maybe there is something offensive in the banner itself.

Let us know.
Posted By: caspe7_dup1 Re: [6.2] Banner Ad Rotator - 03/19/2003 10:09 AM
Thanks, I did what it said in the other topic, I think I messed it up (where I put it), and it showed it couple of times (2 out of place, 1 the normal place), so i deleted it and It worked how it should, don't know why
Posted By: caspe7_dup1 Re: [6.2] Banner Ad Rotator - 03/19/2003 11:11 AM
I got a question now that it works

Is there a simple way, to be able to turn it off on a user? forexample if someone hated it so much (if they are on a 56k) that they would pay money to have it removed.

(I know theres the sidebar that can do that, but I didn't like the sidebar too much some reason it made everything look odd)
Posted By: JoshPet Re: [6.2] Banner Ad Rotator - 03/19/2003 5:27 PM
I've done that on my site.

I include it on the top and bottom of every page. If they are a paid supporter... they have the option of turning the top banner off.

I haven't written up the code yet. If I can get to it, I will do it and post it.
Posted By: Tesseract Re: [6.2] Banner Ad Rotator - 03/19/2003 10:36 PM
It appears to be just a problem in using the echo command. I get the same compilation error. But the fix is simple enough just replace the echo block at the end:

Code
<br />echo <<<BANNER<br />  $tbopen<br />  <tr><br />  <td align="center" class="darktable"><br />  <b>Support Our Site - $Title</b><br />  </td><br />  </tr><br />  <td align="center" class="lighttable"><br />  $Banner<br />  </td><br />  </tr><br />  $tbclose<br />  <br /><br />BANNER;<br />


with simple print statements, not as pretty, but it does compile:

Code
<br />print( $tbopen);<br />print(	"<tr>\n");<br />print( "<td align=\"center\" class=\"darktable\"> \n");<br />print( "<b>Support Our Site - $Title</b>\n");<br />print( "</td>\n");<br />print( "</tr>\n");<br />print( "<td align=\"center\" class=\"lighttable\">\n");<br />print( "$Banner\n");<br />print( "</td></tr>$tbclose<br />\n");<br />
Posted By: Kel Re: [6.2] Banner Ad Rotator - 03/19/2003 11:13 PM
Works like a charm! Thanks James...
Posted By: JoshPet Re: [6.2] Banner Ad Rotator - 03/20/2003 1:18 AM
Thank you.
Posted By: jluerken Re: [6.2] Banner Ad Rotator - 03/26/2003 11:39 AM
[]JoshPet said:
I've done that on my site.

I include it on the top and bottom of every page. If they are a paid supporter... they have the option of turning the top banner off.

I haven't written up the code yet. If I can get to it, I will do it and post it. [/]

Oh yes Josh, can you please do so?

Would be nice if the banner will only be shown for some usergroups and not for all.
Posted By: JoshPet Re: [6.2] Banner Ad Rotator - 04/28/2003 10:43 AM
Works for 6.3 - reposted here.

© UBB.Developers