b2evolution PHP Cross Reference Blogging Systems

Source: /skins/evopress/posts.main.php - 160 lines - 5554 bytes - Text - Print

Description: This is the main/default page template.

   1  <?php
   2  /**
   3   * This is the main/default page template.
   4   *
   5   * For a quick explanation of b2evo 2.0 skins, please start here:
   6   * {@link http://b2evolution.net/man/skin-structure}
   7   *
   8   * The main page template is used to display the blog when no specific page template is available
   9   * to handle the request (based on $disp).
  10   *
  11   * @package evoskins
  12   * @subpackage evopress
  13   */
  14  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  15  
  16  if( version_compare( $app_version, '4.0.0-dev' ) < 0 )
  17  { // Older 2.x skins work on newer 2.x b2evo versions, but newer 2.x skins may not work on older 2.x b2evo versions.
  18      die( 'This skin is designed for b2evolution 4.0.0 and above. Please <a href="http://b2evolution.net/downloads/index.html">upgrade your b2evolution</a>.' );
  19  }
  20  
  21  // This is the main template; it may be used to display very different things.
  22  // Do inits depending on current $disp:
  23  skin_init( $disp );
  24  
  25  
  26  // -------------------------- HTML HEADER INCLUDED HERE --------------------------
  27  skin_include( '_html_header.inc.php' );
  28  // Note: You can customize the default HTML header by copying the generic
  29  // /skins/_html_header.inc.php file into the current skin folder.
  30  // -------------------------------- END OF HEADER --------------------------------
  31  ?>
  32  
  33  
  34  <?php
  35  // ------------------------- BODY HEADER INCLUDED HERE --------------------------
  36  skin_include( '_body_header.inc.php' );
  37  // Note: You can customize the default BODY header by copying the generic
  38  // /skins/_body_footer.inc.php file into the current skin folder.
  39  // ------------------------------- END OF HEADER --------------------------------
  40  ?>
  41  
  42  
  43  <div class="top_menu top_menu_narrow top_menu_<?php echo $Skin->get_setting( 'sidebar_position' ); ?>">
  44      <ul>
  45      <?php
  46          // ------------------------- "Menu" CONTAINER EMBEDDED HERE --------------------------
  47          // Display container and contents:
  48          skin_container( NT_('Menu'), array(
  49                  // The following params will be used as defaults for widgets included in this container:
  50                  'block_start' => '',
  51                  'block_end' => '',
  52                  'block_display_title' => false,
  53                  'list_start' => '',
  54                  'list_end' => '',
  55                  'item_start' => '<li>',
  56                  'item_end' => '</li>',
  57              ) );
  58          // ----------------------------- END OF "Menu" CONTAINER -----------------------------
  59      ?>
  60      </ul>
  61  </div>
  62  
  63  
  64  <div id="content" class="narrowcolumn">
  65  
  66  <?php
  67      // ------------------------- MESSAGES GENERATED FROM ACTIONS -------------------------
  68      messages( array(
  69              'block_start' => '<div class="action_messages">',
  70              'block_end'   => '</div>',
  71          ) );
  72      // --------------------------------- END OF MESSAGES ---------------------------------
  73  ?>
  74  
  75  <?php
  76      // ------------------------- TITLE FOR THE CURRENT REQUEST -------------------------
  77      request_title( array(
  78              'title_before'=> '<h2>',
  79              'title_after' => '</h2>',
  80              'title_none'  => '',
  81              'glue'        => ' - ',
  82              'title_single_disp' => true,
  83              'format'      => 'htmlbody',
  84          ) );
  85      // ------------------------------ END OF REQUEST TITLE -----------------------------
  86  ?>
  87  
  88  <?php
  89  // Go Grab the featured post:
  90  if( $Item = & get_featured_Item() )
  91  {    // We have a featured/intro post to display:
  92      // ---------------------- ITEM BLOCK INCLUDED HERE ------------------------
  93      skin_include( '_item_block.inc.php', array(
  94              'feature_block' => true,
  95              'content_mode' => 'auto',        // 'auto' will auto select depending on $disp-detail
  96              'intro_mode'   => 'normal',    // Intro posts will be displayed in normal mode
  97              'item_class'   => 'featured_post',
  98              'image_size'     =>    'fit-400x320',
  99          ) );
 100      // ----------------------------END ITEM BLOCK  ----------------------------
 101  }
 102  ?>
 103  
 104  <?php
 105  // Display message if no post:
 106  display_if_empty();
 107  
 108  echo '<div id="styled_content_block">'; // Beginning of posts display
 109  while( $Item = & mainlist_get_item() )
 110  {    // For each blog post:
 111      // ---------------------- ITEM BLOCK INCLUDED HERE ------------------------
 112      skin_include( '_item_block.inc.php', array(
 113              'content_mode' => 'auto',        // 'auto' will auto select depending on $disp-detail
 114              'image_size'     =>    'fit-400x320',
 115          ) );
 116      // ----------------------------END ITEM BLOCK  ----------------------------
 117  }
 118  echo '</div>'; // End of posts display
 119  ?>
 120  
 121  <?php
 122      // -------------------- PREV/NEXT PAGE LINKS (POST LIST MODE) --------------------
 123      mainlist_page_links( array(
 124              'block_start' => '<div class="navigation">',
 125              'block_end' => '</div>',
 126             'prev_text' => '&lt;&lt;',
 127             'next_text' => '&gt;&gt;',
 128          ) );
 129      // ------------------------- END OF PREV/NEXT PAGE LINKS -------------------------
 130  ?>
 131  
 132  
 133  </div>
 134  
 135  
 136  <?php
 137  // ------------------------- SIDEBAR INCLUDED HERE --------------------------
 138  skin_include( '_sidebar.inc.php' );
 139  // Note: You can customize the default BODY footer by copying the
 140  // _body_footer.inc.php file into the current skin folder.
 141  // ----------------------------- END OF SIDEBAR -----------------------------
 142  ?>
 143  
 144  
 145  <?php
 146  // ------------------------- BODY FOOTER INCLUDED HERE --------------------------
 147  skin_include( '_body_footer.inc.php' );
 148  // Note: You can customize the default BODY footer by copying the
 149  // _body_footer.inc.php file into the current skin folder.
 150  // ------------------------------- END OF FOOTER --------------------------------
 151  ?>
 152  
 153  
 154  <?php
 155  // ------------------------- HTML FOOTER INCLUDED HERE --------------------------
 156  skin_include( '_html_footer.inc.php' );
 157  // Note: You can customize the default HTML footer by copying the
 158  // _html_footer.inc.php file into the current skin folder.
 159  // ------------------------------- END OF FOOTER --------------------------------
 160  ?>

title

Description

title

Description

title

Description

title

title

Body