Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Signatures Extension: More lines
Tiggr
✭
Hi!
I would like to allow my users longer signatures, multiple lines, and having a textarea for input instead of the input field.
How can I change the extension for this?
Bye
Tiggr
I would like to allow my users longer signatures, multiple lines, and having a textarea for input instead of the input field.
How can I change the extension for this?
Bye
Tiggr
0
Comments
I will have a look into this!
Bye
Tiggr
On my forums I use a customized Signatures extension and have for ages.
I don't use a textarea but instead I allowed the [br] tag to be used for new lines.
To do this, replace lines 78 to 86 with this:
$Text = htmlentities($Text); $bbSearch = array( // '/\[b\](.*?)\[\/b\]/is', // '/\[i\](.*?)\[\/i\]/is', // '/\[u\](.*?)\[\/u\]/is', '/\[url\=(.*?)\](.*?)\[\/url\]/is', '/\[url\](.*?)\[\/url\]/is', '/\[img\](.*?)\[\/img\]/is', '/\[br\]/is', ); $bbReplace = array( // '<strong>$1</strong>', // '<em>$1</em>', // '<u>$1</u>', '<a href="$1">$2</a>', '<a href="$1">$1</a>', '<img src="$1" />', '<br />', ); $Text = preg_replace ($bbSearch, $bbReplace, $Text);
If you want to allow bold, italic and/or underlined text just uncomment those lines. I choose to disallow them most times because some people go overboard and it makes the forum ugly, but up to you.
I also changed the description to be more informative of the BBCode options for users. To do that, change line 34 to:
$Context->Dictionary['CUSTOMIZATION_SIGNATURE_DESCRIPTION'] = 'Displays a small signature under each of your posts.<br /> The maximum amount of characters allowed is '.MAX_SIGNATURE_LEN.'.<br /> Syntax allowed is as follows:<br /> <strong>[url=http://www.website.com][img]http://www.website.com/image.jpg[/img][/url]</strong> for image links.<br /> <strong>[url=http://www.website.com]site name[/url]</strong> for links.<br /> <strong>[img]http://www.website.com/image.jpg[/img]</strong> for images.<br /> <strong>[br]</strong> for line breaks.';