function getOptionsSupported() { global $personalities; require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/image_effects.php'; $note = '<p class="notebox">' . gettext('<strong>Note:</strong> This option is valid only if the Zenpage plugin is enabled or the Separate gallery index option is checked. Of course the <em>menu_manager</em> plugin must also be enabled.') . '</p>'; if (!extensionEnabled('print_album_menu') && (($m = getOption('effervescence_menu')) == 'effervescence' || $m == 'zenpage' || $m == 'garland')) { $note .= '<p class="notebox">' . sprintf(gettext('<strong>Note:</strong> The <em>%s</em> custom menu makes use of the <em>print_album_menu</em> plugin.'), $m) . '</p>'; } $options = array(gettext('Separate gallery index') => array('key' => 'gallery_index', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 1, 'desc' => gettext('Check to move the gallery index from the home page to gallery.php.') . '<p class="notebox">' . gettext('<strong>Note:</strong> this is assumed if the zenpage plugin is enabled.') . '</p>'), gettext('Theme logo') => array('key' => 'Theme_logo', 'type' => OPTION_TYPE_TEXTBOX, 'multilingual' => 1, 'order' => 8, 'desc' => gettext('The text for the theme logo')), gettext('Watermark head image') => array('key' => 'Watermark_head_image', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 11, 'desc' => gettext('Check to place a watermark on the heading image. (Image watermarking must be set.)')), gettext('Daily image') => array('key' => 'effervescence_daily_album_image', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 3, 'desc' => gettext('If checked the heading image will change daily rather than on each page load.')), gettext('Allow search') => array('key' => 'Allow_search', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 3.5, 'desc' => gettext('Check to enable search form.')), gettext('Slideshow') => array('key' => 'Slideshow', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 6, 'desc' => gettext('Check to enable slideshow for the <em>Smoothgallery</em> personality.')), gettext('Graphic logo') => array('key' => 'Graphic_logo', 'type' => OPTION_TYPE_CUSTOM, 'order' => 4, 'desc' => sprintf(gettext('Select a logo (PNG files in the <em>%s/images</em> folder) or leave empty for text logo.'), UPLOAD_FOLDER)), gettext('Theme personality') => array('key' => 'effervescence_personality', 'type' => OPTION_TYPE_SELECTOR, 'selections' => $personalities, 'order' => 9, 'desc' => gettext('Select the theme personality')), gettext('Theme colors') => array('key' => 'Theme_colors', 'type' => OPTION_TYPE_CUSTOM, 'order' => 7, 'desc' => gettext('Select the colors of the theme')), gettext('Custom menu') => array('key' => 'effervescence_menu', 'type' => OPTION_TYPE_CUSTOM, 'order' => 2, 'desc' => gettext('Set this to the <em>menu_manager</em> menu you wish to use.') . $note)); if (getOption('effervescence_personality') == 'Image_gallery') { $options[gettext('Image gallery transition')] = array('key' => 'effervescence_transition', 'type' => OPTION_TYPE_SELECTOR, 'selections' => array(gettext('None') => '', gettext('Fade') => 'fade', gettext('Shrink/grow') => 'resize', gettext('Horizontal') => 'slide-hori', gettext('Vertical') => 'slide-vert'), 'order' => 10, 'desc' => gettext('Transition effect for Image gallery')); $options[gettext('Image gallery caption')] = array('key' => 'effervescence_caption_location', 'type' => OPTION_TYPE_RADIO, 'buttons' => array(gettext('On image') => 'image', gettext('Separate') => 'separate', gettext('Omit') => 'none'), 'order' => 10.5, 'desc' => gettext('Location for Image gallery picture caption')); } $effects = new image_effects(); $effectOptions = $effects->getOptionsSupported(); $effect = array_shift($effectOptions); while ($effect && !array_key_exists('selections', $effect)) { $effect = array_shift($effectOptions); } if ($effect && array_key_exists('selections', $effect)) { $options[gettext('Index Image')] = array('key' => 'effervescence_daily_album_image_effect', 'type' => OPTION_TYPE_SELECTOR, 'selections' => $effect['selections'], 'null_selection' => gettext('none'), 'order' => 5, 'desc' => gettext('Apply this effect to the index page image.')); if (!extensionEnabled('image_effects')) { $options[gettext('Index Image')]['disabled'] = true; $options[gettext('Index Image')]['desc'] .= '<p class="notebox">' . gettext('This option requires the <em>image_effects</em> plugin to be enabled.') . '</p>'; } } return $options; }
/** * * supported options */ function getOptionsSupported() { global $_zp_CMS; $options = array(gettext('Consumer key') => array('key' => 'tweet_news_consumer', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 2, 'desc' => gettext('This <code>tweet_news</code> app for this site needs a <em>consumer key</em>, a <em>consumer key secret</em>, an <em>access token</em>, and an <em>access token secret</em>.') . '<p class="notebox">' . gettext('Get these from <a href="http://dev.twitter.com/">Twitter developers</a>') . '</p>'), gettext('Secret') => array('key' => 'tweet_news_consumer_secret', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 3, 'desc' => gettext('The <em>secret</em> associated with your <em>consumer key</em>.')), gettext('Access token') => array('key' => 'tweet_news_oauth_token', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 4, 'desc' => gettext('The application <em>oauth_token</em> token.')), gettext('Access token secret') => array('key' => 'tweet_news_oauth_token_secret', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 5, 'desc' => gettext('The application <em>oauth_token</em> secret.')), gettext('Protected objects') => array('key' => 'tweet_news_protected', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 7, 'desc' => gettext('If checked, protected items will be tweeted. <strong>Note:</strong> followers will need the password to visit the tweeted link.'))); $list = array('<em>' . gettext('Albums') . '</em>' => 'tweet_news_albums', '<em>' . gettext('Images') . '</em>' => 'tweet_news_images'); if (extensionEnabled('zenpage')) { $list['<em>' . gettext('News') . '</em>'] = 'tweet_news_news'; $list['<em>' . gettext('Pages') . '</em>'] = 'tweet_news_pages'; } else { setOption('tweet_news_news', 0); setOption('tweet_news_pages', 0); } $options[gettext('Tweet')] = array('key' => 'tweet_news_items', 'type' => OPTION_TYPE_CHECKBOX_ARRAY, 'order' => 6, 'checkboxes' => $list, 'desc' => gettext('If a <em>type</em> is checked, a Tweet will be made when an object of that <em>type</em> is published.')); if (getOption('multi_lingual')) { $options[gettext('Tweet Language')] = array('key' => 'tweet_language', 'type' => OPTION_TYPE_SELECTOR, 'order' => 5.5, 'selections' => generateLanguageList(), 'desc' => gettext('Select the language for the Tweet message.')); } if (getOption('tweet_news_news') && is_object($_zp_CMS)) { $catlist = getSerializedArray(getOption('tweet_news_categories')); $news_categories = $_zp_CMS->getAllCategories(false); $catlist = array(gettext('*not categorized*') => 'tweet_news_categories_none'); foreach ($news_categories as $category) { $option = 'tweet_news_categories_' . $category['titlelink']; $catlist[$category['title']] = $option; setOptionDefault($option, NULL); } $options[gettext('News categories')] = array('key' => 'tweet_news_categories', 'type' => OPTION_TYPE_CHECKBOX_UL, 'order' => 6.5, 'checkboxes' => $catlist, 'desc' => gettext('Only those <em>news categories</em> checked will be Tweeted. <strong>Note:</strong> <em>*not categorized*</em> means those news articles which have no category assigned.')); } return $options; }
function __construct() { $me = basename(dirname(__FILE__)); setThemeOptionDefault('zenpage_zp_index_news', false); setThemeOptionDefault('Allow_search', true); setThemeOptionDefault('Use_thickbox', true); setThemeOptionDefault('zenpage_homepage', 'none'); setThemeOptionDefault('zenpage_contactpage', true); setThemeOptionDefault('zenpage_custommenu', false); setThemeOptionDefault('albums_per_page', 6); setThemeOptionDefault('albums_per_row', 2); setThemeOptionDefault('images_per_page', 20); setThemeOptionDefault('images_per_row', 5); setThemeOption('image_size', 580, NULL, 'zenpage'); setThemeOption('image_use_side', 'longest', NULL, 'zenpage'); setThemeOption('thumb_size', 95, NULL, 'zenpage'); setThemeOptionDefault('thumb_crop_width', 95); setThemeOptionDefault('thumb_crop_height', 95); setThemeOptionDefault('thumb_crop', 1); setThemeOptionDefault('thumb_transition', 1); if (extensionEnabled('zenpage')) { setThemeOption('custom_index_page', 'gallery', NULL, 'zenpage', false); } else { setThemeOption('custom_index_page', '', NULL, 'zenpage', false); } if (class_exists('cacheManager')) { cacheManager::deleteThemeCacheSizes($me); cacheManager::addThemeCacheSize($me, NULL, 580, 580, NULL, NULL, NULL, NULL, NULL, false, NULL, true); cacheManager::addThemeCacheSize($me, 95, NULL, NULL, getThemeOption('thumb_crop_width'), getThemeOption('thumb_crop_height'), NULL, NULL, true, NULL, NULL, NULL); } if (function_exists('createMenuIfNotExists')) { $menuitems = array(array('type' => 'menulabel', 'title' => gettext('News Articles'), 'link' => '', 'show' => 1, 'nesting' => 0), array('type' => 'menufunction', 'title' => gettext('All news'), 'link' => 'printAllNewsCategories("All news",TRUE,"","menu-active",false,false,false,"list",false,getOption("menu_manager_truncate_string"));', 'show' => 1, 'include_li' => 0, 'nesting' => 1), array('type' => 'menulabel', 'title' => gettext('Gallery'), 'link' => '', 'show' => 1, 'nesting' => 0), array('type' => 'custompage', 'title' => gettext('Gallery index'), 'link' => 'gallery', 'show' => 1, 'nesting' => 1), array('type' => 'menufunction', 'title' => gettext('All Albums'), 'link' => 'printAlbumMenuList("list",NULL,"","menu-active","submenu","menu-active","",false,false,false,false,getOption("menu_manager_truncate_string"));', 'show' => 1, 'include_li' => 0, 'nesting' => 1), array('type' => 'menulabel', 'title' => gettext('Pages'), 'link' => '', 'show' => 1, 'nesting' => 0), array('type' => 'menufunction', 'title' => gettext('All pages'), 'link' => 'printPageMenu("list","","menu-active","submenu","menu-active","",0,false,getOption("menu_manager_truncate_string"));', 'show' => 1, 'include_li' => 0, 'nesting' => 1)); createMenuIfNotExists($menuitems, 'zenpage'); } }
static function getOptionsSupported() { $list = array(gettext('Gallery') => 'defaultCodeblocks_object_gallery', gettext('Album') => 'defaultCodeblocks_object_albums', gettext('Image') => 'defaultCodeblocks_object_images'); if (extensionEnabled('zenpage')) { $list = array_merge($list, array(gettext('News category') => 'defaultCodeblocks_object_news_categories', gettext('News') => 'defaultCodeblocks_object_news', gettext('Page') => 'defaultCodeblocks_object_pages')); } $options = array(gettext('Objects') => array('key' => 'defaultCodeblocks_objects', 'type' => OPTION_TYPE_CHECKBOX_UL, 'order' => 0, 'checkboxes' => $list, 'desc' => gettext('Default codeblocks will be applied for the checked objects.')), gettext('Codeblocks') => array('key' => 'defaultCodeblocks_blocks', 'type' => OPTION_TYPE_CUSTOM, 'order' => 2, 'desc' => gettext('Codeblocks to be inserted when the one for the object is empty.'))); return $options; }
static function getOptionsSupported() { setOptionDefault('ldap_id_offset', 100000); $ldapOptions = array(gettext('LDAP domain') => array('key' => 'ldap_domain', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 1, 'desc' => gettext('Domain name of the LDAP server')), gettext('LDAP base dn') => array('key' => 'ldap_basedn', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 1.1, 'desc' => gettext('Base DN strings for the LDAP searches.')), gettext('ID offset for LDAP usersids') => array('key' => 'ldap_id_offset', 'type' => OPTION_TYPE_NUMBER, 'order' => 1.4, 'desc' => gettext('This number is added to the LDAP <em>userid</em> to insure that there is no overlap to ZenPhoto20 <em>userids</em>.')), gettext('LDAP reader user') => array('key' => 'ldap_reader_user', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 1.2, 'desc' => gettext('User name for LDAP searches. If empty the searches will be anonymous.')), gettext('LDAP reader password') => array('key' => 'ldap_reader_pass', 'type' => OPTION_TYPE_PASSWORD, 'order' => 1.3, 'desc' => gettext('User password for LDAP searches.'))); if (extensionEnabled('user_groups')) { $ldapOptions[gettext('LDAP Group map')] = array('key' => 'ldap_group_map_custom', 'type' => OPTION_TYPE_CUSTOM, 'order' => 1.5, 'desc' => gettext('Mapping of LDAP groups to ZenPhoto20 groups') . '<p class="notebox">' . gettext('<strong>Note:</strong> if the LDAP group is empty no mapping will take place.') . '</p>'); if (!extensionEnabled('LDAP_auth')) { $ldapOptions['note'] = array('key' => 'LDAP_auth_note', 'type' => OPTION_TYPE_NOTE, 'order' => 0, 'desc' => '<p class="notebox">' . gettext('The LDAP Group map cannot be managed with the plugin disabled') . '</p>'); } } return $ldapOptions; }
/** * Reports the supported options * * @return array */ function getOptionsSupported() { global $_zp_captcha; require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/tinymce.php'; $checkboxes = array(gettext('Albums') => 'comment_form_albums', gettext('Images') => 'comment_form_images'); if (extensionEnabled('zenpage')) { $checkboxes = array_merge($checkboxes, array(gettext('Pages') => 'comment_form_pages', gettext('News') => 'comment_form_articles')); } $configarray = gettinymceConfigFiles('comment'); $options = array(gettext('Enable comment notification') => array('key' => 'email_new_comments', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 0, 'desc' => gettext('Email the Admin when new comments are posted')), gettext('Name field') => array('key' => 'comment_name_required', 'type' => OPTION_TYPE_RADIO, 'order' => 0.1, 'buttons' => array(gettext('Omit') => 0, gettext('Show') => 1, gettext('Require') => 'required'), 'desc' => gettext('If the <em>Name</em> field is required, the poster must provide a name.')), gettext('Email field') => array('key' => 'comment_email_required', 'type' => OPTION_TYPE_RADIO, 'order' => 0.2, 'buttons' => array(gettext('Omit') => 0, gettext('Show') => 1, gettext('Require') => 'required'), 'desc' => gettext('If the <em>Email</em> field is required, the poster must provide an email address.')), gettext('Website field') => array('key' => 'comment_web_required', 'type' => OPTION_TYPE_RADIO, 'order' => 0.3, 'buttons' => array(gettext('Omit') => 0, gettext('Show') => 1, gettext('Require') => 'required'), 'desc' => gettext('If the <em>Website</em> field is required, the poster must provide a website.')), gettext('Captcha field') => array('key' => 'Use_Captcha', 'type' => OPTION_TYPE_RADIO, 'order' => 0.4, 'buttons' => array(gettext('Omit') => 0, gettext('For guests') => 2, gettext('Require') => 1), 'desc' => $_zp_captcha->name ? gettext('If <em>Captcha</em> is required, the form will include a Captcha verification.') : '<span class="notebox">' . gettext('No captcha handler is enabled.') . '</span>'), gettext('Address fields') => array('key' => 'comment_form_addresses', 'type' => OPTION_TYPE_RADIO, 'order' => 7, 'buttons' => array(gettext('Omit') => 0, gettext('Show') => 1, gettext('Require') => 'required'), 'desc' => gettext('If <em>Address fields</em> are shown or required, the form will include positions for address information. If required, the poster must supply data in each address field.')), gettext('Allow comments on') => array('key' => 'comment_form_allowed', 'type' => OPTION_TYPE_CHECKBOX_ARRAY, 'order' => 0.9, 'checkboxes' => $checkboxes, 'desc' => gettext('Comment forms will be presented on the checked pages.')), gettext('Toggled comment block') => array('key' => 'comment_form_toggle', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 2, 'desc' => gettext('If checked, existing comments will be initially hidden. Clicking on the provided button will show them.')), gettext('Show author URL') => array('key' => 'comment_form_showURL', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 7, 'desc' => gettext('To discourage SPAM, uncheck this box and the author URL will not be revealed.')), gettext('Only members can comment') => array('key' => 'comment_form_members_only', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 4, 'desc' => gettext('If checked, only logged in users will be allowed to post comments.')), gettext('Allow private postings') => array('key' => 'comment_form_private', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 6, 'desc' => gettext('If checked, posters may mark their comments as private (not for publishing).')), gettext('Allow anonymous posting') => array('key' => 'comment_form_anon', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 5, 'desc' => gettext('If checked, posters may exclude their personal information from the published post.')), gettext('Include RSS link') => array('key' => 'comment_form_rss', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 8, 'desc' => gettext('If checked, an RSS link will be included at the bottom of the comment section.')), gettext('Comments per page') => array('key' => 'comment_form_comments_per_page', 'type' => OPTION_TYPE_NUMBER, 'order' => 9, 'desc' => gettext('The comments that should show per page on the admin tab and when using the jQuery pagination')), gettext('Comment editor configuration') => array('key' => 'tinymce_comments', 'type' => OPTION_TYPE_SELECTOR, 'order' => 1, 'selections' => $configarray, 'null_selection' => gettext('Disabled'), 'desc' => gettext('Configuration file for TinyMCE when used for comments. Set to <code>Disabled</code> to disable visual editing.')), gettext('Admin comment editor configuration') => array('key' => 'tinymce_admin_comments', 'type' => OPTION_TYPE_SELECTOR, 'order' => 1.1, 'selections' => $configarray, 'null_selection' => gettext('Disabled'), 'desc' => gettext('Configuration file for TinyMCE when used for the <em>edit comments</em> tab.')), gettext('Pagination') => array('key' => 'comment_form_pagination', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 3, 'desc' => gettext('Uncheck to disable the jQuery pagination of comments. Enabled by default.'))); return $options; }
function handleOption($option, $currentValue) { switch ($option) { case 'garland_menu': $menusets = array($currentValue => $currentValue); echo '<select id="garland_menuset" name="garland_menu"'; if (function_exists('printCustomMenu') && extensionEnabled('zenpage')) { $result = query_full_array("SELECT DISTINCT menuset FROM " . prefix('menu') . " ORDER BY menuset"); foreach ($result as $set) { $menusets[$set['menuset']] = $set['menuset']; } } else { echo ' disabled="disabled"'; } echo ">\n"; echo '<option value="" style="background-color:LightGray">' . gettext('*standard menu') . '</option>'; generateListFromArray(array($currentValue), $menusets, false, false); echo "</select>\n"; break; } }
/** * * This method establishes the current set of database fields. It will add the * fields to the database if they are not already present. Fields from previous * constructor calls that are no longer in the list will be removed from the * database (along with any data associated with them.) * * @param array $newfields */ function constructor($me, $newfields) { $previous = getSerializedArray(getOption(get_class($this) . '_addedFields')); $current = $fields = array(); if (extensionEnabled($me)) { //need to update the database tables. foreach ($newfields as $newfield) { $current[$newfield['table']][$newfield['name']] = true; unset($previous[$newfield['table']][$newfield['name']]); switch (strtolower($newfield['type'])) { default: $dbType = strtoupper($newfield['type']); break; case 'int': case 'varchar': $dbType = strtoupper($newfield['type']) . '(' . min(255, $newfield['size']) . ')'; break; } $sql = 'ALTER TABLE ' . prefix($newfield['table']) . ' ADD COLUMN `' . $newfield['name'] . '` ' . $dbType; if (query($sql, false) && in_array($newfield['table'], array('albums', 'images', 'news', 'news_categories', 'pages'))) { $fields[] = strtolower($newfield['name']); } } setOption(get_class($this) . '_addedFields', serialize($current)); } else { purgeOption(get_class($this) . '_addedFields'); } $set_fields = array_flip(explode(',', getOption('search_fields'))); foreach ($previous as $table => $orpahed) { //drop fields no longer defined foreach ($orpahed as $field => $v) { unset($set_fields[$field]); $sql = 'ALTER TABLE ' . prefix($table) . ' DROP `' . $field . '`'; query($sql, false); } } $set_fields = array_unique(array_merge($fields, array_flip($set_fields))); setOption('search_fields', implode(',', $set_fields)); }
function my_checkPageValidity($request, $gallery_page, $page) { switch ($gallery_page) { case 'gallery.php': $gallery_page = 'index.php'; // same as an album gallery index break; case 'index.php': if (!extensionEnabled('zenpage') || getOption('zbase_indexlayout') != 'news') { // only one index page if zenpage plugin is enabled & displaying break; } default: if ($page != 1) { return false; } case 'news.php': case 'album.php': case 'search.php': break; } return checkPageValidity($request, $gallery_page, $page); }
function getOptionsSupported() { global $personalities; if (!extensionEnabled('print_album_menu') && (($m = getOption('garland_menu')) == 'garland' || $m == 'zenpage' || $m == 'garland')) { $note = '<p class="notebox">' . sprintf(gettext('<strong>Note:</strong> The <em>%s</em> custom menu makes use of the <em>print_album_menu</em> plugin.'), $m) . '</p>'; } else { $note = ''; } $options = array(gettext('Theme personality') => array('key' => 'garland_personality', 'type' => OPTION_TYPE_SELECTOR, 'selections' => $personalities, 'desc' => gettext('Select the theme personality')), gettext('Allow search') => array('key' => 'Allow_search', 'type' => OPTION_TYPE_CHECKBOX, 'desc' => gettext('Set to enable search form.')), gettext('Allow cloud') => array('key' => 'Allow_cloud', 'type' => OPTION_TYPE_CHECKBOX, 'desc' => gettext('Set to enable tag cloud for album page.')), gettext('Custom menu') => array('key' => 'garland_menu', 'type' => OPTION_TYPE_CUSTOM, 'desc' => gettext('Set this to the <em>menu_manager</em> menu you wish to use.') . $note)); if (extensionEnabled('zenpage')) { global $_zp_zenpage; $pages = $_zp_zenpage->getPages(false); $list = array(); foreach ($pages as $page) { $list[getBare($page['title'])] = $page['titlelink']; } $options[gettext('Custom Homepage')] = array('key' => 'garland_customHome', 'type' => OPTION_TYPE_SELECTOR, 'selections' => $list, 'null_selection' => gettext('none'), 'desc' => gettext('Select the <em>pages</em> titlelink for the home page. Only unpublished pages are offered for selection.')); } if (getOption('garland_personality') == 'image_gallery') { $options[gettext('Image gallery transition')] = array('key' => 'garland_transition', 'type' => OPTION_TYPE_SELECTOR, 'selections' => array(gettext('None') => '', gettext('Fade') => 'fade', gettext('Shrink/grow') => 'resize', gettext('Horizontal') => 'slide-hori', gettext('Vertical') => 'slide-vert'), 'order' => 10, 'desc' => gettext('Transition effect for Image gallery')); $options[gettext('Image gallery caption')] = array('key' => 'garland_caption_location', 'type' => OPTION_TYPE_RADIO, 'buttons' => array(gettext('On image') => 'image', gettext('Separate') => 'separate', gettext('Omit') => 'none'), 'order' => 10.5, 'desc' => gettext('Location for Image gallery picture caption')); } return $options; }
function __construct() { global $_userAddressFields; $firstTime = extensionEnabled('userAddressFields') && is_null(getOption('userAddressFields_addedFields')); parent::constructor('userAddressFields', self::fields()); if ($firstTime) { // migrate the custom data user data $result = query('SELECT * FROM ' . prefix('administrators') . ' WHERE `valid`!=0'); if ($result) { while ($row = db_fetch_assoc($result)) { $custom = getSerializedArray($row['custom_data']); if (!empty($custom)) { $sql = 'UPDATE ' . prefix('administrators') . ' SET '; foreach ($custom as $field => $val) { $sql .= '`' . $field . '`=' . db_quote($val) . ','; } $sql .= '`custom_data`=NULL WHERE `id`=' . $row['id']; query($sql); } } db_free_result($result); } } }
* * If you are using more than one player on a page you need to pass a 3rd parameter with for example an unique number:<br> * [MEDIAPLAYER album1 video1.mp4 <var>1</var>]<br> * [MEDIAPLAYER album2 video2.mp4 <var>2</var>] * * <b>NOTE:</b> This player does not support external albums! * * @author Malte Müller (acrylian) * @package plugins * @subpackage media */ $plugin_is_filter = defaultExtension(5 | CLASS_PLUGIN); $plugin_description = gettext("This plugin handles <code>flv</code>, <code>fla</code>, <code>mp3</code>, <code>mp4</code>, <code>m4v</code>, and <code>m4a</code> multi-media files."); gettext("Please see <a href='http://jplayer.org'>jplayer.org</a> for more info about the player and its license."); $plugin_author = "Malte Müller (acrylian)"; $plugin_disable = zpFunctions::pluginDisable(array(array(!extensionEnabled('class-video'), gettext('This plugin requires the <em>class-video</em> plugin')), array(!extensionEnabled('jplayer') && class_exists('Video') && Video::multimediaExtension() != 'pseudoPlayer', sprintf(gettext('jPlayer not enabled, %s is already instantiated.'), class_exists('Video') ? Video::multimediaExtension() : false)), array(getOption('album_folder_class') === 'external', gettext('This player does not support <em>External Albums</em>.')))); $option_interface = 'jplayer_options'; if ($plugin_disable) { enableExtension('jplayer', 0); } else { Gallery::addImageHandler('flv', 'Video'); Gallery::addImageHandler('fla', 'Video'); Gallery::addImageHandler('mp3', 'Video'); Gallery::addImageHandler('mp4', 'Video'); Gallery::addImageHandler('m4v', 'Video'); Gallery::addImageHandler('m4a', 'Video'); zp_register_filter('content_macro', 'jPlayer::macro'); } class jplayer_options { public $name = 'jPlayer';
<p> <?php $plugins = array_keys($plugins); natcasesort($plugins); echo gettext('Plugin setup:') . '<br />'; foreach ($plugins as $extension) { ?> <span> <img src="<?php echo FULLWEBPATH . '/' . ZENFOLDER . '/setup/setup_pluginOptions.php?plugin=' . $extension; ?> " title="<?php echo $extension; ?> " alt="<?php echo $extension; ?> " height="16px" width="16px" /> </span> <?php } ?> </p> <?php $_zp_gallery->garbageCollect(); if (extensionEnabled('auto_backup')) { //Run the backup since for sure things have changed. require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/auto_backup.php'; auto_backup::timer_handler(''); }
static function is_valid($image, $valid_types) { if (is_object($image)) { $image = $image->filename; } $ext = getSuffix($image); if (in_array($ext, $valid_types)) { return $ext; } return false; } } if ($plugin_disable) { enableExtension('slideshow', 0); } if (extensionEnabled('slideshow')) { $slideshow_instance = 0; /** * Prints a link to call the slideshow (not shown if there are no images in the album) * To be used on album.php and image.php * A CSS id names 'slideshowlink' is attached to the link so it can be directly styled. * * If the mode is set to "jQuery Colorbox" and the Colorbox plugin is enabled this link starts a Colorbox slideshow * from a hidden HTML list of all images in the album. On album.php it starts with the first always, on image.php with the current image. * * @param string $linktext Text for the link * @param string $linkstyle Style of Text for the link */ function printSlideShowLink($linktext = NULL, $linkstyle = Null) { global $_zp_gallery, $_zp_current_image, $_zp_current_album, $_zp_current_search, $slideshow_instance, $_zp_gallery_page;
function getOptionsSupported() { $checkboxes = array(gettext('Albums') => 'multiple_layouts_albums', gettext('Images') => 'multiple_layouts_images'); if (extensionEnabled('zenpage')) { $checkboxes = array_merge($checkboxes, array(gettext('Pages') => 'multiple_layouts_pages', gettext('News') => 'multiple_layouts_news', gettext('News categories') => 'multiple_layouts_news_categories')); } $options = array(gettext('Enable multiple layouts for') => array('key' => 'multiple_layouts_allowed', 'type' => OPTION_TYPE_CHECKBOX_ARRAY, 'checkboxes' => $checkboxes, 'desc' => '')); return $options; }
?> </div> <?php } ?> <div class="span6 pull-left"> <div id="copyright"> <?php echo getMainSiteName(); if (getOption('zpB_show_archive')) { printCustomPageURL(gettext('Archive View'), 'archive', '', ' | '); } if (!zp_loggedin() && extensionEnabled('register_user')) { printRegisterURL(gettext('Register'), ' | '); } if (extensionEnabled('user_login-out')) { printUserLogin_out(' | ', '', 1); ?> <script type="text/javascript"> $('.passwordform').before('| <a href="#zpB_login_passwordform" data-toggle="modal" class="zpB_logonlink" title="<?php echo gettext('Login'); ?> "><?php echo gettext('Login'); ?> </a>'); $('#zpB_login_passwordform').modal({ show: true }); </script> <?php
</script> </div> <?php } ?> <div id="copyright"> <?php echo getMainSiteName(); if (getOption('show_archive')) { printCustomPageURL(gettext('Archive View'), 'archive', '', ' | '); } if (extensionEnabled('user_login-out')) { printUserLogin_out(' | ', '', 2); } if (!zp_loggedin() && extensionEnabled('register_user')) { printRegisterURL(gettext('Register'), ' | '); } ?> </div> <div id="zpcredit"> <?php printZenphotoLink(getOption('css_style')); if ($_zp_gallery_page == 'image.php' || $_zp_gallery_page == 'album.php' && getOption('use_galleriffic') && getNumImages() > 0 || $_zenpage_enabled && is_NewsArticle()) { ?> <img id="icon-help" src="<?php echo $_zp_themeroot; ?> /images/help.png" title="<?php echo gettext('You can browse with the arrows keys of your keyboard');
/** * Update this object's values for width and height. * */ function updateDimensions() { global $_zp_multimedia_extension; $ext = getSuffix($this->filename); switch ($ext) { case '3gp': $h = extensionEnabled('class-video_3gp_h'); $w = extensionEnabled('class-video_3gp_w'); break; case 'mov': $h = extensionEnabled('class-video_mov_h'); $w = extensionEnabled('class-video_mov_w'); break; default: $h = $_zp_multimedia_extension->getHeight($this); $w = $_zp_multimedia_extension->getWidth($this); } $this->set('width', $w); $this->set('height', $h); }
?> </div> <?php if (getOption('show_tag')) { ?> <div class="headline-tags"><?php printTags('links', '', 'hor-list'); ?> </div> <?php } ?> </div> <?php if (extensionEnabled('comment_form')) { ?> <?php include 'inc_print_comment.php'; ?> <?php } ?> <?php } else { // news article loop ?> <div class="pagination-news clearfix"> <?php
* <b>NOTE:</b> the implementation of these URIs requires that Zenphoto parse the URI, save the * language request to a cookie, then redirect to the "native" URI. This means that there is an extra * redirect for <b>EACH</b> page request! * * If your site will support it, we suggest you use the dynamic_locales plugin <i>subdomain locales</i> option * instead for better performance. * * @author Stephen Billard (sbillard) * @package plugins * @subpackage seo */ $plugin_is_filter = 5 | CLASS_PLUGIN; $plugin_description = gettext("Allows setting language locale through the URI."); $plugin_notice = gettext('<strong>Note:</strong> This plugin is not activated for <em>back‑end</em> (administrative) URLs. However, once activated, the language is remembered, even for the <em>back‑end</em>.'); $plugin_author = "Stephen Billard (sbillard)"; $plugin_disable = !MOD_REWRITE ? gettext('<em>mod_rewrite</em> must be enabled for this plugin to function.') : getOption('dynamic_locale_subdomain') && extensionEnabled('dynamic-locale') ? gettext('This plugin is not compatible with the <code>dynamic locale</code> <em>Use subdomains</em> option') : false; if ($plugin_disable) { enableExtension('seo_locale', 0); } else { zp_register_filter('load_request', 'seo_locale::load_request'); if (!defined('SEO_WEBPATH')) { define('SEO_WEBPATH', seo_locale::localePath()); define('SEO_FULLWEBPATH', seo_locale::localePath(true)); } } class seo_locale { static function load_request($allow) { $uri = getRequestURI(); $parts = explode('?', $uri);
/** * Gets the feed item data in a comments feed * * @param array $item Array of a comment * @return array */ protected function getitemComments($item) { if ($item['anon']) { $author = ""; } else { $author = " " . gettext("by") . " " . $item['name']; } $commentpath = $imagetag = $title = ''; switch ($item['type']) { case 'images': $title = get_language_string($item['title']); $obj = newImage(array('folder' => $item['folder'], 'filename' => $item['filename'])); $link = $obj->getlink(); $feeditem['pubdate'] = date("r", strtotime($item['date'])); $category = get_language_string($item['albumtitle']); $website = $item['website']; $title = $category . ": " . $title; $commentpath = PROTOCOL . '://' . $this->host . $link . "#" . $item['id']; break; case 'albums': $obj = newAlbum($item['folder']); $link = rtrim($obj->getLink(), '/'); $feeditem['pubdate'] = date("r", strtotime($item['date'])); $title = get_language_string($item['albumtitle']); $website = $item['website']; $commentpath = PROTOCOL . '://' . $this->host . $link . "#" . $item['id']; break; case 'news': case 'pages': if (extensionEnabled('zenpage')) { $feeditem['pubdate'] = date("r", strtotime($item['date'])); $category = ''; $title = get_language_string($item['title']); $titlelink = $item['titlelink']; $website = $item['website']; if ($item['type'] == 'news') { $obj = newArticle($titlelink); } else { $obj = newPage($titlelink); } $commentpath = PROTOCOL . '://' . $this->host . html_encode($obj->getLink()) . "#" . $item['id']; } else { $commentpath = ''; } break; } $feeditem['title'] = getBare($title . $author); $feeditem['link'] = $commentpath; $feeditem['desc'] = $item['comment']; return $feeditem; }
/** * Creates a feed object from the URL parameters fetched only * */ function __construct($options = NULL) { global $_zp_gallery, $_zp_current_admin_obj, $_zp_loggedin; if (empty($options)) { self::feed404(); } $this->feedtype = $options['external']; $this->key = @$options['accesskey']; parent::__construct($options); if ($this->key) { $result = query_single_row('SELECT * FROM ' . prefix('plugin_storage') . ' WHERE `type`="externalFeed" AND `data`=' . db_quote($this->key)); if (!$result) { $this->key = NULL; } } if (!$this->key && $this->feedtype != 'site_closed') { self::feed404(); } // general feed setup $channeltitlemode = getOption('externalFeed_title'); $this->host = html_encode($_SERVER["HTTP_HOST"]); //channeltitle general switch ($channeltitlemode) { case 'gallery': $this->channel_title = $_zp_gallery->getBareTitle($this->locale); break; case 'website': $this->channel_title = getBare($_zp_gallery->getWebsiteTitle($this->locale)); break; case 'both': $website_title = $_zp_gallery->getWebsiteTitle($this->locale); $this->channel_title = $_zp_gallery->getBareTitle($this->locale); if (!empty($website_title)) { $this->channel_title = $website_title . ' - ' . $this->channel_title; } break; } // individual feedtype setup switch ($this->feedtype) { case 'gallery': if (!getOption('externalFeed_album_image')) { self::feed404(); } $albumname = $this->getChannelTitleExtra(); if ($this->albumfolder) { $alb = newAlbum($this->albumfolder, true, true); if ($alb->exists) { $albumtitle = $alb->getTitle(); if ($this->mode == 'albums' || $this->collection) { $albumname = ' - ' . html_encode($albumtitle) . $this->getChannelTitleExtra(); } } else { self::feed404(); } } else { $albumtitle = ''; } $albumname = $this->getChannelTitleExtra(); $this->channel_title = html_encode($this->channel_title . ' ' . getBare($albumname)); $this->imagesize = $this->getImageSize(); require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/image_album_statistics.php'; break; case 'news': //Zenpage News if (!getOption('externalFeed_articles')) { self::feed404(); } $titleappendix = gettext(' (Latest news)'); switch ($this->sortorder) { case 'popular': $titleappendix = gettext(' (Most popular news)'); break; case 'mostrated': $titleappendix = gettext(' (Most rated news)'); break; case 'toprated': $titleappendix = gettext(' (Top rated news)'); break; case 'random': $titleappendix = gettext(' (Random news)'); break; } $this->channel_title = html_encode($this->channel_title . $this->cattitle . $titleappendix); $this->imagesize = $this->getImageSize(); $this->itemnumber = getOption("externalFeed_zenpage_items"); // # of Items displayed on the feed require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/image_album_statistics.php'; require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/zenpage/zenpage-template-functions.php'; break; case 'pages': //Zenpage News if (!getOption('externalFeed_pages')) { self::feed404(); } switch ($this->sortorder) { case 'popular': $titleappendix = gettext(' (Most popular pages)'); break; case 'mostrated': $titleappendix = gettext(' (Most rated pages)'); break; case 'toprated': $titleappendix = gettext(' (Top rated pages)'); break; case 'random': $titleappendix = gettext(' (Random pages)'); break; default: $titleappendix = gettext(' (Latest pages)'); break; } $this->channel_title = html_encode($this->channel_title . $titleappendix); require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/zenpage/zenpage-template-functions.php'; break; case 'comments': //Comments if (!getOption('externalFeed_comments')) { self::feed404(); } if ($this->id) { switch ($this->commentfeedtype) { case 'album': $table = 'albums'; break; case 'image': $table = 'images'; break; case 'news': $table = 'news'; break; case 'page': $table = 'pages'; break; default: self::feed404(); break; } $this->itemobj = getItemByID($table, $this->id); if ($this->itemobj) { $title = ' - ' . $this->itemobj->getTitle(); } else { self::feed404(); } } else { $this->itemobj = NULL; $title = NULL; } $this->channel_title = html_encode($this->channel_title . $title . gettext(' (latest comments)')); if (extensionEnabled('zenpage')) { require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/zenpage/zenpage-template-functions.php'; } break; case 'null': //we just want the class instantiated return; } $this->feeditems = $this->getitems(); }
<?php /** * This is a "simple" SPAM filter. * It uses a word black list and checks for excessive URLs * * @author Stephen Billard (sbillard) * * @package plugins * @subpackage admin */ $plugin_is_filter = 5 | CLASS_PLUGIN; $plugin_description = gettext("Simple SPAM filter."); $plugin_author = "Stephen Billard (sbillard)"; $plugin_disable = isset($_zp_spamFilter) && !extensionEnabled('simpleSpam') ? sprintf(gettext('Only one SPAM handler plugin may be enabled. <a href="#%1$s"><code>%1$s</code></a> is already enabled.'), $_zp_spamFilter->name) : ''; $option_interface = 'zpSimpleSpam'; if ($plugin_disable) { enableExtension('simpleSpam', 0); } else { $_zp_spamFilter = new zpSimpleSpam(); } /** * This implements the standard SpamFilter class for the Simple spam filter. * */ class zpSimpleSpam { var $name = 'simpleSpam'; var $wordsToDieOn = array('cialis', 'ebony', 'nude', 'p**n', 'porno', 'pussy', 'upskirt', 'ringtones', 'phentermine', 'viagra', 'levitra'); /* the word black list */ var $patternsToDieOn = array('\\[url=.*\\]');
* <dd>extracontent</dd> <dd>tags</dd> <dd>codeblock</dd> * </dl> * * You should copy this script to the user plugin folder if you wish to customize which fields are provided. * * @author Stephen Billard (sbillard) * @package plugins * @subpackage admin * @category package * * Copyright 2014 by Stephen L Billard for use in {@link https://github.com/ZenPhoto20/ZenPhoto20 ZenPhoto20} */ $plugin_is_filter = defaultExtension(1 | CLASS_PLUGIN); // we want this done last so the codeblocks go at the end $plugin_description = gettext('Handles the "optional" object fields'); $plugin_notice = extensionEnabled('optionalObjectFields') ? '' : gettext('<strong>IMPORTANT</strong>: This plugin enables the "tags" database fields. If disabled the admin <em>tags</em> tab will not be present. Click on the <em>More information</em> icon for details.'); $plugin_author = "Stephen Billard (sbillard)"; require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/common/fieldExtender.php'; class optionalObjectFields extends fieldExtender { static function fields() { /* * For definition of this array see fieldExtender.php in the extensions/common folder */ return array(array('table' => 'albums', 'name' => 'owner', 'desc' => gettext('Owner'), 'type' => 'varchar', 'size' => 64, 'edit' => 'function', 'function' => 'optionalObjectFields::owner', 'default' => 'NULL', 'bulkAction' => array(gettext('Change owner') => array('name' => 'changeowner', 'action' => 'mass_owner_data'))), array('table' => 'albums', 'name' => 'date', 'desc' => gettext('Date'), 'type' => 'datetime', 'edit' => 'function', 'function' => 'optionalObjectFields::date'), array('table' => 'albums', 'name' => 'location', 'desc' => gettext('Location'), 'type' => 'text', 'searchDefault' => 1, 'edit' => 'multilingual'), array('table' => 'albums', 'name' => 'tags', 'desc' => gettext('Tags'), 'type' => NULL, 'searchDefault' => 1, 'edit' => 'function', 'function' => 'optionalObjectFields::tags', 'bulkAction' => array(gettext('Add tags') => array('name' => 'addtags', 'action' => 'mass_tags_data'), gettext('Clear tags') => 'cleartags', gettext('Add tags to images') => array('name' => 'alltags', 'action' => 'mass_tags_data'), gettext('Clear tags of images') => 'clearalltags')), array('table' => 'albums', 'name' => 'codeblock', 'desc' => gettext('Codeblocks'), 'type' => 'text', 'edit' => 'function', 'function' => 'optionalObjectFields::codeblocks'), array('table' => 'images', 'name' => 'owner', 'desc' => gettext('Owner'), 'type' => 'varchar', 'size' => 64, 'edit' => 'function', 'function' => 'optionalObjectFields::owner', 'default' => 'NULL', 'bulkAction' => array(gettext('Change owner') => array('name' => 'changeowner', 'action' => 'mass_owner_data'))), array('table' => 'images', 'name' => 'album_thumb', 'desc' => gettext('Set as thumbnail for'), 'type' => NULL, 'edit' => 'function', 'function' => 'optionalObjectFields::thumb'), array('table' => 'images', 'name' => 'date', 'desc' => gettext('Date'), 'type' => 'datetime', 'edit' => 'function', 'function' => 'optionalObjectFields::date'), array('table' => 'images', 'name' => 'watermark', 'desc' => gettext('Image watermark'), 'type' => 'varchar', 'size' => 255, 'edit' => 'function', 'function' => 'optionalObjectFields::watermark', 'default' => NULL), array('table' => 'images', 'name' => 'watermark_use', 'desc' => NULL, 'type' => 'int', 'size' => 1, 'edit' => NULL, 'attribute' => 'UNSIGNED', 'default' => 7), array('table' => 'images', 'name' => 'location', 'desc' => gettext('Location'), 'type' => 'text', 'searchDefault' => 1, 'edit' => 'multilingual'), array('table' => 'images', 'name' => 'city', 'desc' => gettext('City'), 'type' => 'tinytext', 'searchDefault' => 1, 'size' => 50, 'edit' => 'multilingual'), array('table' => 'images', 'name' => 'state', 'desc' => gettext('State'), 'type' => 'tinytext', 'searchDefault' => 1, 'size' => 50, 'edit' => 'multilingual'), array('table' => 'images', 'name' => 'country', 'desc' => gettext('Country'), 'type' => 'tinytext', 'size' => 50, 'searchDefault' => 1, 'edit' => 'multilingual'), array('table' => 'images', 'name' => 'credit', 'desc' => gettext('Credit'), 'type' => 'text', 'edit' => 'multilingual'), array('table' => 'images', 'name' => 'copyright', 'desc' => gettext('Copyright'), 'type' => 'text', 'edit' => 'multilingual'), array('table' => 'images', 'name' => 'tags', 'desc' => gettext('Tags'), 'type' => NULL, 'searchDefault' => 1, 'edit' => 'function', 'function' => 'optionalObjectFields::tags', 'bulkAction' => array(gettext('Add tags') => array('name' => 'addtags', 'action' => 'mass_tags_data'), gettext('Clear tags') => 'cleartags')), array('table' => 'images', 'name' => 'codeblock', 'desc' => gettext('Codeblocks'), 'type' => 'text', 'edit' => 'function', 'function' => 'optionalObjectFields::codeblocks'), array('table' => 'news_categories', 'name' => 'tags', 'desc' => gettext('Tags'), 'type' => NULL, 'searchDefault' => 1, 'edit' => 'function', 'function' => 'optionalObjectFields::tags', 'bulkAction' => array(gettext('Add tags to articles') => array('name' => 'alltags', 'action' => 'mass_tags_data'), gettext('Clear tags of articles') => 'clearalltags')), array('table' => 'pages', 'name' => 'extracontent', 'desc' => gettext('Extra Content'), 'type' => 'text', 'edit' => 'function', 'function' => 'optionalObjectFields::extracontent'), array('table' => 'pages', 'name' => 'codeblock', 'desc' => gettext('Codeblocks'), 'type' => 'text', 'edit' => 'function', 'function' => 'optionalObjectFields::codeblocks'), array('table' => 'pages', 'name' => 'tags', 'desc' => gettext('Tags'), 'type' => NULL, 'searchDefault' => 1, 'edit' => 'function', 'function' => 'optionalObjectFields::tags', 'bulkAction' => array(gettext('Add tags') => array('name' => 'addtags', 'action' => 'mass_tags_data'), gettext('Clear tags') => 'clearalltags')), array('table' => 'news', 'name' => 'extracontent', 'desc' => gettext('Extra Content'), 'type' => 'text', 'edit' => 'function', 'function' => 'optionalObjectFields::extracontent'), array('table' => 'news', 'name' => 'codeblock', 'desc' => gettext('Codeblocks'), 'type' => 'text', 'edit' => 'function', 'function' => 'optionalObjectFields::codeblocks'), array('table' => 'news', 'name' => 'tags', 'desc' => gettext('Tags'), 'type' => NULL, 'searchDefault' => 1, 'edit' => 'function', 'function' => 'optionalObjectFields::tags', 'bulkAction' => array(gettext('Add tags') => array('name' => 'addtags', 'action' => 'mass_tags_data'), gettext('Clear tags') => 'clearalltags'))); } function __construct() { $protected = array('date', 'owner'); $fields = self::fields();
<?php $numimages = getNumImages(); $numalbums = getNumAlbums(); $total = $numimages + $numalbums; $zenpage = getOption('zp_plugin_zenpage'); if ($zenpage && !isArchive()) { $numpages = getNumPages(); $numnews = getNumNews(); $total = $total + $numnews + $numpages; } else { $numpages = $numnews = 0; } ?> <h2> <?php if (extensionEnabled('zenpage')) { ?> <a href="<?php echo getGalleryIndexURL(); ?> " title="<?php gettext('Index'); ?> "><?php echo gettext("Index") . " » "; ?> </a> <?php } else { ?> <a href="<?php
/** * Helper function to list tags/categories as keywords separated by comma. * * @param array $array the array of the tags or categories to list */ private static function getMetaKeywords() { global $_zp_gallery, $_zp_current_album, $_zp_current_image, $_zp_current_zenpage_news, $_zp_current_zenpage_page, $_zp_current_category, $_zp_gallery_page, $_zp_zenpage; $words = ''; if (is_object($_zp_current_album) or is_object($_zp_current_image)) { $tags = getTags(); $words .= htmlmetatags::getMetaAlbumAndImageTags($tags, "gallery"); } else { if ($_zp_gallery_page === "index.php") { $tags = array_keys(getAllTagsCount(true)); // get all if no specific item is set $words .= htmlmetatags::getMetaAlbumAndImageTags($tags, "gallery"); } } if (extensionEnabled('zenpage')) { if (is_NewsArticle()) { $tags = getNewsCategories(getNewsID()); $words .= htmlmetatags::getMetaAlbumAndImageTags($tags, "zenpage"); $tags = getTags(); $words = $words . "," . htmlmetatags::getMetaAlbumAndImageTags($tags, "gallery"); } else { if (is_Pages()) { $tags = getTags(); $words = htmlmetatags::getMetaAlbumAndImageTags($tags, "gallery"); } else { if (is_News()) { $tags = $_zp_zenpage->getAllCategories(); $words .= htmlmetatags::getMetaAlbumAndImageTags($tags, "zenpage"); } else { if (is_NewsCategory()) { $words .= $_zp_current_category->getTitle(); } } } } } return $words; }
<h2><?php echo gettext("Archive view"); ?> </h2> <div id="archive"> <h3><?php echo gettext('Gallery archive'); ?> </h3> <?php printAllDates(); ?> <hr /> <?php if (extensionEnabled('zenpage') && getNumNews(true)) { ?> <h3><?php echo gettext('News archive'); ?> </h3> <?php printNewsArchive("archive"); ?> <hr /> <?php } ?> <h3><?php echo gettext('Popular Tags');
<?php /** * PHP sendmail mailing handler * * @author Stephen Billard (sbillard) * * @package plugins * @subpackage mail */ $plugin_is_filter = defaultExtension(5 | CLASS_PLUGIN); $plugin_description = gettext("Outgoing mail handler based on the PHP <em>mail</em> facility."); $plugin_author = "Stephen Billard (sbillard)"; $plugin_disable = zp_has_filter('sendmail') && !extensionEnabled('zenphoto_sendmail') ? sprintf(gettext('Only one Email handler plugin may be enabled. <a href="#%1$s"><code>%1$s</code></a> is already enabled.'), stripSuffix(get_filterScript('sendmail'))) : ''; if ($plugin_disable) { enableExtension('zenphoto_sendmail', 0); } else { zp_register_filter('sendmail', 'zenphoto_sendmail'); } function zenphoto_sendmail($msg, $email_list, $subject, $message, $from_mail, $from_name, $cc_addresses, $replyTo, $html = false) { $headers = sprintf('From: %1$s <%2$s>', $from_name, $from_mail) . "\n"; if (count($cc_addresses) > 0) { $cclist = ''; foreach ($cc_addresses as $cc_name => $cc_mail) { $cclist .= ',' . $cc_mail; } $headers .= 'Cc: ' . substr($cclist, 1) . "\n"; } if ($replyTo) { $headers .= 'Reply-To: ' . array_shift($replyTo) . "\n";
<?php printZDSearchToggleJS(); ?> </head> <body> <?php zp_apply_filter('theme_body_open'); ?> <div id="main"> <div id="header"> <h1><?php printGalleryTitle(); ?> </h1> <?php $zenpage = extensionEnabled('zenpage'); $numimages = getNumImages(); $numalbums = getNumAlbums(); $total = $numimages + $numalbums; if ($zenpage && !isArchive()) { $numpages = getNumPages(); $numnews = getNumNews(); $total = $total + $numnews + $numpages; } else { $numpages = $numnews = 0; } if ($total == 0) { $_zp_current_search->clearSearchWords(); } if (getOption('Allow_search')) { $categorylist = $_zp_current_search->getCategoryList();
?> </li> <?php } ?> </ul> <div class="menu_rule"></div> </div> <?php if (getOption('RSS_album_image') || getOption('RSS_articles')) { ?> <div class="menu"> <h3><?php echo gettext("RSS"); ?> </h3> <ul> <?php if (class_exists('RSS')) { printRSSLink('Gallery', '<li>', gettext('Gallery'), '</li>'); if (extensionEnabled('zenpage') && ZP_NEWS_ENABLED) { printRSSLink("News", "<li>", gettext("News"), '</li>'); } } ?> </ul> </div> <?php } }