当前位置: 首页>>代码示例>>PHP>>正文


PHP getNewsIndexURL函数代码示例

本文整理汇总了PHP中getNewsIndexURL函数的典型用法代码示例。如果您正苦于以下问题:PHP getNewsIndexURL函数的具体用法?PHP getNewsIndexURL怎么用?PHP getNewsIndexURL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了getNewsIndexURL函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: printThemeMenu

function printThemeMenu()
{
    echo '<ul class="menu main">';
    if (getMainSiteName() != '') {
        echo '<li><a href="' . getMainSiteURL() . '" title="' . getMainSiteName() . '">' . getMainSiteName() . '</a></li>';
    }
    echo '<li><a href="' . getGalleryIndexURL() . '" title="' . getGalleryTitle() . '">' . getGalleryTitle() . '</a></li>';
    if (function_exists('printNewsIndexURL')) {
        echo '<li><a href="' . getNewsIndexURL() . '" title="' . gettext('News') . '">' . gettext('News') . '</a></li>';
    }
    if (function_exists("printPageMenu")) {
        printPageMenu("list-top", "", "menu-active", "", "", '', 0, false, '');
    }
    echo '<li><a href="' . getCustomPageURL('archive') . '">' . gettext('Archives') . '</a></li>';
    echo '</ul>';
}
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:16,代码来源:functions.php

示例2: getNewsIndexURL

 /**
  * Returns the full path of the news index page (news page 1) or if the "news on zp index" option is set a link to the gallery index.
  *
  * @return string
  */
 function getNewsIndexURL()
 {
     Zenpage_internal_deprecations::getNewsIndexURL();
     return getNewsIndexURL();
 }
开发者ID:rb26,项目名称:zenphoto,代码行数:10,代码来源:zenpage-class.php

示例3: printNestedMenu


//.........这里部分代码省略.........
        // categories are not searched
        $css_class_topactive = "";
        $css_class_active = "";
        rem_context(ZP_ZENPAGE_PAGE);
    }
    if (0 == count($items) + (int) ($mode == 'allcategories')) {
        return;
    }
    // nothing to do
    $startlist = $startlist && !($option == 'omit-top' || $option == 'list-sub');
    if ($startlist) {
        echo "<ul{$css_id}>";
    }
    // if index link and if if with count
    if (!empty($indexname)) {
        if ($limit) {
            $display = shortenContent($indexname, $limit, MENU_TRUNCATE_INDICATOR);
        } else {
            $display = $indexname;
        }
        switch ($mode) {
            case 'pages':
                if ($_zp_gallery_page == "index.php") {
                    echo "<li {$css_class_topactive}>" . html_encode($display) . "</li>";
                } else {
                    echo "<li><a href='" . html_encode(getGalleryIndexURL()) . "' title='" . html_encode($indexname) . "'>" . html_encode($display) . "</a></li>";
                }
                break;
            case 'categories':
            case 'allcategories':
                if ($_zp_gallery_page == "news.php" && !is_NewsCategory() && !is_NewsArchive() && !is_NewsArticle()) {
                    echo "<li {$css_class_topactive}>" . html_encode($display);
                } else {
                    echo "<li><a href=\"" . html_encode(getNewsIndexURL()) . "\" title=\"" . html_encode($indexname) . "\">" . html_encode($display) . "</a>";
                }
                if ($counter) {
                    if (in_context(ZP_ZENPAGE_NEWS_CATEGORY) && $mode == 'categories') {
                        $totalcount = count($_zp_current_category->getArticles(0));
                    } else {
                        save_context();
                        rem_context(ZP_ZENPAGE_NEWS_DATE);
                        $totalcount = count($_zp_zenpage->getArticles(0));
                        restore_context();
                    }
                    echo ' <span style="white-space:nowrap;"><small>(' . sprintf(ngettext('%u article', '%u articles', $totalcount), $totalcount) . ')</small></span>';
                }
                echo "</li>\n";
                break;
        }
    }
    $baseindent = max(1, count(explode("-", $currentitem_sortorder)));
    $indent = 1;
    $open = array($indent => 0);
    $parents = array(NULL);
    $order = explode('-', $currentitem_sortorder);
    $mylevel = count($order);
    $myparentsort = array_shift($order);
    for ($c = 0; $c <= $mylevel; $c++) {
        $parents[$c] = NULL;
    }
    foreach ($items as $item) {
        switch ($mode) {
            case 'pages':
                $catcount = 1;
                //	so page items all show.
                $pageobj = new ZenpagePage($item['titlelink']);
开发者ID:rauldobrota,项目名称:zenphoto,代码行数:67,代码来源:zenpage-template-functions.php

示例4: getGalleryIndexURL

			<h2 id="logo"><a href="<?php 
    echo getGalleryIndexURL();
    ?>
"><?php 
    echo getBareGalleryTitle();
    ?>
</a></h2>
			<?php 
}
?>
			
			<?php 
if ($zenpage && $zpfocus_spotlight == 'latest' && getLatestNews()) {
    ?>
			<a id="latest-news-link" href="<?php 
    echo getNewsIndexURL();
    ?>
"><?php 
    echo gettext('Latest News');
    ?>
</a>
			<?php 
    printLatestNewsCustom(1, '', true, true, 500, true);
    ?>
			<?php 
}
?>
			<?php 
if ($zpfocus_spotlight == 'manual') {
    ?>
<div id="manual-spotlight"><?php 
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:31,代码来源:gallery.php

示例5: getHTMLMetaData

    /**
     * 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');
                }
//.........这里部分代码省略.........
开发者ID:rb26,项目名称:zenphoto,代码行数:101,代码来源:html_meta_tags.php

示例6: controlLink

    /**
     *
     * places a link on the theme page to switch to or from the mobile theme
     * @param string $text link text
     */
    static function controlLink($text = NULL, $before = NULL, $after = Null)
    {
        $detect = new mobile();
        if ($detect->isMobile()) {
            if (zp_getCookie('mobileTheme_disable')) {
                if (is_null($text)) {
                    $text = gettext('View the mobile gallery');
                }
                $enable = 'on';
            } else {
                if (is_null($text)) {
                    $text = gettext('View the normal gallery');
                }
                $enable = 'off';
            }
            if ($before) {
                echo '<span class="beforetext">' . html_encode($before) . '</span>';
            }
            if (MOD_REWRITE) {
                $link = '?mobileTheme=' . $enable;
            } else {
                global $_zp_gallery_page, $_zp_current_images, $_zp_current_album, $_zp_current_zenpage_news, $_zp_current_category, $_zp_current_zenpage_page;
                switch ($_zp_gallery_page) {
                    case 'index.php':
                        $link = 'index.php?mobileTheme=' . $enable;
                        break;
                    case 'gallery.php':
                        $link = 'index.php?p=gallery&amp;mobileTheme=' . $enable;
                        break;
                    case 'album.php':
                        $link = pathurlencode($_zp_current_album->getLink(null)) . '&amp;mobileTheme=' . $enable;
                        break;
                    case 'image.php':
                        $link = pathurlencode($_zp_current_image->getLink(null)) . '&amp;mobileTheme=' . $enable;
                        break;
                    case 'news.php':
                        if (is_NewsArticle()) {
                            $link = html_encode($_zp_current_zenpage_news->getLink(null)) . '&amp;mobileTheme=' . $enable;
                        } else {
                            if (is_NewsCategory()) {
                                $link = html_encode($_zp_current_category->getLink(null)) . '&amp;mobileTheme=' . $enable;
                            } else {
                                $link = html_encode(getNewsIndexURL()) . '&amp;mobileTheme=' . $enable;
                            }
                        }
                        break;
                    case 'pages.php':
                        $link = html_encode($_zp_current_zenpage_page->getLink()) . '&amp;mobileTheme=' . $enable;
                        break;
                    default:
                        $link = html_encode($_zp_gallery_page) . '?mobileTheme=' . $enable;
                        break;
                }
            }
            ?>
			<span class="mobileThemeControlLink">
				
				<a href="<?php 
            echo $link;
            ?>
" rel="external">
					<?php 
            echo html_encode($text);
            ?>
				</a>
			</span>
			<?php 
            if ($after) {
                echo '<span class="aftertext">' . html_encode($after) . '</span>';
            }
        }
    }
开发者ID:Simounet,项目名称:zenphoto,代码行数:77,代码来源:mobileTheme.php

示例7: printThemeMenu

?>
			</div>
			<div id="menu">
				<?php 
printThemeMenu();
?>
			</div>
			<div id="breadcrumb">
				<ul>
				<?php 
getFormattedMainSiteName('<li class="page">', '</li><li class="chevron"> > </li>');
echo '<li><a href="' . getGalleryIndexURL() . '" class="activ">' . getBareGalleryTitle() . '</a></li>';
echo '<li class="chevron"><a> &gt; </a></li>';
echo '<li><a';
if (is_NewsArticle()) {
    echo ' href="' . getNewsIndexURL() . '">News</a></li><li class="chevron"><a> &gt; </a></li><li><a>' . strip_tags(getNewsTitle());
} else {
    echo '>News';
}
echo '</a></li>';
?>
				</ul>
			</div>
			<div id="content">
				<?php 
if (is_NewsArticle()) {
    // Affichage d'une news particulière
    ?>
				<div class="description">
					<div class="title">
						<h3><?php 
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:31,代码来源:news.php

示例8: jqm_printMainHeaderNav

/**
 * 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 
}
开发者ID:rauldobrota,项目名称:zenphoto,代码行数:79,代码来源:functions.php

示例9: addItem

/**
 * Adds an menu item set via POST
 *
 * @return array
 */
function addItem(&$reports)
{
    $menuset = checkChosenMenuset();
    $result['type'] = sanitize($_POST['type']);
    $result['show'] = getCheckboxState('show');
    $result['include_li'] = getCheckboxState('include_li');
    $result['id'] = 0;
    if (getCheckboxState('span')) {
        $result['span_id'] = sanitize($_POST['span_id']);
        $result['span_class'] = sanitize($_POST['span_class']);
    } else {
        $result['span_id'] = '';
        $result['span_class'] = '';
    }
    switch ($result['type']) {
        case 'all_items':
            query("INSERT INTO " . prefix('menu') . " (`title`,`link`,`type`,`show`,`menuset`,`sort_order`) " . "VALUES ('" . gettext('Home') . "', '" . WEBPATH . '/' . "','galleryindex','1'," . db_quote($menuset) . ",'000')", true);
            addAlbumsToDatabase($menuset);
            if (extensionEnabled('zenpage')) {
                query("INSERT INTO " . prefix('menu') . " (`title`,`link`,`type`,`show`,`menuset`,`sort_order`) " . "VALUES ('" . gettext('News index') . "', '" . getNewsIndexURL() . "', 'zenpagenewsindex', '1', " . db_quote($menuset) . ", '001')", true);
                addPagesToDatabase($menuset);
                addCategoriesToDatabase($menuset);
            }
            $reports[] = "<p class = 'messagebox fade-message'>" . gettext("Menu items for all Zenphoto objects added.") . " </p>";
            return NULL;
        case 'all_albums':
            addAlbumsToDatabase($menuset);
            $reports[] = "<p class = 'messagebox fade-message'>" . gettext("Menu items for all albums added.") . " </p>";
            return NULL;
        case 'all_zenpagepages':
            addPagesToDatabase($menuset);
            $reports[] = "<p class = 'messagebox fade-message'>" . gettext("Menu items for all Zenpage pages added.") . " </p>";
            return NULL;
        case 'all_zenpagecategorys':
            addCategoriesToDatabase($menuset);
            $reports[] = "<p class = 'messagebox fade-message'>" . gettext("Menu items for all Zenpage categories added.") . " </p>";
            return NULL;
        case 'album':
            $result['title'] = $result['link'] = sanitize($_POST['albumselect']);
            if (empty($result['link'])) {
                $reports[] = "<p class = 'errorbox fade-message'>" . gettext("You forgot to select an album.") . " </p>";
                return $result;
            }
            $successmsg = sprintf(gettext("Album menu item <em>%s</em> added"), $result['link']);
            break;
        case 'galleryindex':
            $result['title'] = process_language_string_save("title", 2);
            $result['link'] = NULL;
            if (empty($result['title'])) {
                $reports[] = "<p class = 'errorbox fade-message'>" . gettext("You forgot to give your menu item a <strong>title</strong>!") . " </p>";
                return $result;
            }
            $successmsg = sprintf(gettext("Gallery index menu item <em>%s</em> added"), $result['link']);
            break;
        case 'zenpagepage':
            $result['title'] = NULL;
            $result['link'] = sanitize($_POST['pageselect']);
            if (empty($result['link'])) {
                $reports[] = "<p class = 'errorbox fade-message'>" . gettext("You forgot to give your menu item a <strong>link</strong>!") . " </p>";
                return $result;
            }
            $successmsg = sprintf(gettext("Zenpage page menu item <em>%s</em> added"), $result['link']);
            break;
        case 'zenpagenewsindex':
            $result['title'] = process_language_string_save("title", 2);
            $result['link'] = NULL;
            if (empty($result['title'])) {
                $reports[] = "<p class = 'errorbox fade-message'>" . gettext("You forgot to give your menu item a <strong>title</strong>!") . " </p>";
                return $result;
            }
            $successmsg = sprintf(gettext("Zenpage news index menu item <em>%s</em> added"), $result['link']);
            break;
        case 'zenpagecategory':
            $result['title'] = NULL;
            $result['link'] = sanitize($_POST['categoryselect']);
            if (empty($result['link'])) {
                $reports[] = "<p class = 'errorbox fade-message'>" . gettext("You forgot to give your menu item a <strong>link</strong>!") . " </p>";
                return $result;
            }
            $successmsg = sprintf(gettext("Zenpage news category menu item <em>%s</em> added"), $result['link']);
            break;
        case 'custompage':
            $result['title'] = process_language_string_save("title", 2);
            $result['link'] = sanitize($_POST['custompageselect']);
            if (empty($result['title'])) {
                $reports[] = "<p class = 'errorbox fade-message'>" . gettext("You forgot to give your menu item a <strong>title</strong>!") . " </p>";
                return $result;
            }
            $successmsg = sprintf(gettext("Custom page menu item <em>%s</em> added"), $result['link']);
            break;
        case 'customlink':
            $result['title'] = process_language_string_save("title", 2);
            if (empty($result['title'])) {
                $reports[] = "<p class = 'errorbox fade-message'>" . gettext("You forgot to give your menu item a <strong>title</strong>!") . " </p>";
                return $result;
//.........这里部分代码省略.........
开发者ID:JoniWeiss,项目名称:JoniWebGirl,代码行数:101,代码来源:menu_manager-admin-functions.php

示例10: createMenuIfNotExists

/**
 * Creates a menu set from the items passed. But only if the menu set does not already exist
 * @param array $menuitems items for the menuset
 * 		array elements:
 * 			'type'=>menuset type
 * 			'title'=>title for the menu item
 * 			'link'=>URL or other data for the item link
 * 			'show'=>set to 1:"visible" or 0:"hidden",
 * 			'nesting'=>nesting level of this item in the menu heirarchy
 *
 * @param string $menuset current menuset
 */
function createMenuIfNotExists($menuitems, $menuset = 'default')
{
    $count = db_count('menu', 'WHERE menuset=' . db_quote($menuset));
    if ($count == 0) {
        // there was not an existing menu set
        require_once dirname(__FILE__) . '/menu_manager/menu_manager-admin-functions.php';
        $success = 1;
        $orders = array();
        foreach ($menuitems as $key => $result) {
            if (array_key_exists('nesting', $result)) {
                $nesting = $result['nesting'];
            } else {
                $nesting = 0;
            }
            while ($nesting + 1 < count($orders)) {
                array_pop($orders);
            }
            while ($nesting + 1 > count($orders)) {
                array_push($orders, -1);
            }
            $result['id'] = 0;
            if (isset($result['include_li'])) {
                $includeli = $result['include_li'];
            } else {
                $includeli = 1;
            }
            $type = $result['type'];
            switch ($type) {
                case 'all_items':
                    $orders[$nesting]++;
                    query("INSERT INTO " . prefix('menu') . " (`title`,`link`,`type`,`show`,`menuset`,`sort_order`) " . "VALUES ('" . gettext('Home') . "', '" . WEBPATH . '/' . "','galleryindex','1'," . db_quote($menuset) . ',' . db_quote($orders), true);
                    $orders[$nesting] = addAlbumsToDatabase($menuset, $orders);
                    if (extensionEnabled('zenpage')) {
                        $orders[$nesting]++;
                        query("INSERT INTO " . prefix('menu') . " (title`,`link`,`type`,`show`,`menuset`,`sort_order`) " . "VALUES ('" . gettext('News index') . "', '" . getNewsIndexURL() . "','newsindex','1'," . db_quote($menuset) . ',' . db_quote(sprintf('%03u', $base + 1)), true);
                        $orders[$nesting] = addPagesToDatabase($menuset, $orders) + 1;
                        $orders[$nesting] = addCategoriesToDatabase($menuset, $orders);
                    }
                    $type = false;
                    break;
                case 'all_albums':
                    $orders[$nesting]++;
                    $orders[$nesting] = addAlbumsToDatabase($menuset, $orders);
                    $type = false;
                    break;
                case 'all_Pages':
                    $orders[$nesting]++;
                    $orders[$nesting] = addPagesToDatabase($menuset, $orders);
                    $type = false;
                    break;
                case 'all_categorys':
                    $orders[$nesting]++;
                    $orders[$nesting] = addCategoriesToDatabase($menuset, $orders);
                    $type = false;
                    break;
                case 'album':
                    $result['title'] = NULL;
                    if (empty($result['link'])) {
                        $success = -1;
                        debugLog(sprintf(gettext('createMenuIfNotExists item %s has an empty link.'), $key));
                    }
                    break;
                case 'galleryindex':
                    $result['link'] = NULL;
                    if (empty($result['title'])) {
                        $success = -1;
                        debugLog(sprintf(gettext('createMenuIfNotExists item %s has an empty title.'), $key));
                    }
                    break;
                case 'Page':
                    $result['title'] = NULL;
                    if (empty($result['link'])) {
                        $success = -1;
                        debugLog(sprintf(gettext('createMenuIfNotExists item %s has an empty link.'), $key));
                    }
                    break;
                case 'newsindex':
                    $result['link'] = NULL;
                    if (empty($result['title'])) {
                        $success = -1;
                        debugLog(sprintf(gettext('createMenuIfNotExists item %s has an empty title.'), $key));
                    }
                    break;
                case 'category':
                    $result['title'] = NULL;
                    if (empty($result['link'])) {
                        $success = -1;
                        debugLog(sprintf(gettext('createMenuIfNotExists item %s has an empty link.'), $key));
//.........这里部分代码省略.........
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:101,代码来源:menu_manager.php

示例11: jqm_printMainHeaderNav

/**
 * Prints the image/subalbum count for the album loop
 */
function jqm_printMainHeaderNav()
{
    global $_zp_gallery_page, $_zp_current_album, $_zp_themeroot;
    ?>
	<div data-role="header" data-position="inline" data-theme="b">
		<h1><?php 
    printGalleryTitle();
    ?>
</h1>
		<a href="<?php 
    echo WEBPATH;
    ?>
/" data-icon="home" data-iconpos="notext"><?php 
    echo gettext('Home');
    ?>
</a>
		<?php 
    if (getOption('Allow_search') && $_zp_gallery_page != 'search.php') {
        ?>
			<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') && getNumNews(true)) {
        ?>
					<li><a href="<?php 
        echo getNewsIndexURL();
        ?>
"><?php 
        echo gettext('News');
        ?>
</a></li>
					<?php 
    }
    if (extensionEnabled('zenpage') && getNumPages(true)) {
        ?>
					<li><a href="<?php 
        echo getCustomPageURL('pagelist');
        ?>
"><?php 
        echo gettext('Pages');
        ?>
</a></li>
					<?php 
    }
    ?>
				<li><a href="<?php 
    echo getCustomPageURL('archive');
    ?>
"><?php 
    echo gettext('Archive');
    ?>
</a></li>
			</ul>
		</div><!-- /navbar -->
	</div><!-- /header -->
	<?php 
}
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:77,代码来源:functions.php


注:本文中的getNewsIndexURL函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。