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
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
2 members (Gizmo, 1 invisible), 636 guests, and 146 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 20240501)