[Awaiting Validation] Roleplaying BBCode

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Hades
Registered User
Posts: 784
Joined: Thu Jan 10, 2002 3:31 pm
Location: The Underworld
Contact:

[Awaiting Validation] Roleplaying BBCode

Post by Hades »

Take a look and enjoy :)

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
Last edited by Hades on Sat May 17, 2003 2:18 pm, edited 1 time in total.
Hades
Lord of the Underworld


Like roleplaying? Try BlastRPG Forums
Hades
Registered User
Posts: 784
Joined: Thu Jan 10, 2002 3:31 pm
Location: The Underworld
Contact:

Post by Hades »

aw.... no-one wants my bbCode :cry:
Hades
Lord of the Underworld


Like roleplaying? Try BlastRPG Forums
cinder
Registered User
Posts: 63
Joined: Sat Mar 01, 2003 9:23 pm
Location: Canada
Contact:

Post by cinder »

Don't worry, give it more than a day for people to go through them.

You have any screenshots or info about what it does? That usually catches people's attentions.
Hades
Registered User
Posts: 784
Joined: Thu Jan 10, 2002 3:31 pm
Location: The Underworld
Contact:

Post by Hades »

Sure... it's pretty simple really.

This bbCode is designed for use in a roleplaying environment and adds the following bbCodes.

[ooc][/ooc] Denotes out of character text.

OOC: This is out of character text

The "OOC:" bit is added automatically by the BBCode.


[ic][/ic] denotes in character speech.

"This is how in character speech displays"


The quotes are added automatically by the bbcode.


and finally [desc][/desc] marks blocks of descriptive text.

**
This is a block of descriptive text. I placed the '*'s on seperate lines so that it wouldn't look odd when encompassing multiple paragraphs and/or lines of text.

Hope you like it
**


The **'s are added automatically by the bbcode

How's that?
Hades
Lord of the Underworld


Like roleplaying? Try BlastRPG Forums
Life sucks
Registered User
Posts: 36
Joined: Thu May 15, 2003 9:49 am

Post by Life sucks »

Mm, can **two** be replaced by *two* in lang_main or sometihng?
Hades
Registered User
Posts: 784
Joined: Thu Jan 10, 2002 3:31 pm
Location: The Underworld
Contact:

Post by Hades »

sure.

in "templates/subsilver/bbcode.tpl" find

Code: Select all

<!-- BEGIN desc_open --><span><b>**<br /><!-- END desc_open --> 
<!-- BEGIN desc_close --><br />**</b></span><!-- END desc_close --> 
and replace it with

Code: Select all

<!-- BEGIN desc_open --><span><b>* <!-- END desc_open --> 
<!-- BEGIN desc_close --><br />* </span><!-- END desc_close --> 
Hades
Lord of the Underworld


Like roleplaying? Try BlastRPG Forums
Hades
Registered User
Posts: 784
Joined: Thu Jan 10, 2002 3:31 pm
Location: The Underworld
Contact:

Post by Hades »

The above change will make descriptive text appear as follows.

* This is an example of descriptive text *

* If descriptive text goes onto
more than one line it might look
a little odd though *
Hades
Lord of the Underworld


Like roleplaying? Try BlastRPG Forums
User avatar
melindeth
Registered User
Posts: 32
Joined: Sun Feb 10, 2002 4:31 am
Location: USA
Contact:

Added

Post by melindeth »

Added this MOD to my new forums :)
Only problem I have is that i'm too lazy to redo the help line for the buttons (your letters are used by other bbcode). Other than that, good work!
Friends are like wedgies. They are intimately close. They know your inner-self. And it feels good when you pick out a good one!
Hades
Registered User
Posts: 784
Joined: Thu Jan 10, 2002 3:31 pm
Location: The Underworld
Contact:

Post by Hades »

Yeah.

Unfortunately there are only 3 letters left available that aren't used and I'm hoping to get one of them for my dice roller mod
Hades
Lord of the Underworld


Like roleplaying? Try BlastRPG Forums
Dr DLP
Registered User
Posts: 527
Joined: Sat Mar 29, 2003 5:34 pm
Location: France
Contact:

Post by Dr DLP »

Erf , sorry I didn't say anything :roll:
phpika
Registered User
Posts: 890
Joined: Fri Aug 09, 2002 10:31 am
Location: UK
Contact:

Post by phpika »

I've installed this, could come in handy for my type of website.
The Pika Club Website |pvpOnline|"I hope I didn't brain my damage" ~ Homer Simpson
Drowelf
Registered User
Posts: 393
Joined: Sat Aug 02, 2003 9:49 pm
Location: USA
Contact:

Post by Drowelf »

awsome...that....is...coooool...

u like to make bbcodes huh? 8) :lol:

aslo would EasyMOD alpha3 v0.0.10a work for this insteada .0.3 or watever
Drowelf - Bringing you AntiAdmin entertainment since 1997
Drowelf
Registered User
Posts: 393
Joined: Sat Aug 02, 2003 9:49 pm
Location: USA
Contact:

Post by Drowelf »

hey, with BBcode, wat is the $EMBB_widths for?
Drowelf - Bringing you AntiAdmin entertainment since 1997
danb00
Registered User
Posts: 1025
Joined: Sun Dec 15, 2002 9:41 pm
Location: Inside Mod:Extreme PHPBB
Contact:

Post by danb00 »

gonna install this today :)
danb00
Registered User
Posts: 1025
Joined: Sun Dec 15, 2002 9:41 pm
Location: Inside Mod:Extreme PHPBB
Contact:

Post by danb00 »

ok right
i cant find this

Code: Select all

# 
#-----[ 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' 
# 
i am using phpbb 2.0.5
Locked

Return to “[2.0.x] MODs in Development”