Source for file data.jstabs.php
Documentation is available at data.jstabs.php
* @subpackage plugins_storage
define( 'PLUGIN_GUID_DATAJSTABS', 'datajstabs' );
'title' => 'Javascript Tabs',
'description' => tra( "Allow tabbing of content using a simple syntax." ),
//'help_page' => 'DataPluginJstabs',
'auto_activate' => FALSE,
// display icon in quicktags bar
'booticon' => '{booticon iname="icon-folder-closed-alt" iexplain="Javascript Tabs"}',
'taginsert' => '{jstabs}text{/jstabs}',
'help_function' => 'data_jstabs_help',
'load_function' => 'data_jstabs',
function data_jstabs( $pData, $pParams, $pCommonObject ) {
$gBitSmarty->loadPlugin( 'smarty_block_jstab' );
$gBitSmarty->loadPlugin( 'smarty_block_jstabs' );
foreach( $tabs as $tab ) {
// first line of every tab is the title
// we need a valid title and content to work with
if( !empty( $split[1] ) && !empty( $split[2] )) {
// prepare data for tabification and parsing
$params['title'] = trim( $split[1] );
$parseHash = $pCommonObject->mInfo;
$parseHash['no_cache'] = TRUE;
$parseHash['data'] = $split[2];
'<p class="data help">'. tra( "This plugin does not take any arguments but you need to use a particular syntax to add tabs. You need to insert something like: <strong>---tab: Title of the tab</strong> on a separate line. This will start a new tab with the title: <em>Title of the tab</em>." ). '</p>'
. tra( "Example: ") . "<br />{jstabs}<br />---tab:First Tab<br />Some content<br />---tab:Second Tab<br />Some content in the second tab.<br />{/jstabs}";
|