Source for file data.biticon.php
Documentation is available at data.biticon.php
* @subpackage plugins_data
define( 'PLUGIN_GUID_DATABITICON', 'databiticon' );
'requires_pair' => FALSE,
'load_function' => 'data_biticon',
'title' => 'bitweaver Icon',
'help_page' => 'DataPluginBiticon',
'description' => tra( "Display any bitweaver icon" ),
'help_function' => 'data_biticon_help',
'syntax' => '{biticon ipackage= iname= iexplain=}',
* @return TRUE on success, FALSE on failure - mErrors will contain reason for failure
'<table class="data help">'
. '<th>' . tra( "Key" ) . '</th>'
. '<th>' . tra( "Type" ) . '</th>'
. '<th>' . tra( "Comments" ) . '</th>'
. '<td>' . tra( "key-words") . '<br />' . tra( "(optional)" ) . '</td>'
. '<td>' . tra( "Package the icon is taken from. The icon style icons take the value 'icons'.") . '</td>'
. '<td>' . tra( "key-words") . '<br />' . tra("(required)") . '</td>'
. '<td>' . tra( "Name of the icon to be displayed" ) . '</td>'
. '<td>' . tra( "string" ) . '<br />' . tra("(optional)") . '</td>'
. '<td>' . tra( "Explanation of the icon - visible when hovering over the icon."). '</td>'
. tra( "Example: " ) . '{biticon ipackage="icons" iname="large/accessories-text-editor" iexplain="edit"}';
$ret = tra( 'Please provide an icon name as iname parameter. You can <a href="'. THEMES_PKG_URL. 'icon_browser.php">select icons here</a>.' );
if( !empty( $pParams['iname'] )) {
$gBitSmarty->loadPlugin( 'smarty_function_biticon' );
// sanitise biticon parameters before they are passed to the function
$biticon['iname'] = $pParams['iname'];
$biticon['ipackage'] = !empty( $pParams['ipackage'] ) ? $pParams['ipackage'] : 'icons';
$biticon['iexplain'] = !empty( $pParams['iexplain'] ) ? $pParams['iexplain'] : 'icon';
$biticon['ipath'] = !empty( $pParams['ipath'] ) ? $pParams['ipath'] : '';
if( !empty( $wrapper['style'] )) {
$ret = '<'. $wrapper['wrapper']. ' class="'. ( !empty( $wrapper['class'] ) ? $wrapper['class'] : "biticon-plugin" ). '" style="'. $wrapper['style']. '">'. $ret. '</'. $wrapper['wrapper']. '>';
|