MyBB Tutorials

How to display Random Text/s on each page load [MyBB]

Submitted by Sozin, , Thread ID: 3381

Thread Closed
Sozin
Nan Ihier Gelair Mordor
Divine
Level:
0
Reputation:
91
Posts:
2.33K
Likes:
374
Credits:
11K
30-04-2015, 10:03 PM
#1
Content locked
This content has been locked. Please login or register in order to unlock it.
Do not let your difficulties fill you with anxiety, after all it is only in the darkest nights that stars shine more brightly. - Ali(a.s)

Developer( PHP, Python, C++, HTML+CSS, JS I am available for Hire. Message Me for details.

RE: How to display Random Text/s on each page load [MyBB]

Akay
We are!
Level:
0
Reputation:
28
Posts:
946
Likes:
109
Credits:
2.05K
30-04-2015, 10:39 PM
This post was last modified: 30-04-2015, 10:42 PM by Akay
#2
What exactly is this? If i don't mind asking.

Edit: oh yeah. Don't see why this is needed, but nice share I guess.

RE: How to display Random Text/s on each page load [MyBB]

AndresXZ09
Closed Account
Level:
0
Reputation:
30
Posts:
1.22K
Likes:
139
Credits:
1.51K
30-04-2015, 11:07 PM
#3
It's rare to see Sozin sharing stuff on this section, so it is something awesome then :hurr:

RE: How to display Random Text/s on each page load [MyBB]

AndresXZ09
Closed Account
Level:
0
Reputation:
30
Posts:
1.22K
Likes:
139
Credits:
1.51K
01-05-2015, 12:45 AM
This post was last modified: 01-05-2015, 01:07 AM by AndresXZ09
#4
I think that you can replace that with

Code:
$random = array(
1=>"Blabla",
2=>"Blablabla",
3=>"jkdsa",
4=>"bkjsda",
);
$random_stuff = rand(1, count($random));
$_text = $random[$random_stuff];
Idk

In fact, if you use 'text here' it gives an error (or atleast I get an error) you have to use "text"

RE: How to display Random Text/s on each page load [MyBB]

Akay
We are!
Level:
0
Reputation:
28
Posts:
946
Likes:
109
Credits:
2.05K
01-05-2015, 01:31 AM
#5
Good job on sharing it for leechers. :fp:

@AndresXZ09 @Google

RE: How to display Random Text/s on each page load [MyBB]

AndresXZ09
Closed Account
Level:
0
Reputation:
30
Posts:
1.22K
Likes:
139
Credits:
1.51K
01-05-2015, 01:34 AM
#6
01-05-2015, 01:31 AM
Kewl Wrote:
Good job on sharing it for leechers. :fp:

@AndresXZ09 @Google

Thanks :yus:

Anyway, that's not going to work if not do the proper modifications.

RE: How to display Random Text/s on each page load [MyBB]

Blaze
Same shit, different day.
Divine
Level:
0
Reputation:
106
Posts:
1.28K
Likes:
187
Credits:
1.44K
01-05-2015, 11:04 AM
#7
Since when do we post the hidden content?
Next time will result in a warning.
Like some, love some, trust none.

[Image: YuwcFg6.png?2]

RE: How to display Random Text/s on each page load [MyBB]

Sozin
Nan Ihier Gelair Mordor
Divine
Level:
0
Reputation:
91
Posts:
2.33K
Likes:
374
Credits:
11K
OP
01-05-2015, 03:27 PM
#8
01-05-2015, 12:45 AM
AndresXZ09 Wrote:
I think that you can replace that with


Code:
$random = array(
1=>"Blabla",
2=>"Blablabla",
3=>"jkdsa",
4=>"bkjsda",
);
$random_stuff = rand(1, count($random));
$_text = $random[$random_stuff];
Idk

In fact, if you use 'text here' it gives an error (or atleast I get an error) you have to use "text"

1. Do not share hidden content.
2. IDK what you actually mean and the count stuff is okay Smile
Do not let your difficulties fill you with anxiety, after all it is only in the darkest nights that stars shine more brightly. - Ali(a.s)

Developer( PHP, Python, C++, HTML+CSS, JS I am available for Hire. Message Me for details.

RE: How to display Random Text/s on each page load [MyBB]

AndresXZ09
Closed Account
Level:
0
Reputation:
30
Posts:
1.22K
Likes:
139
Credits:
1.51K
01-05-2015, 05:56 PM
#9
01-05-2015, 03:27 PM
Sozin Wrote:
01-05-2015, 12:45 AM
AndresXZ09 Wrote:
I think that you can replace that with


Code:
$random = array(
1=>"Blabla",
2=>"Blablabla",
3=>"jkdsa",
4=>"bkjsda",
);
$random_stuff = rand(1, count($random));
$_text = $random[$random_stuff];
Idk

In fact, if you use 'text here' it gives an error (or atleast I get an error) you have to use "text"

1. Do not share hidden content.
2. IDK what you actually mean and the count stuff is okay Smile

I just said that's another way to do it Tongue

RE: How to display Random Text/s on each page load [MyBB]

Sozin
Nan Ihier Gelair Mordor
Divine
Level:
0
Reputation:
91
Posts:
2.33K
Likes:
374
Credits:
11K
OP
01-05-2015, 06:59 PM
#10
01-05-2015, 05:56 PM
AndresXZ09 Wrote:
01-05-2015, 03:27 PM
Sozin Wrote:
01-05-2015, 12:45 AM
AndresXZ09 Wrote:
I think that you can replace that with



Code:
$random = array(
1=>"Blabla",
2=>"Blablabla",
3=>"jkdsa",
4=>"bkjsda",
);
$random_stuff = rand(1, count($random));
$_text = $random[$random_stuff];
Idk

In fact, if you use 'text here' it gives an error (or atleast I get an error) you have to use "text"

1. Do not share hidden content.
2. IDK what you actually mean and the count stuff is okay Smile

I just said that's another way to do it Tongue

Just don't share hidden content. Don't make me say this again. Smile
Do not let your difficulties fill you with anxiety, after all it is only in the darkest nights that stars shine more brightly. - Ali(a.s)

Developer( PHP, Python, C++, HTML+CSS, JS I am available for Hire. Message Me for details.


Users browsing this thread: 1 Guest(s)