|
Signature BBCode Bar
95Signature_BBCode_Bar.zip
|
Filesize: 3.98kB Views: (2650) Downloads (3789) Last Download: April 19, 2024, 12:56:33 am
|
Previous Download | Next Download
|
Description: Link to Mod
Adds a row of buttons of some of the most commonly used bbcode above the edit/add signature area in a users profile. Including img,url,b,i,u,ftp,email,list,pre,center,left,right.
Tested & Works On 1.1.3, 1.1.2, 1.1.1 (and probably more) (Just because your version isnt listed here, doesnt mean it won't work on your version)
This modication contains no language strings, it loads the 'Post' templates language set in the language whatever the user is using.
Note: It does not check permissions or additional permissions set by any mod whether img bbcode is allowed in sigs.
Installs automatically on Default, Classic and Babylon themes and any theme that do not use a custom profile.template.php
For themes which do use a custom profile.template.php only a single manual edit is required for most themes
FIND this
echo ' </td> <td> <textarea class="editor" onkeyup="calcCharLeft();" name="signature" rows="5" cols="50">', $context['member']['signature'], '</textarea><br />';
REPLACE with
echo ' </td> <td> <script language="JavaScript" type="text/javascript"> function bbc_highlight(something, mode) { something.style.backgroundImage = "url(" + smf_images_url + (mode ? "/bbc/bbc_hoverbg.gif)" : "/bbc/bbc_bg.gif)"); } </script>'; // load the post variables loadLanguage('Post'); // The below array makes it dead easy to add images to this page. Add it to the array and everything else is done for you! $context['bbc_tags'] = array(); $context['bbc_tags'][] = array( 'bold' => array('code' => 'b', 'before' => '[b]', 'after' => '[/b]', 'description' => $txt[253]), 'italicize' => array('code' => 'i', 'before' => '[i]', 'after' => '[/i]', 'description' => $txt[254]), 'underline' => array('code' => 'u', 'before' => '[u]', 'after' => '[/u]', 'description' => $txt[255]), 'img' => array('code' => 'img', 'before' => '[img]', 'after' => '[/img]', 'description' => $txt[435]), 'url' => array('code' => 'url', 'before' => '[url]', 'after' => '[/url]', 'description' => $txt[257]), 'email' => array('code' => 'email', 'before' => '[email]', 'after' => '[/email]', 'description' => $txt[258]), 'ftp' => array('code' => 'ftp', 'before' => '[ftp]', 'after' => '[/ftp]', 'description' => $txt[434]), 'size' => array('code' => 'size', 'before' => '[size=10pt]', 'after' => '[/size]', 'description' => $txt[532]), 'face' => array('code' => 'font', 'before' => '[font=Verdana]', 'after' => '[/font]', 'description' => $txt[533]), 'pre' => array('code' => 'pre', 'before' => '[pre]', 'after' => '[/pre]', 'description' => $txt[444]), 'left' => array('code' => 'left', 'before' => '[left]', 'after' => '[/left]', 'description' => $txt[445]), 'center' => array('code' => 'center', 'before' => '[center]', 'after' => '[/center]', 'description' => $txt[256]), 'right' => array('code' => 'right', 'before' => '[right]', 'after' => '[/right]', 'description' => $txt[446]), 'list' => array('code' => 'list', 'before' => '[list]\n[li]', 'after' => '[/li]\n[li][/li]\n[/list]', 'description' => $txt[261]), ); // Here loop through the array, printing the images/rows/separators! foreach ($context['bbc_tags'][0] as $image => $tag) { // Is there a "before" part for this bbc button? If not, it can't be a button!! if (isset($tag['before'])) { // Is this tag disabled? if (!empty($context['disabled_tags'][$tag['code']])) continue;
// If there's no after, we're just replacing the entire selection in the post box. if (!isset($tag['after'])) echo '<a href="javascript:void(0);" onclick="replaceText(\'', $tag['before'], '\', document.forms.creator.signature); return false;">'; // On the other hand, if there is one we are surrounding the selection ;). else echo '<a href="javascript:void(0);" onclick="surroundText(\'', $tag['before'], '\', \'', $tag['after'], '\', document.forms.creator.signature); return false;">';
// Okay... we have the link. Now for the image and the closing </a>! echo '<img onmouseover="bbc_highlight(this, true);" onmouseout="if (window.bbc_highlight) bbc_highlight(this, false);" src="', $settings['images_url'], '/bbc/', $image, '.gif" align="bottom" width="23" height="22" alt="', $tag['description'], '" title="', $tag['description'], '" style="background-image: url(', $settings['images_url'], '/bbc/bbc_bg.gif); margin: 1px 2px 1px 1px;" /></a>'; } } echo ' <br/><textarea class="editor" onkeyup="calcCharLeft();" name="signature" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" rows="5" cols="50">', $context['member']['signature'], '</textarea><br />';
Posted by: karlbenson August 08, 2007, 12:00:00 am
Rating: This download has not been rated yet.
|
0 Members and 1 Guest are viewing this files. |
Comments (0)
|
Please Help!
by SMFHacks
April 17, 2024, 08:04:55 am
|
Rate own images
by fvlog19
April 11, 2024, 10:56:53 am
|
Tidy Child Boards on 2.1.4
by SMFHacks
April 04, 2024, 03:54:12 pm
|
Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header
by Michel68
March 30, 2024, 12:41:08 pm
|
Can't DROP 'id_member'; check that column/key exists Datei:
by SMFHacks
March 30, 2024, 11:58:20 am
|
No thumbnails on new uploads
by Tonyvic
March 29, 2024, 06:26:18 am
|
Display the Contact Page for guests
by SMFHacks
March 27, 2024, 10:55:43 am
|
is it possible to add support for odysee.com
by fvlog19
March 21, 2024, 08:47:51 am
|
Request for admin notification
by davejo
March 10, 2024, 01:31:59 am
|
I need help with torrent upload
by Ineedsmfhelp
March 09, 2024, 10:01:13 pm
|
|
|