b2evolution PHP Cross Reference Blogging Systems

Source: /skins/evopress/_item_block.inc.php - 122 lines - 3344 bytes - Text - Print

Description: This is the template that displays the item block

   1  <?php
   2  /**
   3   * This is the template that displays the item block
   4   *
   5   * This file is not meant to be called directly.
   6   * It is meant to be called by an include in the main.page.php template (or other templates)
   7   *
   8   * b2evolution - {@link http://b2evolution.net/}
   9   * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
  10   * @copyright (c)2003-2014 by Francois Planque - {@link http://fplanque.com/}
  11   *
  12   * @package evoskins
  13   * @subpackage evopress
  14   */
  15  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  16  
  17  global $Item;
  18  
  19  // Default params:
  20  $params = array_merge( array(
  21          'feature_block'   => false,
  22          'content_mode'    => 'auto',        // 'auto' will auto select depending on $disp-detail
  23          'item_class'      => 'post',
  24          'image_size'        => 'fit-400x320',
  25      ), $params );
  26  
  27  ?>
  28  <div id="<?php $Item->anchor_id() ?>" class="<?php $Item->div_classes( $params ) ?>" lang="<?php $Item->lang() ?>">
  29  
  30      <?php
  31          $Item->locale_temp_switch(); // Temporarily switch to post locale (useful for multilingual blogs)
  32      ?>
  33  
  34      <?php
  35          if(    $Item->is_intro() )
  36          {    // Display edit link only if we're displaying an intro post:
  37              $Item->edit_link( array( // Link to backoffice for editing
  38                      'before'    => '<div class="floatright">',
  39                      'after'     => '</div>',
  40                  ) );
  41          }
  42          if( $Item->status != 'published' )
  43          {
  44              $Item->status( array( 'format' => 'styled' ) );
  45          }
  46      ?>
  47  
  48      <h2><?php $Item->title(); ?></h2>
  49  
  50      <?php
  51          if( (!$Item->is_intro()) && $Skin->get_setting( 'display_post_date') )
  52          {    // Display only if we're *not* displaying an intro post AND we want to see the date:
  53              $Item->issue_time( array(
  54                      'before'      => '<small>',
  55                      'after'       => '</small>',
  56                      'time_format' => 'F jS, Y',
  57                  ) );
  58          }
  59      ?>
  60  
  61      <?php
  62          // ---------------------- POST CONTENT INCLUDED HERE ----------------------
  63          skin_include( '_item_content.inc.php', $params );
  64          // Note: You can customize the default item feedback by copying the generic
  65          // /skins/_item_content.inc.php file into the current skin folder.
  66          // -------------------------- END OF POST CONTENT -------------------------
  67      ?>
  68  
  69      <?php
  70          // List all tags attached to this post:
  71          $Item->tags( array(
  72                  'before' =>         '<div class="posttags">'.T_('Tags').': ',
  73                  'after' =>          '</div>',
  74                  'separator' =>      ', ',
  75              ) );
  76      ?>
  77  
  78      <?php
  79          if( ! $Item->is_intro() )
  80          {    // Display only if we're not displaying an intro post:
  81              ?>
  82              <p class="postmetadata">
  83                  <?php
  84                      $Item->categories( array(
  85                          'before'          => T_('Posted in').' ',
  86                          'after'           => ' ',
  87                          'include_main'    => true,
  88                          'include_other'   => true,
  89                          'include_external'=> true,
  90                          'link_categories' => true,
  91                      ) );
  92                  ?>
  93  
  94                  <?php
  95                      $Item->edit_link( array( // Link to backoffice for editing
  96                              'before'    => ' | ',
  97                              'after'     => '',
  98                          ) );
  99                  ?>
 100  
 101                  <?php
 102                      // Link to comments, trackbacks, etc.:
 103                      $Item->feedback_link( array(
 104                              'type' => 'feedbacks',
 105                              'link_before' => ' | ',
 106                              'link_after' => '',
 107                              'link_text_zero' => '#',
 108                              'link_text_one' => '#',
 109                              'link_text_more' => '#',
 110                              'link_title' => '#',
 111                              'use_popup' => false,
 112                          ) );
 113                  ?>
 114                  </p>
 115              <?php
 116          }
 117      ?>
 118  </div>
 119  
 120  <?php
 121  locale_restore_previous();    // Restore previous locale (Blog locale)
 122  ?>

title

Description

title

Description

title

Description

title

title

Body