b2evolution PHP Cross Reference Blogging Systems

Source: /skins/manual/_item_block.inc.php - 135 lines - 5123 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 manual

  14   */
  15  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  16  
  17  global $Item, $cat;
  18  global $posttypes_specialtypes;
  19  
  20  // Default params:

  21  $params = array_merge( array(
  22          'feature_block'     => false,
  23          'content_mode'      => 'auto',        // 'auto' will auto select depending on $disp-detail
  24          'item_class'        => 'bPost',
  25          'image_size'        => 'fit-640x480',
  26          'disp_comment_form' => true,
  27          'item_link_type'    => 'permalink',
  28      ), $params );
  29  
  30  echo '<div id="styled_content_block">'; // Beginning of post display

  31  if( ( $disp == 'single' ) && empty( $cat ) )
  32  { // Display breadcrumb, but only if it was not displayed yet. When category is set then breadcrumbs is already displayed.
  33      $Skin->display_breadcrumbs( $Item->main_cat_ID );
  34  }
  35  ?>
  36  
  37  <div id="<?php $Item->anchor_id() ?>" class="<?php $Item->div_classes( $params ) ?>" lang="<?php $Item->lang() ?>">
  38  
  39      <?php
  40          $Item->locale_temp_switch(); // Temporarily switch to post locale (useful for multilingual blogs)

  41      ?>
  42  
  43      <?php
  44          // ------------------- PREV/NEXT POST LINKS (SINGLE POST MODE) -------------------

  45          item_prevnext_links( array(
  46                  'block_start' => '<div class="posts_navigation">',
  47                  'separator'   => ' :: ',
  48                  'block_end'   => '</div>',
  49                  'target_blog' => $Blog->ID,    // this forces to stay in the same blog, should the post be cross posted in multiple blogs
  50                  'post_navigation' => 'same_category', // force to stay in the same category in this skin
  51              ) );
  52          // ------------------------- END OF PREV/NEXT POST LINKS -------------------------

  53  
  54      $action_links = $Item->get_edit_link( array( // Link to backoffice for editing
  55              'before' => '',
  56              'after'  => '',
  57              'text'   => $Item->is_intro() ? get_icon( 'edit' ).' '.T_('Edit Intro') : '#',
  58              'class'  => 'roundbutton roundbutton_text',
  59          ) );
  60      if( $Item->is_intro() && $Item->ptyp_ID != 1500 )
  61      { // Link to edit category
  62          $ItemChapter = & $Item->get_main_Chapter();
  63          if( !empty( $ItemChapter ) )
  64          {
  65              $action_links .= $ItemChapter->get_edit_link( array(
  66                      'text'          => get_icon( 'edit' ).' '.T_('Edit Cat'),
  67                      'class'         => 'roundbutton roundbutton_text',
  68                      'redirect_page' => 'front',
  69                  ) );
  70          }
  71      }
  72      if( $Item->status != 'published' )
  73      {
  74          $Item->status( array( 'format' => 'styled' ) );
  75      }
  76      $Item->title( array(
  77              'link_type'  => $params['item_link_type'],
  78              'before'     => '<div class="bTitle linked"><h1>',
  79              'after'      => '</h1><div class="roundbutton_group">'.$action_links.'</div><div class="clear"></div></div>',
  80              'nav_target' => false,
  81          ) );
  82  
  83          // ---------------------- POST CONTENT INCLUDED HERE ----------------------

  84          skin_include( '_item_content.inc.php', $params );
  85          // Note: You can customize the default item feedback by copying the generic

  86          // /skins/_item_content.inc.php file into the current skin folder.

  87          // -------------------------- END OF POST CONTENT -------------------------

  88      ?>
  89  
  90      <?php
  91          // List all tags attached to this post:

  92          $Item->tags( array(
  93                  'before' =>         '<div class="bSmallPrint">'.T_('Tags').': ',
  94                  'after' =>          '</div>',
  95                  'separator' =>      ', ',
  96              ) );
  97  
  98          echo '<p class="notes">';
  99          $Item->author( array(
 100                  'before'    => T_('Created by '),
 101                  'after'     => ' &bull; ',
 102                  'link_text' => 'login',
 103              ) );
 104          $Item->lastedit_user( array(
 105                  'before'    => T_('Last edit by '),
 106                  'after'     => T_(' on ').$Item->get_mod_date( 'F jS, Y' ),
 107                  'link_text' => 'login',
 108              ) );
 109          '</p>';
 110          if( is_logged_in() && $current_User->check_perm( 'item_post!CURSTATUS', 'edit', false, $Item ) )
 111          {    // Check permission to view histories of this item
 112              global $admin_url;
 113              echo '  &bull; ';
 114              echo '<a href="'.$admin_url.'?ctrl=items&amp;action=history&amp;p='.$Item->ID.'">'.T_('View history').'</a>';
 115          }
 116  
 117          // ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------

 118          skin_include( '_item_feedback.inc.php', array_merge( $params, array(
 119                  'before_section_title' => '<h2 class="comments_list_title">',
 120                  'after_section_title'  => '</h2>',
 121                  'form_title_start'     => '<h3 class="comments_form_title">',
 122                  'form_title_end'       => '</h3>',
 123              ) ) );
 124          // Note: You can customize the default item feedback by copying the generic

 125          // /skins/_item_feedback.inc.php file into the current skin folder.

 126          // ---------------------- END OF FEEDBACK (COMMENTS/TRACKBACKS) ---------------------

 127      ?>
 128  
 129      <?php
 130          locale_restore_previous();    // Restore previous locale (Blog locale)

 131      ?>
 132  </div>
 133  <?php 
 134  echo '</div>'; // End of post display

 135  ?>

title

Description

title

Description

title

Description

title

title

Body