/b2evolution/nonzero/_item_block.inc.php

http://laibcomsthemes.googlecode.com/ · PHP · 120 lines · 87 code · 13 blank · 20 comment · 4 complexity · deefa3e46db3ba1918d2e44ecd69c1c6 MD5 · raw file

  1. <?php
  2. /**
  3. * This is the template that displays the item block
  4. *
  5. * This file is not meant to be called directly.
  6. * It is meant to be called by an include in the main.page.php template (or other templates)
  7. *
  8. * b2evolution - {@link http://b2evolution.net/}
  9. * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
  10. * @copyright (c)2003-2009 by Francois PLANQUE - {@link http://fplanque.net/}
  11. *
  12. * @package evoskins
  13. * @subpackage nonzero
  14. */
  15. if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  16. global $Item;
  17. // Default params:
  18. $params = array_merge( array(
  19. 'feature_block' => false,
  20. 'content_mode' => 'auto', // 'auto' will auto select depending on $disp-detail
  21. 'item_class' => 'post',
  22. 'image_size' => 'fit-400x320',
  23. 'more_link_text' => T_('Read more'),
  24. ), $params );
  25. ?>
  26. <div id="<?php $Item->anchor_id() ?>" class="<?php $Item->div_classes( $params ) ?>" lang="<?php $Item->lang() ?>">
  27. <?php
  28. $Item->locale_temp_switch(); // Temporarily switch to post locale (useful for multilingual blogs)
  29. ?>
  30. <p class="postinfo">
  31. <?php
  32. if( $Item->is_intro() )
  33. { // Display edit link only if we're displaying an intro post:
  34. $Item->edit_link( array( // Link to backoffice for editing
  35. 'before' => '<div class="floatright">',
  36. 'after' => '</div>',
  37. ) );
  38. }
  39. ?>
  40. </p>
  41. <h3><?php $Item->title(); ?></h3>
  42. <ul class="post_info">
  43. <?php
  44. if( ! $Item->is_intro() )
  45. { // Display only if we're not displaying an intro post:
  46. $Item->author( array(
  47. 'before' => T_('<li class="date">Posted by '),' ',
  48. 'after' => ' ',
  49. ) );
  50. $Item->issue_time( array(
  51. 'before' => /* TRANS: date */ T_('on '),
  52. 'after' => '</li>',
  53. 'time_format' => 'm.d.Y'.'',
  54. ) );
  55. // Link to comments, trackbacks, etc.:
  56. $Item->feedback_link( array(
  57. 'type' => 'feedbacks',
  58. 'link_before' => '<li class="comments">',
  59. 'link_after' => '</li>',
  60. 'link_text_zero' => '#',
  61. 'link_text_one' => '#',
  62. 'link_text_more' => '#',
  63. 'link_title' => '#',
  64. 'use_popup' => false,
  65. ) );
  66. }
  67. ?>
  68. </ul>
  69. <?php
  70. // ---------------------- POST CONTENT INCLUDED HERE ----------------------
  71. skin_include( '_item_content.inc.php', $params );
  72. // Note: You can customize the default item feedback by copying the generic
  73. // /skins/_item_content.inc.php file into the current skin folder.
  74. // -------------------------- END OF POST CONTENT -------------------------
  75. ?>
  76. <?php
  77. // List all tags attached to this post:
  78. $Item->tags( array(
  79. 'before' => '<div class="posttags">'.T_('Tags').': ',
  80. 'after' => '</div>',
  81. 'separator' => ', ',
  82. ) );
  83. ?>
  84. <p class="postinfo">
  85. <br/>
  86. <?php
  87. if( ! $Item->is_intro() )
  88. { // Display only if we're not displaying an intro post:
  89. $Item->categories( array(
  90. 'before' => T_('In '),
  91. 'after' => ' ',
  92. 'include_main' => true,
  93. 'include_other' => true,
  94. 'include_external'=> true,
  95. 'link_categories' => true,
  96. ) );
  97. $Item->edit_link( array( // Link to backoffice for editing
  98. 'before' => ' | ',
  99. 'after' => '',
  100. ) );
  101. }
  102. ?>
  103. </p>
  104. </div>
  105. <?php
  106. locale_restore_previous(); // Restore previous locale (Blog locale)
  107. ?>