b2evolution PHP Cross Reference Blogging Systems

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

title

Description

title

Description

title

Description

title

title

Body