MyBB Tutorials

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

Submitted by Sozin, , Thread ID: 3381

Thread Closed
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]

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]

#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]

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]

#5
Good job on sharing it for leechers. :fp:

@AndresXZ09 @Google

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

#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]

#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]

OP
#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]

#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]

OP
#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)