BBCODE : phpbb .
, Veryhappy

#
#-----[ ]------------------------------------------
#
includes/bbcode.php
#
#-----[ ]------------------------------------------
#
// and for bolding text.
$text = str_replace("[b:$uid]", $bbcode_tpl['b_'], $text);
$text = str_replace("[/b:$uid]", $bbcode_tpl['b_close'], $text);

#
#-----[ , ]------------------------------------
#

// [s] and [/s] for striking out text.
$text = str_replace("[s:$uid]", $bbcode_tpl['s_'], $text);
$text = str_replace("[/s:$uid]", $bbcode_tpl['s_close'], $text);

#
#-----[ ]------------------------------------------
#
// and for bolding text.
$text = preg_replace("#\[b\](.*?)\[/b\]#si", "[b:$uid]\\1[/b:$uid]", $text);

#
#-----[ , ]------------------------------------
#
// [s] and [/s] for striking out text.
$text = preg_replace("#\[s\](.*?)\[/s\]#si", "[s:$uid]\\1[/s:$uid]", $text);


#
#-----[ ]------------------------------------------
#
templates/subSilver/bbcode.tpl
#
#-----[ ]---------------------------------
#

<!-- BEGIN b_ --><span style="font-weight: bold"><!-- END b_ -->
<!-- BEGIN b_close --></span><!-- END b_close -->

#
#-----[ , ]------------------------------------
#

<!-- BEGIN s_ --><span><s><!-- END s_ -->
<!-- BEGIN s_close --></s></span><!-- END s_close -->

#
#-----[ ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ ]------------------------------------------
#

$lang['bbcode_f_help'] = 'Font size: [size=x-small]small text[/size]';

#
#-----[ , ]------------------------------------
#

$lang['bbcode_k_help'] = "Strikethrough text: [s]text[/s] (alt+k)";

#
#-----[ ]------------------------------------------
#
posting.php
#
#-----[ ]---------------------------------
#
'L_BBCODE_F_HELP' => $lang['bbcode_f_help'],
#
#-----[ , ]------------------------------------
#
'L_BBCODE_K_HELP' => $lang['bbcode_k_help'],

#
#-----[ ]------------------------------------------
#
templates/subSilver/posting_body.tpl
#
#-----[ ]------------------------------------------
#

f_help = "{L_BBCODE_F_HELP}";

#
#-----[ , ]------------------------------------
#

k_help = "{L_BBCODE_K_HELP}";


#
#-----[ ]------------------------------------------
#

bbtags = new Array('','','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','
','
','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]');

#
#-----[ , ]------------------------------------------
#

bbtags = new Array('','','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','
','
','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[s]','[/s]');


#
#-----[ ]------------------------------------------
#

<td><span class="genmed">
<input type="button" class="button" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onClick="bbstyle(16)" onMouseOver="helpline('w')" />
</span></td>



#
#-----[ , ]------------------------------------
#

<td><span class="genmed">
<input type="button" class="button" accesskey="k" name="addbbcode18" value="s" style="text-decoration: strike; width: 30px" onClick="bbstyle(18)" onMouseOver="helpline('k')" />
</span></td>


#
#-----[ ]---------------------------------
#

<select name="addbbcode18" onChange="bbfontstyle('[color=' + this.form.addbbcode18.options[this.form.addbbcode18.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;" onMouseOver="helpline('s')">

#
#-----[ , ]---------------------------------
#

<select name="addbbcode20" onChange="bbfontstyle('[color=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;" onMouseOver="helpline('s')">

#
#-----[ ]---------------------------------
#

</select> {L_FONT_SIZE}:<select name="addbbcode20" onChange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]')" onMouseOver="helpline('f')">

#
#-----[ , ]---------------------------------
#

</select> {L_FONT_SIZE}:<select name="addbbcode22" onChange="bbfontstyle('[size=' + this.form.addbbcode22.options[this.form.addbbcode22.selectedIndex].value + ']', '[/size]')" onMouseOver="helpline('f')">

#
#-----[ SAVE & ]--------------------------
#

DEMO

Veryhappy !



/ /