
Code: Select all
## EasyMod 0.0.7 compliant
##############################################################
## MOD Title: Roleplaying BBCode
## MOD Author: Hades < phpbb@hades.me.uk > (Lee Conlin) http://www.celestialvault.com/blast
## MOD Description: A set of three roleplaying bbcode tags to enable users to distiguish between Out Of Character speech, In Character speech and Descritive text
## MOD Version: 1.0.0
##
## Installation Level: easy
## Installation Time: 7 minutes.
## Files To Edit: includes/bbcode.php
## posting.php
## language/lang_english/lang_main.php
## language/lang_english/lang_bbcode.php
## templates/subSilver/bbcode.tpl
## templates/subSilver/posting_body.tpl
## Included Files: None
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/
##############################################################
## Author Notes: Tested on phpBB 2.0.3 - 2.0.4
##
## IMPORTANT: if you are installing manually (without EasyMod) you MUST first install the Multi Quick BBCode Mod - available to download from www.phpBB.com.
##
## Remember to edit lang_main.php and lang_bbcode.php for each language that you have installed on your board.
##
## Remember to edit bbcode.tpl and posting_body.tpl for each template that you have installed on your board
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]------------------------------------------
#
$text = str_replace("[/b:$uid]
#
#-----[ AFTER, ADD ]------------------------------------------
#
// [desc] and [/desc] for descriptive text.
$text = str_replace("[desc:$uid]", $bbcode_tpl['desc_open'], $text);
$text = str_replace("[/desc:$uid]", $bbcode_tpl['desc_close'], $text);
// [ic] and [/ic] for in character speech.
$text = str_replace("[ic:$uid]", $bbcode_tpl['ic_open'], $text);
$text = str_replace("[/ic:$uid]", $bbcode_tpl['ic_close'], $text);
// [ooc] and [/ooc] for out of character speech.
$text = str_replace("[ooc:$uid]", $bbcode_tpl['ooc_open'], $text);
$text = str_replace("[/ooc:$uid]", $bbcode_tpl['ooc_close'], $text);
#
#-----[ FIND ]------------------------------------------
#
$text = preg_replace("#\[b\]
#
#-----[ AFTER, ADD ]------------------------------------------
#
// [desc] and [/desc] for descriptive text.
$text = preg_replace("#\[desc\](.*?)\[/desc\]#si", "[desc:$uid]\\1[/desc:$uid]", $text);
// [ic] and [/ic] for in character speech.
$text = preg_replace("#\[ic\](.*?)\[/ic\]#si", "[ic:$uid]\\1[/ic:$uid]", $text);
// [ooc] and [/ooc] for out of character speech.
$text = preg_replace("#\[ooc\](.*?)\[/ooc\]#si", "[ooc:$uid]\\1[/ooc:$uid]", $text);
#
#-----[ OPEN ]------------------------------------------
#
posting.php
#
#-----[ FIND ]------------------------------------------
#
$EMBB_keys = array(''
$EMBB_widths = array(''
$EMBB_values = array(''
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$EMBB_keys = array(''
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
,'j','r','e'
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$EMBB_widths = array(''
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
,'35','30','70'
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$EMBB_values = array(''
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
,'OOC','IC','Description'
#
#-----[ FIND ]------------------------------------------
#
'L_BBCODE_F_HELP' =>
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_BBCODE_E_HELP' => $lang['bbcode_e_help'],
'L_BBCODE_R_HELP' => $lang['bbcode_r_help'],
'L_BBCODE_J_HELP' => $lang['bbcode_j_help'],
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['bbcode_f_help']
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['bbcode_e_help'] = 'Descriptive text: [desc]text[/desc] (alt+e)';
$lang['bbcode_r_help'] = 'In Character speech: [ic]text[/ic] (alt+r)';
$lang['bbcode_j_help'] = 'Out Of Character speech: [ooc]text[/ooc] (alt+j)';
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_bbcode.php
#
#-----[ FIND ]------------------------------------------
#
$faq[] = array("Adding an image to a post",
#
#-----[ AFTER, ADD ]------------------------------------------
#
$faq[] = array("--", "BBCode for roleplaying games");
$faq[] = array("How to use Out of Character speech", "If you want to output a piece of Out of Character speech (for explaining things in terms of game mechanics for example) you should enclose the text in <b>[ooc][/ooc]</b> tags, eg.<br /><br /><b>[ooc]</b>I'm going to roll 5 dice to hide from the beast.<b>[/ooc]<br /><br /></b>will produce<br /><br /><b>OOC:</b> I'm going to roll 5 dice to hide from the beast.");
$faq[] = array("How to use In Character speech", "If you want to output a piece of In Character speech (eg. what your character is actually saying) you should enclose the text in <b>[ic][/ic]</b> tags, eg.<br /><br /><b>[ic]</b>Prepare to meet your end, foul beast!<b>[/ic]<br /><br /></b>wil produce<br /><br /><b><i>&Prepare to meet your end, foul beast!&</i></b>");
$faq[] = array("How to use Descriptive Text", "If you want to output a piece of descriptive text (eg. what your character is doing, the garden you are in, etc) you should enclose the text in <b>[desc][/desc]</b> tags, eg.<br /><br /><b>[desc]</b>You can see Joran standing atop a shear cliff. Nearby you see a beautiful waterfall. The sound of the waterfall is so loud you can't make out what Joran is shouting to you.<b>[/desc]</b><br /><br />will produce<br /><br /><b>**<br />You can see Joran standing atop a shear cliff. Nearby you see a beautiful waterfall. The sound of the waterfall is so loud you can't make out what Joran is shouting to you.<br />**</b>");
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/bbcode.tpl
#
#-----[ FIND ]------------------------------------------
#
<!-- END b_close -->
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- BEGIN desc_open --><span><b>**<br /><!-- END desc_open -->
<!-- BEGIN desc_close --><br />**</b></span><!-- END desc_close -->
<!-- BEGIN ic_open --><span><b>"<i><!-- END ic_open -->
<!-- BEGIN ic_close --></i>"</b></span><!-- END ic_close -->
<!-- BEGIN ooc_open --><span><b>OOC: </b><!-- END ooc_open -->
<!-- BEGIN ooc_close --></span><!-- END ooc_close -->
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/posting_body.tpl
#
#-----[ FIND ]------------------------------------------
#
f_help =
#
#-----[ AFTER, ADD ]------------------------------------------
#
e_help = "{L_BBCODE_E_HELP}";
r_help = "{L_BBCODE_R_HELP}";
j_help = "{L_BBCODE_J_HELP}";
#
#-----[ FIND ]------------------------------------------
#
bbtags = new Array(
#
#-----[ IN-LINE FIND ]------------------------------------------
#
'[url]','[/url]'
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
,'[ooc]','[/ooc]','[ic]','[/ic]','[desc]','[/desc]'
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM