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


PHP is_NewsArticle函数代码示例

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


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

示例1: printCommentForm

/**
 * Prints a form for posting comments
 *
 * @param bool $showcomments defaults to true for showing list of comments
 * @param string $addcommenttext alternate text for "Add a comment:"
 * @param bool $addheader set true to display comment count header
 * @param string $comment_commententry_mod use to add styles, classes to the comment form div
 * @param bool $desc_order default false, set to true to change the comment order to descending ( = newest to oldest)
 */
function printCommentForm($showcomments = true, $addcommenttext = NULL, $addheader = true, $comment_commententry_mod = '', $desc_order = false)
{
    global $_zp_gallery_page, $_zp_current_admin_obj, $_zp_current_comment, $_zp_captcha, $_zp_authority, $_zp_HTML_cache, $_zp_current_image, $_zp_current_album, $_zp_current_page, $_zp_current_article;
    if (getOption('email_new_comments')) {
        $email_list = $_zp_authority->getAdminEmail();
        if (empty($email_list)) {
            setOption('email_new_comments', 0);
        }
    }
    if (is_null($addcommenttext)) {
        $addcommenttext = '<h3>' . gettext('Add a comment:') . '</h3>';
    }
    switch ($_zp_gallery_page) {
        case 'album.php':
            if (!getOption('comment_form_albums')) {
                return;
            }
            $obj = $_zp_current_album;
            break;
        case 'image.php':
            if (!getOption('comment_form_images')) {
                return;
            }
            $obj = $_zp_current_image;
            break;
        case 'pages.php':
            if (!getOption('comment_form_pages')) {
                return;
            }
            $obj = $_zp_current_page;
            break;
        case 'news.php':
            if (!getOption('comment_form_articles') || !is_NewsArticle()) {
                return;
            }
            $obj = $_zp_current_article;
            break;
        default:
            return;
            break;
    }
    $comments_open = $obj->getCommentsAllowed();
    ?>
	<!-- printCommentForm -->
	<div id="commentcontent">
		<?php 
    $num = getCommentCount();
    if ($showcomments) {
        if ($num == 0) {
            if ($addheader) {
                echo '<h3 class="empty">' . gettext('No Comments') . '</h3>';
            }
            $display = '';
        } else {
            if ($addheader) {
                echo '<h3>' . sprintf(ngettext('%u Comment', '%u Comments', $num), $num) . '</h3>';
            }
            if (getOption('comment_form_toggle')) {
                ?>
					<div id="comment_toggle"><!-- place holder for toggle button --></div>
					<script type="text/javascript">
						// <!-- <![CDATA[
						function toggleComments(hide) {
							if (hide) {
								$('div.comment').hide();
								$('.Pagination').hide();
								$('#comment_toggle').html('<button class="button buttons" onclick="toggleComments(false);"><?php 
                echo gettext('show comments');
                ?>
</button>');
							} else {
								$('div.comment').show();
								$('.Pagination').show();
								$('#comment_toggle').html('<button class="button buttons" onclick="toggleComments(true);"><?php 
                echo gettext('hide comments');
                ?>
</button>');
							}
						}
						$(document).ready(function () {
							toggleComments(window.location.hash.search(/#zp_comment_id_/));
						});
						// ]]> -->
					</script>
					<?php 
                $display = ' style="display:none"';
            } else {
                $display = '';
            }
        }
        $hideoriginalcomments = '';
//.........这里部分代码省略.........
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:101,代码来源:comment_form.php

示例2: getHeadTitle

/**
 * Function to create the page title to be used within the html <head> <title></title> element.
 * Usefull if you use one header.php for the header of all theme pages instead of individual ones on the theme pages
 * It returns the title and site name in reversed breadcrumb order:
 * <title of current page> | <parent item if present> | <gallery title>
 * It supports standard gallery pages as well a custom and Zenpage news articles, categories and pages.
 *
 * @param string $separator How you wish the parts to be separated
 * @param bool $listparentalbums If the parent albums should be printed in reversed order before the current
 * @param bool $listparentpage If the parent Zenpage pages should be printed in reversed order before the current page
 */
function getHeadTitle($separator = ' | ', $listparentalbums = true, $listparentpages = true)
{
    global $_zp_gallery, $_zp_current_album, $_zp_current_image, $_zp_current_zenpage_news, $_zp_current_zenpage_page, $_zp_gallery_page, $_zp_current_category, $_zp_page, $_myFavorites;
    $mainsitetitle = html_encode(getBare(getMainSiteName()));
    $separator = html_encode($separator);
    if ($mainsitetitle) {
        $mainsitetitle = $separator . $mainsitetitle;
    }
    $gallerytitle = html_encode(getBareGalleryTitle());
    if ($_zp_page > 1) {
        $pagenumber = ' (' . $_zp_page . ')';
    } else {
        $pagenumber = '';
    }
    switch ($_zp_gallery_page) {
        case 'index.php':
            return $gallerytitle . $mainsitetitle . $pagenumber;
            break;
        case 'album.php':
        case 'image.php':
            if ($listparentalbums) {
                $parents = getParentAlbums();
                $parentalbums = '';
                if (count($parents) != 0) {
                    $parents = array_reverse($parents);
                    foreach ($parents as $parent) {
                        $parentalbums .= html_encode(getBare($parent->getTitle())) . $separator;
                    }
                }
            } else {
                $parentalbums = '';
            }
            $albumtitle = html_encode(getBareAlbumTitle()) . $pagenumber . $separator . $parentalbums . $gallerytitle . $mainsitetitle;
            switch ($_zp_gallery_page) {
                case 'album.php':
                    return $albumtitle;
                    break;
                case 'image.php':
                    return html_encode(getBareImageTitle()) . $separator . $albumtitle;
                    break;
            }
            break;
        case 'news.php':
            if (function_exists("is_NewsArticle")) {
                if (is_NewsArticle()) {
                    return html_encode(getBareNewsTitle()) . $pagenumber . $separator . gettext('News') . $separator . $gallerytitle . $mainsitetitle;
                } else {
                    if (is_NewsCategory()) {
                        return html_encode(getBare($_zp_current_category->getTitle())) . $pagenumber . $separator . gettext('News') . $separator . $gallerytitle . $mainsitetitle;
                    } else {
                        return gettext('News') . $pagenumber . $separator . $gallerytitle . $mainsitetitle;
                    }
                }
            }
            break;
        case 'pages.php':
            if ($listparentpages) {
                $parents = $_zp_current_zenpage_page->getParents();
                $parentpages = '';
                if (count($parents) != 0) {
                    $parents = array_reverse($parents);
                    foreach ($parents as $parent) {
                        $obj = new ZenpagePage($parent);
                        $parentpages .= html_encode(getBare($obj->getTitle())) . $separator;
                    }
                }
            } else {
                $parentpages = '';
            }
            return html_encode(getBarePageTitle()) . $pagenumber . $separator . $parentpages . $gallerytitle . $mainsitetitle;
            break;
        case '404.php':
            return gettext('Object not found') . $separator . $gallerytitle . $mainsitetitle;
            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)) {
                return $standard[$custompage] . $pagenumber . $separator . $gallerytitle . $mainsitetitle;
            } else {
                return $custompage . $pagenumber . $separator . $gallerytitle . $mainsitetitle;
            }
            break;
    }
}
开发者ID:IliyanGochev,项目名称:zenphoto,代码行数:100,代码来源:template-functions.php

示例3: gettext

        if (getTags()) {
            echo gettext('<strong>Tags:</strong>');
        }
        printTags('links', '', 'taglist', ', ');
        ?>
				<br style="clear:both;" /><br />
			</div>
			<?php 
    }
}
?>
  	</div>
		</div>
		<div id="tools">
		<?php 
if (!is_NewsArticle()) {
    if (hasPrevPage()) {
        ?>
			<a href="<?php 
        echo getPrevNewsPageURL();
        ?>
"><span class="prev"></span></a>
			<?php 
    } else {
        ?>
				<span class="prev-disabled"></span>
			<?php 
    }
    ?>
	
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:29,代码来源:news.php

示例4: zenpageOpenedForComments

/**
 * @deprecated
 * @since 1.4.6
 */
function zenpageOpenedForComments()
{
    deprecated_functions::notify(gettext("use the object’s getCommentsAllowed() method"));
    global $_zp_current_zenpage_news, $_zp_current_zenpage_page;
    if (is_NewsArticle()) {
        $obj = $_zp_current_zenpage_news;
    }
    if (is_Pages()) {
        $obj = $_zp_current_zenpage_page;
    }
    return $obj->getCommentsAllowed();
}
开发者ID:rb26,项目名称:zenphoto,代码行数:16,代码来源:deprecated-functions.php

示例5: hitcounter_load_script

function hitcounter_load_script($obj)
{
    if (getOption('hitcounter_ignoreIPList_enable')) {
        $ignoreIPAddressList = explode(',', str_replace(' ', '', getOption('hitcounter_ignoreIPList')));
        $skip = in_array(getUserIP(), $ignoreIPAddressList);
    } else {
        $skip = false;
    }
    if (getOption('hitcounter_ignoreSearchCrawlers_enable') && !$skip) {
        $botList = explode(',', getOption('hitcounter_searchCrawlerList'));
        foreach ($botList as $bot) {
            if (stripos($_SERVER['HTTP_USER_AGENT'], trim($bot))) {
                $skip = true;
                break;
            }
        }
    }
    if (!$skip) {
        global $_zp_gallery_page, $_zp_current_album, $_zp_current_image, $_zp_current_zenpage_news, $_zp_current_zenpage_page, $_zp_current_category;
        $hint = $show = false;
        if (checkAccess($hint, $show)) {
            // count only if permitted to access
            switch ($_zp_gallery_page) {
                case 'album.php':
                    if (!$_zp_current_album->isMyItem(ALBUM_RIGHTS) && getCurrentPage() == 1) {
                        $_zp_current_album->countHit();
                    }
                    break;
                case 'image.php':
                    if (!$_zp_current_album->isMyItem(ALBUM_RIGHTS)) {
                        //update hit counter
                        $_zp_current_image->countHit();
                    }
                    break;
                case 'pages.php':
                    if (!zp_loggedin(ZENPAGE_PAGES_RIGHTS)) {
                        $_zp_current_zenpage_page->countHit();
                    }
                    break;
                case 'news.php':
                    if (!zp_loggedin(ZENPAGE_NEWS_RIGHTS)) {
                        if (is_NewsArticle()) {
                            $_zp_current_zenpage_news->countHit();
                        } else {
                            if (is_NewsCategory()) {
                                $_zp_current_category->countHit();
                            }
                        }
                    }
                    break;
                default:
                    if (!zp_loggedin()) {
                        $page = stripSuffix($_zp_gallery_page);
                        setOption('Page-Hitcounter-' . $page, getOption('Page-Hitcounter-' . $page) + 1);
                    }
                    break;
            }
        }
    }
    return $obj;
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:61,代码来源:hitcounter.php

示例6: printCustomPageURL

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');
    ?>
" alt="help" />
				<?php 
}
?>
		</div> <!-- END #zpcredit-->
	</div>	<!-- END #foot-left -->
</div>		<!-- END #FOOTER -->
</div>			<!-- END #PAGE -->
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:inc_footer.php

示例7: printNestedMenu

/**
 * Prints a context sensitive menu of all pages as a unordered html list
 *
 * @param string $option The mode for the menu:
 * 												"list" context sensitive toplevel plus sublevel pages,
 * 												"list-top" only top level pages,
 * 												"omit-top" only sub level pages
 * 												"list-sub" lists only the current pages direct offspring
 * @param string $mode 'pages' or 'categories'
 * @param bool $counter Only $mode = 'categories': Count the articles in each category
 * @param string $css_id CSS id of the top level list
 * @param string $css_class_topactive class of the active item in the top level list
 * @param string $css_class CSS class of the sub level list(s)
 * @param string $$css_class_active CSS class of the sub level list(s)
 * @param string $indexname insert the name (default "Gallery Index") how you want to call the link to the gallery index, insert "" (default) if you don't use it, it is not printed then.
 * @param int $showsubs Set to depth of sublevels that should be shown always. 0 by default. To show all, set to a true! Only valid if option=="list".
 * @param bool $startlist set to true to output the UL tab (false automatically if you use 'omit-top' or 'list-sub')
 * @param int $limit truncation limit display strings
 * @return string
 */
function printNestedMenu($option = 'list', $mode = NULL, $counter = TRUE, $css_id = NULL, $css_class_topactive = NULL, $css_class = NULL, $css_class_active = NULL, $indexname = NULL, $showsubs = 0, $startlist = true, $limit = NULL)
{
    global $_zp_zenpage, $_zp_gallery_page, $_zp_current_zenpage_news, $_zp_current_zenpage_page, $_zp_current_category;
    if (is_null($limit)) {
        $limit = MENU_TRUNCATE_STRING;
    }
    if ($css_id != "") {
        $css_id = " id='" . $css_id . "'";
    }
    if ($css_class_topactive != "") {
        $css_class_topactive = " class='" . $css_class_topactive . "'";
    }
    if ($css_class != "") {
        $css_class = " class='" . $css_class . "'";
    }
    if ($css_class_active != "") {
        $css_class_active = " class='" . $css_class_active . "'";
    }
    if ($showsubs === true) {
        $showsubs = 9999999999.0;
    }
    switch ($mode) {
        case 'pages':
            $items = $_zp_zenpage->getPages();
            $currentitem_id = getPageID();
            if (is_object($_zp_current_zenpage_page)) {
                $currentitem_parentid = $_zp_current_zenpage_page->getParentID();
            } else {
                $currentitem_parentid = NULL;
            }
            $currentitem_sortorder = getPageSortorder();
            break;
        case 'categories':
        case 'allcategories':
            $items = $_zp_zenpage->getAllCategories();
            if (is_object($_zp_current_category) && $mode == 'categories') {
                $currentitem_sortorder = $_zp_current_category->getSortOrder();
                $currentitem_id = $_zp_current_category->getID();
                $currentitem_parentid = $_zp_current_category->getParentID();
            } else {
                $currentitem_sortorder = NULL;
                $currentitem_id = NULL;
                $currentitem_parentid = NULL;
            }
            break;
    }
    // don't highlight current pages or foldout if in search mode as next_page() sets page context
    if (in_context(ZP_SEARCH) && $mode == 'pages') {
        // 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);
//.........这里部分代码省略.........
开发者ID:rauldobrota,项目名称:zenphoto,代码行数:101,代码来源:zenpage-template-functions.php

示例8: zenpageOpenedForComments

/**
 * Returns if comments are open for this news article or page (TRUE or FALSE)
 *
 * @return bool
 */
function zenpageOpenedForComments()
{
    global $_zp_current_zenpage_news, $_zp_current_zenpage_page;
    if (is_NewsArticle()) {
        $obj = $_zp_current_zenpage_news;
    }
    if (is_Pages()) {
        $obj = $_zp_current_zenpage_page;
    }
    return $obj->get('commentson');
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:16,代码来源:zenpage-template-functions.php

示例9: printTrackbackRDF

 /**
  * Prints the RDF trackback url information for external clients to autodiscover.
  * This code is invisible and within comments on the theme page.
  *
  * For theme usage.
  *
  */
 function printTrackbackRDF()
 {
     global $_zp_current_zenpage_news, $_zp_current_zenpage_page, $_zp_current_album, $_zp_current_image;
     // check if Zenpage is there...
     if (getOption('zp_plugin_zenpage')) {
         if (is_NewsArticle()) {
             $trackback = $this->getTrackbackURL($_zp_current_zenpage_news);
             $title = getNewsTitle();
             $permalink = $this->getPermalinkURL($_zp_current_zenpage_news, $host);
         }
         if (is_Pages()) {
             $trackback = $this->getTrackbackURL($_zp_current_zenpage_page);
             $title = getPageTitle();
             $permalink = $this->getPermalinkURL($_zp_current_zenpage_page);
         }
     }
     if (in_context(ZP_ALBUM)) {
         $trackback = $this->getTrackbackURL($_zp_current_album);
         $title = getAlbumTitle();
         $permalink = $this->getPermalinkURL($_zp_current_album);
     }
     if (in_context(ZP_IMAGE)) {
         $trackback = $this->getTrackbackURL($_zp_current_image);
         $title = getImageTitle();
         $permalink = $this->getPermalinkURL($_zp_current_image);
     }
     echo $this->rdf_autodiscover("", $title, "", $permalink, $trackback, "");
 }
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:35,代码来源:comment_trackback.php

示例10: openedForComments

/**
 * @deprecated
 * @since 1.4.6
 *
 */
function openedForComments()
{
    deprecated_functions::notify(gettext("use the object’s getCommentsAllowed() method"));
    global $_zp_gallery_page, $_zp_current_image, $_zp_current_album, $_zp_current_zenpage_page, $_zp_current_zenpage_news;
    switch ($_zp_gallery_page) {
        case 'album.php':
            return $_zp_current_album->getCommentsAllowed();
        case 'image.php':
            return $_zp_current_image->getCommentsAllowed();
        case 'pages.php':
            return $_zp_current_zenpage_page->getCommentsAllowed();
        case 'news.php':
            if (is_NewsArticle()) {
                $_zp_current_zenpage_news->getCommentsAllowed();
            }
    }
    return false;
}
开发者ID:rb26,项目名称:zenphoto,代码行数:23,代码来源:deprecated-functions.php

示例11: admin_toolbox_news

    static function admin_toolbox_news($redirect, $zf)
    {
        global $_zp_CMS, $_zp_current_category, $_zp_current_article;
        if (is_NewsArticle()) {
            if (zp_loggedin(ZENPAGE_NEWS_RIGHTS) && $_zp_CMS && $_zp_CMS->news_enabled) {
                // page is a NewsArticle--provide zenpage edit, delete, and Add links
                echo "<li><a href=\"" . $zf . '/' . PLUGIN_FOLDER . "/zenpage/admin-edit.php?newsarticle&amp;edit&amp;titlelink=" . html_encode($_zp_current_article->getTitleLink()) . "&amp;subpage=object\">" . gettext("Edit Article") . "</a></li>";
                if (GALLERY_SESSION) {
                    // XSRF defense requires sessions
                    ?>
					<li>
						<a href="javascript:confirmDelete('<?php 
                    echo $zf . '/' . PLUGIN_FOLDER;
                    ?>
/zenpage/admin-news.php?del=<?php 
                    echo getNewsID();
                    ?>
&amp;XSRFToken=<?php 
                    echo getXSRFToken('delete');
                    ?>
',deleteArticle)"
							 title="<?php 
                    echo gettext("Delete article");
                    ?>
"><?php 
                    echo gettext("Delete Article");
                    ?>
	</a>
					</li>
					<?php 
                }
                echo "<li><a href=\"" . $zf . '/' . PLUGIN_FOLDER . "/zenpage/admin-edit.php?newsarticle&amp;add\">" . gettext("Add Article") . "</a></li>";
            }
            $redirect .= '&amp;title=' . urlencode($_zp_current_article->getTitlelink());
        } else {
            if (!empty($_zp_current_category)) {
                $redirect .= '&amp;category=' . $_zp_current_category->getTitlelink();
            }
        }
        return $redirect;
    }
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:41,代码来源:zenpage.php

示例12: printAllNewsCategories

</h5>
					<?php 
            printAllNewsCategories(gettext('All News'), true, '', 'menu-active', true, 'submenu', 'menu-active');
            ?>
					<?php 
        }
        ?>
					<?php 
    }
    ?>
				</div>
			</div>
		</div>
		
		<?php 
    if (function_exists('printCommentForm') && is_NewsArticle()) {
        ?>
		<div id="comments-page" class="wrap clearfix">
			<div class="inner">
				<div class="comments-sidebar pad">
					<?php 
        if (function_exists('printRating')) {
            ?>
					<div id="rating" class="block"><?php 
            printRating();
            ?>
</div>
					<?php 
        }
        ?>
				</div>
开发者ID:ckfreeman,项目名称:libratus,代码行数:31,代码来源:news.php

示例13: getPrevImageURL

        ?>
		<?php 
        if (hasPrevImage()) {
            ?>
var prevURL = "<?php 
            echo getPrevImageURL();
            $PrevURL = true;
            ?>
";<?php 
        }
        ?>
	<?php 
    } else {
        ?>
		<?php 
        if ($_zenpage_enabled && is_NewsArticle()) {
            ?>
			<?php 
            if (getNextNewsURL()) {
                $article_url = getNextNewsURL();
                ?>
var nextURL = "<?php 
                echo html_decode($article_url['link']);
                $NextURL = true;
                ?>
";<?php 
            }
            ?>
			<?php 
            if (getPrevNewsURL()) {
                $article_url = getPrevNewsURL();
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:inc_header.php

示例14: gettext

if ($_zp_gallery_page == 'archive.php') {
    echo " | " . gettext('Archive View');
}
if ($_zp_gallery_page == 'password.php') {
    echo " | " . gettext('Password Required...');
}
if ($_zp_gallery_page == '404.php') {
    echo " | " . gettext('404 Not Found...');
}
if ($_zp_gallery_page == 'search.php') {
    echo " | " . gettext('Search: ') . html_encode(getSearchWords());
}
if ($_zp_gallery_page == 'news.php') {
    echo " | " . gettext('News');
}
if ($_zp_gallery_page == 'news.php' && is_NewsArticle()) {
    echo " | " . getBareNewsTitle();
}
?>
	
	</title>
	<?php 
if (getOption('zp_plugin_reCaptcha')) {
    ?>
	<script>
		var RecaptchaOptions = {
			theme : <?php 
    if ($zpgal_contrast == 'dark') {
        echo '\'blackglass\'';
    } else {
        echo '\'white\'';
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:31,代码来源:header.php

示例15: 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


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