PageRenderTime 284ms CodeModel.GetById 141ms app.highlight 5ms RepoModel.GetById 136ms app.codeStats 0ms

/b2evolution/nonzero/_item_block.inc.php

http://laibcomsthemes.googlecode.com/
PHP | 120 lines | 87 code | 13 blank | 20 comment | 4 complexity | deefa3e46db3ba1918d2e44ecd69c1c6 MD5 | raw file
  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-2009 by Francois PLANQUE - {@link http://fplanque.net/}
 11 *
 12 * @package evoskins
 13 * @subpackage nonzero
 14 */
 15if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
 16
 17global $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		'more_link_text'  => T_('Read more'),
 26	), $params );
 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	<p class="postinfo">
 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	?>
 45	</p>
 46
 47	<h3><?php $Item->title(); ?></h3>
 48		<ul class="post_info">
 49		<?php
 50		if( ! $Item->is_intro() )
 51		{	// Display only if we're not displaying an intro post:
 52			$Item->author( array(
 53				'before'       => T_('<li class="date">Posted by '),' ',
 54				'after'        => ' ',
 55			) );
 56			$Item->issue_time( array(
 57				'before'      => /* TRANS: date */ T_('on '),
 58				'after'       => '</li>',
 59				'time_format' => 'm.d.Y'.'',
 60			) );
 61			// Link to comments, trackbacks, etc.:
 62			$Item->feedback_link( array(
 63				'type' => 'feedbacks',
 64				'link_before' => '<li class="comments">',
 65				'link_after' => '</li>',
 66				'link_text_zero' => '#',
 67				'link_text_one' => '#',
 68				'link_text_more' => '#',
 69				'link_title' => '#',
 70				'use_popup' => false,
 71			) );
 72		}
 73		?>
 74		</ul>
 75
 76		<?php
 77			// ---------------------- POST CONTENT INCLUDED HERE ----------------------
 78			skin_include( '_item_content.inc.php', $params );
 79			// Note: You can customize the default item feedback by copying the generic
 80			// /skins/_item_content.inc.php file into the current skin folder.
 81			// -------------------------- END OF POST CONTENT -------------------------
 82		?>
 83
 84		<?php
 85			// List all tags attached to this post:
 86			$Item->tags( array(
 87					'before' =>         '<div class="posttags">'.T_('Tags').': ',
 88					'after' =>          '</div>',
 89					'separator' =>      ', ',
 90				) );
 91		?>
 92
 93		<p class="postinfo">
 94		<br/>
 95		<?php
 96		if( ! $Item->is_intro() )
 97		{	// Display only if we're not displaying an intro post:
 98			$Item->categories( array(
 99				'before'          => T_('In '),
100				'after'           => ' ',
101				'include_main'    => true,
102				'include_other'   => true,
103				'include_external'=> true,
104				'link_categories' => true,
105			) );
106			$Item->edit_link( array( // Link to backoffice for editing
107				'before'    => ' | ',
108				'after'     => '',
109			) );
110		}
111		?>
112		</p>
113
114	</div>
115
116<?php
117locale_restore_previous();	// Restore previous locale (Blog locale)
118
119
120?>