b2evolution PHP Cross Reference Blogging Systems

Source: /skins/evocamp/_item_block.inc.php - 114 lines - 3202 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 evocamp
  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      <p class="postinfo">
  51      <?php
  52          if( ! $Item->is_intro() )
  53          { // Display only if we're not displaying an intro post:
  54              $Item->author( array(
  55                  'before'    => T_('By').' ',
  56                  'after'     => ' ',
  57                  'link_text' => 'preferredname',
  58              ) );
  59              $Item->issue_time( array(
  60                      'before'      => /* TRANS: date */ T_('on '),
  61                      'after'       => '',
  62                      'time_format' => 'M j, Y',
  63                  ) );
  64              $Item->categories( array(
  65                      'before'          => ' | '.T_('In '),
  66                      'after'           => ' ',
  67                      'include_main'    => true,
  68                      'include_other'   => true,
  69                      'include_external'=> true,
  70                      'link_categories' => true,
  71                  ) );
  72              // Link to comments, trackbacks, etc.:
  73              $Item->feedback_link( array(
  74                      'type' => 'feedbacks',
  75                      'link_before' => ' | ',
  76                      'link_after' => '',
  77                      'link_text_zero' => '#',
  78                      'link_text_one' => '#',
  79                      'link_text_more' => '#',
  80                      'link_title' => '#',
  81                      'use_popup' => false,
  82                  ) );
  83              $Item->edit_link( array( // Link to backoffice for editing
  84                      'before'    => ' | ',
  85                      'after'     => '',
  86                  ) );
  87  
  88              }
  89          ?>
  90          </p>
  91          <?php
  92              // ---------------------- POST CONTENT INCLUDED HERE ----------------------
  93              skin_include( '_item_content.inc.php', $params );
  94              // Note: You can customize the default item feedback by copying the generic
  95              // /skins/_item_content.inc.php file into the current skin folder.
  96              // -------------------------- END OF POST CONTENT -------------------------
  97          ?>
  98  
  99          <?php
 100              // List all tags attached to this post:
 101              $Item->tags( array(
 102                      'before' =>         '<div class="posttags">'.T_('Tags').': ',
 103                      'after' =>          '</div>',
 104                      'separator' =>      ', ',
 105                  ) );
 106          ?>
 107  
 108  
 109      </div>
 110  
 111  <?php
 112  locale_restore_previous();    // Restore previous locale (Blog locale)
 113  
 114  ?>

title

Description

title

Description

title

Description

title

title

Body