Location: PHPKode > projects > WB News > includes/bbcode_plugins.php
<?php

/*========================================================*\
||########################################################||
||#                                                      #||
||#     WB News v1.1.0                                   #||
||# ---------------------------------------------------- #||
||#     Copyright (c) 2004-2005                          #||
||#     Created: 1st December 2005                       #||
||#     Filename: bbcode_plugins.php                     #||
||#                                                      #||
||########################################################||
/*========================================================*/

/**
 *  @author $Author: pmcilwaine $
 *	@version $Id: bbcode_plugins.php,v 1.2 2006/04/14 14:23:36 pmcilwaine Exp $
 */

/*

    HOW TO
    ------------------------------------
    Create an unique associate index for the bbcode array you must use the same
    associate index for the format associate array variable also, unless already modified
    there is a usable example of how to do this.
    
    To add BBCode Elements to the Administration News Form you must add the plugin to the
    newsform_body.tpl as well as update the editor.js file located in the clientside directory 
    of the admin templates. To do this you must use the prefix in the newsform_body.tpl as cmd_
    and a unique name afterwards this unique name must be added to the controls array. You will also
    need to update the basic.js file to detect this new bbcode element on the form and what to 
    do with it. All template files include js files are subject to change so you may require to
    update this on a regular basis, so please read the CHANGELOG File.

    This file is used last when formatting BBCode so what may work when using just this may not work
    when put into this file.
    
*/

// Regular Expressions
$bbcode['image'] = "/(\[img\])(.+?)(\[\/img\])/is";
$bbcode['quote'] = "/(\[quote\])(.+?)(\[\/quote\])/is";

// Format
$format['image'] = '<img src="\\2" alt="" title="" />';
$format['quote'] = '<blockquote><q>\\2</q></blockquote>';

?>
Return current item: WB News