see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ // | Author: xing // +----------------------------------------------------------------------+ // $Id$ /** * definitions */ /****************** * Initialization * ******************/ global $gLibertySystem; define( 'PLUGIN_GUID_DATAADSENSE', 'dataadsense' ); $pluginParams = [ 'tag' => 'ADSENSE', 'auto_activate' => false, 'requires_pair' => false, 'load_function' => '\data_adsense', 'title' => 'Adsense', 'help_page' => 'DataPluginAdsense', 'description' => KernelTools::tra("This plugin adds Adsense Code to page."), 'help_function' => '\data_adsense_help', 'syntax' => "{ADSENSE}", 'plugin_type' => DATA_PLUGIN, ]; $gLibertySystem->registerPlugin( PLUGIN_GUID_DATAADSENSE, $pluginParams ); $gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAADSENSE ); /***************** * Help Function * *****************/ function data_adsense_help() { return 'NO HELP WRITTEN FOR {ADSENSE} YET. You can set: client, width, height, format, type and channel.'; } /**************** * Load Function * ****************/ function data_adsense( $pData, $pParams ) { extract( $pParams ); $width = !empty( $width ) ? $width : "728"; $height = !empty( $height ) ? $height : "90"; $client = !empty( $client ) ? $client : "pub-xxxxxxxxxxxxxxxx"; $format = !empty( $format ) ? $format : "728x90_as"; $type = !empty( $type ) ? $type : "text_image"; $channel = !empty( $channel ) ? $channel : ""; return " "; }