b2evolution PHP Cross Reference Blogging Systems

Source: /skins/basic/index.main.php - 302 lines - 9272 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   * It is used to display the blog when no specific page template is available to handle the request.
   9   *
  10   * @package evoskins
  11   * @subpackage basic
  12   *
  13   * @version $Id: index.main.php 4275 2013-07-17 10:52:24Z yura $
  14   */
  15  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  16  
  17  if( version_compare( $app_version, '2.4.1' ) < 0 )
  18  { // 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.
  19      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>.' );
  20  }
  21  
  22  // This is the main template; it may be used to display very different things.
  23  // Do inits depending on current $disp:
  24  skin_init( $disp );
  25  
  26  require_js( 'ajax.js', 'blog' );    // Functions to work with AJAX response data
  27  
  28  // ----------------------------- HEADER BEGINS HERE ------------------------------
  29  ?>
  30  <html>
  31  <head>
  32      <?php skin_content_meta(); /* Charset for static pages */ ?>
  33      <?php $Plugins->trigger_event( 'SkinBeginHtmlHead' ); ?>
  34      <title><?php
  35          // ------------------------- TITLE FOR THE CURRENT REQUEST -------------------------
  36          request_title( array(
  37              'auto_pilot'      => 'seo_title',
  38          ) );
  39          // ------------------------------ END OF REQUEST TITLE -----------------------------
  40      ?></title>
  41      <?php skin_base_tag(); /* Base URL for this skin. You need this to fix relative links! */ ?>
  42      <meta name="generator" content="b2evolution <?php echo $app_version ?>" /> <!-- Please leave this for stats -->
  43      <?php include_headlines() ?>
  44  </head>
  45  <body>
  46  <?php
  47  // -------------------------------- END OF HEADER --------------------------------
  48  ?>
  49  
  50      <?php
  51          // Display container and contents:
  52          skin_container( NT_('Page Top'), array(
  53                  // The following params will be used as defaults for widgets included in this container:
  54                  'block_start' => '<div class="$wi_class$">',
  55                  'block_end' => '</div>',
  56                  'block_display_title' => false,
  57                  'list_start' =>  T_('Select blog:').' ',
  58                  'list_end' => '',
  59                  'item_start' => ' [',
  60                  'item_end' => '] ',
  61                  'item_selected_start' => ' [<strong>',
  62                  'item_selected_end' => '</strong>] ',
  63              ) );
  64      ?>
  65  
  66  
  67      <hr>
  68      <div align="center">
  69          <h1><?php $Blog->name() ?></h1>
  70          <?php
  71              $Blog->tagline( array(
  72                      'before'    => '<p>',
  73                      'after'     => '</p>',
  74                  ) );
  75          ?>
  76      </div>
  77      <?php
  78          $Blog->longdesc( array(
  79                  'before'    => '<hr><small>',
  80                  'after'     => '</small>',
  81              ) );
  82      ?>
  83  
  84      <hr>
  85  
  86      <?php
  87      // ------------------------- MESSAGES GENERATED FROM ACTIONS -------------------------
  88      messages( array(
  89              'block_start' => '<div class="action_messages">',
  90              'block_end'   => '</div>',
  91          ) );
  92      // --------------------------------- END OF MESSAGES ---------------------------------
  93      ?>
  94  
  95    <?php
  96          // ------------------- PREV/NEXT POST LINKS (SINGLE POST MODE) -------------------
  97          item_prevnext_links( array(
  98                  'block_start' => '',
  99                  'prev_start'  => '',
 100                  'prev_end'    => ' :',
 101                  'next_start'  => ': ',
 102                  'next_end'    => '',
 103                  'block_end'   => '',
 104              ) );
 105          // ------------------------- END OF PREV/NEXT POST LINKS -------------------------
 106      ?>
 107  
 108      <?php
 109          // ------------------------- TITLE FOR THE CURRENT REQUEST -------------------------
 110          request_title( array(
 111                  'title_before'=> '<h2>',
 112                  'title_after' => '</h2>',
 113                  'title_none'  => '',
 114                  'glue'        => ' - ',
 115                  'title_single_disp' => true,
 116                  'format'      => 'htmlbody',
 117              ) );
 118          // ------------------------------ END OF REQUEST TITLE -----------------------------
 119      ?>
 120  
 121      <?php    // ---------------------------------- START OF POSTS --------------------------------------
 122          // Display message if no post:
 123          display_if_empty();
 124  
 125          while( $Item = & mainlist_get_item() )
 126          {    // For each blog post, do everything below up to the closing curly brace "}"
 127          ?>
 128  
 129              <?php
 130              // ------------------------------ DATE SEPARATOR ------------------------------
 131              $MainList->date_if_changed( array(
 132                      'before'      => '<h2>',
 133                      'after'       => '</h2>',
 134                      'date_format' => '#',
 135                  ) );
 136              ?>
 137  
 138              <div id="<?php $Item->anchor_id() ?>" lang="<?php $Item->lang() ?>">
 139  
 140              <?php
 141                  $Item->locale_temp_switch(); // Temporarily switch to post locale (useful for multilingual blogs)
 142              ?>
 143  
 144              <h3>
 145                  <?php $Item->issue_time(); ?>
 146                  <a href="<?php $Item->permanent_url() ?>" title="<?php echo T_('Permanent link to full entry') ?>"><img src="img/icon_minipost.gif" alt="Permalink" width="12" height="9" border="0" align="absmiddle" /></a>
 147                  <?php
 148                      $Item->title( array(
 149                              'link_type' => 'permalink'
 150                          ) );
 151                  ?>
 152              </h3>
 153  
 154              <blockquote>
 155  
 156                  <?php
 157                      $Item->categories( array(
 158                          'before'          => '<small>'.T_('Categories').': ',
 159                          'after'           => '</small>',
 160                          'include_main'    => true,
 161                          'include_other'   => true,
 162                          'include_external'=> true,
 163                          'link_categories' => true,
 164                      ) );
 165  
 166                      if( $Item->status != 'published' )
 167                      {
 168                          $Item->status( array( 'before' => ' &bull; <small>'.T_('Status').': ', 'after' => '</small>' ) );
 169                      }
 170                  ?>
 171  
 172                  <?php
 173                      // ---------------------- POST CONTENT INCLUDED HERE ----------------------
 174                      skin_include( '_item_content.inc.php', array(
 175                              'image_size'    =>    'fit-400x320',
 176                          ) );
 177                      // Note: You can customize the default item feedback by copying the generic
 178                      // /skins/_item_feedback.inc.php file into the current skin folder.
 179                      // -------------------------- END OF POST CONTENT -------------------------
 180                  ?>
 181  
 182                  <small>
 183                      <?php
 184                          // Link to comments, trackbacks, etc.:
 185                          $Item->feedback_link( array(
 186                                          'type' => 'feedbacks',
 187                                          'link_before' => '',
 188                                          'link_after' => ' &bull; ',
 189                                          'link_text_zero' => '#',
 190                                          'link_text_one' => '#',
 191                                          'link_text_more' => '#',
 192                                          'link_title' => '#',
 193                                          'use_popup' => false,
 194                                      ) );
 195                      ?>
 196  
 197                      <?php
 198                          $Item->edit_link( array( // Link to backoffice for editing
 199                                  'before'    => '',
 200                                  'after'     => ' &bull; ',
 201                              ) );
 202                      ?>
 203  
 204                      <?php $Item->permanent_link(); ?>
 205                  </small>
 206  
 207              </blockquote>
 208  
 209              <?php
 210                  // ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------
 211                  skin_include( '_item_feedback.inc.php', array(
 212                          'before_section_title' => '<h4>',
 213                          'after_section_title'  => '</h4>',
 214                      ) );
 215                  // Note: You can customize the default item feedback by copying the generic
 216                  // /skins/_item_feedback.inc.php file into the current skin folder.
 217                  // ---------------------- END OF FEEDBACK (COMMENTS/TRACKBACKS) ---------------------
 218              ?>
 219  
 220              <?php
 221                  locale_restore_previous();    // Restore previous locale (Blog locale)
 222              ?>
 223  
 224              </div>
 225  
 226      <?php } // --------------------------------- END OF POSTS ----------------------------------- ?>
 227  
 228  
 229      <?php
 230          // -------------- MAIN CONTENT TEMPLATE INCLUDED HERE (Based on $disp) --------------
 231          skin_include( '$disp$', array(
 232                  'disp_posts'  => '',        // We already handled this case above
 233                  'disp_single' => '',        // We already handled this case above
 234                  'disp_page'   => '',        // We already handled this case above
 235                  'author_link_text' => 'preferredname',
 236              ) );
 237          // Note: you can customize any of the sub templates included here by
 238          // copying the matching php file into your skin directory.
 239          // ------------------------- END OF MAIN CONTENT TEMPLATE ---------------------------
 240      ?>
 241  
 242  
 243      <hr>
 244  
 245  
 246      <div align="center">
 247          <?php
 248              // -------------------- PREV/NEXT PAGE LINKS (POST LIST MODE) --------------------
 249              mainlist_page_links( array(
 250                      'block_start' => '<p class="center"><strong>',
 251                      'block_end' => '</strong></p>',
 252                      'links_format' => '$prev$ :: $next$',
 253                     'prev_text' => '&lt;&lt; '.T_('Previous'),
 254                     'next_text' => T_('Next').' &gt;&gt;',
 255                  ) );
 256              // ------------------------- END OF PREV/NEXT PAGE LINKS -------------------------
 257          ?>
 258  
 259          <strong>
 260          <a href="<?php $Blog->disp( 'arcdirurl', 'raw' ) ?>"><?php echo T_('Archives') ?></a>
 261          </strong>
 262  
 263          <p>
 264          <?php
 265              // Display a link to contact the owner of this blog (if owner accepts messages):
 266              $Blog->contact_link( array(
 267                      'before'      => ' [',
 268                      'after'       => '] ',
 269                      'text'   => T_('Contact'),
 270                      'title'  => T_('Send a message to the owner of this blog...'),
 271                  ) );
 272          ?>
 273  
 274          <?php
 275              user_login_link( ' [', '] ', '', '#', 'sidebar login link' );
 276              user_register_link( ' [', '] ', '', '#', false, 'sidebar register link' );
 277              user_admin_link( ' [', '] ' );
 278              user_logout_link( ' [', '] ' );
 279          ?>
 280          </p>
 281      </div>
 282  
 283      <hr>
 284  
 285      <?php
 286          // Please help us promote b2evolution and leave this logo on your blog:
 287          powered_by( array(
 288                  'block_start' => '<div align="center">',
 289                  'block_end'   => '</div>',
 290                  // Check /rsc/img/ for other possible images -- Don't forget to change or remove width & height too
 291                  'img_url'     => '$rsc$img/powered-by-b2evolution-120t.gif',
 292                  'img_width'   => 120,
 293                  'img_height'  => 32,
 294              ) );
 295      ?>
 296  
 297      <?php
 298          $Hit->log();  // log the hit on this page
 299          debug_info();    // output debug info if requested
 300      ?>
 301  </body>
 302  </html>

title

Description

title

Description

title

Description

title

title

Body