Randomized Text
3 posters
Page 1 of 1
Randomized Text
Hello everyone! Today, I came here to know if there's a way to randomize the text that shows in a forum description. Like it'll change each time the forum is refreshed or like a different page is clicked.
Thanks!
Thanks!
Re: Randomized Text
Sir. Mayo wrote:Hello,
Do you mean the google description?
or the one on your forum?
Sir. mayo
The one on the forum, The site description. I wanna know how to randomize the site description text. Like when you refresh the page, different texts show.
Re: Randomized Text
Sir. Mayo wrote:What is your forum type?
Are you ok with editing the templates?
I'm using PHPBB3
And yes, i'm ok with editing the templates
Re: Randomized Text
Bloxx wrote:Sir. Mayo wrote:What is your forum type?
Are you ok with editing the templates?
I'm using PHPBB3
And yes, i'm ok with editing the templates
This should do it! Try adding this to your home page message:
- Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Random Message</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
var msgArr = new Array();
msgArr[0] = "Message here ";
msgArr[1] = "Message here ";
msgArr[2] = "Message here ";
msgArr[3] = "Message here ";
msgArr[4] = "Message here ";
msgArr[5] = "Message here ";
window.onload = function () {
document.getElementById("msgDiv").innerHTML = msgArr[Math.floor(Math.random()*msgArr.length)];
}
</script>
</head>
<body><div id="msgDiv"></div>
</body>
</html>
You will need to replace "Message here" with you message, but keep the quotation marks as the script won't work otherwise
Re: Randomized Text
Bloxx wrote:Thanks! This is what I wanted, Topic solved
just wanted to add if you add {username} to the message it adds the username of the person viewign it!
Re: Randomized Text
Problem solved & topic archived.
|


Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.

» Randomized Logos
» Randomized Logo
» 18+ forum feature/password-protectedforum/randomized logo
» RPG Module Character Sheet Problem - Text/list text invisible
» Can you create special text or use a picture of text for your forum title?
» Randomized Logo
» 18+ forum feature/password-protectedforum/randomized logo
» RPG Module Character Sheet Problem - Text/list text invisible
» Can you create special text or use a picture of text for your forum title?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum