b2evolution PHP Cross Reference Blogging Systems

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

title

Description

title

Description

title

Description

title

title

Body