PageRenderTime 22ms CodeModel.GetById 12ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 1ms

/b2evolution/nonzero/posts.main.php

http://laibcomsthemes.googlecode.com/
PHP | 167 lines | 97 code | 20 blank | 50 comment | 8 complexity | be0a6f3639ed2e3a2f1b8d0af53bf509 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: posts.main.php,v 1.10 2009/01/21 20:33:49 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					// ------------------------- TITLE FOR THE CURRENT REQUEST -------------------------
 70					request_title( array(
 71							'title_before'=> '<h2 class="sectionhead">',
 72							'title_after' => '</h2>',
 73							'title_none'  => '',
 74							'glue'        => ' - ',
 75							'title_single_disp' => true,
 76							'format'      => 'htmlbody',
 77						) );
 78					// ------------------------------ END OF REQUEST TITLE -----------------------------
 79				?>
 80	
 81	
 82				<?php
 83					// ------------------------- MESSAGES GENERATED FROM ACTIONS -------------------------
 84					messages( array(
 85						'block_start' => '<div class="action_messages">',
 86						'block_end'   => '</div> <!-- end of class="action_messages" -->',
 87					) );
 88					// --------------------------------- END OF MESSAGES ---------------------------------
 89				?>
 90
 91				<?php
 92				// Go Grab the featured post:
 93				if( $Item = & get_featured_Item() )
 94				{	// We have a featured/intro post to display:
 95					// ---------------------- ITEM BLOCK INCLUDED HERE ------------------------
 96					skin_include( '_item_block.inc.php', array(
 97							'feature_block' => true,
 98							'content_mode' => 'auto',		// 'auto' will auto select depending on $disp-detail
 99							'intro_mode'   => 'normal',	// Intro posts will be displayed in normal mode
100							'item_class'   => 'featurepost',
101							'image_size'	 =>	'fit-400x320',
102						) );
103					// ----------------------------END ITEM BLOCK  ----------------------------
104				}
105				?>
106	
107					<div class="space"></div>
108
109				<?php
110					// Display message if no post:
111					display_if_empty();
112			
113					while( $Item = & mainlist_get_item() )
114					{	// For each blog post:
115						// ---------------------- ITEM BLOCK INCLUDED HERE ------------------------
116						skin_include( '_item_block.inc.php', array(
117								'content_mode' => 'auto',		// 'auto' will auto select depending on $disp-detail
118								'image_size'	 =>	'fit-400x320',
119							) );
120						// Note: You can customize the default item feedback by copying the generic
121						// /skins/_item_feedback.inc.php file into the current skin folder.
122						// ----------------------------END ITEM BLOCK  ----------------------------
123					}
124				?>
125			
126				<?php
127					// -------------------- PREV/NEXT PAGE LINKS (POST LIST MODE) --------------------
128					mainlist_page_links( array(
129							'block_start' => '<div id="navigation">',
130							'block_end' => '</div> <!-- end of id="navigation" -->',
131							'prev_text' => '<span class="older">&#171;</span>',
132							'next_text' => '<span class="newer">&#187;</span>',
133						) );
134					// ------------------------- END OF PREV/NEXT PAGE LINKS -------------------------
135				?>
136			</div> <!-- end of id="columnA_3columns" -->
137		</div> <!-- end of id="primaryContent_3columns" -->
138
139<?php
140if( $Skin->get_setting('column_count') != '1' )
141{
142// ------------------------- SIDEBAR INCLUDED HERE --------------------------
143skin_include( '_sidebar_right.inc.php' );
144// Note: You can customize the default BODY footer by copying the
145// _body_footer.inc.php file into the current skin folder.
146// ----------------------------- END OF SIDEBAR -----------------------------
147}
148?>
149
150	</div> <!-- end of id="main_inner" -->
151</div> <!-- end of id="main" -->
152
153<?php
154// ------------------------- BODY FOOTER INCLUDED HERE --------------------------
155skin_include( '_body_footer.inc.php' );
156// Note: You can customize the default BODY footer by copying the
157// _body_footer.inc.php file into the current skin folder.
158// ------------------------------- END OF FOOTER --------------------------------
159?>
160
161<?php
162// ------------------------- HTML FOOTER INCLUDED HERE --------------------------
163skin_include( '_html_footer.inc.php' );
164// Note: You can customize the default HTML footer by copying the
165// _html_footer.inc.php file into the current skin folder.
166// ------------------------------- END OF FOOTER --------------------------------
167?>