Express Hosting
"We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
/* PHP CODE HERE */
$Ads = array (
'http://www.germanshepherdhome.net/testadbanner1.jpg',
'http://www.germanshepherdhome.net/testadbanner2.jpg',
'http://www.germanshepherdhome.net/testadbanner3.jpg'
);
/* BODY HERE */
$body = <<<EOF
$Ads[mt_rand(0, count($Ads)-1)]
EOF;
might work
Remember array index starts from 0 there
Also, i'd recommend (if i were you) to put your banners in something like /forums/images/banners directory. That way you don't clutter up your site's root dir.. if you do, you'd need to modify the URLs above, but you get the drift
Custom island syntax has been a bugaboo, because it's not obvious what is php and what is not..
In actuality, the ENTIRE code block is, since the custom island code that UBB.threads uses to save it simply puts <?php and ?> around it.
The only thing you MUST have in your code is the last 3 lines.. where 1 of them assigns to the body a value. the EOF; is key too, since the save code keys upon it.
Linky Poo to a tutorial in progress about how it works.. that one is for a different application of custom island, but the concept remains the same
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ']' in /home/content/t/i/g/tiger2/html/germanshepherdhome/forum/cache_builders/custom/portal_box_1.php on line 13
well... you have the custom island is built every xx minutes.. that is when it will randomize..
for test.. have it always build and see if it changes..
as for rotation... if you mean you want the banners to sit there and rotate between the 3 every say 30secs.. that's a javascript dealio and is possible
I have had problems with some not all rotating banner scripts in Islands. Where they will rotate on the island cache or rotate on the own setting. But only one time. Unless you refresh the browser. Then it will only make one pass again. Never figured out why.
BTW, The note on the cache time for a island suggests 0 for banner ad's but it never made a difference in my situation.
Don't quite understand the question but... The script would go in the island. If you have say some image files for the banner put them where ever you want.Then reference them in the script. if it is a php script then you would place the php code between the comments in the island code.
It might be a better starting point with posting a banner ad you like and we all can make suggestions.
You have to make it a custom island first. Then you would add the island at Control Panel » Forum Settings » Edit Forum TAB>Custom inserts. Select the island from the list in the Custom Island Insert field.
Oh forgot about this part. After you do the above. You need to make the groups see it by going to: Control Panel » Forum Permissions Must view Ad Island Set a 1 in each group you want to make it visible to.