PageRenderTime 18ms CodeModel.GetById 12ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/b2evolution/emerald/page.main.php

http://laibcomsthemes.googlecode.com/
PHP | 224 lines | 138 code | 27 blank | 59 comment | 2 complexity | 04d3c5281433fe9d50d2983ef583c9cd 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 emerald
 13 *
 14 * @version $Id: page.main.php,v 1.6 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="content">
 45	<div id="primaryContentContainer">
 46		<div id="primaryContent">
 47
 48	<?php
 49		// ------------------------- MESSAGES GENERATED FROM ACTIONS -------------------------
 50		messages( array(
 51			'block_start' => '<div class="action_messages">',
 52			'block_end'   => '</div> <!-- end of class="action_messages -->',
 53		) );
 54		// --------------------------------- END OF MESSAGES ---------------------------------
 55	?>
 56
 57
 58	<?php
 59		// Display message if no post:
 60		display_if_empty();
 61
 62		while( $Item = & mainlist_get_item() )
 63		{	// For each blog post, do everything below up to the closing curly brace "}"
 64		?>
 65		<div id="<?php $Item->anchor_id() ?>" class="post post<?php $Item->status_raw() ?>" lang="<?php $Item->lang() ?>">
 66
 67			<?php
 68				$Item->locale_temp_switch(); // Temporarily switch to post locale (useful for multilingual blogs)
 69			?>
 70
 71			<h2><?php $Item->title(); ?></h2>
 72
 73			<p class="postinfo">
 74			<?php
 75				$Item->author( array(
 76					'before'       => T_('By '),' ',
 77					'after'        => ' ',
 78				) );
 79				$Item->issue_time( array(
 80					'before'      => /* TRANS: date */ T_('on '),
 81					'after'       => '',
 82					'time_format' => 'F jS, Y'.'',
 83				) );
 84			?>
 85			<br/>
 86			<?php
 87				$Item->categories( array(
 88					'before'          => T_('In '),
 89					'after'           => ' ',
 90					'include_main'    => true,
 91					'include_other'   => true,
 92					'include_external'=> true,
 93					'link_categories' => true,
 94				) );
 95			?>
 96			</p>
 97
 98			<?php
 99				// ---------------------- POST CONTENT INCLUDED HERE ----------------------
100				skin_include( '_item_content.inc.php', array(
101						'image_size'	=>	'fit-400x320',
102					) );
103				// Note: You can customize the default item feedback by copying the generic
104				// /skins/_item_feedback.inc.php file into the current skin folder.
105				// -------------------------- END OF POST CONTENT -------------------------
106			?>
107
108			<?php
109				// List all tags attached to this post:
110				$Item->tags( array(
111					'before' =>         '<div class="posttags">'.T_('Tags').': ',
112					'after' =>          '</div>',
113					'separator' =>      ', ',
114				) );
115			?>
116
117			<p class="postinfo">
118			<?php
119				// Link to comments, trackbacks, etc.:
120				$Item->feedback_link( array(
121					'type' => 'feedbacks',
122					'link_before' => '',
123					'link_after' => '',
124					'link_text_zero' => '#',
125					'link_text_one' => '#',
126					'link_text_more' => '#',
127					'link_title' => '#',
128					'use_popup' => false,
129				) );
130				$Item->edit_link( array( // Link to backoffice for editing
131					'before'    => ' | ',
132					'after'     => '',
133				) );
134			?>
135			</p>
136
137		<?php
138			// Display container and contents:
139			skin_container( NT_('Post Loop'), array(
140				// The following (optional) params will be used as defaults for widgets included in this container:
141				// This will enclose each widget in a block:
142				'block_start' => '<div class="$wi_class$">',
143				'block_end' => '</div>',
144				// This will enclose the title of each widget:
145				'block_title_start' => '<h3>',
146				'block_title_end' => '</h3>',
147				// If a widget displays a list, this will enclose that list:
148				'list_start' => '<ul>',
149				'list_end' => '</ul>',
150				// This will enclose each item in a list:
151				'item_start' => '<li>',
152				'item_end' => '</li>',
153				// This will enclose sub-lists in a list:
154				'group_start' => '<ul>',
155				'group_end' => '</ul>',
156				// This will enclose (foot)notes:
157				'notes_start' => '<div class="notes">',
158				'notes_end' => '</div> <!-- end of class="notes" -->',
159			) );
160		?>
161
162			<div class="space"></div>
163		</div> <!-- end of id="item_" -->
164
165		<?php
166			// ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------
167			skin_include( '_item_feedback.inc.php', array(
168					'before_section_title' => '<h3 id="comments">',
169					'after_section_title'  => '</h3>',
170					'form_title_start' => '<h3 class="comment_form_title">',
171					'form_title_end'  => '</h3>',
172				) );
173			// Note: You can customize the default item feedback by copying the generic
174			// /skins/_item_feedback.inc.php file into the current skin folder.
175			// ---------------------- END OF FEEDBACK (COMMENTS/TRACKBACKS) ---------------------
176		?>
177
178		<?php
179			locale_restore_previous();	// Restore previous locale (Blog locale)
180		}
181	?>
182
183	<div class="space"></div>
184	<?php
185		// ------------------- PREV/NEXT POST LINKS (SINGLE POST MODE) -------------------
186		item_prevnext_links( array(
187				'block_start'	=> '<div id="navigation">',
188				'prev_start'		=> '<div class="floatleft">',
189				'prev_end'		=> '</div> <!-- end of class="floatleft" -->',
190				'next_start'		=> '<div class="floatright">',
191				'next_end'		=> '</div> <!-- end of class="floatright" -->',
192				'block_end' => '</div> <!-- end of id="navigation" -->',
193			) );
194		// ------------------------- END OF PREV/NEXT POST LINKS -------------------------
195	?>
196
197			</div> <!-- end of id="primaryContent" -->
198		</div> <!-- end of id="primaryContentContainer" -->
199
200<?php
201// ------------------------- SIDEBAR INCLUDED HERE --------------------------
202skin_include( '_sidebar_right.inc.php' );
203// Note: You can customize the default BODY footer by copying the
204// _body_footer.inc.php file into the current skin folder.
205// ----------------------------- END OF SIDEBAR -----------------------------
206?>
207
208	</div> <!-- end of id="content" -->
209
210<?php
211// ------------------------- BODY FOOTER INCLUDED HERE --------------------------
212skin_include( '_body_footer.inc.php' );
213// Note: You can customize the default BODY footer by copying the
214// _body_footer.inc.php file into the current skin folder.
215// ------------------------------- END OF FOOTER --------------------------------
216?>
217
218<?php
219// ------------------------- HTML FOOTER INCLUDED HERE --------------------------
220skin_include( '_html_footer.inc.php' );
221// Note: You can customize the default HTML footer by copying the
222// _html_footer.inc.php file into the current skin folder.
223// ------------------------------- END OF FOOTER --------------------------------
224?>