本文整理汇总了PHP中get_featured_Item函数的典型用法代码示例。如果您正苦于以下问题:PHP get_featured_Item函数的具体用法?PHP get_featured_Item怎么用?PHP get_featured_Item使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_featured_Item函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: messages
<div class="leftside">
<?php
// ------------------------- MESSAGES GENERATED FROM ACTIONS -------------------------
messages(array('block_start' => '<div class="action_messages">', 'block_end' => '</div>'));
// --------------------------------- END OF MESSAGES ---------------------------------
?>
<div class="text">
<?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
// Go Grab the featured post:
if ($Item =& get_featured_Item()) {
// We have a featured/intro post to display:
// ---------------------- ITEM BLOCK INCLUDED HERE ------------------------
skin_include('_item_block.inc.php', array('feature_block' => true, 'content_mode' => 'auto', 'intro_mode' => 'normal', 'item_class' => 'featured_post', 'image_size' => 'fit-400x320'));
// ----------------------------END ITEM BLOCK ----------------------------
}
?>
<?php
// --------------------------------- START OF POSTS -------------------------------------
// Display message if no post:
display_if_empty();
echo '<div id="styled_content_block">';
// Beginning of posts display
while ($Item =& mainlist_get_item()) {
// For each blog post:
示例2: die
* b2evolution - {@link http://b2evolution.net/}
* Released under GNU GPL License - {@link http://b2evolution.net/about/gnu-gpl-license}
* @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}
*
* @package evoskins
* @subpackage bootstrap_gallery_skin
*/
if (!defined('EVO_MAIN_INIT')) {
die('Please, do not access this page directly.');
}
global $Blog;
// Default params:
$params = array_merge(array('item_class' => 'evo_post evo_content_block', 'item_type_class' => 'evo_post__ptyp_', 'item_status_class' => 'evo_post__'), $params);
// ------------------------------- START OF INTRO POST -------------------------------
init_MainList($Blog->get_setting('posts_per_page'));
if ($Item = get_featured_Item('catdir')) {
// We have a intro-front post to display:
?>
<div id="<?php
$Item->anchor_id();
?>
" class="<?php
$Item->div_classes(array('item_class' => 'jumbotron evo_content_block evo_post'));
?>
" lang="<?php
$Item->lang();
?>
">
<?php
$Item->locale_temp_switch();
示例3: die
* This file is not meant to be called directly.
* It is meant to be called by an include in a *.main.php template.
*
* b2evolution - {@link http://b2evolution.net/}
* Released under GNU GPL License - {@link http://b2evolution.net/about/gnu-gpl-license}
* @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}
*
* @package evoskins
* @subpackage bootstrap_manual
*/
if (!defined('EVO_MAIN_INIT')) {
die('Please, do not access this page directly.');
}
// Home page, display full categories list
// Go Grab the featured post:
$intro_Item =& get_featured_Item('front');
// $intro_Item is used below for comments form
$Item = $intro_Item;
if (!empty($Item)) {
// We have a featured/intro post to display:
echo '<div class="evo_content_block">';
// Beginning of posts display
// ---------------------- ITEM BLOCK INCLUDED HERE ------------------------
skin_include('_item_block.inc.php', array('feature_block' => true, 'content_mode' => 'auto', 'intro_mode' => 'normal', 'item_class' => 'jumbotron evo_content_block evo_post', 'disp_comment_form' => false, 'item_link_type' => 'none'));
// ----------------------------END ITEM BLOCK ----------------------------
echo '</div>';
// End of posts display
}
// --------------------------------- START OF CONTENT HIERARCHY --------------------------------
echo '<h2 class="table_contents">' . T_('Table of contents') . '</h2>';
skin_widget(array('widget' => 'content_hierarchy', 'display_blog_title' => false, 'open_children_levels' => 20, 'class_selected' => '', 'item_before_opened' => get_icon('collapse'), 'item_before_closed' => get_icon('expand'), 'item_before_post' => get_icon('file_message')));
示例4: mainlist_page_links
}
echo '</ul>';
// ---------------------------------- END OF POSTS ------------------------------------
// -------------------- PREV/NEXT PAGE LINKS (POST LIST MODE) --------------------
mainlist_page_links($params['pagination']);
// ------------------------- END OF PREV/NEXT PAGE LINKS -------------------------
}
} elseif (!empty($cat) && $cat > 0) {
// Display Category's page
global $Item;
$ChapterCache =& get_ChapterCache();
// Load blog's categories
$ChapterCache->reveal_children($Blog->ID);
$curr_Chapter =& $ChapterCache->get_by_ID($cat, false);
// Go Grab the featured post:
$intro_Item =& get_featured_Item();
// $intro_Item is used below for comments form
if (empty($intro_Item) || $intro_Item->get('title') == '') {
// Display chapter title only if intro post has no title
echo '<div class="cat_title">';
echo '<h1>' . $curr_Chapter->get('name') . '</h1>';
echo '<div class="' . button_class('group') . '">';
echo $curr_Chapter->get_edit_link(array('text' => get_icon('edit') . ' ' . T_('Edit Cat'), 'class' => button_class('text'), 'redirect_page' => 'front'));
// Button to create a new page
$write_new_intro_url = $Blog->get_write_item_url($cat, '', '', 'intro-cat');
if (!empty($write_new_intro_url)) {
// Display button to write a new intro
echo '<a href="' . $write_new_intro_url . '" class="' . button_class('text') . '">' . get_icon('add') . ' ' . T_('Add Intro') . '</a>';
}
echo '</div>';
echo '</div>';
示例5: get_ChapterCache
<?php
if ($single_cat_ID) {
// Display category title:
$ChapterCache =& get_ChapterCache();
if ($category =& $ChapterCache->get_by_ID($single_cat_ID)) {
// Display category title
echo '<div class="panel-heading">' . $Skin->get_post_button($single_cat_ID, NULL, array('group_class' => 'pull-right', 'button_class' => 'btn-sm')) . '<h3 class="panel-title">' . $category->get('name') . '</h3>' . '</div>';
}
}
?>
<section class="table table-hover">
<?php
if ($single_cat_ID) {
// Go to grab the featured posts only on pages with defined category:
while ($Item =& get_featured_Item()) {
// We have a intro post to display:
// ---------------------- ITEM LIST INCLUDED HERE ------------------------
skin_include('_item_list.inc.php', array('Item' => $Item));
// ----------------------------END ITEM LIST ----------------------------
}
}
if ($MainList->result_num_rows > 0) {
while (mainlist_get_item()) {
// For each blog post, do everything below up to the closing curly brace "}"
// ---------------------- ITEM BLOCK INCLUDED HERE ------------------------
skin_include('_item_list.inc.php', array('content_mode' => 'auto', 'image_size' => 'fit-1280x720'));
// ----------------------------END ITEM BLOCK ----------------------------
}
} elseif (isset($current_Chapter)) {
// Display a message about no posts in this category
示例6: item_prevnext_links
<?php
// ------------------- PREV/NEXT POST LINKS (SINGLE POST MODE) -------------------
item_prevnext_links(array('block_start' => '<nav><ul class="pager">', 'prev_start' => '<li class="previous">', 'prev_end' => '</li>', 'next_start' => '<li class="next">', 'next_end' => '</li>', 'block_end' => '</ul></nav>'));
// ------------------------- END OF PREV/NEXT POST LINKS -------------------------
?>
<?php
// ------------------------ TITLE FOR THE CURRENT REQUEST ------------------------
request_title(array('title_before' => '<h2>', 'title_after' => '</h2>', 'title_none' => '', 'glue' => ' - ', 'title_single_disp' => false, 'title_page_disp' => false, 'format' => 'htmlbody', 'register_text' => '', 'login_text' => '', 'lostpassword_text' => '', 'account_activation' => '', 'msgform_text' => '', 'user_text' => '', 'users_text' => '', 'display_edit_links' => false));
// ----------------------------- END OF REQUEST TITLE ----------------------------
?>
<?php
// Go Grab the featured post:
if (!in_array($disp, array('single', 'page')) && ($Item =& get_featured_Item())) {
// We have a featured/intro post to display:
// ---------------------- ITEM BLOCK INCLUDED HERE ------------------------
skin_include('_item_block.inc.php', array('feature_block' => true, 'content_mode' => 'full', 'intro_mode' => 'normal', 'item_class' => $Item->is_intro() ? 'well evo_intro_post' : 'well evo_featured_post'));
// ----------------------------END ITEM BLOCK ----------------------------
}
?>
<?php
// -------------- MAIN CONTENT TEMPLATE INCLUDED HERE (Based on $disp) --------------
skin_include('$disp$', array('author_link_text' => 'preferredname', 'profile_tabs' => array('block_start' => '<nav><ul class="nav nav-tabs profile_tabs">', 'item_start' => '<li>', 'item_end' => '</li>', 'item_selected_start' => '<li class="active">', 'item_selected_end' => '</li>', 'block_end' => '</ul></nav>'), 'pagination' => array('block_start' => '<div class="center"><ul class="pagination">', 'block_end' => '</ul></div>', 'page_current_template' => '<span>$page_num$</span>', 'page_item_before' => '<li>', 'page_item_after' => '</li>', 'page_item_current_before' => '<li class="active">', 'page_item_current_after' => '</li>', 'prev_text' => '<i class="fa fa-angle-double-left"></i>', 'next_text' => '<i class="fa fa-angle-double-right"></i>'), 'skin_form_before' => '<div class="panel panel-default skin-form">' . '<div class="panel-heading">' . '<h3 class="panel-title">$form_title$</h3>' . '</div>' . '<div class="panel-body">', 'skin_form_after' => '</div></div>', 'display_form_messages' => true, 'form_title_login' => T_('Log in to your account') . '$form_links$', 'form_title_lostpass' => get_request_title() . '$form_links$', 'lostpass_page_class' => 'evo_panel__lostpass', 'login_form_inskin' => false, 'login_page_class' => 'evo_panel__login', 'login_page_before' => '<div class="$form_class$">', 'login_page_after' => '</div>', 'display_reg_link' => true, 'abort_link_position' => 'form_title', 'abort_link_text' => '<button type="button" class="close" aria-label="Close"><span aria-hidden="true">×</span></button>', 'register_page_before' => '<div class="evo_panel__register">', 'register_page_after' => '</div>', 'register_form_title' => T_('Register'), 'register_links_attrs' => '', 'register_use_placeholders' => true, 'register_field_width' => 252, 'register_disabled_page_before' => '<div class="evo_panel__register register-disabled">', 'register_disabled_page_after' => '</div>', 'activate_form_title' => T_('Account activation'), 'activate_page_before' => '<div class="evo_panel__activation">', 'activate_page_after' => '</div>', 'search_input_before' => '<div class="input-group">', 'search_input_after' => '', 'search_submit_before' => '<span class="input-group-btn">', 'search_submit_after' => '</span></div>', 'featured_intro_before' => '<div class="jumbotron"><div class="intro_background_image"></div>', 'featured_intro_after' => '</div>', 'msgform_form_title' => T_('Sending a message')));
// Note: you can customize any of the sub templates included here by
// copying the matching php file into your skin directory.
// ------------------------- END OF MAIN CONTENT TEMPLATE ---------------------------
?>
</main>
示例7: display
/**
* Display the widget!
*
* @param array MUST contain at least the basic display params
*/
function display($params)
{
global $Item;
$this->init_display($params);
// Go Grab the featured post:
if ($Item = get_featured_Item('front', $this->disp_params['blog_ID'])) {
// We have a featured/intro post to display:
// ---------------------- ITEM BLOCK INCLUDED HERE ------------------------
echo $this->disp_params['block_start'];
echo $this->disp_params['block_body_start'];
echo $this->disp_params['featured_intro_before'];
skin_include($this->disp_params['skin_template'] . '.inc.php', array('feature_block' => true, 'content_mode' => 'auto', 'intro_mode' => 'normal', 'item_class' => $this->disp_params['item_class'], 'image_size' => $this->disp_params['image_size'], 'disp_title' => $this->disp_params['disp_title'], 'item_title_link_type' => $this->disp_params['item_title_link_type'], 'attached_pics' => $this->disp_params['attached_pics'], 'item_pic_link_type' => $this->disp_params['item_pic_link_type']));
echo $this->disp_params['featured_intro_after'];
echo $this->disp_params['block_body_end'];
echo $this->disp_params['block_end'];
// ----------------------------END ITEM BLOCK ----------------------------
}
}