Random Signature Text BBCode
Posted: 09 Mar 2010, 06:41
Random Signature Text BBCode
Author: Highway of Life
Description: The Random Signature Text BBCode lets you use a random signature. It changes from post to post or when you reload the page.
Create a new PHP file, and I place a bunch of quotes in it, each quote is on a newline.
You need to change Signature 1, Signature 2 and so on to what ever you like. You can have as many lines as you like.
Save the php file as 1_signature.php and upload it to your forum root.
You offer this to your members. Then you will have to create a signature.php for each member. Cal them 2_signature.php, 3_ signature.php etc.
BBCode:
HTML:
Helpline:
Example:
Demo:
[signature]1[/signature]
Author: Highway of Life
Description: The Random Signature Text BBCode lets you use a random signature. It changes from post to post or when you reload the page.
Create a new PHP file, and I place a bunch of quotes in it, each quote is on a newline.
You need to change Signature 1, Signature 2 and so on to what ever you like. You can have as many lines as you like.
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);
header("content-type: application/x-javascript");
echo "<!--\n
document.write('{$split_array[$rand_keys]}');\n
//-->";
?>
You offer this to your members. Then you will have to create a signature.php for each member. Cal them 2_signature.php, 3_ signature.php etc.
BBCode:
Code: Select all
[signature]{NUMBER}[/signature]
Code: Select all
<script type="text/javascript" src="./path/to/scripts/{NUMBER}_signature.php"></script>
Code: Select all
Signature: [signature]Number[/signature]
Code: Select all
[signature]1[/signature]
[signature]1[/signature]