b2evolution PHP Cross Reference Blogging Systems

Source: /skins/evopress/single.main.php - 263 lines - 8566 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  add_headline( <<<HEREDOC
  28  <style type="text/css" media="screen">
  29      #page.page-left, #page.page-right{background-image:none}
  30  </style>
  31  HEREDOC
  32  );
  33  skin_include( '_html_header.inc.php' );
  34  // Note: You can customize the default HTML header by copying the generic
  35  // /skins/_html_header.inc.php file into the current skin folder.
  36  // -------------------------------- END OF HEADER --------------------------------
  37  ?>
  38  
  39  
  40  <?php
  41  // ------------------------- BODY HEADER INCLUDED HERE --------------------------
  42  skin_include( '_body_header.inc.php' );
  43  // Note: You can customize the default BODY header by copying the generic
  44  // /skins/_body_footer.inc.php file into the current skin folder.
  45  // ------------------------------- END OF HEADER --------------------------------
  46  ?>
  47  
  48  
  49  <div class="top_menu">
  50      <ul>
  51      <?php
  52          // ------------------------- "Menu" CONTAINER EMBEDDED HERE --------------------------
  53          // Display container and contents:
  54          skin_container( NT_('Menu'), array(
  55                  // The following params will be used as defaults for widgets included in this container:
  56                  'block_start' => '',
  57                  'block_end' => '',
  58                  'block_display_title' => false,
  59                  'list_start' => '',
  60                  'list_end' => '',
  61                  'item_start' => '<li>',
  62                  'item_end' => '</li>',
  63              ) );
  64          // ----------------------------- END OF "Menu" CONTAINER -----------------------------
  65      ?>
  66      </ul>
  67  </div>
  68  
  69  
  70  <div id="content" class="widecolumn">
  71  
  72  
  73  <?php
  74      // ------------------------- MESSAGES GENERATED FROM ACTIONS -------------------------
  75      messages( array(
  76              'block_start' => '<div class="action_messages">',
  77              'block_end'   => '</div>',
  78          ) );
  79      // --------------------------------- END OF MESSAGES ---------------------------------
  80  ?>
  81  
  82  
  83  <?php
  84      // ------------------- PREV/NEXT POST LINKS (SINGLE POST MODE) -------------------
  85      item_prevnext_links( array(
  86              'block_start' => '<table class="prevnext_post"><tr>',
  87              'prev_start'  => '<td>',
  88              'prev_end'    => '</td>',
  89              'next_start'  => '<td class="right">',
  90              'next_end'    => '</td>',
  91              'block_end'   => '</tr></table>',
  92          ) );
  93      // ------------------------- END OF PREV/NEXT POST LINKS -------------------------
  94  ?>
  95  
  96  
  97  <?php
  98  // Display message if no post:
  99  display_if_empty();
 100  
 101  echo '<div id="styled_content_block">'; // Beginning of posts display
 102  while( $Item = & mainlist_get_item() )
 103  {    // For each blog post, do everything below up to the closing curly brace "}"
 104      ?>
 105  
 106      <?php
 107          $Item->locale_temp_switch(); // Temporarily switch to post locale (useful for multilingual blogs)
 108      ?>
 109  
 110      <div id="<?php $Item->anchor_id() ?>" class="post post<?php $Item->status_raw() ?>" lang="<?php $Item->lang() ?>">
 111          <?php
 112          if( $Item->status != 'published' )
 113          {
 114              $Item->status( array( 'format' => 'styled' ) );
 115          }
 116          ?>
 117          <h2><?php
 118              $Item->title( array(
 119                      'link_type' => 'permalink'
 120                  ) );
 121          ?></h2>
 122  
 123          <?php
 124              // ---------------------- POST CONTENT INCLUDED HERE ----------------------
 125              skin_include( '_item_content.inc.php', array(
 126                      'image_size'    =>    'fit-400x320',
 127                  ) );
 128              // Note: You can customize the default item feedback by copying the generic
 129              // /skins/_item_feedback.inc.php file into the current skin folder.
 130              // -------------------------- END OF POST CONTENT -------------------------
 131          ?>
 132  
 133      <?php
 134        // ------------------------- "Item - Single" CONTAINER EMBEDDED HERE --------------------------
 135        // WARNING: EXPERIMENTAL -- NOT RECOMMENDED FOR PRODUCTION -- MAY CHANGE DRAMATICALLY BEFORE RELEASE.
 136        // Display container contents:
 137        skin_container( /* TRANS: Widget container name */ NT_('Item Single'), array(
 138            // The following (optional) params will be used as defaults for widgets included in this container:
 139            // This will enclose each widget in a block:
 140            'block_start' => '<div class="$wi_class$">',
 141            'block_end' => '</div>',
 142            // This will enclose the title of each widget:
 143            'block_title_start' => '<h3>',
 144            'block_title_end' => '</h3>',
 145            // If a widget displays a list, this will enclose that list:
 146            'list_start' => '<ul>',
 147            'list_end' => '</ul>',
 148            // This will enclose each item in a list:
 149            'item_start' => '<li>',
 150            'item_end' => '</li>',
 151            // This will enclose sub-lists in a list:
 152            'group_start' => '<ul>',
 153            'group_end' => '</ul>',
 154            // This will enclose (foot)notes:
 155            'notes_start' => '<div class="notes">',
 156            'notes_end' => '</div>',
 157          ) );
 158        // ----------------------------- END OF "Sidebar" CONTAINER -----------------------------
 159      ?>
 160  
 161          <p class="postmetadata alt">
 162              <small>
 163                  <?php
 164                      $Item->author( array(
 165                              'link_text'    => 'only_avatar',
 166                              'link_rel'     => 'nofollow',
 167                              'thumb_size'   => 'crop-top-32x32',
 168                              'thumb_class'  => 'leftmargin',
 169                          ) );
 170                  ?>
 171                  <?php
 172                      if( $Skin->get_setting( 'display_post_date') )
 173                      {    // We want to display the post date:
 174                          $Item->issue_time( array(
 175                                  'before'      => /* TRANS: date */ T_('This entry was posted on '),
 176                                  'time_format' => 'F jS, Y',
 177                              ) );
 178                          $Item->issue_time( array(
 179                                  'before'      => /* TRANS: time */ T_('at '),
 180                              ) );
 181                          $Item->author( array(
 182                                  'before'    => T_('by '),
 183                                  'link_text' => 'preferredname',
 184                              ) );
 185                      }
 186                      else
 187                      {
 188                          $Item->author( array(
 189                                  'before'    => T_('This entry was posted by '),
 190                                  'link_text' => 'preferredname',
 191                              ) );
 192                      }
 193                  ?>
 194                  <?php
 195                      $Item->categories( array(
 196                          'before'          => ' '.T_('and is filed under').' ',
 197                          'after'           => '.',
 198                          'include_main'    => true,
 199                          'include_other'   => true,
 200                          'include_external'=> true,
 201                          'link_categories' => true,
 202                      ) );
 203                  ?>
 204  
 205                  <?php
 206                      // List all tags attached to this post:
 207                      $Item->tags( array(
 208                              'before' =>         ' '.T_('Tags').': ',
 209                              'after' =>          ' ',
 210                              'separator' =>      ', ',
 211                          ) );
 212                  ?>
 213  
 214                  <!-- You can follow any responses to this entry through the RSS feed. -->
 215                  <?php
 216                      $Item->edit_link( array( // Link to backoffice for editing
 217                              'before'    => '',
 218                              'after'     => '',
 219                          ) );
 220                  ?>
 221              </small>
 222          </p>
 223  
 224      </div>
 225  
 226  
 227      <?php
 228          // ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------
 229          skin_include( '_item_feedback.inc.php', array(
 230                  'before_section_title' => '<h3>',
 231                  'after_section_title'  => '</h3>',
 232                  'author_link_text' => 'preferredname',
 233              ) );
 234          // Note: You can customize the default item feedback by copying the generic
 235          // /skins/_item_feedback.inc.php file into the current skin folder.
 236          // ---------------------- END OF FEEDBACK (COMMENTS/TRACKBACKS) ---------------------
 237      ?>
 238  
 239      <?php
 240      locale_restore_previous();    // Restore previous locale (Blog locale)
 241  }
 242  echo '</div>'; // End of posts display
 243  ?>
 244  
 245  </div>
 246  
 247  
 248  <?php
 249  // ------------------------- BODY FOOTER INCLUDED HERE --------------------------
 250  skin_include( '_body_footer.inc.php' );
 251  // Note: You can customize the default BODY footer by copying the
 252  // _body_footer.inc.php file into the current skin folder.
 253  // ------------------------------- END OF FOOTER --------------------------------
 254  ?>
 255  
 256  
 257  <?php
 258  // ------------------------- HTML FOOTER INCLUDED HERE --------------------------
 259  skin_include( '_html_footer.inc.php' );
 260  // Note: You can customize the default HTML footer by copying the
 261  // _html_footer.inc.php file into the current skin folder.
 262  // ------------------------------- END OF FOOTER --------------------------------
 263  ?>

title

Description

title

Description

title

Description

title

title

Body