b2evolution PHP Cross Reference Blogging Systems

Source: /skins/custom/_item_block.inc.php - 170 lines - 4370 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   */
  14  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  15  
  16  global $Item;
  17  
  18  // Default params:
  19  $params = array_merge( array(
  20          'feature_block'   => false,
  21          'content_mode'    => 'auto',        // 'auto' will auto select depending on $disp-detail
  22          'item_class'      => 'bPost',
  23          'image_size'        => 'fit-400x320',
  24      ), $params );
  25  
  26  echo '<div id="styled_content_block">'; // Beginning of post display
  27  ?>
  28  
  29  <div id="<?php $Item->anchor_id() ?>" class="<?php $Item->div_classes( $params ) ?>" lang="<?php $Item->lang() ?>">
  30  
  31      <?php
  32          $Item->locale_temp_switch(); // Temporarily switch to post locale (useful for multilingual blogs)
  33      ?>
  34  
  35      <div class="bSmallHead">
  36      <?php
  37          if( $Item->status != 'published' )
  38          {
  39              $Item->status( array( 'format' => 'styled' ) );
  40          }
  41          // Permalink:
  42          $Item->permanent_link( array(
  43                  'text' => '#icon#',
  44              ) );
  45  
  46          if( $Skin->get_setting( 'display_post_time') )
  47          {    // We want to display the post time:
  48              $Item->issue_time( array(
  49                      'before'    => ' ',
  50                      'after'     => ', ',
  51                  ) );
  52          }
  53  
  54          $Item->author( array(
  55              'before'    => ' '.T_('by').' ',
  56              'after'     => '',
  57              'link_text' => 'preferredname',
  58          ) );
  59  
  60          $Item->msgform_link();
  61          echo ', ';
  62  
  63          $Item->wordcount();
  64          echo ' '.T_('words');
  65          // echo ', ';
  66          // $Item->views();
  67  
  68          $Item->locale_flag( array(
  69                  'before'    => ' &nbsp; ',
  70                  'after'     => '',
  71              ) );
  72      ?>
  73  
  74      <br />
  75  
  76      <?php
  77          $Item->categories( array(
  78              'before'          => T_('Categories').': ',
  79              'after'           => ' ',
  80              'include_main'    => true,
  81              'include_other'   => true,
  82              'include_external'=> true,
  83              'link_categories' => true,
  84          ) );
  85      ?>
  86      </div>
  87  
  88      <h3 class="bTitle linked"><?php
  89          $Item->title( array(
  90                  'link_type' => 'permalink'
  91              ) );
  92      ?></h3>
  93  
  94      <?php
  95          // ---------------------- POST CONTENT INCLUDED HERE ----------------------
  96          skin_include( '_item_content.inc.php', $params );
  97          // Note: You can customize the default item feedback by copying the generic
  98          // /skins/_item_content.inc.php file into the current skin folder.
  99          // -------------------------- END OF POST CONTENT -------------------------
 100      ?>
 101  
 102      <?php
 103          // List all tags attached to this post:
 104          $Item->tags( array(
 105                  'before' =>         '<div class="bSmallPrint">'.T_('Tags').': ',
 106                  'after' =>          '</div>',
 107                  'separator' =>      ', ',
 108              ) );
 109      ?>
 110  
 111      <div class="bSmallPrint">
 112          <?php
 113              // Permalink:
 114              $Item->permanent_link( array(
 115                      'class' => 'permalink_right',
 116                  ) );
 117  
 118              // Link to comments, trackbacks, etc.:
 119              $Item->feedback_link( array(
 120                              'type' => 'comments',
 121                              'link_before' => '',
 122                              'link_after' => '',
 123                              'link_text_zero' => '#',
 124                              'link_text_one' => '#',
 125                              'link_text_more' => '#',
 126                              'link_title' => '#',
 127                              'use_popup' => false,
 128                          ) );
 129  
 130              // Link to comments, trackbacks, etc.:
 131              $Item->feedback_link( array(
 132                              'type' => 'trackbacks',
 133                              'link_before' => ' &bull; ',
 134                              'link_after' => '',
 135                              'link_text_zero' => '#',
 136                              'link_text_one' => '#',
 137                              'link_text_more' => '#',
 138                              'link_title' => '#',
 139                              'use_popup' => false,
 140                          ) );
 141  
 142              $Item->edit_link( array( // Link to backoffice for editing
 143                      'before'    => ' &bull; ',
 144                      'after'     => '',
 145                  ) );
 146          ?>
 147      </div>
 148  
 149      <?php
 150          // ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------
 151          skin_include( '_item_feedback.inc.php', array(
 152                  'before_section_title' => '<h4>',
 153                  'after_section_title'  => '</h4>',
 154                  'author_link_text'     => 'preferredname',
 155              ) );
 156          // Note: You can customize the default item feedback by copying the generic
 157          // /skins/_item_feedback.inc.php file into the current skin folder.
 158          // ---------------------- END OF FEEDBACK (COMMENTS/TRACKBACKS) ---------------------
 159      ?>
 160  
 161      <?php
 162          locale_restore_previous();    // Restore previous locale (Blog locale)
 163      ?>
 164  </div>
 165  
 166  <?php
 167  
 168  echo '</div>'; // End of post display 
 169  
 170  ?>

title

Description

title

Description

title

Description

title

title

Body