PageRenderTime 61ms CodeModel.GetById 51ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/b2evolution/corporatemag/posts.main.php

http://laibcomsthemes.googlecode.com/
PHP | 333 lines | 179 code | 24 blank | 130 comment | 2 complexity | fbd8fa9a0df44d29525b53249fcf6625 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 corporatemag
 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="container">
 45	<div id="top-container">
 46
 47		<?php /*----------------------- FEATURED POST GLIDE -----------------------*/ ?>
 48		<?php /*
 49		if ($corporatemag->option['featuredCat'] != '' && $corporatemag->option['featuredCat'] != 'Select a category:'  && $corporatemag->option['featuredNum'] != '0' && $corporatemag->option['featuredNum'] !=''):
 50		$glidecat = $corporatemag->option['featuredCat'];
 51		$glidecount = $corporatemag->option['featuredNum'];
 52		$my_query = new WP_Query('category_name= '. $glidecat .'&showposts= '. $glidecount);
 53		if ($my_query->have_posts()):
 54		*/ ?>
 55		<? /*
 56		<script type="text/javascript">
 57		featuredcontentglider.init({
 58			gliderid: "featured-posts",
 59			contentclass: "post",
 60			togglerid: "togglebox",
 61			remotecontent: "", 
 62			selected: 1,
 63			persiststate: true,
 64			speed: 300,
 65			direction: "leftright",
 66			autorotate: true, 
 67			autorotateconfig: [10000, 9999] //if auto rotate enabled, set [milliseconds_btw_rotations, cycles_before_stopping]
 68		})
 69		</script>
 70		*/ ?>
 71		<div id="featured-posts-wrapper">
 72			<div id="featured-posts" class="glidecontentwrapper">
 73			<?php /* while ($my_query->have_posts()) : $my_query->the_post();$do_not_duplicate = $post->ID; ?>
 74				<div class="post">
 75					<h2 class="title"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
 76					<div class="entry">
 77						<p><?php the_content_rss('', TRUE, '', 140); ?></p>
 78						<a class="more-link" href="<?php the_permalink() ?>" title="Read More <?php the_title(); ?>"><span>Read More...</span></a>
 79					</div>
 80				</div>
 81			<?php endwhile; */ ?>
 82			</div>
 83			<div id="togglebox" class="glidecontenttoggler">
 84				<a href="<?php $Blog->disp('url') ?>#" class="prev"></a>
 85				<a href="<?php $Blog->disp('url') ?>#" class="next"></a>
 86				<div class="clear"></div>
 87			</div>
 88			<div class="clear"></div>
 89		</div><!-- /featured-posts-wrapper -->
 90		<?php /* endif; endif; */ ?>
 91		<?php /*----------------------- FEATURED POST GLIDE -----------------------*/ ?>
 92
 93		<?php /*----------------------- TAB -----------------------*/ ?>
 94		<div id="tab-content">
 95			<ul class="tabnav">
 96				<li><a href="<?php $Blog->disp('url') ?>#recent-entries">Recent Entries</a></li>
 97				<li><a href="<?php $Blog->disp('url') ?>#recent-comments">Recent Comments</a></li>
 98				<li class="last"><a href="<?php $Blog->disp('url') ?>#archives">Archives</a></li>
 99			</ul>
