The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Randomized Text

View previous topic View next topic Go down

Solved Randomized Text

Post by Bloxx on September 20th 2016, 12:55 am

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!

Bloxx
New Member

Posts : 6
Reputation : 1
Language : English

http://otincinerator.forumotion.com/

Back to top Go down

Solved Re: Randomized Text

Post by Sir. Mayo on September 20th 2016, 2:04 am

Hello,

Do you mean the google description?
or the one on your forum?


Sir. mayo

Sir. Mayo
Forumember

Male Posts : 961
Reputation : 84
Language : English, Some french.
Location : Working 11Pm-7Am EST I will try to respond ASAP

http://sir-mayo.forumotion.com/

Back to top Go down

Solved Re: Randomized Text

Post by Bloxx on September 20th 2016, 2:09 am

@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.

Bloxx
New Member

Posts : 6
Reputation : 1
Language : English

http://otincinerator.forumotion.com/

Back to top Go down

Solved Re: Randomized Text

Post by Sir. Mayo on September 20th 2016, 2:15 am

What is your forum type?
Are you ok with editing the templates?

Sir. Mayo
Forumember

Male Posts : 961
Reputation : 84
Language : English, Some french.
Location : Working 11Pm-7Am EST I will try to respond ASAP

http://sir-mayo.forumotion.com/

Back to top Go down

Solved Re: Randomized Text

Post by Bloxx on September 20th 2016, 2:15 am

@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

Bloxx
New Member

Posts : 6
Reputation : 1
Language : English

http://otincinerator.forumotion.com/

Back to top Go down

Solved Re: Randomized Text

Post by Sir. Mayo on September 20th 2016, 2:35 am

@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

Sir. Mayo
Forumember

Male Posts : 961
Reputation : 84
Language : English, Some french.
Location : Working 11Pm-7Am EST I will try to respond ASAP

http://sir-mayo.forumotion.com/

Back to top Go down

Solved Re: Randomized Text

Post by Bloxx on September 20th 2016, 2:48 am

Thanks! This is what I wanted, Topic solved

Bloxx
New Member

Posts : 6
Reputation : 1
Language : English

http://otincinerator.forumotion.com/

Back to top Go down

Solved Re: Randomized Text

Post by Sir. Mayo on September 20th 2016, 2:52 am

@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!

Sir. Mayo
Forumember

Male Posts : 961
Reputation : 84
Language : English, Some french.
Location : Working 11Pm-7Am EST I will try to respond ASAP

http://sir-mayo.forumotion.com/

Back to top Go down

Solved Re: Randomized Text

Post by SLGray on September 20th 2016, 3:03 am

Problem solved & topic archived.
Please read our forum rules: ESF General Rules


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35641
Reputation : 2374
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum