Random Signature Text BBCode

Mod BBCode Database
BBCodes that need some file editing or extra files
There is no support here! Only Read Access!
Locked
User avatar
BBCode Bot
BBCoder IV
BBCoder IV
Posts: 239
Joined: 04 Mar 2010, 15:04
Location: bbcode table

Random Signature Text BBCode

Post by BBCode Bot »

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

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
    //-->";  
?>
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:

Code: Select all

[signature]{NUMBER}[/signature]
HTML:

Code: Select all

<script type="text/javascript" src="./path/to/scripts/{NUMBER}_signature.php"></script>
Helpline:

Code: Select all

Signature: [signature]Number[/signature]
Example:

Code: Select all

[signature]1[/signature]
Demo:
[signature]1[/signature]
MasterZ
BBCoder I
BBCoder I
Posts: 3
Joined: 25 Apr 2010, 02:21

Re: Random Signature Text BBCode

Post by MasterZ »

ZenorSoft Web Design | Carriers of the Cross - A Christian World of Warcraft Guild
Locked