Previous Thread
Next Thread
Print Thread
Rate Thread
#237845 02/24/2003 4:04 AM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.
Attachments
70615-BannerAdRotator1.0.zip (0 Bytes, 45 downloads)

Sponsored Links
Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
cool mod... can it be turned off and on?

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
If the "banner" forum is empty nothing will appear.

Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
Cool I can just move them to a hidden forum... Thanks Josh another great mod

Joined: Apr 2002
Posts: 68
Power User
Power User
Offline
Joined: Apr 2002
Posts: 68
For some reason i'm getting this "Parse error: parse error in /www/prowrestlingforum.com/threads/bannerad.php on line 92"


"We're sorta like the 7-11. We're not always doin' business, but we're always open"
Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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?

Joined: Apr 2002
Posts: 68
Power User
Power User
Offline
Joined: Apr 2002
Posts: 68
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)


"We're sorta like the 7-11. We're not always doin' business, but we're always open"
Joined: Jan 2002
Posts: 266
Kel Offline
Member
Member
Offline
Joined: Jan 2002
Posts: 266
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.

Last edited by Sasha; 03/11/2003 12:12 AM.
Joined: Jan 2002
Posts: 266
Kel Offline
Member
Member
Offline
Joined: Jan 2002
Posts: 266
Any feedback on this yet?

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.

Sponsored Links
Joined: Jan 2002
Posts: 266
Kel Offline
Member
Member
Offline
Joined: Jan 2002
Posts: 266
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.

Joined: Jan 2002
Posts: 266
Kel Offline
Member
Member
Offline
Joined: Jan 2002
Posts: 266
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)

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Ah I'd forgotten. I"ll take a look in a bit.

Joined: Jan 2002
Posts: 266
Kel Offline
Member
Member
Offline
Joined: Jan 2002
Posts: 266
Thanks much!!!

Joined: Apr 2002
Posts: 68
Power User
Power User
Offline
Joined: Apr 2002
Posts: 68
thanks, I'm waiting for the fix too.


"We're sorta like the 7-11. We're not always doin' business, but we're always open"
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.
Attachments
73545-BannerAdRotator1.0test.zip (0 Bytes, 25 downloads)

Joined: Jan 2002
Posts: 266
Kel Offline
Member
Member
Offline
Joined: Jan 2002
Posts: 266
I'm trying it. I'll report back in a few minutes.


Joined: Jan 2002
Posts: 266
Kel Offline
Member
Member
Offline
Joined: Jan 2002
Posts: 266
Now I have this error:

[]Parse error: parse error, unexpected $ in my directory/ubbthreads/templates/default/banner.tmpl on line 17[/]

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.

Joined: Apr 2002
Posts: 68
Power User
Power User
Offline
Joined: Apr 2002
Posts: 68
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


"We're sorta like the 7-11. We're not always doin' business, but we're always open"
Joined: Apr 2002
Posts: 68
Power User
Power User
Offline
Joined: Apr 2002
Posts: 68
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)


"We're sorta like the 7-11. We're not always doin' business, but we're always open"
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.

Joined: Mar 2003
Posts: 2
Lurker
Lurker
Offline
Joined: Mar 2003
Posts: 2
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 />

Joined: Jan 2002
Posts: 266
Kel Offline
Member
Member
Offline
Joined: Jan 2002
Posts: 266
Works like a charm! Thanks James...

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Thank you.

Joined: Aug 2002
Posts: 218
Member
Member
Offline
Joined: Aug 2002
Posts: 218
[]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.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Works for 6.3 - reposted here.



Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)