'GOOGLEVIEWER', 'auto_activate' => FALSE, 'requires_pair' => FALSE, 'load_function' => 'data_googleviewer', 'title' => 'Google Viewer', 'help_page' => 'DataPluginGoogleviewer', 'description' => tra( "This plugin allows you to simply embed a PDF document in a page using the embeddable Google Viewer." ), 'help_function' => 'data_googleviewer_help', 'syntax' => "{googleviewer url=}", 'plugin_type' => DATA_PLUGIN ); $gLibertySystem->registerPlugin( PLUGIN_GUID_DATAGOOGLEVIEWER, $pluginParams ); $gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAGOOGLEVIEWER ); /** * data_googleviewer_help * * @access public * @return HTML help in a table */ function data_googleviewer_help() { return '' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'
' . tra( "Key" ) . '' . tra( "Type" ) . '' . tra( "Comments" ) . '
url' . tra( "string" ) . '
' . tra("(required)") . '
' . tra( "URL of the PDF online" ) . '
width' . tra( "numeric" ) . '
' . tra( "(optional)" ) . '
' . tra( "Alternate width of the Google Viewer box in pixels. Default is 100%." ) . '
height' . tra( "numeric" ) . '
' . tra("(optional)") . '
' . tra( "Alternate height of the Google Viewer box in pixels. Default is 650." ) . '
' . tra( "Example: " ) . '{googleviewer url=XXXXX width=425 height=355}'; } /** * data_googleviewer * * @param array $pData * @param array $pParams * @access public * @return TRUE on success, FALSE on failure - mErrors will contain reason for failure */ function data_googleviewer( $pData, $pParams ) { extract( $pParams ); $width = ( !empty( $width ) ? $width : "100%" ); $height = ( !empty( $height ) ? $height : "650" ); if( !empty( $url )) { return ''; } else { return tra( 'No URL given' ); } } ?>