PageRenderTime 285ms CodeModel.GetById 141ms app.highlight 9ms RepoModel.GetById 132ms app.codeStats 0ms

/b2evolution/nonzero/single.main.php

http://laibcomsthemes.googlecode.com/
PHP | 243 lines | 158 code | 26 blank | 59 comment | 7 complexity | 1ff69249821cbf510d870b81f42bf064 MD5 | raw file
  1<?php
  2/**
  3 * This is the main/default page template.
  4 *
  5 * For a quick explanation of b2evo 2.0 skins, please start here:
  6 * {@link http://manual.b2evolution.net/Skins_2.0}
  7 *
  8 * The main page template is used to display the blog when no specific page template is available
  9 * to handle the request (based on $disp).
 10 *
 11 * @package evoskins
 12 * @subpackage nonzero
 13 *
 14 * @version $Id: single.main.php,v 1.10 2008/04/15 21:53:31 fplanque Exp $
 15 */
 16if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
 17
 18if( version_compare( $app_version, '3.3' ) < 0 )
 19{ // Older skins (versions 2.x and above) should work on newer b2evo versions, but newer skins may not work on older b2evo versions.
 20	die( 'This skin is designed for b2evolution 3.3 and above. Please <a href="http://b2evolution.net/downloads/index.html">upgrade your b2evolution</a>.' );
 21}
 22
 23// This is the main template; it may be used to display very different things.
 24// Do inits depending on current $disp:
 25skin_init( $disp );
 26
 27
 28// -------------------------- HTML HEADER INCLUDED HERE --------------------------
 29skin_include( '_html_header.inc.php' );
 30// Note: You can customize the default HTML header by copying the generic
 31// /skins/_html_header.inc.php file into the current skin folder.
 32// -------------------------------- END OF HEADER --------------------------------
 33?>
 34
 35
 36<?php
 37// ------------------------- BODY HEADER INCLUDED HERE --------------------------
 38skin_include( '_body_header.inc.php' );
 39// Note: You can customize the default BODY header by copying the generic
 40// /skins/_body_footer.inc.php file into the current skin folder.
 41// ------------------------------- END OF HEADER --------------------------------
 42?>
 43
 44<div id="main">
 45	<div id="main_inner" class="widthstyle">
 46
 47	<?php
 48	if( $Skin->get_setting('column_count') == '3' )
 49	{
 50		echo '	<div id="primaryContent_3columns">
 51				<div id="columnA_3columns">
 52	';
 53	}
 54	elseif( $Skin->get_setting('column_count') == '2' )
 55	{
 56		echo '	<div id="primaryContent_2columns">
 57				<div id="columnA_2columns">
 58	';
 59	}
 60	else
 61	{
 62		echo '	<div id="primaryContent_1column">
 63				<div id="columnA_1column">
 64	';
 65	}
 66	?>
 67
 68	<?php
 69		// ------------------------- MESSAGES GENERATED FROM ACTIONS -------------------------
 70		messages( array(
 71			'block_start' => '<div class="action_messages">',
 72			'block_end'   => '</div> <!-- end of class="action_messages" -->',
 73		) );
 74		// --------------------------------- END OF MESSAGES ---------------------------------
 75	?>
 76
 77	<?php
 78		// Display message if no post:
 79		display_if_empty();
 80
 81		while( $Item = & mainlist_get_item() )
 82		{	// For each blog post, do everything below up to the closing curly brace "}"
 83		?>
 84		<div id="<?php $Item->anchor_id() ?>" class="post post<?php $Item->status_raw() ?>" lang="<?php $Item->lang() ?>">
 85
 86			<?php
 87				$Item->locale_temp_switch(); // Temporarily switch to post locale (useful for multilingual blogs)
 88			?>
 89
 90			<h3><?php $Item->title(); ?></h3>
 91
 92			<ul class="post_info">
 93			<?php
 94				$Item->author( array(
 95					'before'       => T_('<li class="date">Posted by '),' ',
 96					'after'        => ' ',
 97				) );
 98				$Item->issue_time( array(
 99					'before'      => /* TRANS: date */ T_('on '),
100					'after'       => '</li>',
101					'time_format' => 'm.d.Y'.'',
102				) );
103				// Link to comments, trackbacks, etc.:
104				$Item->feedback_link( array(
105					'type' => 'feedbacks',
106					'link_before' => '<li class="comments">',
107					'link_after' => '</li>',
108					'link_text_zero' => '#',
109					'link_text_one' => '#',
110					'link_text_more' => '#',
111					'link_title' => '#',
112					'use_popup' => false,
113				) );
114			?>
115			</ul>
116
117			<?php
118				// ---------------------- POST CONTENT INCLUDED HERE ----------------------
119				skin_include( '_item_content.inc.php', array(
120						'image_size'	=>	'fit-400x320',
121					) );
122				// Note: You can customize the default item feedback by copying the generic
123				// /skins/_item_feedback.inc.php file into the current skin folder.
124				// -------------------------- END OF POST CONTENT -------------------------
125			?>
126
127			<?php
128				// List all tags attached to this post:
129				$Item->tags( array(
130					'before' =>         '<div class="posttags">'.T_('Tags').': ',
131					'after' =>          '</div>',
132					'separator' =>      ', ',
133				) );
134			?>
135
136			<p class="postinfo">
137			<?php
138				$Item->categories( array(
139					'before'          => T_('In '),
140					'after'           => ' ',
141					'include_main'    => true,
142					'include_other'   => true,
143					'include_external'=> true,
144					'link_categories' => true,
145				) );
146				$Item->edit_link( array( // Link to backoffice for editing
147					'before'    => ' | ',
148					'after'     => '',
149				) );
150			?>
151			</p>
152
153		<?php
154			// Display container and contents:
155			skin_container( NT_('Post Loop'), array(
156				// The following (optional) params will be used as defaults for widgets included in this container:
157				// This will enclose each widget in a block:
158				'block_start' => '<div class="$wi_class$">',
159				'block_end' => '</div>',
160				// This will enclose the title of each widget:
161				'block_title_start' => '<h4><span>',
162				'block_title_end' => '</span></h4>',
163				// If a widget displays a list, this will enclose that list:
164				'list_start' => '<ul class="links">',
165				'list_end' => '</ul>',
166				// This will enclose each item in a list:
167				'item_start' => '<li>',
168				'item_end' => '</li>',
169				// This will enclose sub-lists in a list:
170				'group_start' => '<ul>',
171				'group_end' => '</ul>',
172				// This will enclose (foot)notes:
173				'notes_start' => '<div class="notes">',
174				'notes_end' => '</div> <!-- end of class="notes" -->',
175			) );
176		?>
177
178			<div class="space"></div>
179		</div>
180
181		<?php
182			// ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------
183			skin_include( '_item_feedback.inc.php', array(
184					'before_section_title' => '<h3 id="comments">',
185					'after_section_title'  => '</h3>',
186					'form_title_start' => '<h3 class="comment_form_title">',
187					'form_title_end'  => '</h3>',
188				) );
189			// Note: You can customize the default item feedback by copying the generic
190			// /skins/_item_feedback.inc.php file into the current skin folder.
191			// ---------------------- END OF FEEDBACK (COMMENTS/TRACKBACKS) ---------------------
192		?>
193
194		<?php
195			locale_restore_previous();	// Restore previous locale (Blog locale)
196		}
197	?>
198
199	<div class="space"></div>
200	<?php
201		// ------------------- PREV/NEXT POST LINKS (SINGLE POST MODE) -------------------
202		item_prevnext_links( array(
203				'block_start'	=> '<div id="navigation">',
204				'prev_start'		=> '<div class="floatleft">',
205				'prev_end'		=> '</div> <!-- end of class="floatleft" -->',
206				'next_start'		=> '<div class="floatright">',
207				'next_end'		=> '</div> <!-- end of class="floatright" -->',
208				'block_end' => '</div> <!-- end of id="navigation" -->',
209			) );
210		// ------------------------- END OF PREV/NEXT POST LINKS -------------------------
211	?>
212			</div> <!-- end of id="columnA_3columns" -->
213		</div> <!-- end of id="primaryContent_3columns" -->
214
215<?php
216if( $Skin->get_setting('column_count') != '1' )
217{
218// ------------------------- SIDEBAR INCLUDED HERE --------------------------
219skin_include( '_sidebar_right.inc.php' );
220// Note: You can customize the default BODY footer by copying the
221// _body_footer.inc.php file into the current skin folder.
222// ----------------------------- END OF SIDEBAR -----------------------------
223}
224?>
225
226	</div> <!-- end of id="main_inner" -->
227</div> <!-- end of id="main" -->
228
229<?php
230// ------------------------- BODY FOOTER INCLUDED HERE --------------------------
231skin_include( '_body_footer.inc.php' );
232// Note: You can customize the default BODY footer by copying the
233// _body_footer.inc.php file into the current skin folder.
234// ------------------------------- END OF FOOTER --------------------------------
235?>
236
237<?php
238// ------------------------- HTML FOOTER INCLUDED HERE --------------------------
239skin_include( '_html_footer.inc.php' );
240// Note: You can customize the default HTML footer by copying the
241// _html_footer.inc.php file into the current skin folder.
242// ------------------------------- END OF FOOTER --------------------------------
243?>