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