/b2evolution/nonzero/single.main.php

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