Previous Thread
Next Thread
Print Thread
Hop To
Joined: Mar 2010
Posts: 34
V
Vic
Offline
newbie
newbie
V Offline
Joined: Mar 2010
Posts: 34
In the Community Introduction Body section is there a way to put text so each time someone refreshes the forum page it would show a different text?

Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
yes.. you can use php code or javascript there to 'rotate' some text in.. smile

Joined: Mar 2010
Posts: 34
V
Vic
Offline
newbie
newbie
V Offline
Joined: Mar 2010
Posts: 34
Originally Posted by Sirdude
yes.. you can use php code or javascript there to 'rotate' some text in.. smile

Can you recommend away how to do this please?

Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
Community title:
HTML
<center>Wazzaaaaap!?</center>

Community body:
PHP Code

<?php

$randText = array(
 'Hi there',
 'Yo bubba',
 'I love Sirdude');

$randInd = mt_rand(0,count($randText)-1);
$theBanner = '<center><b>'.$randText[$randInd].'</b></center><br />';
echo $theBanner;
?>

Bam! <br />

just change the $randText strings.. add as many as you want and it'll rotate them in every time someone displays the forum list (cfrm) wink

Joined: Mar 2010
Posts: 34
V
Vic
Offline
newbie
newbie
V Offline
Joined: Mar 2010
Posts: 34
Thanks so much it worked perfect.


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Version 7.7.5 Images suddenly not displaying
by Stovebolt - 05/04/2024 11:19 AM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
Who's Online Now
1 members (Geoff), 770 guests, and 174 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)