b2evolution PHP Cross Reference Blogging Systems

Source: /skins/basic/_item_content.inc.php - 86 lines - 2701 bytes - Text - Print

Description: This is the template that displays the contents for a post (images, teaser, more link, body, etc...)

   1  <?php
   2  /**
   3   * This is the template that displays the contents for a post
   4   * (images, teaser, more link, body, etc...)
   5   *
   6   * This file is not meant to be called directly.
   7   * It is meant to be called by an include in the main.page.php template (or other templates)
   8   *
   9   * b2evolution - {@link http://b2evolution.net/}
  10   *
  11   * @package evoskins
  12   * @subpackage basic
  13   */
  14  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  15  
  16  global $more;
  17  
  18  // Display images that are linked to this post:
  19  $Item->images( array(
  20          'before' =>              '<table cellspacing="5">',
  21          'before_image' =>        '<tr><td align="center">',
  22          'before_image_legend' => '<br><small>',
  23          'after_image_legend' =>  '</small>',
  24          'after_image' =>         '</td></tr>',
  25          'after' =>               '</table>',
  26          'image_size' =>          'fit-400x320',
  27          // Optionally restrict to files/images linked to specific position: 'teaser'|'aftermore'
  28          'restrict_to_image_position' => $Item->has_content_parts($params) ? 'teaser' : '',
  29      ) );
  30  ?>
  31  
  32  <div>
  33      <?php
  34          // Increment view count of first post on page:
  35          $Item->count_view( array(
  36                  'allow_multiple_counts_per_page' => false,
  37              ) );
  38  
  39          // Display CONTENT:
  40          $Item->content_teaser( array(
  41                  'before'      => '',
  42                  'after'       => '',
  43              ) );
  44          $Item->more_link();
  45  
  46          if( $more )
  47          {    // Display images that are linked after "more" in this post:
  48              $Item->images( array(
  49                      'before' =>              '<table cellspacing="5">',
  50                      'before_image' =>        '<tr><td align="center">',
  51                      'before_image_legend' => '<br><small>',
  52                      'after_image_legend' =>  '</small>',
  53                      'after_image' =>         '</td></tr>',
  54                      'after' =>               '</table>',
  55                      'image_size' =>          'fit-400x320',
  56                      'restrict_to_image_position' => 'aftermore',    // Optionally restrict to files/images linked to specific position: 'teaser'|'aftermore'
  57                  ) );
  58          }
  59          $Item->content_extension( array(
  60                  'before'      => '',
  61                  'after'       => '',
  62                  'image_size' =>          'fit-400x320',
  63              ) );
  64  
  65          // Links to post pages (for multipage posts):
  66          $Item->page_links( array(
  67                  'before'      => '<p class="right">'.T_('Pages:').' ',
  68                  'separator'   => ' &middot; ',
  69              ) );
  70  
  71          // Display Item footer text (text can be edited in Blog Settings):
  72          $Item->footer( array(
  73                  'mode'        => '#',                // Will detect 'single' from $disp automatically
  74                  'block_start' => '<div class="item_footer">',
  75                  'block_end'   => '</div>',
  76              ) );
  77  
  78          // Display location info
  79          $Item->location( '<div class="item_location"><strong>'.T_('Location').': </strong>', '</div>' );
  80  
  81          if( $disp == 'single' )
  82          {    // Display custom fields
  83              $Item->custom_fields();
  84          }
  85      ?>
  86  </div>

title

Description

title

Description

title

Description

title

title

Body