PHP Bulletin Board Home
News About Home
Features of phpBB Test drive phpBB Downloads Support for phpBB The phpBB Community Styles for customising phpBB 3rd party modifications to phpBB

Support Home | Knowledge Base Home | Submit Article | Search Articles | Browse Articles
 BBCode MOD Standardization 
Description: Standards for using and writing BBCode MODs for 2.0.6 and later
Author: Nuttzy99
Date: Tue Oct 21, 2003 8:35 pm
Type: Info
Keywords: BBCode MOD
Category: MODifications
Code:
Document:      BBCode MOD Standardization
Author:        Nuttzy
Revision:      1.2.2
Rev Date:      11/21/05
phpBB Version: 2.0.6+



Introduction
As part of our on going effort to simplify and improve MOD installations, the phpBB MOD Team is pleased to announce standards for phpBB BBCode MODs. We feel these standard will allow for a maximum number of BBCode MODs to work together while also simplifying installation at the same time.


For MOD users:
Previous to phpBB 2.0.2, if you have ever tried getting multiple BBCode MODs to work together, then you have probably run into problems. Now when you install a MOD from the phpBB MODs Database, you know it will work with all other validated BBCode MODs.

Topics of interest:
1) To install validated BBCode MODs, you will need to install the Multiple BBCode MOD (section 1)
2) Now that you have a bunch of BBCode MODs installed, all those buttons may be getting out of control! We suggest the easy to install BBCode Buttons Organizer (section 2).
3) What is BBCode?


For MOD authors:
These standards are going to simplify your life too! A cool feature of BBCode is the little buttons displayed in posting.php. However, since it can be rather complex to add more buttons, many authors don't even add them! Now we've made it all easy.

Topics of interest:
1) Official requirements for phpBB BBCode MODs - (section 3)
2) Why do we need a standard? The problem and solution explained - (chapter 4; optional read).



1. Multi BBCodes MOD

Starting with phpBB 2.0.2, all BBCode MODs must conform to a required standard. Before installing any phpBB BBCode MODs, installation of this MOD is required. The purpose of the Multi BBCode MOD is to clean up some nasty issues (section 4 if you are curious) and ensure that all BBCode MODs will work together.

FYI, this MOD used to be built into EasyMOD, but now is a standalone MOD.

Download:
http://www.phpbb.com/phpBB/viewtopic.php?t=145513



2. BBCode Buttons Organizer

When a MOD adds additional BBCode buttons for editing a post, they are usually added on the same line as the other buttons like this...


If you add more than a couple of buttons, then things can get out of control with all the buttons being on the same line! With the BBCode Buttons Organizer, you can neatly display an unlimited number of additional buttons. Installation is very easy too!


Download:
http://www.phpbb.com/phpBB/viewtopic.php?t=145516

NOTE: Before installing you will first need to install the Multi BBCode MOD (see section 1)



3. Official requirements for phpBB BBCode MODs

As fellow BBCode MOD authors, we on the MOD Team are very pleased to announce these requirements that will allow all of our MODs to work in harmony! You can read about the details of the problems and solutions (section 4) if you wish.

Requirements:
  1. Your MOD MUST support the Multi BBCode MOD (section 1). Details on supporting it are below.
  2. You are "encouraged" to make an addition to the lang_bbcode.php file so a BBCode FAQ entry will be created. This is not required however.


Supporting the Multi BBCode MOD:
The Multi BBCode MOD eliminates your need to deal with adding HTML input tags in post_body.tpl. You will still need to add modifications for BBCode help and the addition into the bbtags array. An example of a fully supported BBCode MOD is the Pre BBCode MOD.

Edit the language/lang_english/lang_main.php file to add additional BBCode help
Code:
#
#-----[ FIND ]---------------------------------
#
$lang['bbcode_help']['value'] = 'BBCode Name: Info (Alt+%s)';

#
#-----[ AFTER, ADD ]---------------------------------
#
$lang['bbcode_help']['pre'] = 'Preformatted text (preserves formatting): [pre]some text[/pre]  (alt+%s)';



Next, in includes/bbcode.php, for the EMBB_widths and EMBB_values arrays it is VERY important that you do not simply use a REPLACE WITH to add the elements you want. You MUST use the IN-LINE commands....
Code:
#
#-----[ FIND ]---------------------------------
#
   $EMBB_widths = array('') ;
   $EMBB_values = array('') ;

#
#-----[ IN-LINE FIND ]---------------------------------
#
$EMBB_widths = array(''

#
#-----[ IN-LINE AFTER, ADD ]---------------------------------
#
,'40'

#
#-----[ IN-LINE FIND ]---------------------------------
#
$EMBB_values = array(''

#
#-----[ IN-LINE AFTER, ADD ]---------------------------------
#
,'Pre'


Lastly, your MOD script must inform users they must use the Multi BBCode MOD. Before your first action, you MUST have the following lines in your script:
Code:

#
# IMPORTANT: you MUST first have already installed the Multi BBCode MOD
#    available at http://www.phpbb.com/mods/
#


-Nuttzy Cool

Username: Password:
News | Features | Demo | Downloads | Support | Community | Styles | Mods | Links | Merchandise | About | Home
 © Copyright 2002 The phpBB Group.