b2evolution PHP Cross Reference Blogging Systems

Source: /skins/pluralism/single.main.php - 195 lines - 6523 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 pluralism
  13   */
  14  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  15  
  16  if( version_compare( $app_version, '2.4.1' ) < 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 2.4.1 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      // -------------------------- HTML HEADER INCLUDED HERE --------------------------
  26      skin_include( '_html_header.inc.php' );
  27      // Note: You can customize the default HTML header by copying the generic
  28      // /skins/_html_header.inc.php file into the current skin folder.
  29      // -------------------------------- END OF HEADER --------------------------------
  30  
  31      // ------------------------- BODY HEADER INCLUDED HERE --------------------------
  32      skin_include( '_body_header.inc.php' );
  33      // Note: You can customize the default BODY header by copying the generic
  34      // /skins/_body_footer.inc.php file into the current skin folder.
  35      // ------------------------------- END OF HEADER --------------------------------
  36  ?>
  37  
  38  <div id="content">
  39  
  40  <?php
  41  
  42      // ------------------------- MESSAGES GENERATED FROM ACTIONS -------------------------
  43      messages( array(
  44              'block_start' => '<div class="action_messages">',
  45              'block_end'   => '</div>',
  46          ) );
  47      // --------------------------------- END OF MESSAGES ---------------------------------
  48  
  49      // ------------------- PREV/NEXT POST LINKS (SINGLE POST MODE) -------------------
  50      item_prevnext_links( array(
  51              'block_start' => '<table class="prevnext_post"><tr>',
  52              'prev_start'  => '<td>',
  53              'prev_end'    => '</td>',
  54              'next_start'  => '<td class="right">',
  55              'next_end'    => '</td>',
  56              'block_end'   => '</tr></table>',
  57          ) );
  58      // ------------------------- END OF PREV/NEXT POST LINKS -------------------------
  59  ?>
  60  
  61  <?php
  62  // Display message if no post:
  63  display_if_empty();
  64  
  65  echo '<div id="styled_content_block">'; // Beginning of posts display
  66  while( $Item = & mainlist_get_item() )
  67  {    // For each blog post, do everything below up to the closing curly brace "}"
  68      ?>
  69  
  70      <?php
  71          $Item->locale_temp_switch(); // Temporarily switch to post locale (useful for multilingual blogs)
  72      ?>
  73  
  74      <div id="<?php $Item->anchor_id() ?>" class="post post<?php $Item->status_raw() ?>" lang="<?php $Item->lang() ?>">
  75  
  76          <h2 class="title"><?php
  77              $Item->title( array(
  78                  'link_type' => 'permalink'
  79                  ) );
  80          ?></h2>
  81  
  82          <?php
  83              if( $Item->status != 'published' )
  84              {
  85                  $Item->status( array( 'format' => 'styled' ) );
  86              }
  87  
  88              // ---------------------- POST CONTENT INCLUDED HERE ----------------------
  89              skin_include( '_item_content.inc.php', array(
  90                      'image_size'    =>    'fit-400x320',
  91                  ) );
  92              // Note: You can customize the default item feedback by copying the generic
  93              // /skins/_item_feedback.inc.php file into the current skin folder.
  94              // -------------------------- END OF POST CONTENT -------------------------
  95          ?>
  96  
  97          <p class="postmetadata alt">
  98              <small>
  99                  <?php
 100                      $Item->author( array(
 101                              'link_text'    => 'only_avatar',
 102                              'link_rel'     => 'nofollow',
 103                              'thumb_size'   => 'crop-32x32',
 104                              'thumb_class'  => 'leftmargin',
 105                          ) );
 106                  ?>
 107                  <?php
 108                      $Item->issue_time( array(
 109                              'before'      => /* TRANS: date */ T_('This entry was posted on '),
 110                              'time_format' => 'F jS, Y',
 111                          ) );
 112                  ?>
 113                  <?php
 114                      $Item->issue_time( array(
 115                              'before'      => /* TRANS: time */ T_('at '),
 116                          ) );
 117                  ?>
 118                  <?php
 119                      $Item->author( array(
 120                              'before'    => T_('by '),
 121                              'link_text' => 'preferredname',
 122                          ) );
 123                  ?>
 124                  <?php
 125                      $Item->categories( array(
 126                          'before'          => ' '.T_('and is filed under').' ',
 127                          'after'           => '.',
 128                          'include_main'    => true,
 129                          'include_other'   => true,
 130                          'include_external'=> true,
 131                          'link_categories' => true,
 132                      ) );
 133                  ?>
 134  
 135                  <?php
 136                      // List all tags attached to this post:
 137                      $Item->tags( array(
 138                              'before'      => ' '.T_('Tags').': ',
 139                              'after'       => ' ',
 140                              'separator'   => ', ',
 141                          ) );
 142                  ?>
 143  
 144                  <!-- You can follow any responses to this entry through the RSS feed. -->
 145                  <?php
 146                      $Item->edit_link( array( // Link to backoffice for editing
 147                              'before'      => '',
 148                              'after'       => '',
 149                          ) );
 150                  ?>
 151              </small>
 152          </p>
 153  
 154      </div>
 155  
 156  
 157      <?php
 158          // ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------
 159          skin_include( '_item_feedback.inc.php', array(
 160                  'before_section_title' => '<h3>',
 161                  'after_section_title'  => '</h3>',
 162                  'author_link_text'     => 'preferredname',
 163              ) );
 164          // Note: You can customize the default item feedback by copying the generic
 165          // /skins/_item_feedback.inc.php file into the current skin folder.
 166          // ---------------------- END OF FEEDBACK (COMMENTS/TRACKBACKS) ---------------------
 167      ?>
 168  
 169      <?php
 170      locale_restore_previous();    // Restore previous locale (Blog locale)
 171  }
 172  echo '</div>'; // End of posts display
 173  ?>
 174  
 175  </div>
 176  
 177  <?php
 178      // ------------------------- SIDEBAR INCLUDED HERE --------------------------
 179      skin_include( '_sidebar.inc.php' );
 180      // Note: You can customize the default BODY footer by copying the
 181      // _body_footer.inc.php file into the current skin folder.
 182      // ----------------------------- END OF SIDEBAR -----------------------------
 183  
 184      // ------------------------- BODY FOOTER INCLUDED HERE --------------------------
 185      skin_include( '_body_footer.inc.php' );
 186      // Note: You can customize the default BODY footer by copying the
 187      // _body_footer.inc.php file into the current skin folder.
 188      // ------------------------------- END OF FOOTER --------------------------------
 189  
 190      // ------------------------- HTML FOOTER INCLUDED HERE --------------------------
 191      skin_include( '_html_footer.inc.php' );
 192      // Note: You can customize the default HTML footer by copying the
 193      // _html_footer.inc.php file into the current skin folder.
 194      // ------------------------------- END OF FOOTER --------------------------------
 195  ?>

title

Description

title

Description

title

Description

title

title

Body