/b2evolution/emerald/posts.main.php

http://laibcomsthemes.googlecode.com/ · PHP · 144 lines · 74 code · 20 blank · 50 comment · 3 complexity · 68122cf46e4ff6cac795d45e7991df89 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: 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="content">
  38. <div id="primaryContentContainer">
  39. <div id="primaryContent">
  40. <?php
  41. // ------------------------- TITLE FOR THE CURRENT REQUEST -------------------------
  42. request_title( array(
  43. 'title_before'=> '<h2 class="sectionhead">',
  44. 'title_after' => '</h2>',
  45. 'title_none' => '',
  46. 'glue' => ' - ',
  47. 'title_single_disp' => true,
  48. 'format' => 'htmlbody',
  49. ) );
  50. // ------------------------------ END OF REQUEST TITLE -----------------------------
  51. ?>
  52. <?php
  53. // ------------------------- MESSAGES GENERATED FROM ACTIONS -------------------------
  54. messages( array(
  55. 'block_start' => '<div class="action_messages">',
  56. 'block_end' => '</div> <!-- end of class="action_messages" -->',
  57. ) );
  58. // --------------------------------- END OF MESSAGES ---------------------------------
  59. ?>
  60. <?php
  61. // Go Grab the featured post:
  62. if( $Item = & get_featured_Item() )
  63. { // We have a featured/intro post to display:
  64. // ---------------------- ITEM BLOCK INCLUDED HERE ------------------------
  65. skin_include( '_item_block.inc.php', array(
  66. 'feature_block' => true,
  67. 'content_mode' => 'auto', // 'auto' will auto select depending on $disp-detail
  68. 'intro_mode' => 'normal', // Intro posts will be displayed in normal mode
  69. 'item_class' => 'featurepost',
  70. 'image_size' => 'fit-400x320',
  71. ) );
  72. // ----------------------------END ITEM BLOCK ----------------------------
  73. }
  74. ?>
  75. <div class="space"></div>
  76. <?php
  77. // Display message if no post:
  78. display_if_empty();
  79. while( $Item = & mainlist_get_item() )
  80. { // For each blog post:
  81. // ---------------------- ITEM BLOCK INCLUDED HERE ------------------------
  82. skin_include( '_item_block.inc.php', array(
  83. 'content_mode' => 'auto', // 'auto' will auto select depending on $disp-detail
  84. 'image_size' => 'fit-400x320',
  85. ) );
  86. // Note: You can customize the default item feedback by copying the generic
  87. // /skins/_item_feedback.inc.php file into the current skin folder.
  88. // ----------------------------END ITEM BLOCK ----------------------------
  89. }
  90. ?>
  91. <?php
  92. // -------------------- PREV/NEXT PAGE LINKS (POST LIST MODE) --------------------
  93. mainlist_page_links( array(
  94. 'block_start' => '<div id="navigation">',
  95. 'block_end' => '</div> <!-- end of id="navigation" -->',
  96. 'prev_text' => '<span class="older">&#171;</span>',
  97. 'next_text' => '<span class="newer">&#187;</span>',
  98. ) );
  99. // ------------------------- END OF PREV/NEXT PAGE LINKS -------------------------
  100. ?>
  101. </div> <!-- end of id="primaryContent" -->
  102. </div> <!-- end of id="primaryContentContainer" -->
  103. <?php
  104. // ------------------------- SIDEBAR INCLUDED HERE --------------------------
  105. skin_include( '_sidebar_right.inc.php' );
  106. // Note: You can customize the default BODY footer by copying the
  107. // _body_footer.inc.php file into the current skin folder.
  108. // ----------------------------- END OF SIDEBAR -----------------------------
  109. ?>
  110. </div> <!-- end of id="content" -->
  111. <?php
  112. // ------------------------- BODY FOOTER INCLUDED HERE --------------------------
  113. skin_include( '_body_footer.inc.php' );
  114. // Note: You can customize the default BODY footer by copying the
  115. // _body_footer.inc.php file into the current skin folder.
  116. // ------------------------------- END OF FOOTER --------------------------------
  117. ?>
  118. <?php
  119. // ------------------------- HTML FOOTER INCLUDED HERE --------------------------
  120. skin_include( '_html_footer.inc.php' );
  121. // Note: You can customize the default HTML footer by copying the
  122. // _html_footer.inc.php file into the current skin folder.
  123. // ------------------------------- END OF FOOTER --------------------------------
  124. ?>