/b2evolution/corporatemag/single.main.php

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