100		
101			<div id="recent-entries" class="tabdiv">
102				<ul>
103					<?php
104						// ------------------------- "Sidebar" CONTAINER EMBEDDED HERE --------------------------
105						// Display container contents:
106						skin_container( NT_('Tab-1'), array(
107								// The following (optional) params will be used as defaults for widgets included in this container:
108								// This will enclose each widget in a block:
109								'block_start' => '<li id="$wi_ID$" class="$wi_class$">',
110								'block_end' => '</li>',
111								// Turn On or Off the display of block titles
112								'block_display_title' => false,
113								// This will enclose the title of each widget:
114								'block_title_start' => '',
115								'block_title_end' => '',
116								// If a widget displays a list, this will enclose that list:
117								'list_start' => '<ul>',
118								'list_end' => '</ul>',
119								// This will enclose each item in a list:
120								'item_start' => '<li>',
121								'item_end' => '</li>',
122								// This will enclose sub-lists in a list:
123								'group_start' => '<ul>',
124								'group_end' => '</ul>',
125								// This will enclose (foot)notes:
126								'notes_start' => '</div><div class="notes">',
127								'notes_end' => '</div> <!-- end of class="notes" -->',
128							) );
129						// ----------------------------- END OF "Sidebar" CONTAINER -----------------------------
130					?>
131				</ul>
132			</div><!--/recent-entries-->
133		
134			<div id="recent-comments" class="tabdiv">
135				<ul>
136					<?php
137						// ------------------------- "Sidebar" CONTAINER EMBEDDED HERE --------------------------
138						// Display container contents:
139						skin_container( NT_('Tab-2'), 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' => '<li id="$wi_ID$" class="$wi_class$">',
143								'block_end' => '</li>',
144								// Turn On or Off the display of block titles
145								'block_display_title' => false,
146								// This will enclose the title of each widget:
147								'block_title_start' => '',
148								'block_title_end' => '',
149								// If a widget displays a list, this will enclose that list:
150								'list_start' => '<ul>',
151								'list_end' => '</ul>',
152								// This will enclose each item in a list:
153								'item_start' => '<li>',
154								'item_end' => '</li>',
155								// This will enclose sub-lists in a list:
156								'group_start' => '<ul>',
157								'group_end' => '</ul>',
158								// This will enclose (foot)notes:
159								'notes_start' => '</div><div class="notes">',
160								'notes_end' => '</div> <!-- end of class="notes" -->',
161							) );
162						// ----------------------------- END OF "Sidebar" CONTAINER -----------------------------
163					?>
164				</ul>
165			</div><!--/recent-comments-->
166		
167			<div id="archives" class="tabdiv">
168				<ul>
169					<?php
170						// ------------------------- "Sidebar" CONTAINER EMBEDDED HERE --------------------------
171						// Display container contents:
172						skin_container( NT_('Tab-3'), array(
173								// The following (optional) params will be used as defaults for widgets included in this container:
174								// This will enclose each widget in a block:
175								'block_start' => '<li id="$wi_ID$" class="$wi_class$">',
176								'block_end' => '</li>',
177								// Turn On or Off the display of block titles
178								'block_display_title' => false,
179								// This will enclose the title of each widget:
180								'block_title_start' => '',
181								'block_title_end' => '',
182								// If a widget displays a list, this will enclose that list:
183								'list_start' => '<ul>',
184								'list_end' => '</ul>',
185								// This will enclose each item in a list:
186								'item_start' => '<li>',
187								'item_end' => '</li>',
188								// This will enclose sub-lists in a list:
189								'group_start' => '<ul>',
190								'group_end' => '</ul>',
191								// This will enclose (foot)notes:
192								'notes_start' => '</div><div class="notes">',
193								'notes_end' => '</div> <!-- end of class="notes" -->',
194							) );
195						// ----------------------------- END OF "Sidebar" CONTAINER -----------------------------
196					?>
197				</ul>
198			</div><!-- /archives -->
199			<div class="clear"></div>
200		</div><!-- /tab-content -->
201		<?php /*----------------------- TAB -----------------------*/ ?>
202
203		<div class="clear"></div>
204	</div><!-- end of id="top-container" -->
205	<?php /*----------------------- POST with IMAGE SLIDE -----------------------*/ ?>
206	<?php /*
207	if($corporatemag->option['slideCat'] !='Select a category:' && $corporatemag->option['slideCat'] !='' && $corporatemag->option['slideNum'] != 0 && $corporatemag->option['slideNum'] !=''):
208	$slidecat = $corporatemag->option['slideCat'];
209	$slidecount = $corporatemag->option['slideNum'];
210	$my_query = new WP_Query('category_name= '. $slidecat .'&showposts='.$slidecount.'');
211	if($my_query->have_posts()):
212	*/ ?>
213	<?php /*
214		<script type="text/javascript">
215		stepcarousel.setup({
216			galleryid: 'mygallery', //id of carousel DIV
217			beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
218			panelclass: 'panel', //class of panel DIVs each holding content
219			panelbehavior: {speed:500, wraparound:true, persist:true},
220			defaultbuttons: {enable: true, moveby: 4, leftnav: ['<?php bloginfo('template_directory'); ?>/img/sliding-prev-button.gif', -25, 78, 'slide-prev-nav'], rightnav: ['<?php bloginfo('template_directory'); ?>/img/sliding-next-button.gif', 15, 78, 'slide-next-nav']},
221			statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
222			contenttype: ['external'] //content setting ['inline'] or ['external', 'path_to_external_file']
223		})
224		</script>
225	*/ ?>
226	<?php /*
227		<div id="mygallery" class="stepcarousel">
228			<div class="belt">
229	*/ ?>
230			<?php /* while ($my_query->have_posts()) : $my_query->the_post();$do_not_duplicate = $post->ID; ?>
231				<div class="panel">
232					<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" > <img src="<?php echo get_post_meta($post->ID,'thumbnail', true); ?>" width="200" height="156" alt="<?php the_title(); ?>"/> </a>
233				</div>
234			<?php endwhile; */ ?>
235	<?php /*
236			</div>
237	*/ ?>
238		</div><!-- /mygallery -->
239	<?php /* endif; endif; */ ?>
240	<?php /*----------------------- POST with IMAGE SLIDE -----------------------*/ ?>
241	
242	<div id="content">
243		<?php
244			// ------------------------- TITLE FOR THE CURRENT REQUEST -------------------------
245			request_title( array(
246				'title_before'=> '<h2 class="sectionhead">',
247				'title_after' => '</h2>',
248				'title_none'  => '',
249				'glue'        => ' - ',
250				'title_single_disp' => true,
251				'format'      => 'htmlbody',
252			) );
253			// ------------------------------ END OF REQUEST TITLE -----------------------------
254		?>
255		<?php
256			// ------------------------- MESSAGES GENERATED FROM ACTIONS -------------------------
257			messages( array(
258				'block_start' => '<div class="action_messages">',
259				'block_end'   => '</div> <!-- end of class="action_messages" -->',
260			) );
261			// --------------------------------- END OF MESSAGES ---------------------------------
262		?>
263
264		<?php
265			// Display message if no post:
266			display_if_empty();
267	
268			while( $Item = & mainlist_get_item() )
269			{	// For each blog post:
270				// ---------------------- ITEM BLOCK INCLUDED HERE ------------------------
271				skin_include( '_item_block.inc.php', array(
272						'content_mode' => 'auto',		// 'auto' will auto select depending on $disp-detail
273						'image_size'	 =>	'fit-400x320',
274					) );
275				// Note: You can customize the default item feedback by copying the generic
276				// /skins/_item_feedback.inc.php file into the current skin folder.
277				// ----------------------------END ITEM BLOCK  ----------------------------
278			}
279		?>
280
281		<div class="clear"></div>
282
283		<div id="post-nav">
284			<?php
285				// -------------------- PREV PAGE LINK --------------------
286				mainlist_page_links( array(
287					'block_start' => '<div id="nav-prev-post">',
288					'block_end' => '</div>',
289					'block_single' => '',
290					'links_format' => '$prev$',
291					'prev_text' => '&laquo; Prev',
292				) );
293				// ------------------------- END OF PREV PAGE LINK -------------------------
294	
295				// -------------------- NEXT PAGE LINK --------------------
296				mainlist_page_links( array(
297					'block_start' => '<div id="nav-next-post">',
298					'block_end' => '</div>',
299					'block_single' => '',
300					'links_format' => '$next$',
301					'next_text' => 'Next &raquo;',
302				) );
303				// ------------------------- END OF NEXT PAGE LINK -------------------------
304			?>		
305			
306			<div class="clear"></div>
307		</div><!-- end of id="post-nav" -->
308		
309	</div> <!-- end of id="content" -->
310
311<?php
312// ------------------------- SIDEBAR INCLUDED HERE --------------------------
313skin_include( '_sidebar_right.inc.php' );
314// Note: You can customize the default BODY footer by copying the
315// _body_footer.inc.php file into the current skin folder.
316// ----------------------------- END OF SIDEBAR -----------------------------
317?>
318
319<?php
320// ------------------------- BODY FOOTER INCLUDED HERE --------------------------
321skin_include( '_body_footer.inc.php' );
322// Note: You can customize the default BODY footer by copying the
323// _body_footer.inc.php file into the current skin folder.
324// ------------------------------- END OF FOOTER --------------------------------
325?>
326
327<?php
328// ------------------------- HTML FOOTER INCLUDED HERE --------------------------
329skin_include( '_html_footer.inc.php' );
330// Note: You can customize the default HTML footer by copying the
331// _html_footer.inc.php file into the current skin folder.
332// ------------------------------- END OF FOOTER --------------------------------
333?>