b2evolution PHP Cross Reference Blogging Systems

Source: /skins/natural_pink/index.main.php - 256 lines - 8871 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   * It is used to display the blog when no specific page template is available to handle the request.
   9   *
  10   * @package evoskins
  11   * @subpackage natural_pink
  12   *
  13   * @version $Id: index.main.php 4275 2013-07-17 10:52:24Z yura $
  14   */
  15  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  16  
  17  if( version_compare( $app_version, '3.0' ) < 0 )
  18  { // Older skins (versions 2.x and above) should work on newer b2evo versions, but newer skins may not work on older b2evo versions.
  19      die( 'This skin is designed for b2evolution 3.0 and above. Please <a href="http://b2evolution.net/downloads/index.html">upgrade your b2evolution</a>.' );
  20  }
  21  
  22  // This is the main template; it may be used to display very different things.
  23  // Do inits depending on current $disp:
  24  skin_init( $disp );
  25  
  26  
  27  // -------------------------- HTML HEADER INCLUDED HERE --------------------------
  28  skin_include( '_html_header.inc.php' );
  29  // Note: You can customize the default HTML header by copying the
  30  // _html_header.inc.php file into the current skin folder.
  31  // -------------------------------- END OF HEADER --------------------------------
  32  ?>
  33  
  34  <div class="wrapper">
  35  <div class="wrapper2">
  36  
  37  <div class="PageTop">
  38      <?php
  39          // Display container and contents:
  40          skin_container( NT_('Page Top'), array(
  41                  // The following params will be used as defaults for widgets included in this container:
  42                  'block_start' => '<div class="$wi_class$">',
  43                  'block_end' => '</div>',
  44                  'block_display_title' => false,
  45                  'list_start' => '<ul>',
  46                  'list_end' => '</ul>',
  47                  'item_start' => '<li>',
  48                  'item_end' => '</li>',
  49              ) );
  50      ?>
  51  </div>
  52  
  53  <div class="pageHeader">
  54      <?php
  55          // Display container and contents:
  56          skin_container( NT_('Header'), array(
  57                  // The following params will be used as defaults for widgets included in this container:
  58                  'block_start' => '<div class="$wi_class$">',
  59                  'block_end' => '</div>',
  60                  'block_title_start' => '<h1>',
  61                  'block_title_end' => '</h1>',
  62              ) );
  63      ?>
  64  
  65      <div class="top_menu">
  66          <ul>
  67          <?php
  68              // ------------------------- "Menu" CONTAINER EMBEDDED HERE --------------------------
  69              // Display container and contents:
  70              skin_container( NT_('Menu'), array(
  71                      // The following params will be used as defaults for widgets included in this container:
  72                      'block_start' => '',
  73                      'block_end' => '',
  74                      'block_display_title' => false,
  75                      'list_start' => '',
  76                      'list_end' => '',
  77                      'item_start' => '<li>',
  78                      'item_end' => '</li>',
  79                  ) );
  80              // ----------------------------- END OF "Menu" CONTAINER -----------------------------
  81          ?>
  82          </ul>
  83      </div>
  84  </div>
  85  
  86  <div class="bPosts">
  87  
  88  <?php
  89      // ------------------------- MESSAGES GENERATED FROM ACTIONS -------------------------
  90      messages( array(
  91              'block_start' => '<div class="action_messages">',
  92              'block_end'   => '</div>',
  93          ) );
  94      // --------------------------------- END OF MESSAGES ---------------------------------
  95  ?>
  96  
  97  <?php
  98      // ------------------- PREV/NEXT POST LINKS (SINGLE POST MODE) -------------------
  99      item_prevnext_links( array(
 100              'block_start' => '<table class="prevnext_post"><tr>',
 101              'prev_start'  => '<td>',
 102              'prev_end'    => '</td>',
 103              'next_start'  => '<td class="right">',
 104              'next_end'    => '</td>',
 105              'block_end'   => '</tr></table>',
 106          ) );
 107      // ------------------------- END OF PREV/NEXT POST LINKS -------------------------
 108  ?>
 109  
 110  <?php
 111      // ------------------------- TITLE FOR THE CURRENT REQUEST -------------------------
 112      request_title( array(
 113              'title_before'=> '<h2>',
 114              'title_after' => '</h2>',
 115              'title_none'  => '',
 116              'glue'        => ' - ',
 117              'title_single_disp' => true,
 118              'format'      => 'htmlbody',
 119          ) );
 120      // ------------------------------ END OF REQUEST TITLE -----------------------------
 121  ?>
 122  
 123  <!-- =================================== START OF MAIN AREA =================================== -->
 124  
 125  <?php
 126  // Go Grab the featured post:
 127  if( $Item = & get_featured_Item() )
 128  {    // We have a featured/intro post to display:
 129      // ---------------------- ITEM BLOCK INCLUDED HERE ------------------------
 130      skin_include( '_item_block.inc.php', array(
 131              'feature_block' => true,
 132              'content_mode' => 'auto',        // 'auto' will auto select depending on $disp-detail
 133              'intro_mode'   => 'normal',    // Intro posts will be displayed in normal mode
 134              'item_class'   => 'featured_post',
 135              'image_size'     =>    'fit-400x320',
 136          ) );
 137      // ----------------------------END ITEM BLOCK  ----------------------------
 138  }
 139  ?>
 140  
 141  <?php // ------------------------------------ START OF POSTS ----------------------------------------
 142      // Display message if no post:
 143      display_if_empty();
 144  
 145      echo '<div id="styled_content_block">'; // Beginning of posts display
 146      while( $Item = & mainlist_get_item() )
 147      {    // For each blog post, do everything below up to the closing curly brace "}"
 148  
 149          // ------------------------------ DATE SEPARATOR ------------------------------
 150          $MainList->date_if_changed( array(
 151                  'before'      => '<h2>',
 152                  'after'       => '</h2>',
 153                  'date_format' => '#',
 154              ) );
 155  
 156          // ---------------------- ITEM BLOCK INCLUDED HERE ------------------------
 157          skin_include( '_item_block.inc.php', array(
 158                  'content_mode' => 'auto',        // 'auto' will auto select depending on $disp-detail
 159                  'image_size'     =>    'fit-400x320',
 160              ) );
 161          // ----------------------------END ITEM BLOCK  ----------------------------
 162          ?>
 163  
 164          <div class="separator" ><img src="rsc/img/separator.gif" width="265" height="14" alt="" /></div>
 165      <?php
 166      } // ---------------------------------- END OF POSTS ------------------------------------
 167      echo '</div>'; // End of posts display
 168      ?>
 169  
 170      <?php
 171          // -------------------- PREV/NEXT PAGE LINKS (POST LIST MODE) --------------------
 172          mainlist_page_links( array(
 173                  'block_start' => '<p class="center"><strong>',
 174                  'block_end' => '</strong></p>',
 175                  'links_format' => '$prev$ :: $next$',
 176                 'prev_text' => '&lt;&lt; '.T_('Previous'),
 177                 'next_text' => T_('Next').' &gt;&gt;',
 178              ) );
 179          // ------------------------- END OF PREV/NEXT PAGE LINKS -------------------------
 180      ?>
 181  
 182  
 183      <?php
 184          // -------------- MAIN CONTENT TEMPLATE INCLUDED HERE (Based on $disp) --------------
 185          skin_include( '$disp$', array(
 186                  'disp_posts'  => '',        // We already handled this case above
 187                  'disp_single' => '',        // We already handled this case above
 188                  'disp_page'   => '',        // We already handled this case above
 189                  'author_link_text' => 'preferredname',
 190              ) );
 191          // Note: you can customize any of the sub templates included here by
 192          // copying the matching php file into your skin directory.
 193          // ------------------------- END OF MAIN CONTENT TEMPLATE ---------------------------
 194      ?>
 195  
 196  </div>
 197  <!-- =================================== START OF SIDEBAR =================================== -->
 198  
 199  <div class="bSideBar">
 200  
 201      <?php
 202          // Display container contents:
 203          skin_container( NT_('Sidebar'), array(
 204                  // The following (optional) params will be used as defaults for widgets included in this container:
 205                  // This will enclose each widget in a block:
 206                  'block_start' => '<div class="bSideItem $wi_class$">',
 207                  'block_end' => '</div>',
 208                  // This will enclose the title of each widget:
 209                  'block_title_start' => '<h3>',
 210                  'block_title_end' => '</h3>',
 211                  // If a widget displays a list, this will enclose that list:
 212                  'list_start' => '<ul>',
 213                  'list_end' => '</ul>',
 214                  // This will enclose each item in a list:
 215                  'item_start' => '<li>',
 216                  'item_end' => '</li>',
 217                  // This will enclose sub-lists in a list:
 218                  'group_start' => '<ul>',
 219                  'group_end' => '</ul>',
 220              ) );
 221      ?>
 222  
 223      <?php
 224          // Please help us promote b2evolution and leave this logo on your blog:
 225          powered_by( array(
 226                  'block_start' => '<div class="powered_by">',
 227                  'block_end'   => '</div>',
 228                  // Check /rsc/img/ for other possible images -- Don't forget to change or remove width & height too
 229                  'img_url'     => '$rsc$img/powered-by-b2evolution-120t.gif',
 230                  'img_width'   => 120,
 231                  'img_height'  => 32,
 232              ) );
 233      ?>
 234  
 235  </div>
 236  
 237  <div class="clear"><?php echo get_icon( 'pixel' ); ?></div>
 238  
 239  <?php
 240  // ------------------------- BODY FOOTER INCLUDED HERE --------------------------
 241  skin_include( '_body_footer.inc.php' );
 242  // Note: You can customize the default BODY footer by copying the
 243  // _body_footer.inc.php file into the current skin folder.
 244  // ------------------------------- END OF FOOTER --------------------------------
 245  ?>
 246  
 247  </div>
 248  </div>
 249  
 250  <?php
 251  // ------------------------- HTML FOOTER INCLUDED HERE --------------------------
 252  skin_include( '_html_footer.inc.php' );
 253  // Note: You can customize the default HTML footer by copying the
 254  // _html_footer.inc.php file into the current skin folder.
 255  // ------------------------------- END OF FOOTER --------------------------------
 256  ?>

title

Description

title

Description

title

Description

title

title

Body