short_desc = $this->T_('Short description'); $this->long_desc = $this->T_('Longer description. You may also remove this.'); } /** * Define the GLOBAL settings of the plugin here. These can then be edited in the backoffice in System > Plugins. * * @param array Associative array of parameters (since v1.9). * 'for_editing': true, if the settings get queried for editing; * false, if they get queried for instantiating {@link Plugin::$Settings}. * @return array see {@link Plugin::GetDefaultSettings()}. * The array to be returned should define the names of the settings as keys (max length is 30 chars) * and assign an array with the following keys to them (only 'label' is required): */ function GetDefaultSettings( & $params ) { global $app_version; return array( 'sample_sets' => array( 'label' => T_('Dynamic Settings'), 'note' => T_('Click to add another set'), 'type' => version_compare( $app_version, '6.6.5', '>' ) ? 'array:array:string' : 'array', 'max_count' => 10, 'entries' => array( 'file_ID' => array( 'label' => T_('Image'), 'defaultvalue' => '', 'type' => 'fileselect', 'thumbnail_size' => 'fit-320x320', ), ), ), ); } /** * Define the PER-USER settings of the plugin here. These can then be edited by each user. * * @see Plugin::GetDefaultSettings() * @param array Associative array of parameters. * 'for_editing': true, if the settings get queried for editing; * false, if they get queried for instantiating * @return array See {@link Plugin::GetDefaultSettings()}. */ function GetDefaultUserSettings( & $params ) { global $app_version; return array( 'sample_sets' => array( 'label' => T_('Dynamic Settings'), 'note' => T_('Click to add another set'), 'type' => version_compare( $app_version, '6.6.5', '>' ) ? 'array:array:string' : 'array', 'max_count' => 10, 'entries' => array( 'file_ID' => array( 'label' => T_('Image'), 'defaultvalue' => '', 'type' => 'fileselect', 'thumbnail_size' => 'fit-320x320', ), ), ), ); } /** * Define here default custom settings that are to be made available * in the backoffice for collections, private messages and newsletters. * * @param array Associative array of parameters. * @return array See {@link Plugin::get_custom_setting_definitions()}. */ function get_custom_setting_definitions( & $params ) { global $app_version; return array( 'sample_sets' => array( 'label' => T_('Dynamic Settings'), 'note' => T_('Click to add another set'), 'type' => version_compare( $app_version, '6.6.5', '>' ) ? 'array:array:string' : 'array', 'max_count' => 10, 'entries' => array( 'file_ID' => array( 'label' => T_('Image'), 'defaultvalue' => '', 'type' => 'fileselect', 'thumbnail_size' => 'fit-320x320', ), ), ), ); } /** * Define here default collection/blog settings that are to be made available in the backoffice. * * @param array Associative array of parameters. * @return array See {@link Plugin::get_coll_setting_definitions()}. */ function get_coll_setting_definitions( & $params ) { global $app_version; return array( 'sample_sets' => array( 'label' => T_('Dynamic Settings'), 'note' => T_('Click to add another set'), 'type' => version_compare( $app_version, '6.6.5', '>' ) ? 'array:array:string' : 'array', 'max_count' => 10, 'entries' => array( 'file_ID' => array( 'label' => T_('Image'), 'defaultvalue' => '', 'type' => 'fileselect', 'thumbnail_size' => 'fit-320x320', ), ), ), ); } /** * Param definitions when added as a widget. * * Plugins used as widget need to implement the SkinTag hook. * * @return array */ function get_widget_param_definitions( $params ) { global $app_version; return array( 'sample_sets' => array( 'label' => T_('Dynamic Settings'), 'note' => T_('Click to add another set'), 'type' => version_compare( $app_version, '6.6.5', '>' ) ? 'array:array:string' : 'array', 'max_count' => 10, 'entries' => array( 'file_ID' => array( 'label' => T_('Image'), 'defaultvalue' => '', 'type' => 'fileselect', 'thumbnail_size' => 'fit-320x320', ), ), ), ); } // If you use hooks, that are not present in b2evo 1.8, you should also add // a GetDependencies() function and require the b2evo version your Plugin needs. // See http://doc.b2evolution.net/stable/plugins/Plugin.html#methodGetDependencies // Add the methods to hook into here... // See http://doc.b2evolution.net/stable/plugins/Plugin.html function SkinTag( & $params ) { return true; } } ?>