b2evolution PHP Cross Reference Blogging Systems

Source: /skins/custom/index.main.php - 320 lines - 11512 bytes - Text - Print

Description: This is the main/default page template for the "custom" skin.

   1  <?php
   2  /**
   3   * This is the main/default page template for the "custom" skin.
   4   *
   5   * This skin only uses one single template which includes most of its features.
   6   * It will also rely on default includes for specific dispays (like the comment form).
   7   *
   8   * For a quick explanation of b2evo 2.0 skins, please start here:
   9   * {@link http://b2evolution.net/man/skin-structure}
  10   *
  11   * The main page template is used to display the blog when no specific page template is available
  12   * to handle the request (based on $disp).
  13   *
  14   * @package evoskins
  15   * @subpackage custom
  16   *
  17   * @version $Id: index.main.php 4275 2013-07-17 10:52:24Z yura $
  18   */
  19  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  20  
  21  if( version_compare( $app_version, '3.0' ) < 0 )
  22  { // Older skins (versions 2.x and above) should work on newer b2evo versions, but newer skins may not work on older b2evo versions.
  23      die( 'This skin is designed for b2evolution 3.0 and above. Please <a href="http://b2evolution.net/downloads/index.html">upgrade your b2evolution</a>.' );
  24  }
  25  
  26  // This is the main template; it may be used to display very different things.
  27  // Do inits depending on current $disp:
  28  skin_init( $disp );
  29  
  30  
  31  // -------------------------- HTML HEADER INCLUDED HERE --------------------------
  32  skin_include( '_html_header.inc.php' );
  33  // Note: You can customize the default HTML header by copying the generic
  34  // /skins/_html_header.inc.php file into the current skin folder.
  35  // -------------------------------- END OF HEADER --------------------------------
  36  ?>
  37  
  38  
  39  <div id="wrapper" class="wrapper_<?php echo $Skin->get_setting( 'sidebar_position' ); ?>">
  40  
  41  <div class="PageTop">
  42      <?php
  43          // ------------------------- "Page Top" CONTAINER EMBEDDED HERE --------------------------
  44          // Display container and contents:
  45          skin_container( NT_('Page Top'), array(
  46                  // The following params will be used as defaults for widgets included in this container:
  47                  'block_start'         => '<div class="$wi_class$">',
  48                  'block_end'           => '</div>',
  49                  'block_display_title' => false,
  50                  'list_start'          => '<ul>',
  51                  'list_end'            => '</ul>',
  52                  'item_start'          => '<li>',
  53                  'item_end'            => '</li>',
  54              ) );
  55          // ----------------------------- END OF "Page Top" CONTAINER -----------------------------
  56      ?>
  57  </div>
  58  
  59  <div class="pageHeader">
  60      <?php
  61          // ------------------------- "Header" CONTAINER EMBEDDED HERE --------------------------
  62          // Display container and contents:
  63          skin_container( NT_('Header'), array(
  64                  // The following params will be used as defaults for widgets included in this container:
  65                  'block_start'       => '<div class="$wi_class$">',
  66                  'block_end'         => '</div>',
  67                  'block_title_start' => '<h1>',
  68                  'block_title_end'   => '</h1>',
  69              ) );
  70          // ----------------------------- END OF "Header" CONTAINER -----------------------------
  71      ?>
  72  </div>
  73  
  74  <div class="top_menu">
  75      <ul>
  76      <?php
  77          // ------------------------- "Menu" CONTAINER EMBEDDED HERE --------------------------
  78          // Display container and contents:
  79          // Note: this container is designed to be a single <ul> list
  80          skin_container( NT_('Menu'), array(
  81                  // The following params will be used as defaults for widgets included in this container:
  82                  'block_start'         => '',
  83                  'block_end'           => '',
  84                  'block_display_title' => false,
  85                  'list_start'          => '',
  86                  'list_end'            => '',
  87                  'item_start'          => '<li>',
  88                  'item_end'            => '</li>',
  89              ) );
  90          // ----------------------------- END OF "Menu" CONTAINER -----------------------------
  91      ?>
  92      </ul>
  93      &nbsp;
  94  </div>
  95  
  96  
  97  <!-- =================================== START OF MAIN AREA =================================== -->
  98  <div class="bPosts bPosts_<?php echo $Skin->get_setting( 'sidebar_position' ); ?>">
  99  
 100      <?php
 101          // ------------------------- MESSAGES GENERATED FROM ACTIONS -------------------------
 102          messages( array(
 103                  'block_start' => '<div class="action_messages">',
 104                  'block_end'   => '</div>',
 105              ) );
 106          // --------------------------------- END OF MESSAGES ---------------------------------
 107      ?>
 108  
 109      <?php
 110          // ------------------- PREV/NEXT POST LINKS (SINGLE POST MODE) -------------------
 111          item_prevnext_links( array(
 112                  'block_start' => '<table class="prevnext_post"><tr>',
 113                  'prev_start'  => '<td>',
 114                  'prev_end'    => '</td>',
 115                  'next_start'  => '<td class="right">',
 116                  'next_end'    => '</td>',
 117                  'block_end'   => '</tr></table>',
 118              ) );
 119          // ------------------------- END OF PREV/NEXT POST LINKS -------------------------
 120      ?>
 121  
 122      <?php
 123          // ------------------------ TITLE FOR THE CURRENT REQUEST ------------------------
 124          request_title( array(
 125                  'title_before'=> '<h2>',
 126                  'title_after' => '</h2>',
 127                  'title_none'  => '',
 128                  'glue'        => ' - ',
 129                  'title_single_disp' => true,
 130                  'format'      => 'htmlbody',
 131              ) );
 132          // ----------------------------- END OF REQUEST TITLE ----------------------------
 133      ?>
 134  
 135      <?php
 136      // Go Grab the featured post:
 137      if( $Item = & get_featured_Item() )
 138      {    // We have a featured/intro post to display:
 139          // ---------------------- ITEM BLOCK INCLUDED HERE ------------------------
 140          skin_include( '_item_block.inc.php', array(
 141                  'feature_block' => true,
 142                  'content_mode' => 'auto',        // 'auto' will auto select depending on $disp-detail
 143                  'intro_mode'   => 'normal',    // Intro posts will be displayed in normal mode
 144                  'item_class'   => 'featured_post',
 145                  'image_size'     =>    'fit-400x320',
 146              ) );
 147          // ----------------------------END ITEM BLOCK  ----------------------------
 148      }
 149      ?>
 150  
 151      <?php
 152          // -------------------- PREV/NEXT PAGE LINKS (POST LIST MODE) --------------------
 153          mainlist_page_links( array(
 154                  'block_start' => '<p class="center">'.T_('Pages:').' <strong>',
 155                  'block_end' => '</strong></p>',
 156              ) );
 157          // ------------------------- END OF PREV/NEXT PAGE LINKS -------------------------
 158      ?>
 159  
 160  
 161      <?php
 162          // --------------------------------- START OF POSTS -------------------------------------
 163          // Display message if no post:
 164          display_if_empty();
 165  
 166          while( $Item = & mainlist_get_item() )
 167          {    // For each blog post, do everything below up to the closing curly brace "}"
 168  
 169              // ------------------------------ DATE SEPARATOR ------------------------------
 170              $MainList->date_if_changed( array(
 171                      'before'      => '<h2>',
 172                      'after'       => '</h2>',
 173                      'date_format' => '#',
 174                  ) );
 175  
 176              // ---------------------- ITEM BLOCK INCLUDED HERE ------------------------
 177              skin_include( '_item_block.inc.php', array(
 178                      'content_mode'     => 'auto', // 'auto' will auto select depending on $disp-detail
 179                      'image_size'       => 'fit-400x320',
 180                  ) );
 181              // ----------------------------END ITEM BLOCK  ----------------------------
 182  
 183          } // ---------------------------------- END OF POSTS ------------------------------------
 184      ?>
 185  
 186      <?php
 187          // -------------------- PREV/NEXT PAGE LINKS (POST LIST MODE) --------------------
 188          mainlist_page_links( array(
 189                  'block_start' => '<p class="center"><strong>',
 190                  'block_end' => '</strong></p>',
 191                 'prev_text' => '&lt;&lt;',
 192                 'next_text' => '&gt;&gt;',
 193              ) );
 194          // ------------------------- END OF PREV/NEXT PAGE LINKS -------------------------
 195      ?>
 196  
 197  
 198      <?php
 199          // -------------- MAIN CONTENT TEMPLATE INCLUDED HERE (Based on $disp) --------------
 200          skin_include( '$disp$', array(
 201                  'disp_posts'  => '',        // We already handled this case above
 202                  'disp_single' => '',        // We already handled this case above
 203                  'disp_page'   => '',        // We already handled this case above
 204                  'author_link_text' => 'preferredname',
 205              ) );
 206          // Note: you can customize any of the sub templates included here by
 207          // copying the matching php file into your skin directory.
 208          // ------------------------- END OF MAIN CONTENT TEMPLATE ---------------------------
 209      ?>
 210  
 211  </div>
 212  
 213  
 214  <!-- =================================== START OF SIDEBAR =================================== -->
 215  <div class="bSideBar bSideBar_<?php echo $Skin->get_setting( 'sidebar_position'); ?>">
 216  
 217      <?php
 218          // ------------------------- "Sidebar" CONTAINER EMBEDDED HERE --------------------------
 219          // Display container contents:
 220          skin_container( NT_('Sidebar'), array(
 221                  // The following (optional) params will be used as defaults for widgets included in this container:
 222                  // This will enclose each widget in a block:
 223                  'block_start' => '<div class="bSideItem $wi_class$">',
 224                  'block_end' => '</div>',
 225                  // This will enclose the title of each widget:
 226                  'block_title_start' => '<h3>',
 227                  'block_title_end' => '</h3>',
 228                  // If a widget displays a list, this will enclose that list:
 229                  'list_start' => '<ul>',
 230                  'list_end' => '</ul>',
 231                  // This will enclose each item in a list:
 232                  'item_start' => '<li>',
 233                  'item_end' => '</li>',
 234                  // This will enclose sub-lists in a list:
 235                  'group_start' => '<ul>',
 236                  'group_end' => '</ul>',
 237                  // This will enclose (foot)notes:
 238                  'notes_start' => '<div class="notes">',
 239                  'notes_end' => '</div>',
 240              ) );
 241          // ----------------------------- END OF "Sidebar" CONTAINER -----------------------------
 242      ?>
 243  
 244      <?php
 245          // Please help us promote b2evolution and leave this logo on your blog:
 246          powered_by( array(
 247                  'block_start' => '<div class="powered_by">',
 248                  'block_end'   => '</div>',
 249                  // Check /rsc/img/ for other possible images -- Don't forget to change or remove width & height too
 250                  'img_url'     => '$rsc$img/powered-by-b2evolution-120t.gif',
 251                  'img_width'   => 120,
 252                  'img_height'  => 32,
 253              ) );
 254      ?>
 255  
 256  </div>
 257  
 258  
 259  <!-- =================================== START OF FOOTER =================================== -->
 260  <div id="pageFooter">
 261      <?php
 262          // Display container and contents:
 263          skin_container( NT_("Footer"), array(
 264                  // The following params will be used as defaults for widgets included in this container:
 265              ) );
 266          // Note: Double quotes have been used around "Footer" only for test purposes.
 267      ?>
 268      <p class="baseline">
 269          <?php
 270              // Display footer text (text can be edited in Blog Settings):
 271              $Blog->footer_text( array(
 272                      'before'      => '',
 273                      'after'       => ' &bull; ',
 274                  ) );
 275  
 276          // TODO: dh> provide a default class for pTyp, too. Should be a name and not the ptyp_ID though..?!
 277          ?>
 278  
 279          <?php
 280              // Display a link to contact the owner of this blog (if owner accepts messages):
 281              $Blog->contact_link( array(
 282                      'before'      => '',
 283                      'after'       => ' &bull; ',
 284                      'text'   => T_('Contact'),
 285                      'title'  => T_('Send a message to the owner of this blog...'),
 286                  ) );
 287              // Display a link to help page:
 288              $Blog->help_link( array(
 289                      'before'      => ' ',
 290                      'after'       => ' &bull; ',
 291                      'text'        => T_('Help'),
 292                  ) );
 293          ?>
 294  
 295          <?php display_param_link( $skin_links ) ?> by <?php display_param_link( $francois_links ) ?>
 296  
 297          <?php
 298              // Display additional credits:
 299               // If you can add your own credits without removing the defaults, you'll be very cool :))
 300               // Please leave this at the bottom of the page to make sure your blog gets listed on b2evolution.net
 301              credits( array(
 302                      'list_start'  => '&bull;',
 303                      'list_end'    => ' ',
 304                      'separator'   => '&bull;',
 305                      'item_start'  => ' ',
 306                      'item_end'    => ' ',
 307                  ) );
 308          ?>
 309      </p>
 310  </div>
 311  </div>
 312  
 313  
 314  <?php
 315  // ------------------------- HTML FOOTER INCLUDED HERE --------------------------
 316  skin_include( '_html_footer.inc.php' );
 317  // Note: You can customize the default HTML footer by copying the
 318  // _html_footer.inc.php file into the current skin folder.
 319  // ------------------------------- END OF FOOTER --------------------------------
 320  ?>

title

Description

title

Description

title

Description

title

title

Body