/** * Get definitions for editable params * * @see Plugin::GetDefaultSettings() * @param local params like 'for_editing' => true */ function get_param_definitions($params) { global $Blog; $r = parent::get_param_definitions($params); $r['widget_name']['defaultvalue'] = $Blog->dget('name'); return $r; }
/** * Get definitions for editable params * * @see Plugin::GetDefaultSettings() * @param local params like 'for_editing' => true */ function get_param_definitions($params) { global $Blog; // Demo data: $r = array_merge(array('title' => array('label' => 'Block title', 'size' => 60, 'defaultvalue' => T_('Linkblog'), 'note' => T_('This is title to display in your skin.')), 'linkblog_ID' => array('label' => T_('Linkblog'), 'size' => 4, 'defaultvalue' => $Blog->get('links_blog_ID'), 'note' => T_('This is ID number of the blog to use as a linkblog.')), 'linkblog_limit' => array('label' => T_('Display'), 'size' => 4, 'defaultvalue' => 100, 'note' => T_('This is the maximum number of links to display.'))), parent::get_param_definitions($params)); return $r; }
/** * Get definitions for editable params * * @see Plugin::GetDefaultSettings() * @param local params like 'for_editing' => true */ function get_param_definitions($params) { $r = array_merge(array('title' => array('label' => T_('Block title'), 'note' => T_('Title to display in your skin.'), 'size' => 40, 'defaultvalue' => T_('User tools')), 'user_postnew_link_show' => array('label' => T_('Write a new post link'), 'note' => T_('Show link'), 'type' => 'checkbox', 'defaultvalue' => 1), 'user_postnew_link' => array('size' => 30, 'note' => T_('Link text to display'), 'type' => 'text', 'defaultvalue' => T_('Write a new post...')), 'user_messaging_link_show' => array('label' => T_('Messaging area link'), 'note' => T_('Show link'), 'type' => 'checkbox', 'defaultvalue' => 1), 'show_badge' => array('label' => T_('Show Badge'), 'note' => T_('Show a badge with the count of unread messages.'), 'type' => 'checkbox', 'defaultvalue' => true), 'user_messaging_link' => array('size' => 30, 'note' => T_('Link text to display'), 'type' => 'text', 'defaultvalue' => T_('My messages')), 'user_contacts_link_show' => array('label' => T_('Contacts link'), 'note' => T_('Show link'), 'type' => 'checkbox', 'defaultvalue' => 1), 'user_contacts_link' => array('size' => 30, 'note' => T_('Link text to display'), 'type' => 'text', 'defaultvalue' => T_('My contacts')), 'user_view_link_show' => array('label' => T_('See profile link'), 'note' => T_('Show link'), 'type' => 'checkbox', 'defaultvalue' => 1), 'user_view_link' => array('size' => 30, 'note' => T_('Link text to display'), 'type' => 'text', 'defaultvalue' => T_('My profile')), 'user_profile_link_show' => array('label' => T_('Edit profile link'), 'note' => T_('Show link'), 'type' => 'checkbox', 'defaultvalue' => 1), 'user_profile_link' => array('size' => 30, 'note' => T_('Link text to display'), 'type' => 'text', 'defaultvalue' => T_('Edit my profile')), 'user_picture_link_show' => array('label' => T_('Edit profile picture link'), 'note' => T_('Show link'), 'type' => 'checkbox', 'defaultvalue' => 1), 'user_picture_link' => array('size' => 30, 'note' => T_('Link text to display'), 'type' => 'text', 'defaultvalue' => T_('Change my picture')), 'user_password_link_show' => array('label' => T_('Edit password link'), 'note' => T_('Show link'), 'type' => 'checkbox', 'defaultvalue' => 0), 'user_password_link' => array('size' => 30, 'note' => T_('Link text to display'), 'type' => 'text', 'defaultvalue' => T_('Change my password')), 'user_preferences_link_show' => array('label' => T_('Edit preferences link'), 'note' => T_('Show link'), 'type' => 'checkbox', 'defaultvalue' => 0), 'user_preferences_link' => array('size' => 30, 'note' => T_('Link text to display'), 'type' => 'text', 'defaultvalue' => T_('Change my preferences')), 'user_subs_link_show' => array('label' => T_('Edit notifications link'), 'note' => T_('Show link'), 'type' => 'checkbox', 'defaultvalue' => 0), 'user_subs_link' => array('size' => 30, 'note' => T_('Link text to display'), 'type' => 'text', 'defaultvalue' => T_('Notifications & Subscriptions')), 'user_admin_link_show' => array('label' => T_('Admin link'), 'note' => T_('Show link'), 'type' => 'checkbox', 'defaultvalue' => 1), 'user_admin_link' => array('size' => 30, 'note' => T_('Link text to display'), 'type' => 'text', 'defaultvalue' => T_('Admin area')), 'user_logout_link_show' => array('label' => T_('Logout link'), 'note' => T_('Show link'), 'type' => 'checkbox', 'defaultvalue' => 1), 'user_logout_link' => array('size' => 30, 'note' => T_('Link text to display'), 'type' => 'text', 'defaultvalue' => T_('Log out'))), parent::get_param_definitions($params)); if (isset($r['allow_blockcache'])) { // Set default blockcache to false and disable this setting because caching is never allowed for this widget $r['allow_blockcache']['defaultvalue'] = false; $r['allow_blockcache']['disabled'] = 'disabled'; $r['allow_blockcache']['note'] = T_('This widget cannot be cached in the block cache.'); } return $r; }
/** * Get definitions for editable params * * @see Plugin::GetDefaultSettings() * @param local params like 'for_editing' => true */ function get_param_definitions($params) { $r = array_merge(array('title' => array('label' => T_('Block title'), 'note' => T_('Title to display in your skin.'), 'size' => 40, 'defaultvalue' => T_('Get our newsletter!')), 'intro' => array('label' => T_('Intro text'), 'note' => '', 'type' => 'textarea', 'defaultvalue' => ''), 'ask_firstname' => array('label' => T_('Ask for first name'), 'note' => '', 'type' => 'radio', 'options' => array(array('no', T_('No')), array('optional', T_('Optional')), array('required', T_('Required'))), 'defaultvalue' => 'no'), 'ask_lastname' => array('label' => T_('Ask for last name'), 'note' => '', 'type' => 'radio', 'options' => array(array('no', T_('No')), array('optional', T_('Optional')), array('required', T_('Required'))), 'defaultvalue' => 'no'), 'source' => array('label' => T_('Source code'), 'note' => '', 'size' => 40, 'defaultvalue' => 'email capture form'), 'subscribe_post' => array('label' => T_('Auto subscribe'), 'note' => T_('check to auto subscribe new user to current collection posts'), 'type' => 'checkbox', 'defaultvalue' => 1), 'subscribe_comment' => array('label' => '', 'note' => T_('check to auto subscribe new user to current collection comments'), 'type' => 'checkbox', 'defaultvalue' => 1), 'button' => array('label' => T_('Button title'), 'note' => T_('Text that appears on the form submit button.'), 'size' => 40, 'defaultvalue' => T_('Sign up!'))), parent::get_param_definitions($params)); if (isset($r['allow_blockcache'])) { // Set default blockcache to false and disable this setting because caching is never allowed for this widget $r['allow_blockcache']['defaultvalue'] = false; $r['allow_blockcache']['disabled'] = 'disabled'; $r['allow_blockcache']['note'] = T_('This widget cannot be cached in the block cache.'); } return $r; }
/** * Get definitions for editable params * * @see Plugin::GetDefaultSettings() * @param local params like 'for_editing' => true */ function get_param_definitions($params) { load_funcs('files/model/_image.funcs.php'); /** * @var ItemTypeCache */ $ItemTypeCache =& get_ItemTypeCache(); $item_type_options = array('' => T_('All')) + $ItemTypeCache->get_option_array(); $r = array_merge(array('title' => array('label' => T_('Block title'), 'note' => T_('Title to display in your skin.'), 'size' => 40, 'defaultvalue' => T_('Recent photos')), 'item_type' => array('label' => T_('Item type'), 'note' => T_('What kind of items do you want to list?'), 'type' => 'select', 'options' => $item_type_options, 'defaultvalue' => '1'), 'thumb_size' => array('label' => T_('Thumbnail size'), 'note' => T_('Cropping and sizing of thumbnails'), 'type' => 'select', 'options' => get_available_thumb_sizes(), 'defaultvalue' => 'crop-80x80'), 'thumb_layout' => array('label' => T_('Layout'), 'note' => T_('How to lay out the thumbnails'), 'type' => 'select', 'options' => array('grid' => T_('Grid'), 'list' => T_('List')), 'defaultvalue' => 'grid'), 'disp_image_title' => array('label' => T_('Display image title'), 'note' => T_('Check this to display image title. This falls back to post title if image title is not set.'), 'type' => 'checkbox', 'defaultvalue' => false), 'grid_nb_cols' => array('label' => T_('Columns'), 'note' => T_('Number of columns in grid mode.'), 'size' => 4, 'defaultvalue' => 2), 'limit' => array('label' => T_('Max items'), 'note' => T_('Maximum number of items to display.'), 'size' => 4, 'defaultvalue' => 3), 'order_by' => array('label' => T_('Order by'), 'note' => T_('How to sort the items'), 'type' => 'select', 'options' => get_available_sort_options(), 'defaultvalue' => 'datestart'), 'order_dir' => array('label' => T_('Direction'), 'note' => T_('How to sort the items'), 'type' => 'radio', 'options' => array(array('ASC', T_('Ascending')), array('DESC', T_('Descending'))), 'defaultvalue' => 'DESC'), 'blog_ID' => array('label' => T_('Blogs'), 'note' => T_('IDs of the blogs to use, leave empty for the current blog. Separate multiple blogs by commas.'), 'size' => 4)), parent::get_param_definitions($params)); return $r; }
/** * Get definitions for editable params * * @see Plugin::GetDefaultSettings() * @param local params like 'for_editing' => true */ function get_param_definitions($params) { load_funcs('files/model/_image.funcs.php'); /** * @var ItemTypeCache */ $ItemTypeCache =& get_ItemTypeCache(); $item_type_options = array('#' => T_('Default'), '' => T_('All')) + $ItemTypeCache->get_option_array(); $r = array_merge(array('title' => array('label' => T_('Block title'), 'note' => T_('Title to display in your skin.'), 'size' => 60, 'defaultvalue' => T_('Items')), 'title_link' => array('label' => T_('Link to blog'), 'note' => T_('Link the block title to the blog?'), 'type' => 'checkbox', 'defaultvalue' => false), 'item_type' => array('label' => T_('Item type'), 'note' => T_('What kind of items do you want to list?'), 'type' => 'select', 'options' => $item_type_options, 'defaultvalue' => '#'), 'thumb_size' => array('label' => T_('Thumbnail size'), 'note' => T_('Cropping and sizing of thumbnails'), 'type' => 'select', 'options' => get_available_thumb_sizes(), 'defaultvalue' => 'crop-80x80'), 'follow_mainlist' => array('label' => T_('Follow Main List'), 'note' => T_('Do you want to restrict to contents related to what is displayed in the main area?'), 'type' => 'radio', 'options' => array(array('no', T_('No')), array('tags', T_('By tags'))), 'defaultvalue' => 'no'), 'blog_ID' => array('label' => T_('Blog'), 'note' => T_('ID of the blog to use, leave empty for the current blog.'), 'size' => 4), 'item_group_by' => array('label' => T_('Group by'), 'note' => T_('Do you want to group the Items?'), 'type' => 'radio', 'options' => array(array('none', T_('None')), array('chapter', T_('By category/chapter'))), 'defaultvalue' => 'none'), 'order_by' => array('label' => T_('Order by'), 'note' => T_('How to sort the items'), 'type' => 'select', 'options' => get_available_sort_options(), 'defaultvalue' => 'datestart'), 'order_dir' => array('label' => T_('Direction'), 'note' => T_('How to sort the items'), 'type' => 'radio', 'options' => array(array('ASC', T_('Ascending')), array('DESC', T_('Descending'))), 'defaultvalue' => 'DESC'), 'limit' => array('label' => T_('Max items'), 'note' => T_('Maximum number of items to display.'), 'size' => 4, 'defaultvalue' => 20), 'disp_title' => array('label' => T_('Titles'), 'note' => T_('Display title.'), 'type' => 'checkbox', 'defaultvalue' => true), 'item_title_link_type' => array('label' => T_('Link titles'), 'note' => T_('Where should titles be linked to?'), 'type' => 'select', 'options' => array('auto' => T_('Automatic'), 'permalink' => T_('Item permalink'), 'linkto_url' => T_('Item URL'), 'none' => T_('Nowhere')), 'defaultvalue' => 'auto'), 'attached_pics' => array('label' => T_('Attached pictures'), 'note' => '', 'type' => 'radio', 'options' => array(array('none', T_('None')), array('first', T_('Display first')), array('all', T_('Display all'))), 'defaultvalue' => 'none'), 'item_pic_link_type' => array('label' => T_('Link pictures'), 'note' => T_('Where should pictures be linked to?'), 'type' => 'select', 'options' => array('auto' => T_('Automatic'), 'permalink' => T_('Item permalink'), 'linkto_url' => T_('Item URL'), 'none' => T_('Nowhere')), 'defaultvalue' => 'auto'), 'disp_excerpt' => array('label' => T_('Excerpt'), 'note' => T_('Display excerpt for each item.'), 'type' => 'checkbox', 'defaultvalue' => false), 'disp_teaser' => array('label' => T_('Content teaser'), 'type' => 'checkbox', 'defaultvalue' => false, 'note' => T_('Display content teaser for each item.')), 'disp_teaser_maxwords' => array('label' => T_('Max Words'), 'type' => 'integer', 'defaultvalue' => 20, 'note' => T_('Max number of words for the teasers.'))), parent::get_param_definitions($params)); // pre_dump( $r['item_type']['options'] ); return $r; }
/** * Get definitions for editable params * * @see Plugin::GetDefaultSettings() * @param local params like 'for_editing' => true */ function get_param_definitions($params) { load_funcs('files/model/_image.funcs.php'); $r = array_merge(array('title' => array('label' => T_('Block title'), 'note' => T_('Title to display in your skin.'), 'size' => 40, 'defaultvalue' => T_('User log in')), 'password_link_show' => array('label' => T_('Password recovery link'), 'note' => T_('Show link'), 'type' => 'checkbox', 'defaultvalue' => 1), 'password_link' => array('size' => 30, 'note' => T_('Link text to display'), 'type' => 'text', 'defaultvalue' => T_('Lost password?')), 'register_link_show' => array('label' => T_('Register link'), 'note' => T_('Show link'), 'type' => 'checkbox', 'defaultvalue' => 1), 'register_link' => array('size' => 30, 'note' => T_('Link text to display'), 'type' => 'text', 'defaultvalue' => T_('No account yet? Register here »')), 'profile_picture_size' => array('label' => T_('Profile picture'), 'note' => '', 'type' => 'select', 'options' => get_available_thumb_sizes(T_('none')), 'defaultvalue' => 'crop-top-32x32'), 'group_show' => array('label' => T_('User group'), 'note' => T_('Show user group'), 'type' => 'checkbox', 'defaultvalue' => 1), 'group_text' => array('size' => 30, 'note' => T_('Group text to display'), 'type' => 'text', 'defaultvalue' => T_('Your group: $group$')), 'level_show' => array('label' => T_('User level'), 'note' => T_('Show user level'), 'type' => 'checkbox', 'defaultvalue' => 1), 'level_text' => array('size' => 30, 'note' => T_('Level text to display'), 'type' => 'text', 'defaultvalue' => T_('Your level: $level$')), 'greeting_show' => array('label' => T_('Greeting'), 'note' => T_('Show greeting'), 'type' => 'checkbox', 'defaultvalue' => 1), 'greeting_text' => array('size' => 30, 'note' => T_('Greeting text to display'), 'type' => 'text', 'defaultvalue' => T_('Hello $login$!'))), parent::get_param_definitions($params)); if (isset($r['allow_blockcache'])) { // Set default blockcache to false and disable this setting because caching is never allowed for this widget $r['allow_blockcache']['defaultvalue'] = false; $r['allow_blockcache']['disabled'] = 'disabled'; $r['allow_blockcache']['note'] = T_('This widget cannot be cached in the block cache.'); } return $r; }
/** * Get definitions for editable params * * @see Plugin::GetDefaultSettings() * @param local params like 'for_editing' => true */ function get_param_definitions($params) { load_funcs('files/model/_image.funcs.php'); $r = array_merge(array('display_blog_title' => array('label' => T_('Blog Title'), 'note' => T_('Display blog title.'), 'type' => 'checkbox', 'defaultvalue' => true), 'open_children_levels' => array('label' => T_('Open children levels'), 'note' => T_('From 0 to 20.'), 'type' => 'integer', 'defaultvalue' => '0', 'valid_pattern' => array('pattern' => '~^(1?\\d|20)$~i', 'error' => T_('We can display from 0 to 20 children levels.'))), 'blog_ID' => array('label' => T_('Collection'), 'note' => T_('ID of the collection to use, leave empty for the current collection.'), 'size' => 4, 'type' => 'integer', 'allow_empty' => true)), parent::get_param_definitions($params)); if (isset($r['allow_blockcache'])) { // Disable "allow blockcache" because this widget uses the selected items and the content is dynamic $r['allow_blockcache']['defaultvalue'] = false; $r['allow_blockcache']['disabled'] = 'disabled'; $r['allow_blockcache']['note'] = T_('This widget cannot be cached in the block cache.'); } return $r; }
/** * Get definitions for editable params * * @see Plugin::GetDefaultSettings() * @param local params like 'for_editing' => true */ function get_param_definitions($params) { // Load Userfield class and all fields: load_class('users/model/_userfield.class.php', 'Userfield'); $UserFieldCache =& get_UserFieldCache(); $UserFieldCache->load_all(); $user_fields = array(); foreach ($UserFieldCache->cache as $UserField) { $user_fields[$UserField->get('code')] = $UserField->get_name(); } $r = array_merge(array('title' => array('label' => T_('Block title'), 'note' => T_('Title to display in your skin.'), 'size' => 40, 'defaultvalue' => T_('Our Awesome Team')), 'org_ID' => array('label' => T_('Organization ID'), 'note' => sprintf(T_('ID of the <a %s>organization</a> to display.'), 'href="?ctrl=organizations"'), 'type' => 'integer', 'size' => 3, 'defaultvalue' => 1), 'link_profile' => array('label' => T_('Link to profile'), 'note' => T_('Check this to link each user to his profile.'), 'type' => 'checkbox', 'defaultvalue' => 1), 'display_icons' => array('label' => T_('Contact icons'), 'note' => T_('Check this to display icons for User Field URLs with an icon.'), 'type' => 'checkbox', 'defaultvalue' => 1), 'icon_colors' => array('label' => T_('Icon color'), 'type' => 'checklist', 'options' => array(array('text', T_('Use for normal text'), 0), array('bg', T_('Use for normal background'), 0), array('hovertext', T_('Use for hover text'), 0), array('hoverbg', T_('Use for hover background'), 1))), 'field_code' => array('label' => T_('Extra Info Field'), 'note' => T_('Select what extra user field should be displayed.'), 'type' => 'select', 'options' => array('' => T_('None')) + $user_fields, 'defaultvalue' => 'microbio'), 'field_extra_lines' => array('label' => T_('Lines of extra info'), 'note' => T_('Use this to keep contact cards aligned.'), 'defaultvalue' => '2')), parent::get_param_definitions($params)); return $r; }
/** * Get definitions for editable params * * @see Plugin::GetDefaultSettings() * @param local params like 'for_editing' => true */ function get_param_definitions($params) { load_funcs('files/model/_image.funcs.php'); /** * @var ItemTypeCache */ $ItemTypeCache =& get_ItemTypeCache(); $item_type_options = array('#' => T_('Default'), '' => T_('All')) + $ItemTypeCache->get_option_array(); $r = array_merge(array('title' => array('label' => T_('Block title'), 'note' => T_('Title to display in your skin.'), 'size' => 60, 'defaultvalue' => T_('Items')), 'title_link' => array('label' => T_('Link to blog'), 'note' => T_('Link the block title to the blog?'), 'type' => 'checkbox', 'defaultvalue' => false), 'item_visibility' => array('label' => T_('Item visibility'), 'note' => T_('What post statuses should be included in the list?'), 'type' => 'radio', 'field_lines' => true, 'options' => array(array('public', T_('show public posts')), array('all', T_('show all posts the current user is allowed to see'))), 'defaultvalue' => 'all'), 'item_type' => array('label' => T_('Post type'), 'note' => T_('What kind of items do you want to list?'), 'type' => 'select', 'options' => $item_type_options, 'defaultvalue' => '#'), 'follow_mainlist' => array('label' => T_('Follow Main List'), 'note' => T_('Do you want to restrict to contents related to what is displayed in the main area?'), 'type' => 'radio', 'options' => array(array('no', T_('No')), array('tags', T_('By tags'))), 'defaultvalue' => 'no'), 'blog_ID' => array('label' => T_('Collections'), 'note' => T_('List collection IDs separated by \',\', \'*\' for all collections, \'-\' for current collection without aggregation or leave empty for current collection including aggregation.'), 'size' => 4, 'type' => 'text', 'valid_pattern' => array('pattern' => '/^(\\d+(,\\d+)*|-|\\*)?$/', 'error' => T_('Invalid list of Collection IDs.')), 'defaultvalue' => ''), 'cat_IDs' => array('label' => T_('Categories'), 'note' => T_('List category IDs separated by ,'), 'size' => 15, 'type' => 'text', 'valid_pattern' => array('pattern' => '/^(\\d+(,\\d+)*|-|\\*)?$/', 'error' => T_('Invalid list of Category IDs.'))), 'item_group_by' => array('label' => T_('Group by'), 'note' => T_('Do you want to group the Items?'), 'type' => 'radio', 'options' => array(array('none', T_('None')), array('chapter', T_('By category/chapter'))), 'defaultvalue' => 'none'), 'order_by' => array('label' => T_('Order by'), 'note' => T_('How to sort the items'), 'type' => 'select', 'options' => get_available_sort_options(), 'defaultvalue' => 'datestart'), 'order_dir' => array('label' => T_('Direction'), 'note' => T_('How to sort the items'), 'type' => 'radio', 'options' => array(array('ASC', T_('Ascending')), array('DESC', T_('Descending'))), 'defaultvalue' => 'DESC'), 'limit' => array('label' => T_('Max items'), 'note' => T_('Maximum number of items to display.'), 'size' => 4, 'defaultvalue' => 20), 'disp_title' => array('label' => T_('Titles'), 'note' => T_('Display title.'), 'type' => 'checkbox', 'defaultvalue' => true), 'item_title_link_type' => array('label' => T_('Link titles to'), 'note' => T_('Where should titles be linked to?'), 'type' => 'select', 'options' => array('auto' => T_('Automatic'), 'permalink' => T_('Item permalink'), 'linkto_url' => T_('Item URL'), 'none' => T_('Nowhere')), 'defaultvalue' => 'permalink'), 'attached_pics' => array('label' => T_('Attached pictures'), 'note' => '', 'type' => 'radio', 'options' => array(array('none', T_('None')), array('first', T_('Display first picture')), array('all', T_('Display all pictures'))), 'defaultvalue' => 'none'), 'disp_first_image' => array('label' => T_('First picture'), 'note' => '', 'type' => 'radio', 'options' => array(array('special', T_('Special placement before title')), array('normal', T_('No special treatment (same as other pictures)'))), 'defaultvalue' => 'normal'), 'max_pics' => array('label' => T_('Max pictures'), 'note' => T_('Maximum number of pictures to display after the title.'), 'size' => 4, 'type' => 'integer', 'defaultvalue' => '', 'allow_empty' => true), 'thumb_size' => array('label' => T_('Image size'), 'note' => T_('Cropping and sizing of thumbnails'), 'type' => 'select', 'options' => get_available_thumb_sizes(), 'defaultvalue' => 'crop-80x80'), 'item_pic_link_type' => array('label' => T_('Link pictures'), 'note' => T_('Where should pictures be linked to?'), 'type' => 'select', 'options' => array('auto' => T_('Automatic'), 'permalink' => T_('Item permalink'), 'linkto_url' => T_('Item URL'), 'none' => T_('Nowhere')), 'defaultvalue' => 'auto'), 'disp_excerpt' => array('label' => T_('Excerpt'), 'note' => T_('Display excerpt for each item.'), 'type' => 'checkbox', 'defaultvalue' => false), 'disp_teaser' => array('label' => T_('Content teaser'), 'type' => 'checkbox', 'defaultvalue' => false, 'note' => T_('Display content teaser for each item.')), 'disp_teaser_maxwords' => array('label' => T_('Max Words'), 'type' => 'integer', 'defaultvalue' => 20, 'note' => T_('Max number of words for the teasers.'))), parent::get_param_definitions($params)); if (isset($r['allow_blockcache'])) { // Disable "allow blockcache" because this widget uses the selected items $r['allow_blockcache']['defaultvalue'] = false; $r['allow_blockcache']['disabled'] = 'disabled'; $r['allow_blockcache']['note'] = T_('This widget cannot be cached in the block cache.'); } return $r; }
/** * Get definitions for editable params * * @see Plugin::GetDefaultSettings() * @param local params like 'for_editing' => true */ function get_param_definitions($params) { $r = array_merge(array('title' => array('label' => T_('Block title'), 'note' => T_('Title to display in your skin.'), 'size' => 40, 'defaultvalue' => T_('Recent Comments')), 'disp_order' => array('label' => T_('Order'), 'note' => T_('Order to display items'), 'type' => 'select', 'options' => array('DESC' => T_('Newest to oldest'), 'ASC' => T_('Oldest to newest'), 'RAND' => T_('Random selection')), 'defaultvalue' => 'DESC'), 'limit' => array('label' => T_('Max items'), 'note' => T_('Maximum number of items to display.'), 'size' => 4, 'defaultvalue' => 20), 'author_links' => array('label' => T_('Link to author'), 'note' => T_('Link the author to their url'), 'defaultvalue' => true, 'type' => 'checkbox'), 'hover_text' => array('label' => T_('Hover text'), 'note' => T_('Text to show when hovering over the link'), 'size' => 40, 'defaultvalue' => T_('Read the full comment'), 'type' => 'text'), 'blog_ID' => array('label' => T_('Collection'), 'note' => T_('ID of the collection to use, leave empty for the current collection.'), 'size' => 4, 'type' => 'integer', 'allow_empty' => true)), parent::get_param_definitions($params)); return $r; }
/** * Constructor */ function coll_longdesc_Widget($db_row = NULL) { // Call parent constructor: parent::ComponentWidget($db_row, 'core', 'coll_longdesc'); }
/** * Get definitions for editable params * * @see Plugin::GetDefaultSettings() * @param local params like 'for_editing' => true */ function get_param_definitions($params) { $r = array_merge(array('image_source' => array('label' => T_('Image source'), 'note' => '', 'type' => 'radio', 'options' => array(array('skin', T_('Skin folder')), array('coll', T_('Collection File Root')), array('shared', T_('Shared File Root'))), 'defaultvalue' => 'coll'), 'logo_file' => array('label' => T_('Image filename'), 'note' => T_('Relative to the root of the selected source.'), 'defaultvalue' => 'logo.png', 'valid_pattern' => array('pattern' => '~^[a-z0-9_\\-/][a-z0-9_.\\-/]*$~i', 'error' => T_('Invalid filename.'))), 'width' => array('label' => T_('Image width'), 'note' => T_('pixels'), 'type' => 'integer', 'defaultvalue' => '', 'allow_empty' => true), 'height' => array('label' => T_('Image height'), 'note' => T_('pixels'), 'type' => 'integer', 'defaultvalue' => '', 'allow_empty' => true), 'check_file' => array('label' => T_('Check file'), 'note' => T_('Check if file exists. If not, no IMG tag will be created.'), 'type' => 'checkbox', 'defaultvalue' => false)), parent::get_param_definitions($params)); return $r; }
/** * Get definitions for editable params * * @see Plugin::GetDefaultSettings() * @param local params like 'for_editing' => true */ function get_param_definitions($params) { $r = array_merge(array('title' => array('label' => T_('Block title'), 'note' => T_('Title to display in your skin.'), 'size' => 40, 'defaultvalue' => '')), parent::get_param_definitions($params)); return $r; }
/** * Get definitions for editable params * * @see Plugin::GetDefaultSettings() * @param local params like 'for_editing' => true */ function get_param_definitions($params) { $r = array_merge(array('title' => array('label' => T_('Block title'), 'note' => T_('Title to display in your skin.'), 'size' => 40, 'defaultvalue' => ''), 'show_recently' => array('type' => 'checkbox', 'label' => T_('Show "Recently"'), 'note' => T_('Go to the most recent posts / the blog\'s home.'), 'defaultvalue' => 1), 'show_search' => array('type' => 'checkbox', 'label' => T_('Show "Search"'), 'note' => T_('Go to the search page.'), 'defaultvalue' => 0), 'show_postidx' => array('type' => 'checkbox', 'label' => T_('Show "Post index"'), 'note' => T_('Go to the post index.'), 'defaultvalue' => 0), 'show_archives' => array('type' => 'checkbox', 'label' => T_('Show "Archives"'), 'note' => T_('Go to the monthly/weekly/daily archive list.'), 'defaultvalue' => 1), 'show_categories' => array('type' => 'checkbox', 'label' => T_('Show "Categories"'), 'note' => T_('Go to the category tree.'), 'defaultvalue' => 1), 'show_mediaidx' => array('type' => 'checkbox', 'label' => T_('Show "Photo index"'), 'note' => T_('Go to the photo index / contact sheet.'), 'defaultvalue' => 0), 'show_latestcomments' => array('type' => 'checkbox', 'label' => T_('Show "Latest comments"'), 'note' => T_('Go to the latest comments.'), 'defaultvalue' => 1), 'show_owneruserinfo' => array('type' => 'checkbox', 'label' => T_('Show "Owner details"'), 'note' => T_('Go to user info about the blog owner.'), 'defaultvalue' => 0), 'show_ownercontact' => array('type' => 'checkbox', 'label' => T_('Show "Contact"'), 'note' => T_('Go to message form to contact the blog owner.'), 'defaultvalue' => 0), 'show_sitemap' => array('type' => 'checkbox', 'label' => T_('Show "Site map"'), 'note' => T_('Go to site map (HTML version).'), 'defaultvalue' => 0)), parent::get_param_definitions($params)); return $r; }
/** * Get definitions for editable params * * @see Plugin::GetDefaultSettings() * @param local params like 'for_editing' => true */ function get_param_definitions($params) { global $use_strict; $r = array_merge(array('title' => array('label' => T_('Title'), 'size' => 40, 'note' => T_('This is the title to display, $icon$ will be replaced by the feed icon'), 'defaultvalue' => T_('All blogs')), 'order_by' => array('label' => T_('Order by'), 'note' => T_('How to sort the blogs'), 'type' => 'select', 'options' => get_coll_sort_options(), 'defaultvalue' => 'ID'), 'order_dir' => array('label' => T_('Direction'), 'note' => T_('How to sort the blogs'), 'type' => 'radio', 'options' => array(array('ASC', T_('Ascending')), array('DESC', T_('Descending'))), 'defaultvalue' => 'ASC')), parent::get_param_definitions($params)); return $r; }
/** * Get definitions for editable params * * @see Plugin::GetDefaultSettings() * @param local params like 'for_editing' => true */ function get_param_definitions($params) { // Demo data: $r = array_merge(array('title' => array('label' => T_('Title'), 'size' => 60, 'defaultvalue' => T_('Mobile skin'))), parent::get_param_definitions($params)); return $r; }
/** * Get definitions for editable params * * @see Plugin::GetDefaultSettings() * @param array local params * - 'size': Size definition, see {@link $thumbnail_sizes}. E.g. 'fit-160x160'. */ function get_param_definitions($params) { load_funcs('files/model/_image.funcs.php'); $r = array_merge(array('thumb_size' => array('type' => 'select', 'label' => T_('Image size'), 'options' => get_available_thumb_sizes(), 'note' => sprintf(T_('List of available image sizes is defined in %s.'), '$thumbnail_sizes'), 'defaultvalue' => 'fit-160x160')), parent::get_param_definitions($params)); return $r; }
/** * Constructor */ function member_count_Widget($db_row = NULL) { // Call parent constructor: parent::ComponentWidget($db_row, 'core', 'member_count'); }
/** * Prepare display params * * @param array MUST contain at least the basic display params */ function init_display($params) { parent::init_display($params); // Disable "allow blockcache" because this widget uses the selected items $this->disp_params['allow_blockcache'] = 0; }
/** * Get definitions for editable params * * @see Plugin::GetDefaultSettings() * @param array local params */ function get_param_definitions($params) { $r = array_merge(array('title' => array('type' => 'text', 'label' => T_('Block title'), 'defaultvalue' => T_('Current filters'), 'maxlength' => 100), 'show_filters' => array('type' => 'checklist', 'label' => T_('Show filters'), 'options' => array(array('category', T_('Category'), 1), array('archive', T_('Archive'), 1), array('keyword', T_('Keyword'), 1), array('tag', T_('Tag'), 1), array('author', T_('Author'), 1), array('assignee', T_('Assignee'), 1), array('locale', T_('Locale'), 1), array('status', T_('Status'), 1), array('visibility', T_('Visibility'), 1), array('time', T_('Past/Future'), 0), array('limit', T_('Limit by days'), 1)))), parent::get_param_definitions($params)); return $r; }
/** * Get definitions for editable params * * @see Plugin::GetDefaultSettings() * @param array local params */ function get_param_definitions($params) { load_funcs('files/model/_image.funcs.php'); $r = array_merge(array('title' => array('label' => T_('Block title'), 'note' => T_('Title to display in your skin.'), 'size' => 40, 'defaultvalue' => T_('Online users')), 'allow_anonymous' => array('label' => T_('Allow for anonymous users'), 'note' => T_('Uncheck to display this widget only for logged in users'), 'type' => 'checkbox', 'defaultvalue' => 1)), parent::get_param_definitions($params)); return $r; }
/** * Get definitions for editable params * * @see Plugin::GetDefaultSettings() * @param local params like 'for_editing' => true */ function get_param_definitions($params) { load_funcs('files/model/_image.funcs.php'); $r = array_merge(array('title' => array('label' => T_('Block title'), 'note' => T_('Title to display in your skin.'), 'size' => 40, 'defaultvalue' => T_('User log in')), 'password_link_show' => array('label' => T_('Password recovery link'), 'note' => T_('Show link'), 'type' => 'checkbox', 'defaultvalue' => 1), 'password_link' => array('size' => 30, 'note' => T_('Link text to display'), 'type' => 'text', 'defaultvalue' => T_('Lost password?')), 'register_link_show' => array('label' => T_('Register link'), 'note' => T_('Show link'), 'type' => 'checkbox', 'defaultvalue' => 1), 'register_link' => array('size' => 30, 'note' => T_('Link text to display'), 'type' => 'text', 'defaultvalue' => T_('No account yet? Register here »')), 'profile_picture_size' => array('label' => T_('Profile picture'), 'note' => '', 'type' => 'select', 'options' => get_available_thumb_sizes(T_('none')), 'defaultvalue' => 'crop-top-32x32'), 'group_show' => array('label' => T_('User group'), 'note' => T_('Show user group'), 'type' => 'checkbox', 'defaultvalue' => 1), 'group_text' => array('size' => 30, 'note' => T_('Group text to display'), 'type' => 'text', 'defaultvalue' => T_('Your group: $group$')), 'level_show' => array('label' => T_('User level'), 'note' => T_('Show user level'), 'type' => 'checkbox', 'defaultvalue' => 1), 'level_text' => array('size' => 30, 'note' => T_('Level text to display'), 'type' => 'text', 'defaultvalue' => T_('Your level: $level$')), 'greeting_show' => array('label' => T_('Greeting'), 'note' => T_('Show greeting'), 'type' => 'checkbox', 'defaultvalue' => 1), 'greeting_text' => array('size' => 30, 'note' => T_('Greeting text to display'), 'type' => 'text', 'defaultvalue' => T_('Hello $login$ !'))), parent::get_param_definitions($params)); return $r; }
/** * Get definitions for editable params * * @see Plugin::GetDefaultSettings() * @param local params like 'for_editing' => true */ function get_param_definitions($params) { $r = array_merge(array('show_recently' => array('type' => 'checkbox', 'label' => T_('Show "Recently"'), 'note' => T_('Go to the most recent posts / the blog\'s home.'), 'defaultvalue' => '1'), 'show_archives' => array('type' => 'checkbox', 'label' => T_('Show "Archives"'), 'note' => T_('Go to the monthly/weekly/daily archive list.'), 'defaultvalue' => '1'), 'show_categories' => array('type' => 'checkbox', 'label' => T_('Show "Categories"'), 'note' => T_('Go to the category tree.'), 'defaultvalue' => '1'), 'show_latestcomments' => array('type' => 'checkbox', 'label' => T_('Show "Latest comments"'), 'note' => T_('Go to the latest comments.'), 'defaultvalue' => '1')), parent::get_param_definitions($params)); return $r; }
/** * Get definitions for editable params * * @see Plugin::GetDefaultSettings() * @param local params like 'for_editing' => true */ function get_param_definitions($params) { load_funcs('files/model/_image.funcs.php'); $r = array_merge(array('title' => array('label' => T_('Block title'), 'note' => T_('Title to display in your skin.'), 'size' => 40, 'defaultvalue' => ''), 'login' => array('label' => T_('User login'), 'note' => T_('leave blank to use author of current post or current collection.'), 'size' => 20, 'defaultvalue' => ''), 'icon_colors' => array('label' => T_('Icon color'), 'type' => 'checklist', 'options' => array(array('text', T_('Use for normal text'), 0), array('bg', T_('Use for normal background'), 0), array('hovertext', T_('Use for hover text'), 0), array('hoverbg', T_('Use for hover background'), 1)))), parent::get_param_definitions($params)); return $r; }
/** * Get definitions for editable params * * @see Plugin::GetDefaultSettings() * @param local params like 'for_editing' => true */ function get_param_definitions($params) { $r = array_merge(array('title' => array('label' => T_('Block title'), 'note' => T_('Title to display in your skin.'), 'size' => 40, 'defaultvalue' => T_('User tools')), 'user_postnew_link_show' => array('label' => T_('Write a new post link'), 'note' => T_('Show link'), 'type' => 'checkbox', 'defaultvalue' => 1), 'user_postnew_link' => array('size' => 30, 'note' => T_('Link text to display'), 'type' => 'text', 'defaultvalue' => T_('Write a new post...')), 'user_messaging_link_show' => array('label' => T_('Messaging area link'), 'note' => T_('Show link'), 'type' => 'checkbox', 'defaultvalue' => 1), 'show_badge' => array('label' => T_('Show Badge'), 'note' => T_('Show a badge with the count of unread messages.'), 'type' => 'checkbox', 'defaultvalue' => true), 'user_messaging_link' => array('size' => 30, 'note' => T_('Link text to display'), 'type' => 'text', 'defaultvalue' => T_('My messages')), 'user_contacts_link_show' => array('label' => T_('Contacts link'), 'note' => T_('Show link'), 'type' => 'checkbox', 'defaultvalue' => 1), 'user_contacts_link' => array('size' => 30, 'note' => T_('Link text to display'), 'type' => 'text', 'defaultvalue' => T_('My contacts')), 'user_view_link_show' => array('label' => T_('See profile link'), 'note' => T_('Show link'), 'type' => 'checkbox', 'defaultvalue' => 1), 'user_view_link' => array('size' => 30, 'note' => T_('Link text to display'), 'type' => 'text', 'defaultvalue' => T_('My profile')), 'user_profile_link_show' => array('label' => T_('Edit profile link'), 'note' => T_('Show link'), 'type' => 'checkbox', 'defaultvalue' => 1), 'user_profile_link' => array('size' => 30, 'note' => T_('Link text to display'), 'type' => 'text', 'defaultvalue' => T_('Edit my profile')), 'user_picture_link_show' => array('label' => T_('Edit profile picture link'), 'note' => T_('Show link'), 'type' => 'checkbox', 'defaultvalue' => 1), 'user_picture_link' => array('size' => 30, 'note' => T_('Link text to display'), 'type' => 'text', 'defaultvalue' => T_('Change my picture')), 'user_password_link_show' => array('label' => T_('Edit password link'), 'note' => T_('Show link'), 'type' => 'checkbox', 'defaultvalue' => 0), 'user_password_link' => array('size' => 30, 'note' => T_('Link text to display'), 'type' => 'text', 'defaultvalue' => T_('Change my password')), 'user_preferences_link_show' => array('label' => T_('Edit preferences link'), 'note' => T_('Show link'), 'type' => 'checkbox', 'defaultvalue' => 0), 'user_preferences_link' => array('size' => 30, 'note' => T_('Link text to display'), 'type' => 'text', 'defaultvalue' => T_('Change my preferences')), 'user_subs_link_show' => array('label' => T_('Edit notifications link'), 'note' => T_('Show link'), 'type' => 'checkbox', 'defaultvalue' => 0), 'user_subs_link' => array('size' => 30, 'note' => T_('Link text to display'), 'type' => 'text', 'defaultvalue' => T_('Notifications & Subscriptions')), 'user_admin_link_show' => array('label' => T_('Admin link'), 'note' => T_('Show link'), 'type' => 'checkbox', 'defaultvalue' => 1), 'user_admin_link' => array('size' => 30, 'note' => T_('Link text to display'), 'type' => 'text', 'defaultvalue' => T_('Admin area')), 'user_logout_link_show' => array('label' => T_('Logout link'), 'note' => T_('Show link'), 'type' => 'checkbox', 'defaultvalue' => 1), 'user_logout_link' => array('size' => 30, 'note' => T_('Link text to display'), 'type' => 'text', 'defaultvalue' => T_('Logout'))), parent::get_param_definitions($params)); return $r; }
/** * Constructor */ function coll_title_Widget($db_row = NULL) { // Call parent constructor: parent::ComponentWidget($db_row, 'core', 'coll_title'); }
/** * Get definitions for editable params * * @see Plugin::GetDefaultSettings() * @param local params like 'for_editing' => true */ function get_param_definitions($params) { $r = array_merge(array('title' => array('label' => T_('Block title'), 'note' => T_('Title to display in your skin.'), 'size' => 60, 'defaultvalue' => T_('Pages')), 'title_link' => array('label' => T_('Link to blog'), 'note' => T_('Link the block title to the blog?'), 'type' => 'checkbox', 'defaultvalue' => false), 'disp_order' => array('label' => T_('Order'), 'note' => T_('Order to display items'), 'type' => 'select', 'options' => array('DESC' => T_('Alphabetical ( Z - A )'), 'ASC' => T_('Alphabetical ( A - Z )'), 'RAND' => T_('Random selection')), 'defaultvalue' => 'ASC'), 'limit' => array('label' => T_('Display'), 'note' => T_('Max items to display.'), 'size' => 4, 'defaultvalue' => 20), 'disp_excerpt' => array('label' => T_('Excerpt'), 'note' => T_('Display item excerpt.'), 'type' => 'checkbox', 'defaultvalue' => false), 'blog_ID' => array('label' => T_('Blog'), 'note' => T_('ID of the blog to use, leave empty for the current blog.'), 'size' => 4)), parent::get_param_definitions($params)); return $r; }
/** * Get definitions for editable params * * @see Plugin::GetDefaultSettings() * @param local params like 'for_editing' => true */ function get_param_definitions($params) { // Demo data: $r = array_merge(array('title' => array('label' => T_('Block title'), 'size' => 60), 'content' => array('type' => 'html_textarea', 'label' => T_('Block content'), 'rows' => 10)), parent::get_param_definitions($params)); return $r; }
/** * Get definitions for editable params * * @see Plugin::GetDefaultSettings() * @param local params like 'for_editing' => true */ function get_param_definitions($params) { global $use_strict; $r = array_merge(array('title' => array('label' => T_('Title'), 'size' => 40, 'note' => T_('This is the title to display, $icon$ will be replaced by the feed icon'), 'defaultvalue' => '$icon$ ' . T_('XML Feeds')), 'disp_info_link' => array('label' => T_('Help link'), 'type' => 'checkbox', 'note' => T_('Check this to display "What is RSS?" link'), 'defaultvalue' => 1), 'info_link' => array('label' => T_('New Window'), 'type' => 'checkbox', 'note' => T_('Check this to add target="_blank" to the "What is RSS?" link'), 'defaultvalue' => !$use_strict)), parent::get_param_definitions($params)); return $r; }