[BBCode] Random text signature
Posted: 12 Dec 2011, 10:05
Title: Random text signature
Description: Adds a random text signature. BBCode Random text signature allows you to use randomly changing the signature. Is changed from post to post or reload the page.
Author: I'm sorry but I do not remember where I found it and who is the author of this script, I just adapted and I use on my board (forum).
Create a new PHP file and put the a few citations, each in a new line.
Instead of Signature 1 Signature 2 and so on, insert your own text. You can have as many lines as you like.
[spoiler]Here is a sample code file:
Save the file as 1_signature.php php and send it to the root of your board (forum). This signature can be offered to a few users. Therefore, you must create a file signature.php for each of them and call them 2_signature.php, 3_ signature.php etc.
bbcode usage:
HTML replacement:
Helpline:
Example:[/spoiler]
Demo: See my signature on my test board (forum).
Description: Adds a random text signature. BBCode Random text signature allows you to use randomly changing the signature. Is changed from post to post or reload the page.
Author: I'm sorry but I do not remember where I found it and who is the author of this script, I just adapted and I use on my board (forum).
Create a new PHP file and put the a few citations, each in a new line.
Instead of Signature 1 Signature 2 and so on, insert your own text. You can have as many lines as you like.
[spoiler]Here is a sample code file:
Code: Select all
<?php
$quotes = 'Signature 1
Signature 2
Signature 3
Signature 4
Signature 5';
$split_array = explode("\n", $quotes);
$rand_keys = array_rand($split_array, 1);
$order = array("\r\n", "\n", "\r");
$replace = '<br />';
$los = str_replace($order, $replace, $split_array[$rand_keys]);
header("content-type: application/x-javascript");
echo "<!--\n
document.write('$los');\n
//-->";
?>
bbcode usage:
Code: Select all
[signature]{NUMBER}[/signature]
Code: Select all
<script type="text/javascript" src="./redirect/to/script_file/{NUMBER}_signature.php"></script>
Code: Select all
Signature: [signature]Number[/signature]
Code: Select all
[signature]5[/signature]
Demo: See my signature on my test board (forum).