b2evolution PHP Cross Reference Blogging Systems

Source: /skins/touch/single.main.php - 244 lines - 8314 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 touch

  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_header.inc.php file into the current skin folder.

  39  // ------------------------------- END OF HEADER --------------------------------

  40  ?>
  41  
  42  
  43  
  44  <div id="content" class="widecolumn">
  45  
  46  
  47  <?php
  48      // ------------------------- MESSAGES GENERATED FROM ACTIONS -------------------------

  49      messages( array(
  50              'block_start' => '<div class="action_messages">',
  51              'block_end'   => '</div>',
  52          ) );
  53      // --------------------------------- END OF MESSAGES ---------------------------------

  54  ?>
  55  
  56  
  57  <?php
  58  // Display message if no post:

  59  display_if_empty();
  60  
  61  echo '<div id="styled_content_block">'; // Beginning of posts display

  62  while( $Item = & mainlist_get_item() )
  63  {    // For each blog post, do everything below up to the closing curly brace "}"
  64      ?>
  65  
  66      <?php
  67          $Item->locale_temp_switch(); // Temporarily switch to post locale (useful for multilingual blogs)

  68      ?>
  69  
  70      <div class="post">
  71          <?php
  72              $Item->title( array(
  73                      'link_type'  => 'permalink',
  74                      'link_class' => 'sh2'
  75                  ) );
  76          ?>
  77  
  78          <div class="single-post-meta-top">
  79              <?php
  80                  // We want to display the post date:

  81                  $Item->issue_time( array(
  82                          'before'      => /* TRANS: date */ '',
  83                          'time_format' => 'F jS, Y',
  84                      ) );
  85                  $Item->issue_time( array(
  86                          'before'      => /* TRANS: time */ T_('at '),
  87                      ) );
  88                  $Item->author( array(
  89                          'before'    => ' > ',
  90                          'link_text' => 'preferredname',
  91                      ) );
  92              ?>
  93          <br>
  94              <?php /*<a href="#com-head">&darr; Skip to comments</a>*/ ?>
  95      <?php
  96          // Link to comments, trackbacks, etc.:

  97          $Item->feedback_link( array(
  98                  'type' => 'feedbacks',
  99                  'link_before' => '',
 100                  'link_after' => '',
 101                  'link_text_zero' => '&darr; '.T_('Skip to comments'),
 102                  'link_text_one' => '&darr; '.T_('Skip to comments'),
 103                  'link_text_more' => '&darr; '.T_('Skip to comments'),
 104                  'link_title' => '',
 105                  'use_popup' => false,
 106                  'show_in_single_mode' => true
 107              ) );
 108      ?>
 109          </div>
 110      </div>
 111  
 112      <div id="<?php $Item->anchor_id() ?>" class="post post<?php $Item->status_raw() ?>" lang="<?php $Item->lang() ?>">
 113          <?php
 114              if( $Item->status != 'published' )
 115              {
 116                  $Item->status( array( 'format' => 'styled' ) );
 117              }
 118              // ---------------------- POST CONTENT INCLUDED HERE ----------------------

 119              skin_include( '_item_content.inc.php', array(
 120                      'image_size' => 'fit-400x320',
 121                  ) );
 122              // Note: You can customize the default item content by copying the generic

 123              // /skins/_item_content.inc.php file into the current skin folder.

 124              // -------------------------- END OF POST CONTENT -------------------------

 125          ?>
 126  
 127          <?php
 128              // ------------------------- "Item - Single" CONTAINER EMBEDDED HERE --------------------------

 129              // WARNING: EXPERIMENTAL -- NOT RECOMMENDED FOR PRODUCTION -- MAY CHANGE DRAMATICALLY BEFORE RELEASE.

 130              // Display container contents:

 131              skin_container( /* TRANS: Widget container name */ NT_('Item Single'), array(
 132                      // The following (optional) params will be used as defaults for widgets included in this container:

 133                      // This will enclose each widget in a block:

 134                      'block_start' => '<div class="$wi_class$">',
 135                      'block_end' => '</div>',
 136                      // This will enclose the title of each widget:

 137                      'block_title_start' => '<h3>',
 138                      'block_title_end' => '</h3>',
 139                      // If a widget displays a list, this will enclose that list:

 140                      'list_start' => '<ul>',
 141                      'list_end' => '</ul>',
 142                      // This will enclose each item in a list:

 143                      'item_start' => '<li>',
 144                      'item_end' => '</li>',
 145                      // This will enclose sub-lists in a list:

 146                      'group_start' => '<ul>',
 147                      'group_end' => '</ul>',
 148                      // This will enclose (foot)notes:

 149                      'notes_start' => '<div class="notes">',
 150                      'notes_end' => '</div>',
 151                  ) );
 152              // ----------------------------- END OF "Item - Single" CONTAINER -----------------------------

 153          ?>
 154  
 155          <?php
 156              $Item->edit_link( array( // Link to backoffice for editing
 157                      'before'    => '',
 158                      'after'     => '',
 159                  ) );
 160          ?>
 161  
 162          <div class="single-post-meta-bottom">
 163                  <?php
 164                      $Item->categories( array(
 165                          'before'          => ' '.T_('Categories').': ',
 166                          'after'           => '.',
 167                          'include_main'    => true,
 168                          'include_other'   => true,
 169                          'include_external'=> true,
 170                          'link_categories' => true,
 171                      ) );
 172                  ?>
 173  
 174                  <?php
 175                      // List all tags attached to this post:

 176                      $Item->tags( array(
 177                              'before' =>         '<br />'.T_('Tags').': ',
 178                              'after' =>          ' ',
 179                              'separator' =>      ', ',
 180                          ) );
 181                  ?>
 182          </div>
 183  
 184          <?php
 185              // ------------------- PREV/NEXT POST LINKS (SINGLE POST MODE) -------------------

 186              item_prevnext_links( array(
 187                      'block_start' => '<ul id="post-options">',
 188                      'prev_start'  => '<li>',
 189                      'prev_text'   => '',
 190                      'prev_end'    => '</li>',
 191                      'prev_class'  => 'oprev',
 192                      'next_start'  => '<li>',
 193                      'next_text'   => '',
 194                      'next_end'    => '</li>',
 195                      'next_class'  => 'onext',
 196                      'block_end'   => '</ul>',
 197                  ) );
 198              // ------------------------- END OF PREV/NEXT POST LINKS -------------------------

 199          ?>
 200  
 201      </div>
 202  
 203  
 204      <?php
 205          // ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------

 206          skin_include( '_item_feedback.inc.php', array(
 207                  'author_link_text' => 'preferredname',
 208              ) );
 209          // Note: You can customize the default item feedback by copying the generic

 210          // /skins/_item_feedback.inc.php file into the current skin folder.

 211          // ---------------------- END OF FEEDBACK (COMMENTS/TRACKBACKS) ---------------------

 212      ?>
 213  
 214      <?php
 215      locale_restore_previous();    // Restore previous locale (Blog locale)

 216  }
 217  echo '</div>'; // End of posts display

 218  ?>
 219  
 220  </div>
 221  
 222  
 223  <?php
 224  // ------------------------- MOBILE FOOTER INCLUDED HERE --------------------------

 225  skin_include( '_mobile_footer.inc.php' );
 226  // Note: You can customize the default MOBILE FOOTER footer by copying the

 227  // _mobile_footer.inc.php file into the current skin folder.

 228  // ----------------------------- END OF MOBILE FOOTER -----------------------------

 229  
 230  // ------------------------- BODY FOOTER INCLUDED HERE --------------------------

 231  skin_include( '_body_footer.inc.php' );
 232  // Note: You can customize the default BODY footer by copying the

 233  // _body_footer.inc.php file into the current skin folder.

 234  // ------------------------------- END OF FOOTER --------------------------------

 235  ?>
 236  
 237  
 238  <?php
 239  // ------------------------- HTML FOOTER INCLUDED HERE --------------------------

 240  skin_include( '_html_footer.inc.php' );
 241  // Note: You can customize the default HTML footer by copying the

 242  // _html_footer.inc.php file into the current skin folder.

 243  // ------------------------------- END OF FOOTER --------------------------------

 244  ?>

title

Description

title

Description

title

Description

title

title

Body