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