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