b2evolution PHP Cross Reference Blogging Systems

Source: /skins/forums/_posts.disp.php - 99 lines - 3434 bytes - Text - Print

Description: This is the template that displays the posts for a blog

   1  <?php
   2  /**

   3   * This is the template that displays the posts for a blog

   4   *

   5   * This file is not meant to be called directly.

   6   * It is meant to be called by an include in the main.page.php template.

   7   * To display the archive directory, you should call a stub AND pass the right parameters

   8   * For example: /blogs/index.php?disp=posts

   9   *

  10   * b2evolution - {@link http://b2evolution.net/}

  11   * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}

  12   * @copyright (c)2003-2014 by Francois Planque - {@link http://fplanque.com/}

  13   *

  14   * @package evoskins

  15   */
  16  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  17  
  18  //global $Item;

  19  
  20  // --------------------------------- START OF POSTS -------------------------------------

  21  global $cat, $MainList;
  22  
  23  if( $cat > 0 )
  24  {
  25  ?>
  26  <div class="post_panel">
  27  <?php
  28      $Skin->display_post_button( $cat );
  29      // BREADCRUMBS

  30      $Skin->display_breadcrumbs( $cat );
  31  ?>
  32  </div>
  33  <div class="clear"></div>
  34  <?php
  35  } // End of the selected category specific display

  36  
  37  // Display message if no post:

  38  display_if_empty();
  39  
  40  // -------------------- PREV/NEXT PAGE LINKS (POST LIST MODE) --------------------

  41  mainlist_page_links( array(
  42          'block_start' => '<div class="navigation_top"><div class="navigation">'.T_('Page').': ',
  43          'block_end' => '</div></div>',
  44          'prev_text' => T_('Previous'),
  45          'next_text' => T_('Next'),
  46      ) );
  47  // ------------------------- END OF PREV/NEXT PAGE LINKS -------------------------

  48  
  49  if( isset( $MainList ) && $MainList->result_num_rows > 0 )
  50  {
  51  ?>
  52  <table class="bForums bPosts" width="100%" cellspacing="1" cellpadding="2" border="0">
  53      <tr>
  54          <th colspan="2"><?php echo T_('Topics'); ?></th>
  55          <th width="70"><?php echo T_('Replies'); ?></th>
  56          <th width="100"><?php echo T_('Author'); ?></th>
  57          <th width="160"><?php echo T_('Last Post'); ?></th>
  58      </tr>
  59  <?php
  60  
  61  // Go Grab the featured posts:

  62  while( $Item = get_featured_Item() )
  63  {    // We have a intro or a featured post to display:
  64      // ---------------------- ITEM BLOCK INCLUDED HERE ------------------------

  65      skin_include( '_item_list.inc.php', array(
  66              'feature_block' => true,
  67              'content_mode'  => 'auto',        // 'auto' will auto select depending on $disp-detail
  68              'intro_mode'    => 'normal',    // Intro posts will be displayed in normal mode
  69              'item_class'    => 'featured_post',
  70              'image_size'    => 'fit-400x320',
  71          ) );
  72      // ----------------------------END ITEM BLOCK  ----------------------------

  73  }
  74  
  75  while( mainlist_get_item() )
  76  {    // For each blog post, do everything below up to the closing curly brace "}"
  77      // ---------------------- ITEM BLOCK INCLUDED HERE ------------------------

  78      skin_include( '_item_list.inc.php', array(
  79              'content_mode' => 'auto',        // 'auto' will auto select depending on $disp-detail
  80              'image_size'   => 'fit-400x320',
  81          ) );
  82      // ----------------------------END ITEM BLOCK  ----------------------------

  83  
  84  } // ---------------------------------- END OF POSTS ------------------------------------

  85  ?>
  86  </table>
  87  <?php
  88  }
  89  
  90  // -------------------- PREV/NEXT PAGE LINKS (POST LIST MODE) --------------------

  91  mainlist_page_links( array(
  92          'block_start' => '<div class="navigation">'.T_('Page').': ',
  93          'block_end' => '</div>',
  94          'prev_text' => T_('Previous'),
  95          'next_text' => T_('Next'),
  96      ) );
  97  // ------------------------- END OF PREV/NEXT PAGE LINKS -------------------------

  98  
  99  ?>

title

Description

title

Description

title

Description

title

title

Body