function printThemeFooter() { echo '<ul class="menu footer">'; if (function_exists('printRegistrationForm') or function_exists('printUserLogin_out')) { if (zp_loggedin() and function_exists('printUserLogin_out')) { echo '<li>'; printUserLogin_out(); echo '</li>'; } else { echo '<li><a href="' . getCustomPageURL('login') . '">'; if (function_exists('printRegistrationForm')) { echo gettext('Register'); } if (function_exists('printRegistrationForm') and function_exists('printUserLogin_out')) { echo ' / '; } if (function_exists('printUserLogin_out')) { echo gettext('Login'); } echo '</a></li>'; } } if (function_exists('printContactForm')) { echo '<li><a href="' . getCustomPageURL('contact') . '">' . gettext('Contact') . '</a></li>'; } echo '</ul>'; }
static function printPersonalities() { $personalities = self::getPersonalities(); echo "<ul>"; echo "<li><span style='padding: 0 5px; margin-right: 5px;" . "background-color: #fff; border: 1px #666 dotted;'> </span><a persona='__void__' href='" . getCustomPageURL('switch-persona') . "&persona=__void__'>Great void</a></li>"; foreach ($personalities as $persona => $a) { $name = $a['name']; $dominant = $a['dominant']; echo "<li><span style='padding: 0 5px; margin-right: 5px;" . "background-color: {$dominant}; border: 1px #666 dotted;'> </span><a persona='{$persona}' href='" . getCustomPageURL('switch-persona') . "&persona={$persona}'>{$name}</a></li>"; } echo "</ul>"; }
function printThemeMenu() { echo '<ul id="main">'; if (getMainSiteName() != '') { echo '<li class="title">' . gettext('Main site') . '</li>'; echo '<ul>'; echo '<li><a href="' . getMainSiteURL() . '" title="' . getMainSiteName() . '">' . getMainSiteName() . '</a></li>'; echo '</ul>'; } if (function_exists('printAlbumMenu')) { echo '<li class="title">' . gettext('Gallery') . '</li>'; $temp = getGalleryTitle(); printAlbumMenu('list', false, '', 'menu-active', 'submenu', 'menu-active', $temp, true); } else { echo '<li class="title">' . gettext('Gallery') . '</li>'; echo '<ul>'; echo '<li><a href="' . getGalleryIndexURL() . '" title="' . getGalleryTitle() . '">' . getGalleryTitle() . '</a></li>'; echo '</ul>'; } if (function_exists('printNewsIndexURL')) { echo '<li class="title">' . gettext('News blog') . '</li>'; printAllNewsCategories("All news", FALSE, "", "menu-active"); } if (function_exists("printPageMenu")) { echo '<li class="title">' . gettext('Pages') . '</li>'; printPageMenu("list", "", "menu-active", "submenu", "menu-active"); } echo '<li class="title">' . gettext('Stay informed') . '</li>'; echo '<ul>'; echo '<li><a href="' . getCustomPageURL('archive') . '">' . gettext('Archives') . '</a></li>'; echo '</ul>'; echo '</ul>'; echo '<div id="login">'; echo '<div class="title">' . gettext('Connection') . '</div>'; if (function_exists('printUserLogin_out') and !zp_loggedin()) { printUserLogin_out(); } echo '</div>'; if (function_exists("printLanguageSelector")) { echo '<div id="languages">'; echo '<div class="title">' . gettext('Languages') . '</div>'; printLanguageSelector(); echo '<div class="clear_left"></div>'; echo '</div>'; } }
/** * Prints out the menu of the theme */ function printMenu() { ?> <ul id="m_menu" class="prefix_10"> <?php if (function_exists('printCalendar')) { ?> <li class="grid_2"><a href="<?php echo getCustomPageURL('calendar'); ?> "><?php echo gettext('Calendar'); ?> </a></li> <?php } else { ?> <li class="grid_2"><a href="<?php echo getCustomPageURL('archive'); ?> "><?php echo gettext('Archive View'); ?> </a></li> <?php } ?> <?php if (getOption('zp_plugin_contact_form')) { ?> <li class="grid_2"><a href="<?php echo getCustomPageURL('contact'); ?> "><?php echo gettext('Contact'); ?> </a></li><?php } ?> </ul> <?php }
?> <li><?php printUserLogin_out('', ''); ?> </li> <?php } else { ?> <li <?php if ($_zp_gallery_page == "login.php") { ?> class="active" <?php } ?> ><a href="<?php echo getCustomPageURL('login'); ?> " title="<?php echo gettext('Login'); ?> "><?php echo gettext('Login'); ?> </a></li> <?php } ?> <?php } ?> </ul>
<?php if (getOption('simplicity2_print_home_menu_item')) { MenuUtil::printMenuItem(getGalleryIndexUrl(), gettext("Home"), THEME_HOME, "first"); } MenuUtil::printMenuItem(getGalleryIndexUrl(), gettext("Gallery"), THEME_GALLERY, '', true); if (function_exists('getNewsIndexURL')) { //if zenpage is enabled MenuUtil::printMenuItem(NewsUtil::getNewsIndexUrl(), gettext("Notes"), THEME_NEWS); } $m = SERVERPATH . "/themes/" . basename(dirname(dirname(__FILE__))) . "/menus/main.php"; if (file_exists($m)) { include $m; } if (getOption('simplicity2_print_contact_menu_item') && !getOption('simplicity2_contact_is_secondary')) { $pageName = getOption('simplicity2_contact_page_name'); if (is_null($pageName) or trim($pageName) == '') { MenuUtil::printMenuItem(getCustomPageURL("contact"), gettext("Contact"), THEME_CONTACT, '', false, 'contact-link'); } else { MenuUtil::printMenuPageLink($pageName, gettext('Contact'), 'contact-link'); } } ?>
<?php MenuUtil::printSecondaryLinkItem('theme-info', getCustomPageURL('theme-info'), gettext('Theme'), THEME_INFO);
"><?php echo gettext('Login'); ?> </a></li> <?php } ?> <?php } ?> <?php if (!zp_loggedin() && function_exists('printRegistrationForm')) { ?> <li>| <a href="<?php echo getCustomPageURL('register'); ?> " title="<?php echo gettext('Register'); ?> "><?php echo gettext('Register'); ?> </a></li> <?php } ?> </ul> </div> <div class="footer-left">
/** * Prints the image/subalbum count for the album loop */ function jqm_printMainHeaderNav() { global $_zp_gallery_page, $_zp_zenpage, $_zp_current_album, $_zp_themeroot; ?> <div data-role="header" data-position="inline" data-theme="b"> <h1><?php printGalleryTitle(); ?> </h1> <a href="<?php echo html_encode(getSiteHomeURL()); ?> " data-icon="home" data-iconpos="notext"><?php echo gettext('Home'); ?> </a> <?php if (getOption('Allow_search')) { ?> <a href="<?php echo getCustomPageURL('search'); ?> " data-icon="search" data-iconpos="notext"><?php echo gettext('Search'); ?> </a> <?php } ?> <div data-role="navbar"> <ul> <li><a href="<?php echo getCustomPageURL('gallery'); ?> "><?php echo gettext('Gallery'); ?> </a></li> <?php if (extensionEnabled('zenpage') && ZP_NEWS_ENABLED) { ?> <li><a href="<?php echo getNewsIndexURL(); ?> "><?php echo gettext('News'); ?> </a></li> <?php if (extensionEnabled('zenpage') && ZP_PAGES_ENABLED) { ?> <li><a href="<?php echo getPagesLink(); ?> "><?php echo gettext('Pages'); ?> </a></li> <?php } ?> <?php } ?> <li><a href="<?php echo getCustomPageURL('archive'); ?> "><?php echo gettext('Archive'); ?> </a></li> </ul> </div><!-- /navbar --> </div><!-- /header --> <?php }
/** * Prints the url to a custom page (e.g. one that is not album.php, image.php, or index.php) * * @param string $linktext Text for the URL * @param string $page page name to include in URL * @param string $q query string to add to url * @param string $prev text to insert before the URL * @param string $next text to follow the URL * @param string $class optional class */ function printCustomPageURL($linktext, $page, $q = '', $prev = '', $next = '', $class = NULL) { if (!is_null($class)) { $class = 'class="' . $class . '"'; } echo $prev . "<a href=\"" . html_encode(getCustomPageURL($page, $q)) . "\" {$class} title=\"" . html_encode($linktext) . "\">" . html_encode($linktext) . "</a>" . $next; }
} ?> <?php if (function_exists("printUserLogin_out")) { if (zp_loggedin()) { ?> <li><?php printUserLogin_out("", ""); ?> </li> <?php } else { ?> <li> | <a href="<?php echo getCustomPageURL('password'); ?> "><?php echo gettext('Login'); ?> </a></li> <?php } ?> <?php } ?> </ul> <?php if (getOption('RSS_items_albums') || getOption('RSS_zenpage_items')) {
/** * Prints html meta data to be used in the <head> section of a page * */ static function getHTMLMetaData() { global $_zp_gallery, $_zp_page, $_zp_current_album, $_zp_current_image, $_zp_current_search, $_zp_current_article, $_zp_current_page, $_zp_gallery_page, $_zp_current_category, $_zp_authority, $_zp_conf_vars, $_myFavorites; $host = sanitize("http://" . $_SERVER['HTTP_HOST']); $url = $host . getRequestURI(); // Convert locale shorttag to allowed html meta format $locale_ = getUserLocale(); $locale = zpFunctions::getLanguageText($locale_, '-'); $canonicalurl = ''; // generate page title, get date $pagetitle = ""; // for gallery index setup below switch $date = strftime(DATE_FORMAT); // if we don't have a item date use current date $desc = getBareGalleryDesc(); $thumb = ''; if (getOption('htmlmeta_sitelogo')) { $thumb = getOption('htmlmeta_sitelogo'); } if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) { $ogimage_width = getOption('htmlmeta_ogimage_width'); $ogimage_height = getOption('htmlmeta_ogimage_height'); if (empty($ogimage_width)) { $ogimage_width = 1280; } if (empty($ogimage_height)) { $ogimage_height = 900; } $twittercard_type = 'summary'; } $type = 'article'; switch ($_zp_gallery_page) { case 'index.php': $desc = getBareGalleryDesc(); $canonicalurl = $host . $_zp_gallery->getLink($_zp_page); $type = 'website'; break; case 'album.php': case 'favorites.php': $pagetitle = getBareAlbumTitle() . " - "; $date = getAlbumDate(); $desc = getBareAlbumDesc(); $canonicalurl = $host . $_zp_current_album->getLink($_zp_page); if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) { $thumbimg = $_zp_current_album->getAlbumThumbImage(); getMaxSpaceContainer($ogimage_width, $ogimage_height, $thumbimg, false); $thumb = $host . html_encode(pathurlencode($thumbimg->getCustomImage(NULL, $ogimage_width, $ogimage_height, NULL, NULL, NULL, NULL, false, NULL))); $twittercard_type = 'summary_large_image'; } break; case 'image.php': $pagetitle = getBareImageTitle() . " (" . getBareAlbumTitle() . ") - "; $date = getImageDate(); $desc = getBareImageDesc(); $canonicalurl = $host . $_zp_current_image->getLink(); if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) { $thumb = $host . html_encode(pathurlencode(getCustomSizedImageMaxSpace($ogimage_width, $ogimage_height))); $twittercard_type = 'summary_large_image'; } break; case 'news.php': if (function_exists("is_NewsArticle")) { if (is_NewsArticle()) { $pagetitle = getBareNewsTitle() . " - "; $date = getNewsDate(); $desc = trim(getBare(getNewsContent())); $canonicalurl = $host . $_zp_current_article->getLink(); } else { if (is_NewsCategory()) { $pagetitle = $_zp_current_category->getTitlelink() . " - "; $date = strftime(DATE_FORMAT); $desc = trim(getBare($_zp_current_category->getDesc())); $canonicalurl = $host . $_zp_current_category->getLink($_zp_page); $type = 'category'; } else { $pagetitle = gettext('News') . " - "; $desc = ''; $canonicalurl = $host . getNewsPathNav($_zp_page); $type = 'website'; } } } break; case 'pages.php': $pagetitle = getBarePageTitle() . " - "; $date = getPageDate(); $desc = trim(getBare(getPageContent())); $canonicalurl = $host . $_zp_current_page->getLink(); break; default: // for all other possible static custom pages $custompage = stripSuffix($_zp_gallery_page); $standard = array('contact' => gettext('Contact'), 'register' => gettext('Register'), 'search' => gettext('Search'), 'archive' => gettext('Archive view'), 'password' => gettext('Password required')); if (is_object($_myFavorites)) { $standard['favorites'] = gettext('My favorites'); } if (array_key_exists($custompage, $standard)) { $pagetitle = $standard[$custompage] . " - "; } else { $pagetitle = $custompage . " - "; } $desc = ''; $canonicalurl = $host . getCustomPageURL($custompage); break; } // shorten desc to the allowed 200 characters if necesssary. $desc = html_encode(trim(substr(getBare($desc), 0, 160))); $pagetitle = $pagetitle . getBareGalleryTitle(); // get master admin $admin = $_zp_authority->getMasterUser(); $author = $admin->getName(); $meta = ''; if (getOption('htmlmeta_http-equiv-cache-control')) { $meta .= '<meta http-equiv="Cache-control" content="' . getOption("htmlmeta_cache_control") . '">' . "\n"; } if (getOption('htmlmeta_http-equiv-pragma')) { $meta .= '<meta http-equiv="pragma" content="' . getOption("htmlmeta_pragma") . '">' . "\n"; } if (getOption('htmlmeta_name-keywords')) { $meta .= '<meta name="keywords" content="' . htmlmetatags::getMetaKeywords() . '">' . "\n"; } if (getOption('htmlmeta_name-description')) { $meta .= '<meta name="description" content="' . $desc . '">' . "\n"; } if (getOption('htmlmeta_name-page-topic')) { $meta .= '<meta name="page-topic" content="' . $desc . '">' . "\n"; } if (getOption('htmlmeta_name-robots')) { $meta .= '<meta name="robots" content="' . getOption("htmlmeta_robots") . '">' . "\n"; } if (getOption('htmlmeta_name-publisher')) { $meta .= '<meta name="publisher" content="' . FULLWEBPATH . '">' . "\n"; } if (getOption('htmlmeta_name-creator')) { $meta .= '<meta name="creator" content="' . FULLWEBPATH . '">' . "\n"; } if (getOption('htmlmeta_name-author')) { $meta .= '<meta name="author" content="' . $author . '">' . "\n"; } if (getOption('htmlmeta_name-copyright')) { $meta .= '<meta name="copyright" content=" (c) ' . FULLWEBPATH . ' - ' . $author . '">' . "\n"; } if (getOption('htmlmeta_name-rights')) { $meta .= '<meta name="rights" content="' . $author . '">' . "\n"; } if (getOption('htmlmeta_name-generator')) { $meta .= '<meta name="generator" content="ZenPhoto20 ' . ZENPHOTO_VERSION . '">' . "\n"; } if (getOption('htmlmeta_name-revisit-after')) { $meta .= '<meta name="revisit-after" content="' . getOption("htmlmeta_revisit_after") . ' days">' . "\n"; } if (getOption('htmlmeta_name-expires')) { $expires = getOption("htmlmeta_expires"); if ($expires == (int) $expires) { $expires = preg_replace('|\\s\\-\\d+|', '', date('r', time() + $expires)) . ' GMT'; } $meta .= '<meta name="expires" content="' . $expires . '">' . "\n"; } // OpenGraph meta if (getOption('htmlmeta_opengraph')) { $meta .= '<meta property="og:title" content="' . $pagetitle . '">' . "\n"; if (!empty($thumb)) { $meta .= '<meta property="og:image" content="' . $thumb . '">' . "\n"; } $meta .= '<meta property="og:description" content="' . $desc . '">' . "\n"; $meta .= '<meta property="og:url" content="' . html_encode($url) . '">' . "\n"; $meta .= '<meta property="og:type" content="' . $type . '">' . "\n"; } // Social network extras if (getOption('htmlmeta_name-pinterest')) { $meta .= '<meta name="pinterest" content="nopin">' . "\n"; } // dissalow users to pin images on Pinterest // Twitter card $twittername = getOption('htmlmeta_twittername'); if (getOption('htmlmeta_twittercard') || !empty($twittername)) { $meta .= '<meta name="twitter:creator" content="' . $twittername . '">' . "\n"; $meta .= '<meta name="twitter:site" content="' . $twittername . '">' . "\n"; $meta .= '<meta name="twitter:card" content="' . $twittercard_type . '">' . "\n"; $meta .= '<meta name="twitter:title" content="' . $pagetitle . '">' . "\n"; $meta .= '<meta name="twitter:description" content="' . $desc . '">' . "\n"; if (!empty($thumb)) { $meta .= '<meta name="twitter:image" content="' . $thumb . '">' . "\n"; } } // Canonical url if (getOption('htmlmeta_canonical-url')) { $meta .= '<link rel="canonical" href="' . $canonicalurl . '">' . "\n"; if (METATAG_LOCALE_TYPE) { $langs = generateLanguageList(); if (count($langs) != 1) { if (METATAG_LOCALE_TYPE == 1) { $locallink = seo_locale::localePath(false, $locale_); } else { $locallink = ''; } foreach ($langs as $text => $lang) { $langcheck = zpFunctions::getLanguageText($lang, '-'); // for hreflang we need en-US if ($langcheck != $locale) { if (METATAG_LOCALE_TYPE == 1) { $altlink = seo_locale::localePath(true, $lang); } else { $altlink = dynamic_locale::fullHostPath($lang); } switch ($_zp_gallery_page) { case 'index.php': $altlink .= str_replace($locallink, '', $_zp_gallery->getLink($_zp_page)); break; case 'album.php': case 'favorites.php': $altlink .= str_replace($locallink, '', $_zp_current_album->getLink($_zp_page)); break; case 'image.php': $altlink .= str_replace($locallink, '', $_zp_current_image->getLink()); break; case 'news.php': if (function_exists("is_NewsArticle")) { if (is_NewsArticle()) { $altlink .= str_replace($locallink, '', $_zp_current_article->getLink()); } else { if (is_NewsCategory()) { $altlink .= str_replace($locallink, '', $_zp_current_category->getLink($_zp_page)); } else { $altlink .= getNewsPathNav($_zp_page); } } } break; case 'pages.php': $altlink .= str_replace($locallink, '', $_zp_current_page->getLink()); break; case 'archive.php': $altlink .= getCustomPageURL('archive'); break; case 'search.php': $searchwords = $_zp_current_search->codifySearchString(); $searchdate = $_zp_current_search->getSearchDate(); $searchfields = $_zp_current_search->getSearchFields(true); $searchpagepath = getSearchURL($searchwords, $searchdate, $searchfields, $_zp_page, array('albums' => $_zp_current_search->getAlbumList())); $altlink .= $searchpagepath; break; case 'contact.php': $altlink .= getCustomPageURL('contact'); break; default: // for all other possible none standard custom pages $altlink .= getCustomPageURL($pagetitle); break; } // switch $meta .= '<link rel="alternate" hreflang="' . $langcheck . '" href="' . html_encode($altlink) . '">' . "\n"; } // if lang } // foreach } // if count } // if option } // if canonical echo $meta; }
function printBaseAlbumMenuJump($option = "count", $indexname = "Gallery Index", $firstimagelink = false) { $type = getOption('zpbase_selectmenu'); if ($type) { require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/print_album_menu.php'; global $_zp_gallery, $_zp_current_album, $_zp_gallery_page; $albumpath = rewrite_path("/", "/index.php?album="); if (!is_null($_zp_current_album) || $_zp_gallery_page == 'album.php') { $currentfolder = $_zp_current_album->name; } if ($type == 'standard') { ?> <script type="text/javaScript"> // <!-- <![CDATA[ function gotoLink(form) { var OptionIndex=form.ListBoxURL.selectedIndex; parent.location = form.ListBoxURL.options[OptionIndex].value; } // ]]> --> </script> <form> <select name="ListBoxURL" size="1" onchange="gotoLink(this.form);"> <?php } else { ?> <form> <select> <?php } if (getOption('zpbase_galleryishome')) { if ($_zp_gallery_page == "index.php" || $_zp_gallery_page == "album.php") { ?> <option <?php if ($_zp_gallery_page == "index.php") { echo 'selected'; } ?> value="<?php echo html_encode(getGalleryIndexURL()); ?> "><?php echo $indexname; ?> </option> <?php } else { ?> <option selected value=""><?php echo gettext('Select Album...'); ?> </option> <option value="<?php echo html_encode(getGalleryIndexURL()); ?> "><?php echo $indexname; ?> </option> <?php } } else { ?> <option <?php if ($_zp_gallery_page == "index.php") { echo 'selected'; } ?> value="<?php echo html_encode(getGalleryIndexURL()); ?> "><?php echo gettext('Home'); ?> </option> <?php if ($_zp_gallery_page == "gallery.php" || $_zp_gallery_page == "album.php") { ?> <option <?php if ($_zp_gallery_page == "gallery.php") { echo 'selected'; } ?> value="<?php echo getCustomPageURL('gallery'); ?> "><?php echo $indexname; ?> </option> <?php } else { ?> <?php if ($_zp_gallery_page != "index.php") { ?> <option selected value=""><?php echo gettext('Select Album...'); ?> </option><?php } ?> <option value="<?php echo getCustomPageURL('gallery'); ?> "><?php echo $indexname; ?> </option> <?php } } printAlbumMenuJump($option, "", $firstimagelink, NULL, true); ?> </select> </form> <?php } }
<div class="news-date-placeholder"> <span class="left">Latest note: <a href="<?php echo $link; ?> "><?php echo $n['title']; ?> </a></span> <div class="opa40 right"><b>: </b><?php echo zpFormattedDate('%Y %b, %e', strtotime($n['date'])); ?> </div> </div> <div class="clear"></div> </div> <div class="news-content-placeholder"> <?php echo $n['content']; ?> </div> <div class="clear"></div> </div> <?php } ?> <div class="browse"><a href="<?php echo getCustomPageURL(ZENPAGE_NEWS); ?> " class="news">More notes</a></div> </div>
/** * Creates a "REWRITE" url given the query parameters that represent the link * * @param type $query * @return string */ function zpRewriteURL($query) { $redirectURL = ''; if (isset($query['p'])) { sanitize($query); switch ($query['p']) { case 'news': $redirectURL = _NEWS_; if (isset($query['category'])) { $obj = new ZenpageCategory($query['category'], false); if (!$obj->loaded) { return ''; } $redirectURL = $obj->getLink(); unset($query['category']); } else { if (isset($query['date'])) { $redirectURL = _NEWS_ARCHIVE_ . '/' . $query['date']; unset($query['date']); } } if (isset($query['title'])) { $obj = new ZenpageNews($query['title'], false); if (!$obj->loaded) { return ''; } $redirectURL = $obj->getLink(); unset($query['title']); } break; case 'pages': $redirectURL = _PAGES_; if (isset($query['title'])) { $obj = new ZenpagePage($query['title'], false); if (!$obj->loaded) { return ''; } $redirectURL = $obj->getLink(); unset($query['title']); } break; case 'search': $redirectURL = _SEARCH_; if (isset($query['date'])) { $redirectURL = _ARCHIVE_ . '/' . $query['date']; unset($query['date']); } else { if (isset($query['searchfields']) && $query['searchfields'] == 'tags') { $redirectURL = _TAGS_; unset($query['searchfields']); } } if (isset($query['words'])) { $redirectURL .= '/' . $query['words']; unset($query['words']); } break; default: $redirectURL = getCustomPageURL($query['p']); break; } unset($query['p']); $redirectURL = preg_replace('~^' . WEBPATH . '/~', '', $redirectURL); if (isset($query['page'])) { $redirectURL .= '/' . $query['page']; unset($query['page']); } $q = http_build_query($query); if ($q) { $redirectURL .= '?' . $q; } } else { if (isset($query['album'])) { if (isset($query['image'])) { $obj = newImage(NULL, array('folder' => $query['album'], 'filename' => $query['image']), true); unset($query['image']); } else { $obj = newAlbum($query['album'], NULL, true); } unset($query['album']); if (!$obj->exists) { return ''; } $redirectURL = preg_replace('~^' . WEBPATH . '/~', '', $obj->getLink()); $q = http_build_query($query); if ($q) { $redirectURL .= '?' . $q; } } } return $redirectURL; }
<link type="text/css" href="<?php echo $_zp_themeroot; ?> /resources/css/layout.css" rel="stylesheet" media="screen" /> <link type="text/css" href="<?php echo $_zp_themeroot; ?> /resources/css/style.css" rel="stylesheet" media="screen" /> <link rel="stylesheet" type="text/css" href="<?php echo $_zp_themeroot; ?> /resources/css/.css" media="screen" /> <link rel="stylesheet" type="text/css" href='<?php echo getCustomPageURL("colors"); ?> ' media="screen" /> <link rel="stylesheet" type="text/css" href="<?php echo $_zp_themeroot; ?> /resources/css/contact.css" media="screen" /> <link rel="stylesheet" type="text/css" href="<?php echo $_zp_themeroot; ?> /resources/css/overrides.css" media="screen" /> <!--[if IE]> <link rel="stylesheet" type="text/css" href="<?php echo $_zp_themeroot; ?>
/** * Prints the logout link if the user is logged in. * This is for album passwords only, not admin users; * * @param string $before before text * @param string $after after text * @param int $showLoginForm to display a login form * to not display a login form, but just a login link, set to 0 * to display a login form set to 1 * to display a link to a login form in colorbox, set to 2, but you must have colorbox enabled for the theme pages where this link appears.) * @param string $logouttext optional replacement text for "Logout" */ function printUserLogin_out($before = '', $after = '', $showLoginForm = NULL, $logouttext = NULL) { global $_zp_gallery, $__redirect, $_zp_current_admin_obj, $_zp_login_error, $_zp_gallery_page; $excludedPages = array('password.php', 'register.php', 'favorites.php', '404.php'); $logintext = gettext('Login'); if (is_null($logouttext)) { $logouttext = gettext("Logout"); } $params = array("'userlog=0'"); if (!empty($__redirect)) { foreach ($__redirect as $param => $value) { $params[] .= "'" . $param . '=' . urlencode($value) . "'"; } } if (is_null($showLoginForm)) { $showLoginForm = getOption('user_logout_login_form'); } if (is_object($_zp_current_admin_obj)) { if (!$_zp_current_admin_obj->logout_link) { return; } } $cookies = Zenphoto_Authority::getAuthCookies(); if (empty($cookies) || !zp_loggedin()) { if (!in_array($_zp_gallery_page, $excludedPages)) { switch ($showLoginForm) { case 1: ?> <div class="passwordform"> <?php printPasswordForm('', true, false); ?> </div> <?php break; case 2: if (getOption('colorbox_' . $_zp_gallery->getCurrentTheme() . '_' . stripSuffix($_zp_gallery_page)) && zp_has_filter('theme_head', 'colorbox::css')) { ?> <script type="text/javascript"> // <!-- <![CDATA[ $(document).ready(function() { $(".logonlink").colorbox({ inline: true, innerWidth: "400px", href: "#passwordform", close: '<?php echo gettext("close"); ?> ', open: $('#passwordform_enclosure .errorbox').length }); }); // ]]> --> </script> <?php if ($before) { echo '<span class="beforetext">' . html_encodeTagged($before) . '</span>'; } ?> <a href="#" class="logonlink" title="<?php echo $logintext; ?> "><?php echo $logintext; ?> </a> <span id="passwordform_enclosure" style="display:none"> <div class="passwordform"> <?php printPasswordForm('', true, false); ?> </div> </span> <?php if ($after) { echo '<span class="aftertext">' . html_encodeTagged($after) . '</span>'; } } break; default: if ($loginlink = zp_apply_filter('login_link', getCustomPageURL('password'))) { if ($before) { echo '<span class="beforetext">' . html_encodeTagged($before) . '</span>'; } ?> <a href="<?php echo $loginlink; ?> " title="<?php echo $logintext; ?> "><?php echo $logintext; ?> </a> <?php if ($after) { echo '<span class="aftertext">' . html_encodeTagged($after) . '</span>'; } } } } } else { if ($before) { echo '<span class="beforetext">' . html_encodeTagged($before) . '</span>'; } $logoutlink = "javascript:launchScript('" . FULLWEBPATH . "/',[" . implode(',', $params) . "]);"; ?> <a href="<?php echo $logoutlink; ?> " title="<?php echo $logouttext; ?> "><?php echo $logouttext; ?> </a> <?php if ($after) { echo '<span class="aftertext">' . html_encodeTagged($after) . '</span>'; } } }
<div class="<?php echo $class; ?> "> <h5> <?php echo gettext('Latest Updated Albums'); ?> <?php if (getOption('libratus_stats_albums_latestupdated')) { ?> <a class="stats-more" title="<?php echo gettext('More'); ?> " href="<?php echo getCustomPageURL('archive') . '?set=latestupdatedalbums'; ?> "><i class="fa fa-caret-right"></i></a><?php } ?> </h5> <?php $items = getAlbumStatistic($number, 'latestupdated', '', false, 1); ?> <div class="gallery-thumbs"> <?php foreach ($items as $item) { $image = $item->getAlbumThumbImage(); ?> <a href="<?php echo html_encode($item->getLink());
return; } if (Utils::exists('custom/menus/menus.php')) { require_once 'custom/menus/menus.php'; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title><?php echo $tileSet->getTitle(); ?> </title> <link rel="stylesheet" type="text/css" href="<?php echo getCustomPageURL('css'); ?> " media="screen" /> <!--[if IE 7]> <link rel="stylesheet" type="text/css" href="<?php echo $_zp_themeroot; ?> /resources/css/ie7.css" media="screen" /> <![endif]--> <noscript> <style> #album-slideshow-link { display: none; }
<?php require_once 'theme_functions.php'; define('ERROR_MESSAGE', "Weirdly enough, an internal error just occured. It is most probably only temporary, but should it perdure, " . "feel free to <a href='" . getCustomPageURL('contact') . "' rel='contact'>report the problem</a>."); TileSet::init(getGalleryTitle() . ' : ' . "Internal error", "error"); include_once 'template.php';
<?php $m = SERVERPATH . "/themes/" . basename(dirname(dirname(__FILE__))) . "/menus/secondary.php"; if (file_exists($m)) { include $m; } if (getOption('simplicity2_enable_archive')) { MenuUtil::printSecondaryLinkItem('browse-archive', getCustomPageURL('archive'), gettext('Archives'), THEME_SEARCH); } if (getOption('simplicity2_print_contact_menu_item') && getOption('simplicity2_contact_is_secondary')) { $pageName = getOption('simplicity2_contact_page_name'); $text = gettext("Contact"); if (is_null($pageName) or trim($pageName) == '') { MenuUtil::printSecondaryLinkItem('contact-link', getCustomPageURL('contact'), $text, THEME_CONTACT); } else { MenuUtil::printSecondaryPageLinkItem('contact-link', $pageName, $text); } } ?>
include "inc-header.php"; ?> <div id="breadcrumbs"> <h2><a href="<?php echo html_encode(getGalleryIndexURL()); ?> " title="<?php echo gettext('Home'); ?> "><?php echo gettext('Home'); ?> </a> » <a href="<?php echo getCustomPageURL('gallery'); ?> " title="<?php echo gettext('Gallery Index'); ?> "><?php echo gettext('Gallery Index'); ?> </a> » <?php printParentBreadcrumb('', ' » ', ' » '); ?> <?php printAlbumBreadcrumb('', ' » '); printImageTitle(true); ?> </h2>
?> " ><span class="next"></span></a> <?php } else { ?> <span class="next-disabled"></span> <?php } } ?> </div> </div> </div> <div id="credit"><?php printRSSLink('News', '', 'News RSS', '', false); ?> | <a href="<?php echo getCustomPageURL("archive"); ?> ">Archives</a> | <a href="<?php echo getPageURL('credits'); ?> ">Credits</a> | Powered by <a href="http://www.zenphoto.org" title="A simpler web photo album">zenphoto</a></div> <?php zp_apply_filter('theme_body_close'); ?> </body> </html>
<?php require_once 'theme_functions.php'; define('ERROR_MESSAGE', 'The requested page cannot be found. This may be our fault - or not. The page might have have been deleted or moved. Either case, ' . 'if you ended up here through an internal link, please <a href="' . getCustomPageURL('contact') . '">report the problem</a>.'); TileSet::init(getGalleryTitle() . ' : ' . "Resource not found", "error"); include_once 'template.php';
} ?> <?php if ($zenpage && ZP_PAGES_ENABLED) { printPageMenu('list', '', 'active open', 'submenu', 'active open', '', true, false); } ?> <li <?php if ($_zp_gallery_page == "archive.php" || $_zp_gallery_page == "search.php") { ?> class="active" <?php } ?> > <a href="<?php echo getCustomPageURL('archive'); ?> " title="<?php echo gettext('Archive/Search'); ?> "><?php echo gettext('Archive/Search'); ?> </a> </li> <?php if (function_exists('printContactForm')) { ?> <li <?php if ($_zp_gallery_page == "contact.php") { ?>
/** * Creates a "REWRITE" url given the query parameters that represent the link * * @param type $query * @return string */ function zpRewriteURL($query) { $redirectURL = ''; if (isset($query['p'])) { sanitize($query); switch ($query['p']) { case 'news': $redirectURL = _NEWS_; if (isset($query['category'])) { $obj = newCategory(rtrim($query['category'], '/'), false); if (!$obj->loaded) { return ''; } $redirectURL = $obj->getLink(); unset($query['category']); } else { if (isset($query['date'])) { $redirectURL = _NEWS_ARCHIVE_ . '/' . rtrim($query['date'], '/') . '/'; unset($query['date']); } } if (isset($query['title'])) { $obj = newArticle(rtrim($query['title'], '/'), false); if (!$obj->loaded) { return ''; } $redirectURL = $obj->getLink(); unset($query['title']); } break; case 'pages': if (isset($query['title'])) { $obj = newPage(rtrim($query['title'], '/'), false); if (!$obj->loaded) { return ''; } $redirectURL = $obj->getLink(); unset($query['title']); } break; case 'search': $redirectURL = _SEARCH_; if (isset($query['date'])) { $redirectURL = _ARCHIVE_ . '/' . rtrim($query['date'], '/') . '/'; unset($query['date']); } else { if (isset($query['searchfields']) && $query['searchfields'] == 'tags') { $redirectURL = _TAGS_; unset($query['searchfields']); } } if (isset($query['words'])) { if (!preg_match('/^[0-9A-F]+\\.[0-9A-F]+$/i', $query['words'])) { $query['words'] = SearchEngine::encode($query['words']); } $redirectURL .= '/' . $query['words'] . '/'; unset($query['words']); } break; default: $redirectURL = getCustomPageURL(rtrim($query['p'], '/')); break; } unset($query['p']); if (isset($query['page'])) { $redirectURL = rtrim($redirectURL, '/') . '/' . rtrim($query['page'], '/'); unset($query['page']); } } else { if (isset($query['album'])) { if (isset($query['image'])) { $obj = newImage(array('folder' => $query['album'], 'filename' => $query['image']), NULL, true); unset($query['image']); } else { $obj = newAlbum($query['album'], NULL, true); } if (is_object($obj) && !$obj->exists) { return ''; } unset($query['album']); $redirectURL = preg_replace('~^' . WEBPATH . '/~', '', $obj->getLink(@$query['page'])); unset($query['page']); } else { if (isset($query['page'])) { //index page $redirectURL = _PAGE_ . '/' . rtrim($query['page'], '/'); unset($query['page']); } } } if ($redirectURL && !empty($query)) { $redirectURL .= '?' . http_build_query($query); } return $redirectURL; }
/** * Prints html meta data to be used in the <head> section of a page * */ static function getHTMLMetaData() { global $_zp_gallery, $_zp_galley_page, $_zp_current_album, $_zp_current_image, $_zp_current_zenpage_news, $_zp_current_zenpage_page, $_zp_gallery_page, $_zp_current_category, $_zp_authority, $_zp_conf_vars, $_myFavorites, $htmlmetatags_need_cache, $_zp_page; zp_register_filter('image_processor_uri', 'htmlmetatags::ipURI'); $host = sanitize("http://" . $_SERVER['HTTP_HOST']); $url = $host . getRequestURI(); // Convert locale shorttag to allowed html meta format $locale = str_replace("_", "-", getUserLocale()); $canonicalurl = ''; // generate page title, get date $pagetitle = ""; // for gallery index setup below switch $date = strftime(DATE_FORMAT); // if we don't have a item date use current date $desc = getBareGalleryDesc(); $thumb = ''; if (getOption('htmlmeta_sitelogo')) { $thumb = getOption('htmlmeta_sitelogo'); } if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) { $ogimage_width = getOption('htmlmeta_ogimage_width'); $ogimage_height = getOption('htmlmeta_ogimage_height'); if (empty($ogimage_width)) { $ogimage_width = 1280; } if (empty($ogimage_height)) { $ogimage_height = 900; } } $type = 'article'; switch ($_zp_gallery_page) { case 'index.php': $desc = getBareGalleryDesc(); //$canonicalurl = $host . getGalleryIndexURL(); $canonicalurl = $host . getPageNumURL($_zp_page); $type = 'website'; break; case 'album.php': $pagetitle = getBareAlbumTitle() . " - "; $date = getAlbumDate(); $desc = getBareAlbumDesc(); $canonicalurl = $host . getPageNumURL($_zp_page); if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) { $thumbimg = $_zp_current_album->getAlbumThumbImage(); getMaxSpaceContainer($ogimage_width, $ogimage_height, $thumbimg, false); $thumb = $host . html_encode(pathurlencode($thumbimg->getCustomImage(NULL, $ogimage_width, $ogimage_height, NULL, NULL, NULL, NULL, false, NULL))); } break; case 'image.php': $pagetitle = getBareImageTitle() . " (" . getBareAlbumTitle() . ") - "; $date = getImageDate(); $desc = getBareImageDesc(); $canonicalurl = $host . getImageURL(); if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) { $thumb = $host . html_encode(pathurlencode(getCustomSizedImageMaxSpace($ogimage_width, $ogimage_height))); } break; case 'news.php': if (function_exists("is_NewsArticle")) { if (is_NewsArticle()) { $pagetitle = getBareNewsTitle() . " - "; $date = getNewsDate(); $desc = trim(getBare(getNewsContent())); $canonicalurl = $host . $_zp_current_zenpage_news->getLink(); } else { if (is_NewsCategory()) { $pagetitle = $_zp_current_category->getTitlelink() . " - "; $date = strftime(DATE_FORMAT); $desc = trim(getBare($_zp_current_category->getDesc())); $canonicalurl = $host . $_zp_current_category->getLink(); $type = 'category'; } else { $pagetitle = gettext('News') . " - "; $desc = ''; $canonicalurl = $host . getNewsIndexURL(); $type = 'website'; } } if ($_zp_page != 1) { $canonicalurl .= '/' . $_zp_page; } } break; case 'pages.php': $pagetitle = getBarePageTitle() . " - "; $date = getPageDate(); $desc = trim(getBare(getPageContent())); $canonicalurl = $host . $_zp_current_zenpage_page->getLink(); break; default: // for all other possible static custom pages $custompage = stripSuffix($_zp_gallery_page); $standard = array('contact' => gettext('Contact'), 'register' => gettext('Register'), 'search' => gettext('Search'), 'archive' => gettext('Archive view'), 'password' => gettext('Password required')); if (is_object($_myFavorites)) { $standard['favorites'] = gettext('My favorites'); } if (array_key_exists($custompage, $standard)) { $pagetitle = $standard[$custompage] . " - "; } else { $pagetitle = $custompage . " - "; } $desc = ''; $canonicalurl = $host . getCustomPageURL($custompage); if ($_zp_page != 1) { $canonicalurl .= '/' . $_zp_page; } break; } // shorten desc to the allowed 200 characters if necesssary. $desc = html_encode(trim(substr(getBare($desc), 0, 160))); $pagetitle = $pagetitle . getBareGalleryTitle(); // get master admin $admin = $_zp_authority->getMasterUser(); $author = $admin->getName(); $meta = ''; if (getOption('htmlmeta_http-equiv-cache-control')) { $meta .= '<meta http-equiv="Cache-control" content="' . getOption("htmlmeta_cache_control") . '">' . "\n"; } if (getOption('htmlmeta_http-equiv-pragma')) { $meta .= '<meta http-equiv="pragma" content="' . getOption("htmlmeta_pragma") . '">' . "\n"; } if (getOption('htmlmeta_name-keywords')) { $meta .= '<meta name="keywords" content="' . htmlmetatags::getMetaKeywords() . '">' . "\n"; } if (getOption('htmlmeta_name-description')) { $meta .= '<meta name="description" content="' . $desc . '">' . "\n"; } if (getOption('htmlmeta_name-page-topic')) { $meta .= '<meta name="page-topic" content="' . $desc . '">' . "\n"; } if (getOption('htmlmeta_name-robots')) { $meta .= '<meta name="robots" content="' . getOption("htmlmeta_robots") . '">' . "\n"; } if (getOption('htmlmeta_name-publisher')) { $meta .= '<meta name="publisher" content="' . FULLWEBPATH . '">' . "\n"; } if (getOption('htmlmeta_name-creator')) { $meta .= '<meta name="creator" content="' . FULLWEBPATH . '">' . "\n"; } if (getOption('htmlmeta_name-author')) { $meta .= '<meta name="author" content="' . $author . '">' . "\n"; } if (getOption('htmlmeta_name-copyright')) { $meta .= '<meta name="copyright" content=" (c) ' . FULLWEBPATH . ' - ' . $author . '">' . "\n"; } if (getOption('htmlmeta_name-rights')) { $meta .= '<meta name="rights" content="' . $author . '">' . "\n"; } if (getOption('htmlmeta_name-generator')) { $meta .= '<meta name="generator" content="Zenphoto ' . ZENPHOTO_VERSION . '">' . "\n"; } if (getOption('htmlmeta_name-revisit-after')) { $meta .= '<meta name="revisit-after" content="' . getOption("htmlmeta_revisit_after") . '">' . "\n"; } if (getOption('htmlmeta_name-expires')) { $expires = getOption("htmlmeta_expires"); if ($expires == (int) $expires) { $expires = preg_replace('|\\s\\-\\d+|', '', date('r', time() + $expires)) . ' GMT'; } $meta .= '<meta name="expires" content="' . $expires . '">' . "\n"; } // OpenGraph meta if (getOption('htmlmeta_og-title')) { $meta .= '<meta property="og:title" content="' . $pagetitle . '">' . "\n"; } if (getOption('htmlmeta_og-image') && !empty($thumb)) { $meta .= '<meta property="og:image" content="' . $thumb . '">' . "\n"; } if (getOption('htmlmeta_og-description')) { $meta .= '<meta property="og:description" content="' . $desc . '">' . "\n"; } if (getOption('htmlmeta_og-url')) { $meta .= '<meta property="og:url" content="' . html_encode($url) . '">' . "\n"; } if (getOption('htmlmeta_og-type')) { $meta .= '<meta property="og:type" content="' . $type . '">' . "\n"; } // Social network extras if (getOption('htmlmeta_name-pinterest')) { $meta .= '<meta name="pinterest" content="nopin">' . "\n"; } // dissalow users to pin images on Pinterest // Twitter card $twittername = getOption('htmlmeta_twittername'); if (getOption('htmlmeta_twittercard') || !empty($twittername)) { $meta .= '<meta property="twitter:creator" content="' . $twittername . '">' . "\n"; $meta .= '<meta property="twitter:site" content="' . $twittername . '">' . "\n"; $meta .= '<meta property="twitter:card" content="summary">' . "\n"; $meta .= '<meta property="twitter:title" content="' . $pagetitle . '">' . "\n"; $meta .= '<meta property="twitter:description" content="' . $desc . '">' . "\n"; if (!empty($thumb)) { $meta .= '<meta property="twitter:image" content="' . $thumb . '">' . "\n"; } } // Canonical url if (getOption('htmlmeta_canonical-url')) { $meta .= '<link rel="canonical" href="' . $canonicalurl . '">' . "\n"; if (METATAG_LOCALE_TYPE) { $langs = generateLanguageList(); if (count($langs) != 1) { foreach ($langs as $text => $lang) { $langcheck = zpFunctions::getLanguageText($lang, '-'); // for hreflang we need en-US if ($langcheck != $locale) { switch (METATAG_LOCALE_TYPE) { case 1: $altlink = seo_locale::localePath(true, $lang); break; case 2: $altlink = dynamic_locale::fullHostPath($lang); break; } switch ($_zp_gallery_page) { case 'index.php': $altlink .= '/'; break; case 'gallery.php': $altlink .= '/' . _PAGE_ . '/gallery'; break; case 'album.php': $altlink .= '/' . html_encode($_zp_current_album->name) . '/'; break; case 'image.php': $altlink .= '/' . html_encode($_zp_current_album->name) . '/' . html_encode($_zp_current_image->filename) . IM_SUFFIX; break; case 'news.php': if (function_exists("is_NewsArticle")) { if (is_NewsArticle()) { $altlink .= '/' . _NEWS_ . '/' . html_encode($_zp_current_zenpage_news->getTitlelink()); } else { if (is_NewsCategory()) { $altlink .= '/' . _NEWS_ . '/' . html_encode($_zp_current_category->getTitlelink()); } else { $altlink .= '/' . _NEWS_; } } } break; case 'pages.php': $altlink .= '/' . _PAGES_ . '/' . html_encode($_zp_current_zenpage_page->getTitlelink()); break; case 'archive.php': $altlink .= '/' . _ARCHIVE_; break; case 'search.php': $altlink .= '/' . _SEARCH_ . '/'; break; case 'contact.php': $altlink .= '/' . _CONTACT_ . '/'; break; default: // for all other possible none standard custom pages $altlink .= '/' . _PAGE_ . '/' . html_encode($pagetitle); break; } // switch //append page number if needed switch ($_zp_gallery_page) { case 'index.php': case 'album.php': if ($_zp_page != 1) { $altlink .= _PAGE_ . '/' . $_zp_page . '/'; } break; case 'gallery.php': case 'news.php': if ($_zp_page != 1) { $altlink .= '/' . $_zp_page; } break; } $meta .= '<link rel="alternate" hreflang="' . $langcheck . '" href="' . $altlink . '">' . "\n"; } // if lang } // foreach } // if count } // if option } // if canonical if (!empty($htmlmetatags_need_cache)) { $meta .= '<script type="text/javascript">' . "\n"; $meta .= 'var caches = ["' . implode('","', $htmlmetatags_need_cache) . '"];' . "\n"; $meta .= ' window.onload = function() { var index,value; for (index in caches) { value = caches[index]; $.ajax({ cache: false, type: "GET", url: value }); } } '; $meta .= '</script>' . "\n"; } zp_remove_filter('image_processor_uri', 'htmlmetatags::ipURI'); echo $meta; }
if (isset($_GET['set'])) { if ($_GET['set'] == 'topratedalbums') { $active = ' class="active"'; } else { $active = ''; } } echo '<div' . $active . '><a href="' . getCustomPageURL('archive', 'set=topratedalbums') . '"><i class="fa fa-star fa-fw"></i> ' . gettext('Top Rated Albums') . '</a></div>'; $active = ''; } if (getOption('libratus_stats_albums_latestupdated')) { if ($albheader) { echo $albheadertext; $albheader = false; } if (isset($_GET['set'])) { if ($_GET['set'] == 'latestupdatedalbums') { $active = ' class="active"'; } else { $active = ''; } } echo '<div' . $active . '><a href="' . getCustomPageURL('archive', 'set=latestupdatedalbums') . '"><i class="fa fa-indent fa-fw"></i> ' . gettext('Latest Updated Albums') . '</a></div>'; $active = ''; } ?> </div> <?php if (getOption('libratus_social')) { include 'inc-socialshare.php'; }
?> <?php if (getOption('custom_index_page') === 'gallery') { ?> <a href="<?php echo html_encode(getGalleryIndexURL()); ?> " title="<?php echo gettext('Main Index'); ?> "><?php echo gettext('Home'); ?> </a> | <a href="<?php echo html_encode(getCustomPageURL('gallery')); ?> " title="<?php echo gettext('Albums Index'); ?> "><?php printGalleryTitle(); ?> </a> | <?php } else { ?> <a href="<?php echo html_encode(getGalleryIndexURL()); ?> " title="<?php
static function printScripts($name) { if (self::$scripts) { return; } self::$scripts = TRUE; echo "<script src='" . getCustomPageURL('script', 't=' . $name) . "'></script>"; }