How do I create a random number like we used to be able to with UBB for a banner rotator ?
Random number generator
Collapse
X
-
Cool - thanks wandrer!
Just another query on those parsed headers - rather than pasting the header and footers into the relevant templates, could I automatically pull them in from external files (similar to SSI) and, if so, how ? I know I need to learn a bit about PHP, but i'm really struggling for time right now :(Comment
-
Maybe it's me but, no matter how many different things I try, it really seems to slow down the system when I set it to parse the headers. Also, you have to quote the $header variable between quotes:
[quote]
//--Start header template--
$header = "<p>This is an advert</p>";
//--End header template
[/quote]
This causes problems for me as I have to remove the quotes from the source, which is not good, and causes borders to appear on my banners for some reason ?
Is there no better way to do this ? If not, John, PLEASE include a fix in an early release. PLEASE!Comment
-
Random Numbers Revisited.
Over the weekend I am going to be moving one of my sites to AdForce rich media banners. I am curious as to what the final consensus was on generating random numbers in the headers of vB pages.
Can the code that Wandrer posted be used without making any other changes, or do you have to go through and change some of the code in the header, as Craig suggested? What about the idea of simply INCLUDEing an external PHP file that would contain the ad code? I'm a little concerned that Craig said it was slowing down his board.
Also - so that I understand the code that Wandrer posted, would changing the +1 at the end to +2 make it so that the number would be different for each banner on the same page, or would the number always be different no matter what? I need the top and bottom banner to have different random numbers and I just want to make sure that having two occurrences of the same code on the same page wouldn't generate the exact same 'random' number.
Thanks for any and all help on this matter.Comment
Related Topics
Collapse
-
by hs4x4How do I add some PHP code to the header section? I want to run a banner that rotates and I have some PHP code that accomplishes that. Do I just paste it in?
-
Channel: Support Issues & Questions
Mon 12 Jan '15, 2:56pm -
Comment