b2evolution PHP Cross Reference Blogging Systems

Source: /skins/photoblog/_item_block.inc.php - 197 lines - 6382 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          'item_class'             => 'bPost',
  22          'item_status_class'      => 'bPost',
  23          'content_mode'           => 'full', // We want regular "full" content, even in category browsing: i-e no excerpt or thumbnail
  24          'image_size'               =>    '', // Do not display images in content block - Image is handled separately
  25          'url_link_text_template' => '', // link will be displayed (except player if podcast)
  26      ), $params );
  27  
  28  ?>
  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          // Display images that are linked to this post:
  38          $Item->images( array(
  39                  'before' =>              '<div class="bImages">',
  40                  'before_image' =>        '<div class="image_block">',
  41                  'before_image_legend' => '<div class="image_legend">',
  42                  'after_image_legend' =>  '</div>',
  43                  'after_image' =>         '</div>',
  44                  'after' =>               '</div>',
  45                  'image_size' =>          'fit-720x500',
  46                  /* Comment the above line to use the default image size
  47                   * (fit-720x500). Possible values for the image_size
  48                   * parameter are:
  49                   * fit-720x500, fit-640x480, fit-520x390, fit-400x320,
  50                   * fit-320x320, fit-160x160, fit-160x120, fit-80x80,
  51                   * crop-80x80, crop-64x64, crop-48x48, crop-32x32,
  52                   * crop-15x15
  53                   * See also the $thumbnail_sizes array in conf/_advanced.php.
  54                   */
  55                  'restrict_to_image_position' => 'teaser',    // Optionally restrict to files/images linked to specific position: 'teaser'|'aftermore'
  56              ) );
  57      ?>
  58  
  59  
  60      <div class="bDetails">
  61  
  62          <div class="bSmallHead">
  63  
  64              <?php
  65                  if( $Item->status != 'published' )
  66                  {
  67                      $Item->status( array( 'format' => 'styled' ) );
  68                  }
  69                  // Link to comments, trackbacks, etc.:
  70                  $Item->feedback_link( array(
  71                                  'type' => 'feedbacks',
  72                                  'link_before' => '<div class="action_right">',
  73                                  'link_after' => '</div>',
  74                                  'link_text_zero' => get_icon( 'nocomment' ),
  75                                  'link_text_one' => get_icon( 'comments' ),
  76                                  'link_text_more' => get_icon( 'comments' ),
  77                                  'link_title' => '#',
  78                                  'use_popup' => true,
  79                              ) );
  80  
  81                  $Item->permanent_link( array(
  82                          'before'    => '<div class="action_right">',
  83                          'after'     => '</div>',
  84                          'text' => T_('Permalink'),
  85                      ) );
  86              ?>
  87  
  88              <?php
  89                  $Item->edit_link( array( // Link to backoffice for editing
  90                          'before'    => '<div class="action_right">',
  91                          'after'     => '</div>',
  92                          'text'      => T_('Edit...'),
  93              'title'     => T_('Edit title/description...'),
  94                      ) );
  95              ?>
  96  
  97              <h3 class="bTitle linked"><?php
  98                  $Item->title( array(
  99                      'link_type' => 'permalink'
 100                      ) );
 101              ?></h3>
 102  
 103              <?php
 104                  $Item->issue_date( array(
 105                          'before'      => '<span class="timestamp">',
 106                          'after'       => '</span>',
 107                          'date_format' => locale_datefmt().' H:i',
 108                      ) );
 109              ?>
 110  
 111          </div>
 112  
 113          <?php
 114              // Display images that are linked as "after more" on this post:
 115              // We are actually displaying them before more here, but this is a special photo skin.
 116              $Item->images( array(
 117                      'before' =>              '<div class="bImages">',
 118                      'before_image' =>        '<div class="image_block">',
 119                      'before_image_legend' => '<div class="image_legend">',
 120                      'after_image_legend' =>  '</div>',
 121                      'after_image' =>         '</div>',
 122                      'after' =>               '</div>',
 123                      'image_size' =>          'fit-520x390',
 124                      'restrict_to_image_position' => 'aftermore',    // Optionally restrict to files/images linked to specific position: 'teaser'|'aftermore'
 125                  ) );
 126          ?>
 127  
 128          <?php
 129              // ---------------------- POST CONTENT INCLUDED HERE ----------------------
 130              // Note: at the top of this file, we set: 'image_size' =>    '', // Do not display images in content block - Image is handled separately
 131              skin_include( '_item_content.inc.php', $params );
 132              // Note: You can customize the default item feedback by copying the generic
 133              // /skins/_item_feedback.inc.php file into the current skin folder.
 134              // -------------------------- END OF POST CONTENT -------------------------
 135          ?>
 136  
 137          <div class="bSmallPrint">
 138          <?php
 139              $Item->author( array(
 140                      'before'    => T_('By').' ',
 141                      'after'     => ' &bull; ',
 142                      'link_text' => 'preferredname',
 143                  ) );
 144          ?>
 145  
 146          <?php
 147              $Item->categories( array(
 148                  'before'          => T_('Albums').': ',
 149                  'after'           => ' ',
 150                  'include_main'    => true,
 151                  'include_other'   => true,
 152                  'include_external'=> true,
 153                  'link_categories' => true,
 154              ) );
 155          ?>
 156  
 157          <?php
 158              // List all tags attached to this post:
 159              $Item->tags( array(
 160                      'before' =>         ' &bull; '.T_('Tags').': ',
 161                      'after' =>          ' ',
 162                      'separator' =>      ', ',
 163                  ) );
 164          ?>
 165  
 166          <?php
 167              // URL link, if the post has one:
 168              $Item->url_link( array(
 169                      'before'        => ' &bull; '.T_('Link').': ',
 170                      'after'         => ' ',
 171                      'text_template' => '$url$',
 172                      'url_template'  => '$url$',
 173                      'target'        => '',
 174                      'podcast'       => false,        // DO NOT display mp3 player if post type is podcast
 175                  ) );
 176          ?>
 177  
 178          </div>
 179      </div>
 180  
 181      <?php
 182          // ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------
 183          skin_include( '_item_feedback.inc.php', array(
 184                  'before_section_title' => '<h4>',
 185                  'after_section_title'  => '</h4>',
 186                  'author_link_text' => 'preferredname',
 187              ) );
 188          // Note: You can customize the default item feedback by copying the generic
 189          // /skins/_item_feedback.inc.php file into the current skin folder.
 190          // ---------------------- END OF FEEDBACK (COMMENTS/TRACKBACKS) ---------------------
 191      ?>
 192  
 193      <?php
 194          locale_restore_previous();    // Restore previous locale (Blog locale)
 195      ?>
 196  
 197  </div>

title

Description

title

Description

title

Description

title

title

Body