SimplePortal

Support => English Support => Topic started by: abvs on February 13, 2012, 04:32:37 PM

Title: add bbcode shoutebox
Post by: abvs on February 13, 2012, 04:32:37 PM
I need a good help if you can have is the following SimplePortal 2.3.4 installed and wanted to add some bbcode shoutbox.
My doubt is what are the files that I modify.

thank you
Title: Re: add bbcode shoutebox
Post by: Chen Zhen on February 13, 2012, 07:41:16 PM

File: Sources / PortalAdminShoutbox.php

find:
Code: [Select]
$context['allowed_bbc'] = array(
'b' => $txt['bold'],
'i' => $txt['italic'],
'u' => $txt['underline'],
's' => $txt['strike'],
'pre' => $txt['preformatted'],
'flash' => $txt['flash'],
'img' => $txt['image'],
'url' => $txt['hyperlink'],
'email' => $txt['insert_email'],
'ftp' => $txt['ftp'],
'glow' => $txt['glow'],
'shadow' => $txt['shadow'],
'sup' => $txt['superscript'],
'sub' => $txt['subscript'],
'tt' => $txt['teletype'],
'code' => $txt['bbc_code'],
'quote' => $txt['bbc_quote'],
'size' => $txt['font_size'],
'font' => $txt['font_face'],
'color' => $txt['change_color'],
'me' => 'me',
);

Add the extra bb codes to the array.
Also in a specific shoutboxes settings from the admin panel, you must highlight the bbc's you added above (hold ctrl/cmd while clicking the mouse to add/subtract available bbc's).
Title: Re: add bbcode shoutebox
Post by: abvs on February 14, 2012, 08:49:13 AM
thank you
added several bbcode but what is already activated but does not appear in adimistraĆ§Ć£o the buttons shown in the print screen
Title: Re: add bbcode shoutebox
Post by: Chen Zhen on February 14, 2012, 08:11:26 PM
Also edit file: Sources / PortalBlocks.php

find:
Code: [Select]
$shoutbox['bbc'] = array(
'bold' => array('code' => 'b', 'before' => '[b]', 'after' => '[/b]', 'description' => $txt['bold']),
'italicize' => array('code' => 'i', 'before' => '[i]', 'after' => '[/i]', 'description' => $txt['italic']),
'underline' => array('code' => 'u', 'before' => '[u]', 'after' => '[/u]', 'description' => $txt['underline']),
'strike' => array('code' => 's', 'before' => '[s]', 'after' => '[/s]', 'description' => $txt['strike']),
'pre' => array('code' => 'pre', 'before' => '[pre]', 'after' => '[/pre]', 'description' => $txt['preformatted']),
'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt['flash']),
'img' => array('code' => 'img', 'before' => '[img]', 'after' => '[/img]', 'description' => $txt['image']),
'url' => array('code' => 'url', 'before' => '[url]', 'after' => '[/url]', 'description' => $txt['hyperlink']),
'email' => array('code' => 'email', 'before' => '[email]', 'after' => '[/email]', 'description' => $txt['insert_email']),
'ftp' => array('code' => 'ftp', 'before' => '[ftp]', 'after' => '[/ftp]', 'description' => $txt['ftp']),
'glow' => array('code' => 'glow', 'before' => '[glow=red,2,300]', 'after' => '[/glow]', 'description' => $txt['glow']),
'shadow' => array('code' => 'shadow', 'before' => '[shadow=red,left]', 'after' => '[/shadow]', 'description' => $txt['shadow']),
'sup' => array('code' => 'sup', 'before' => '[sup]', 'after' => '[/sup]', 'description' => $txt['superscript']),
'sub' => array('code' => 'sub', 'before' => '[sub]', 'after' => '[/sub]', 'description' => $txt['subscript']),
'tele' => array('code' => 'tt', 'before' => '[tt]', 'after' => '[/tt]', 'description' => $txt['teletype']),

Just add your bbc to the array. Make sure there is an image for it in every theme's images / bbc folder.
Also the image name(s) must be the bbc name .gif
Title: Re: add bbcode shoutebox
Post by: abvs on February 15, 2012, 06:24:02 AM
Thanks works ok

SimplePortal 2.3.8 © 2008-2024, SimplePortal