The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Randomized Text

3 posters

Go down

Solved Randomized Text

Post by Bloxx September 20th 2016, 01:55

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
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 September 20th 2016, 03:04

Hello,

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


Sir. mayo
Sir. Mayo
Sir. Mayo
Forumember

Male Posts : 980
Reputation : 90
Language : English, Some french.
Location : you can also reach me on snoonet's irc server. I idle in #Techsupport Username is Vault108

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

Back to top Go down

Solved Re: Randomized Text

Post by Bloxx September 20th 2016, 03:09

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
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 September 20th 2016, 03:15

What is your forum type?
Are you ok with editing the templates?
Sir. Mayo
Sir. Mayo
Forumember

Male Posts : 980
Reputation : 90
Language : English, Some french.
Location : you can also reach me on snoonet's irc server. I idle in #Techsupport Username is Vault108

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

Back to top Go down

Solved Re: Randomized Text

Post by Bloxx September 20th 2016, 03:15

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
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 September 20th 2016, 03:35

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
Sir. Mayo
Forumember

Male Posts : 980
Reputation : 90
Language : English, Some french.
Location : you can also reach me on snoonet's irc server. I idle in #Techsupport Username is Vault108

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

Back to top Go down

Solved Re: Randomized Text

Post by Bloxx September 20th 2016, 03:48

Thanks! This is what I wanted, Topic solved
Bloxx
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 September 20th 2016, 03:52

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
Sir. Mayo
Forumember

Male Posts : 980
Reputation : 90
Language : English, Some french.
Location : you can also reach me on snoonet's irc server. I idle in #Techsupport Username is Vault108

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

Back to top Go down

Solved Re: Randomized Text

Post by SLGray September 20th 2016, 04:03

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


Randomized Text Slgray10

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

Male Posts : 51463
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Back to top

- Similar topics

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