see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ // | Author: StarRider starrrider@sourceforge.net // +----------------------------------------------------------------------+ // $id: data.dropdown.php,v 1.8 2005/07/14 09:03:36 starrider Exp $ /** * Initialization */ global $gLibertySystem; define( 'PLUGIN_GUID_DATADROPDOWN', 'datadropdown' ); $pluginParams = [ 'tag' => 'DD', 'auto_activate' => false, 'requires_pair' => true, 'load_function' => '\data_dropdown', 'title' => 'DropDown', 'help_page' => 'DataPluginDropDown', 'description' => KernelTools::tra("This plugin creates a expandable box of text. All text should be entered between the ") . "{DD} " . KernelTools::tra("blocks."), 'help_function' => '\data_dropdown_help', 'syntax' => "{DD title= width= }" . KernelTools::tra("Text in the Drop-Down box.") . "{DD}", 'plugin_type' => DATA_PLUGIN, ]; $gLibertySystem->registerPlugin( PLUGIN_GUID_DATADROPDOWN, $pluginParams ); $gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATADROPDOWN ); /** * Help Function */ function data_dropdown_help() { $help = '' .'' .'' .'' .'' .'' .'' .'' .'' .'') .'' .'' .'' .'' .'' .'' .'
' . KernelTools::tra( "Key" ) . '' . KernelTools::tra( "Type" ) . '' . KernelTools::tra( "Comments" ) . '
title' . KernelTools::tra( "string") . '
' . KernelTools::tra("(optional)") . '
' . KernelTools::tra( 'String used as the link to Expand / Contract the text box.
The Default = "For More Information"
width' . KernelTools::tra( "numeric") . '
' . KernelTools::tra("(optional)") . '
' . KernelTools::tra( "Controls the width of the title area in pixels. This is a percentage value but the % character should not be added.
The Default = ") . '20
' . KernelTools::tra("Example: ") . '{DD}' . KernelTools::tra("Text in the Drop-Down box.") . '{DD}
' . KernelTools::tra("Example: ") . "{DD title='" . KernelTools::tra("Explaining the Lines #1 #3 & #7'} Text in the Drop-Down box") . '{DD}'; return $help; } /** * Load Function */ function data_dropdown($data, $params) { extract ($params, EXTR_SKIP); $title = $title ?? KernelTools::tra( 'For More Information, click me.' ); $id = 'dropdown'.(microtime() * 1000000); $ret = '
' .''.$title.'' .'
' .''; return $ret; }