yvExtensions  English    Donate  Forum   

yvBBCode 

Download yvBBCode   v.2.1.0, (0.05Mb) last changed: March 14, 2011. What's New, For Developers 
Download yvBBCode: JoomlaCode, local file (unzip before install).

Short description

yvBBCode is a BBCode extension for Joomla! 1.6.
(For "Joomla! 1.5" please download yvBBCodePlugin v.1. package , the latest one is v.1.03.001).

It may replace BBCodes with HTML markup:

In addition to 'standard' BBCodes, this extension has BBCodes to create dynamic links between Articles.

The extension is customizable, so you may choose, what subset of BBCodes to use, what images are used for buttons etc.

Installation

1. To install yvBBCode, you MUST have at least Joomla! 1.5 stable. yvBBCode is a "system plugin".
2. yvBBCode distribution package contains English language files only. If you need additional language(s), download yvBBCodeLanguagePacks from JoomlaCode and install. (yvBBCodeLanguagePacks do not need to be enabled!)

In a case of any problem, please refer to the Troubleshooting section below.

Troubleshooting

Good luck!

yvBBCode self test results with Debugging mode option set on 
yvBBCode self test results with Debugging mode option set on 

BBCodes to create dynamic links between Articles

Links between Articles ('content items'...) may be created with 'special type of BBCodes' inserted into any content of the Web page and converted to Hyperlinks on the fly. Currently yvBBCode supports one BBCode for this purpose: 'contentid'.
E.g. [contentid=3]Content management[/contentid] is replaced by the link to the Article with id=3.

Administration, configuration and customization

All configuration setting of this extension are set in "yvBBCode Plugin parameters" (Administrator interface->Extensions->Plugin Manager->yvBBCode).

As you may see, "BBCode set" file path is customizable option. So you may create your copy of it (default.xml file) and change something... but, of cause, main processing is in code of BBCodeParser library, that is not so easy to customize...

yvBBCode parameters 

BBCodes for the whole page

  yvBBCode can make BBCode replacements for the whole page ("Enable BBCode replacements for the whole page" option).
  yvBBCode can make BBCode replacements for the whole page

As you can see on the picture above, you may have BBCodes almost everywhere on the page, in every content... So you may have BBCodes even in those extensions, that know nothing about yvBBCode.

BBCodes for text of Articles

yvBBCode may show BBCodes in your Articles (working as content plugin). This option ('Enable BBCodes for the text of Articles') is disabled by default, but you may use it (change to 'Yes'), if you don't like 'BBCodes for the whole page' option, shown above.

You may restrict work of this plugin for Articles, that belong to only some Sections. To do this, type comma (,) separated list of IDs of Sections in the "SectionIDs of Articles" parameter. Leave the field blank to allow replacement of BBCodes with corresponding HTML tags for Articles of any Section.

Additional parameter: "Exclude Sections, selected above (No - include)" helps you to make this list shorter. If you don't want to process BBCodes for only a small number of Sections: set this parameter to "Yes" (i.e. "exclude"), and type (in the "SectionIDs of Articles" parameter) only IDs of Sections to be excluded.

Other settings

By default, yvBBCode uses simple CSS file (/plugins/system/yvBBCode/default.css), that is intended to be used as a start point for customization. If you made your customized css in your template, your have to change setting of "Use default CSS file" parameter to "No".

Localization

Currently yvBBCode is translated into these languages: English, French, German, Russian.

Feedback

Your feedback is greatly appreciated!

Future plans and thoughts (ToDo)

 History of changes

v.2.1.0 (March 14, 2011)

  1. Improved BBCode replacement: BBCodes inside HTML tags are not replaces with HTML tags (as earlier, that caused markup error) but removed.
  2. Content links [contentid] code was updated

v.2.0.1 (February 11, 2011)

  1. Modified by Bart Jochems (info@batjo.nl) and yvolk to run on Joomla! 1.6
  2. Parameters that mention 'SectionIDs of Articles' were renamed to 'CategoryIDs...' because there are no 'Sections' in Joomla! 1.6

v.1.03 (December 23, 2008)

  1. Added 'Remove BBCodes from page title' option (default to 'Yes')

v.1.02 (October 25, 2008)

  1. Added [br] BBCode (to the 'Extended BBCodes') to have line breaks anywhere! (See the post).
  2. Updated function, that generates link to the Article for [contentid] (function ContentIDToURL) to v.007 .
  3. All translations were removed from main yvBBCode packages. Now yvBBCode Plugin package contain English language files only. All 4 translations were moved to 4 yvBBCodeLanguagePacks, that may be downloaded from JoomlaCode and installed separately.
    There is also special, 'English language pack', that is template package to be used by translators to create additional language packs for yvBBCode extension.
    For information, why this was done, please see the discussion in the forum: How to create language pack for Joomla! 1.5 extension.

v.1.01.007 (August 11, 2008)

  1. Fixed incompatibility with other extensions, that use PEAR library. (Successfully tested with JoomlaPack, thanks to Luckyrat for the report and testing). Problem was in different ways to include PEAR, used by different extensions. The right way is:
    jimport('pear.PEAR');
  2. Updated function, that generates link to the Article for [contentid] (function ContentIDToURL).

 v.1.01 (January 28, 2008)

  1. Added option 'Links to Articles'. If this option is set to 'Yes', links between Articles ('content items'...) may be created with 'special type of BBCodes' inserted into any content of the Web page and converted to Hyperlinks on the fly.
    Currently yvBBCode supports one BBCode: contentid.
    E.g. [contentid=3]Content management[/contentid] is replaced by the link to the Article with id=3.
  2. Added translations:

Information for Developers

When creating yvBBCode, I used yvSmiley extension as a template. So you may find many similarities between the two...

yvBBode uses parser HTML_BBCodeParser library (part of PEAR Package) and BBCode images from Advanced BBCode Box MOD for phpBB.

To use yvBBCode, other extensions don't need to refer to it in any way: they just trigger events, that are intercepted by yvBBCode (if its installed and enabled). If yvBBCode is not installed or is disabled, this doesn't lead to any errors!

yvBBCode always registers itself for two events:

$Form = '';
$mainframe->triggerEvent('onBBCode_RenderForm', array('document.forms.yvCommentForm.fulltext', &$Form) );
echo $Form;
$fulltext = 'Some Text [i]To Be Rendered[/i]';
$mainframe->triggerEvent('onBBCode_RenderText', array (& $fulltext) ); 
echo $fulltext;

As you may see, it is VERY easy to use yvBBCode in other extensions.

You may see example of yvBBCode usage in the yvComment extension.

The license

GPL. Freeware, i.e. at no cost. If you like this extension, please consider donating.

The Joomla! extension is distributed "as is", without any warranties explicit or implied.

(c) 2007-2011 Yuri Volkov, Moscow, Russia