• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP mainlist_get_item函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: request_title

"><?php 
    echo $Blog->disp('name', 'htmlbody');
    ?>
</a></h2>

	<?php 
    // ------------------------- TITLE FOR THE CURRENT REQUEST -------------------------
    request_title(array('title_before' => '<h2>', 'title_after' => '</h2>', 'title_none' => '', 'glue' => ' - ', 'title_single_disp' => true, 'format' => 'htmlbody'));
    // ------------------------------ END OF REQUEST TITLE -----------------------------
    ?>

	<?php 
    // ------------------------------------ START OF POSTS ----------------------------------------
    // Display message if no post:
    display_if_empty();
    while ($Item =& mainlist_get_item()) {
        // For each blog post, do everything below up to the closing curly brace "}"
        ?>

			<?php 
        // ------------------------------ DATE SEPARATOR ------------------------------
        $MainList->date_if_changed(array('before' => '<h2>', 'after' => '</h2>', 'date_format' => '#'));
        ?>

		<div id="<?php 
        $Item->anchor_id();
        ?>
" class="bPost bPost<?php 
        $Item->status_raw();
        ?>
" lang="<?php 
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:multiblogs.php


示例2: skin_init

/**
 * Initialize internal states for the most common skin displays.
 *
 * For more specific skins, this function may not be called and
 * equivalent code may be customized within the skin.
 *
 * @param string What are we going to display. Most of the time the global $disp should be passed.
 */
function skin_init($disp)
{
    /**
     * @var Blog
     */
    global $Blog;
    /**
     * @var Item
     */
    global $Item;
    /**
     * @var Skin
     */
    global $Skin;
    global $robots_index;
    global $seo_page_type;
    global $redir, $ReqURL, $ReqURI, $m, $w, $preview;
    global $Chapter;
    global $Debuglog;
    /**
     * @var ItemList2
     */
    global $MainList;
    /**
     * This will give more detail when $disp == 'posts'; otherwise it will have the same content as $disp
     * @var string
     */
    global $disp_detail, $Settings;
    global $Timer;
    global $Messages, $PageCache;
    global $Session, $current_User;
    $Timer->resume('skin_init');
    if (empty($disp_detail)) {
        $disp_detail = $disp;
    }
    $Debuglog->add('skin_init: $disp=' . $disp, 'skins');
    // This is the main template; it may be used to display very different things.
    // Do inits depending on current $disp:
    switch ($disp) {
        case 'front':
        case 'posts':
        case 'single':
        case 'page':
        case 'terms':
        case 'download':
        case 'feedback-popup':
            // We need to load posts for this display:
            if ($disp == 'terms') {
                // Initialize the redirect param to know what page redirect after accepting of terms:
                param('redirect_to', 'url', '');
            }
            // Note: even if we request the same post as $Item above, the following will do more restrictions (dates, etc.)
            // Init the MainList object:
            init_MainList($Blog->get_setting('posts_per_page'));
            // Init post navigation
            $post_navigation = $Skin->get_post_navigation();
            if (empty($post_navigation)) {
                $post_navigation = $Blog->get_setting('post_navigation');
            }
            if (!empty($MainList) && $MainList->single_post && ($single_Item =& mainlist_get_item())) {
                // If we are currently viewing a single post
                // We assume the current user will have read the entire post and all its current comments:
                $single_Item->update_read_timestamps(true, true);
                // Restart the items list:
                $MainList->restart();
            }
            break;
        case 'search':
            // Searching post, comments and categories
            load_funcs('collections/_search.funcs.php');
            // Check previous search keywords so it can be displayed in the search input box
            param('s', 'string', '', true);
            break;
    }
    // SEO stuff & redirects if necessary:
    $seo_page_type = NULL;
    switch ($disp) {
        // CONTENT PAGES:
        case 'single':
        case 'page':
        case 'terms':
            if ($disp == 'terms' && !$Item) {
                // Wrong post ID for terms page:
                global $disp;
                $disp = '404';
                $Messages->add(sprintf(T_('Terms not found. (post ID #%s)'), get_param('p')), 'error');
                break;
            }
            if (!$preview && empty($Item)) {
                // No Item, incorrect request and incorrect state of the application, a 404 redirect should have already happened
                //debug_die( 'Invalid page URL!' );
            }
//.........这里部分代码省略.........
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:101,代码来源:_skin.funcs.php


示例3: messages

messages(array('block_start' => '<div class="action_messages">', 'block_end' => '</div>'));
// --------------------------------- END OF MESSAGES ---------------------------------
?>

	<?php 
// ------------------------ TITLE FOR THE CURRENT REQUEST ------------------------
request_title(array('title_before' => '<h1 class="page_title">', 'title_after' => '</h1>', 'title_single_disp' => false, 'title_page_disp' => false, 'format' => 'htmlbody', 'edit_text_create' => T_('Post a new topic'), 'edit_text_update' => T_('Edit post'), 'category_text' => '', 'categories_text' => '', 'catdir_text' => ''));
// ----------------------------- END OF REQUEST TITLE ----------------------------
?>

	<?php 
// Display message if no post:
display_if_empty();
echo '<div id="styled_content_block">';
// Beginning of posts display
if ($Item =& mainlist_get_item()) {
    // For each blog post, do everything below up to the closing curly brace "}"
    // ---------------------- ITEM BLOCK INCLUDED HERE ------------------------
    skin_include('_item_block.inc.php', array('content_mode' => 'auto', 'image_size' => 'fit-640x480'));
    // ----------------------------END ITEM BLOCK  ----------------------------
}
echo '</div>';
// End of posts display
?>
</div>
<?php 
// -------------------------- BODY FOOTER INCLUDED HERE --------------------------
skin_include('_body_footer.inc.php');
// Note: You can customize the default BODY footer by copying the generic
// /skins/_body_footer.inc.php file into the current skin folder.
// -------------------------------- END OF BODY FOOTER ---------------------------
开发者ID:b2evolution,项目名称:manual_skin,代码行数:31,代码来源:single.main.php


示例4: die

<?php

/**
 * This is the template that displays a page for a blog
 *
 * This file is not meant to be called directly.
 * It is meant to be called by an include in the main.page.php template.
 * To display the archive directory, you should call a stub AND pass the right parameters
 * For example: /blogs/index.php?p=123
 *
 * b2evolution - {@link http://b2evolution.net/}
 * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
 * @copyright (c)2003-2013 by Francois Planque - {@link http://fplanque.com/}
 *
 * @package evoskins
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
// --------------------------------- START OF POSTS -------------------------------------
// Display message if no post:
display_if_empty();
while (mainlist_get_item()) {
    // For each blog post, do everything below up to the closing curly brace "}"
    // ---------------------- ITEM BLOCK INCLUDED HERE ------------------------
    skin_include('_item_block.inc.php', array('content_mode' => 'auto', 'image_size' => 'fit-400x320'));
    // ----------------------------END ITEM BLOCK  ----------------------------
}
// ---------------------------------- END OF POSTS ------------------------------------
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:29,代码来源:_page.disp.php


示例5: skin_include

    skin_include('_item_block.inc.php', array('feature_block' => true, 'content_mode' => 'full', 'intro_mode' => 'normal', 'item_class' => 'featured_post', 'Item' => $Item));
    // ----------------------------END ITEM BLOCK  ----------------------------
}
?>

	<?php 
if ($disp == 'single' || $disp == 'page') {
    // ------------------------------------ START OF A POST ----------------------------------------
    // Display message if no post:
    display_if_empty();
    if (isset($single_Item)) {
        // Use Item that already is defined above
        $Item =& $single_Item;
    } else {
        // Get next Item object
        $Item =& mainlist_get_item();
    }
    if ($Item) {
        // ---------------------- ITEM BLOCK INCLUDED HERE ------------------------
        skin_include('_item_block.inc.php', array('content_mode' => 'full'));
        // ----------------------------END ITEM BLOCK  ----------------------------
    }
}
// ---------------------------------- END OF A POST ------------------------------------
?>


	<?php 
// -------------- MAIN CONTENT TEMPLATE INCLUDED HERE (Based on $disp) --------------
skin_include('$disp$', array('disp_single' => '', 'disp_page' => '', 'mediaidx_thumb_size' => $Skin->get_setting('mediaidx_thumb_size'), 'author_link_text' => 'auto', 'login_page_before' => '<div class="login_block"><div class="bDetails">', 'login_page_after' => '</div></div>', 'register_page_before' => '<div class="login_block"><div class="bDetails">', 'register_page_after' => '</div></div>', 'display_abort_link' => $Blog->get_setting('allow_access') == 'public'));
// Note: you can customize any of the sub templates included here by
开发者ID:b2evolution,项目名称:photo_albums_skin,代码行数:31,代码来源:index.main.php


示例6: items_list_block_by_page

/**
 * Display the items list (Used to load next page of the items by AJAX)
 *
 * @param array Params
 */
function items_list_block_by_page($params = array())
{
    $params = array_merge(array('skin_name' => '', 'content_mode' => 'auto', 'image_size' => 'fit-400x320', 'block_start' => '<div class="navigation ajax">', 'block_end' => '</div>', 'links_format' => '$next$', 'next_text' => T_('Load more entries') . '&hellip;'), $params);
    if (!skin_init_ajax($params['skin_name'], 'posts')) {
        // Exit here if skin cannot be initialized
        return;
    }
    while ($Item =& mainlist_get_item()) {
        // For each blog post:
        // ---------------------- ITEM BLOCK INCLUDED HERE ------------------------
        skin_include('_item_block.inc.php', $params);
        // ----------------------------END ITEM BLOCK  ----------------------------
    }
    // -------------------- PREV/NEXT PAGE LINKS (POST LIST MODE) --------------------
    mainlist_page_links($params);
    // ------------------------- END OF PREV/NEXT PAGE LINKS -------------------------
}
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:22,代码来源:_item.funcs.php


示例7: skin_container

// Display container and contents:
// Note: this container is designed to be a single <ul> list
skin_container(NT_('Menu'), array('block_start' => '', 'block_end' => '', 'block_display_title' => false, 'list_start' => '', 'list_end' => '', 'item_start' => '<li class="evo_widget $wi_class$">', 'item_end' => '</li>', 'item_selected_start' => '<li class="active evo_widget $wi_class$">', 'item_selected_end' => '</li>', 'item_title_before' => '', 'item_title_after' => ''));
// ----------------------------- END OF "Menu" CONTAINER -----------------------------
?>
		</ul>
	</div><!-- .col -->

</nav><!-- .row -->

<main><!-- This is were a link like "Jump to main content" would land -->

	<!-- =================================== START OF POST TITLE BAR =================================== -->

	<?php 
if ($single_Item =& mainlist_get_item()) {
    // Get Item here, because it can be not defined yet, e.g. in Preview mode
    ?>
		<div class="row">
			<div class="col-xs-12">
			<nav class="nav_album">

			<a href="<?php 
    $Blog->disp('url', 'raw');
    ?>
" title="<?php 
    echo format_to_output(T_('All Albums'), 'htmlattr');
    ?>
" class="all_albums">All Albums</a>

			<span class="nav_album_title">
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:single.main.php


示例8: mainlist_get_item

/**
 * Stub
 *
 * Sets $Item ion global scope
 *
 * @return Item
 */
function &mainlist_get_item()
{
    global $MainList, $featured_displayed_item_IDs;
    if (isset($MainList)) {
        $Item =& $MainList->get_item();
        if ($Item && in_array($Item->ID, $featured_displayed_item_IDs)) {
            // This post was already displayed as a Featured post, let's skip it and get the next one:
            $Item =& mainlist_get_item();
        }
    } else {
        $Item = NULL;
    }
    // Make this available globally:
    $GLOBALS['Item'] =& $Item;
    return $Item;
}
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:23,代码来源:_template.funcs.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP mainlist_page_links函数代码示例发布时间:2022-05-15
下一篇:
PHP main_url函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap