b2evolution PHP Cross Reference Blogging Systems

Source: /skins/colourise/_item_block.inc.php - 163 lines - 4634 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  
  26      ), $params );
  27  
  28  echo '<div id="styled_content_block">'; // Beginning of posts display
  29  ?>
  30  <div id="<?php $Item->anchor_id() ?>" class="<?php $Item->div_classes( $params ) ?>" lang="<?php $Item->lang() ?>">
  31  
  32      <?php
  33          $Item->locale_temp_switch(); // Temporarily switch to post locale (useful for multilingual blogs)
  34      ?>
  35  
  36      <?php
  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="floatright">',
  41                      'after'     => '</div>',
  42                  ) );
  43          }
  44          if( $Item->status != 'published' )
  45          {
  46              $Item->status( array( 'format' => 'styled' ) );
  47          }
  48      ?>
  49  
  50      <h2><?php $Item->title(); ?></h2>
  51  
  52      <?php
  53          if( (!$Item->is_intro()) && $Skin->get_setting( 'display_post_date') )
  54          {    // Display only if we're *not* displaying an intro post AND we want to see the date:
  55              $Item->issue_time( array(
  56                      'before'      => '<small>',
  57                      'after'       => '</small>',
  58                      'time_format' => 'F jS, Y',
  59                  ) );
  60          }
  61      ?>
  62      <p class="post-info">
  63          <?php
  64              $Item->author( array(
  65                  'before'       => T_('Posted by '),
  66                  'after'        => ' ',
  67                  'link_to'      => 'userpage',
  68                  'link_text'    => 'preferredname',
  69                  'link_rel'     => '',
  70                  'link_class'   => '',
  71                  'thumb_size'   => 'crop-top-32x32',
  72                  'thumb_class'  => ''
  73              ) );
  74  
  75              $Item->categories( array(
  76                  'before'          => T_('Filed under').' ',
  77                  'after'           => ' ',
  78                  'include_main'    => true,
  79                  'include_other'   => true,
  80                  'include_external'=> true,
  81                  'link_categories' => true,
  82              ) );
  83          ?>
  84      </p>
  85      <?php
  86          // ---------------------- POST CONTENT INCLUDED HERE ----------------------
  87          skin_include( '_item_content.inc.php', $params );
  88          // Note: You can customize the default item feedback by copying the generic
  89          // /skins/_item_content.inc.php file into the current skin folder.
  90          // -------------------------- END OF POST CONTENT -------------------------
  91      ?>
  92  
  93      <?php
  94          // List all tags attached to this post:
  95          $Item->tags( array(
  96                  'before' =>         '<div class="posttags">'.T_('Tags').': ',
  97                  'after' =>          '</div>',
  98                  'separator' =>      ', ',
  99              ) );
 100      ?>
 101  
 102      <?php
 103          if( ! $Item->is_intro() )
 104          {    // Display only if we're not displaying an intro post:
 105              ?>
 106              <p class="postmeta">
 107                  
 108                  <?php
 109                      $Item->more_link( array(
 110                              'force_more'  => false,
 111                              'before'      => '',
 112                              'after'       => ' | ',
 113                              'link_text'   => 'Read more',
 114                              'anchor_text' => '#',
 115                              'disppage'    => '#',
 116                              'format'      => 'htmlbody'
 117                          ) );
 118                  
 119                      $Item->edit_link( array( // Link to backoffice for editing
 120                              'before'    => '',
 121                              'after'     => ' | ',
 122                          ) );
 123                      
 124                      // Link to comments, trackbacks, etc.:
 125                      $Item->feedback_link( array(
 126                              'type' => 'comments',
 127                              'link_before' => '',
 128                              'link_after' => '',
 129                              'link_text_zero' => '#',
 130                              'link_text_one' => '#',
 131                              'link_text_more' => '#',
 132                              'link_title' => '#',
 133                              'use_popup' => false,
 134                          ) );
 135                          
 136                      $Item->issue_time( array(
 137                              'before'    => ' | ',
 138                              'after'     => ' ',
 139                          ) );
 140                          
 141                  ?>
 142                  </p>
 143              <?php
 144          }
 145      ?>
 146      <?php
 147          // ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------
 148          skin_include( '_item_feedback.inc.php', array(
 149                  'before_section_title' => '<h4>',
 150                  'after_section_title'  => '</h4>',
 151                  'author_link_text'     => 'preferredname',
 152              ) );
 153          // Note: You can customize the default item feedback by copying the generic
 154          // /skins/_item_feedback.inc.php file into the current skin folder.
 155          // ---------------------- END OF FEEDBACK (COMMENTS/TRACKBACKS) ---------------------
 156      ?>
 157  </div>
 158  
 159  <?php
 160  locale_restore_previous();    // Restore previous locale (Blog locale)
 161  
 162  echo '</div>'; // End of posts display
 163  ?>

title

Description

title

Description

title

Description

title

title

Body