Previous Thread
Next Thread
Print Thread
Rate Thread
#279850 09/23/2004 12:50 AM
Joined: Jul 2001
Posts: 442
Enthusiast
Enthusiast
Offline
Joined: Jul 2001
Posts: 442
Does anyone know how I could have like 8 ad banners that always display all 8 but when the page gets refreshed all 8 banners change order? Example:

banner 1
banner 2
banner 3
banner 4

might change to

banner 3
banner 4
banner 1
banner 2

I want to do something like that in my footer but all I find is ad rotation for one banner at a time, not multiple.

Sponsored Links
Joined: Dec 1999
Posts: 158
Enthusiast
Enthusiast
Offline
Joined: Dec 1999
Posts: 158

Joined: Jul 2001
Posts: 442
Enthusiast
Enthusiast
Offline
Joined: Jul 2001
Posts: 442
Thanks, but no thanks, that program takes to much server resources to mess with, I don't need stats or anything just a way to shuffle pics around basicly.

Joined: Jun 2003
Posts: 1,025
Junior Member
Junior Member
Offline
Joined: Jun 2003
Posts: 1,025
This should get you going in the right direction:
https://www.ubbdev.com/forum/showflat.php/Number/77955

Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
Why not just randomize all 8 images with a no-frills PHP random banner script?

They won't rotate in sequential order, but the end result is pretty much the same in that their relative position will always be different with each refresh. It evens out in the long run, and as a matter of fact I think it's a superior method because otherwise if done sequntially, then all those people who only visit once or twice will always be seeing the same ads at the top thus giving them more 'weight' relative to the bottom ones.

Randomizing nullifies this.

Plus the method you describe would require both database support, as well as a fancy system which you mentioned not wanting.

Sponsored Links
Joined: Jul 2001
Posts: 442
Enthusiast
Enthusiast
Offline
Joined: Jul 2001
Posts: 442
Exactly, that's all I need, wasn't sure on how to describe it. As long as all 8 banners show at the same time I could care less how they get rotated/weighted.

Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488

Joined: Jul 2001
Posts: 442
Enthusiast
Enthusiast
Offline
Joined: Jul 2001
Posts: 442
Cool, I will check that out.

Joined: Jul 2001
Posts: 442
Enthusiast
Enthusiast
Offline
Joined: Jul 2001
Posts: 442
Well, it kind of worked on a test page but also gave an error for taking longer than 30 sec to load.

Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
[]coloradok5 said:
Well, it kind of worked on a test page but also gave an error for taking longer than 30 sec to load. [/]

I just tested it and something is indeed wrong with the script

A real shame because the others will randomize multiple banners seperately, but you might get dupes.

I have not found another one that can ensure that they are all unique.

I wonder if it's not working properly if using newer PHP versions which may no longer support certain functions. Just a wild guess. It would take a lot of debugging to find out what's wrong.

Have you tried the other one (by Josh) mentioned above btw?

Sponsored Links
Joined: Jul 2001
Posts: 442
Enthusiast
Enthusiast
Offline
Joined: Jul 2001
Posts: 442
I didn't check that one because I thought it only showed one banner at a time?

Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
Hmm, I had a look at the script and that isn't gonna work either without some hacking. I guess you're SOL

Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
Ok I wrote a script to rotate multiple banners randomly, with no dupes

https://www.ubbdev.com/forum/showflat...SID=#Post121715

Joined: Sep 2003
Posts: 803
Coder
Coder
Offline
Joined: Sep 2003
Posts: 803
Very nice work.

Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
Cheers, I have a demo of it working right here btw...

http://www.mameworld.net/

All the 115x80's change position on every refresh


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
AllenAyres
AllenAyres
Texas
Posts: 21,079
Joined: March 2000
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
Morgan 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)