PageRenderTime 25ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 1ms

/templates/ecard/html/com_content/category/blog_item.php

http://j-ecard-28022011.googlecode.com/
PHP | 137 lines | 130 code | 7 blank | 0 comment | 42 complexity | ed8f0aef6f5009973cc88e800a899c5d MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0, BSD-3-Clause
  1. <?php
  2. defined('_JEXEC') or die('Restricted access'); // no direct access
  3. $canEdit = ($this->user->authorize('com_content', 'edit', 'content', 'all') || $this->user->authorize('com_content', 'edit', 'content', 'own'));
  4. ?>
  5. <?php if ($this->item->state == 0) : ?>
  6. <div class="system-unpublished">
  7. <?php endif; ?>
  8. <div class="art-post">
  9. <div class="art-post-tl"></div>
  10. <div class="art-post-tr"></div>
  11. <div class="art-post-bl"></div>
  12. <div class="art-post-br"></div>
  13. <div class="art-post-tc"></div>
  14. <div class="art-post-bc"></div>
  15. <div class="art-post-cl"></div>
  16. <div class="art-post-cr"></div>
  17. <div class="art-post-cc"></div>
  18. <div class="art-post-body">
  19. <div class="art-post-inner">
  20. <?php
  21. if ($this->item->params->get('show_title')) {
  22. ob_start();
  23. ?>
  24. <h2 class="art-postheader">
  25. <?php
  26. artxFragmentBegin(ob_get_clean());
  27. if ($this->item->params->get('link_titles') && $this->item->readmore_link != '')
  28. artxFragmentContent('<a href="' . $this->item->readmore_link . '" class="PostHeader">' . $this->escape($this->item->title) . '</a>');
  29. else
  30. artxFragmentContent($this->escape($this->item->title));
  31. ob_start();
  32. ?>
  33. </h2>
  34. <?php
  35. artxFragmentEnd(ob_get_clean());
  36. }
  37. artxFragmentBegin("<div class=\"art-postheadericons art-metadata-icons\">\r\n");
  38. if ($this->params->get('show_url') && $this->article->urls)
  39. artxFragment('', '<a href="http://' . $this->item->urls . '" target="_blank">' . $this->item->urls . '</a>', '', ' | ');
  40. if ($this->item->params->get('show_create_date')) {
  41. artxFragment('', JHTML::_('date', $this->item->created, JText::_('DATE_FORMAT_LC2')), '', ' | ');
  42. }
  43. if (($this->item->params->get('show_author')) && ($this->item->author != "")) {
  44. artxFragment('', JText::sprintf('Written by', ($this->item->created_by_alias ? $this->item->created_by_alias : $this->item->author)), '', ' | ');
  45. }
  46. if ($this->item->params->get('show_pdf_icon'))
  47. artxFragment('', JHTML::_('icon.pdf', $this->item, $this->item->params, $this->access), '', ' | ');
  48. if ($this->item->params->get('show_print_icon'))
  49. artxFragment('', JHTML::_('icon.print_popup', $this->item, $this->item->params, $this->access), '', ' | ');
  50. if ($this->item->params->get('show_email_icon'))
  51. artxFragment('', JHTML::_('icon.email', $this->item, $this->item->params, $this->access), '', ' | ');
  52. if ($canEdit)
  53. artxFragment('', JHTML::_('icon.edit', $this->item, $this->item->params, $this->access), '', ' | ');
  54. artxFragmentEnd("\r\n</div>\r\n");
  55. echo "<div class=\"art-postcontent\">\r\n <!-- article-content -->\r\n";
  56. if (!$this->item->params->get('show_intro'))
  57. echo $this->item->event->afterDisplayTitle;
  58. echo $this->item->event->beforeDisplayContent;
  59. if (($this->item->params->get('show_section') && $this->item->sectionid) || ($this->item->params->get('show_category') && $this->item->catid)) {
  60. ?>
  61. <table class="contentpaneopen<?php echo $this->item->params->get('pageclass_sfx' ); ?>">
  62. <tr>
  63. <td>
  64. <?php
  65. if ($this->item->params->get('show_section') && $this->item->sectionid && isset($this->item->section)) {
  66. echo "<span>";
  67. if ($this->item->params->get('link_section'))
  68. echo '<a href="'.JRoute::_(ContentHelperRoute::getSectionRoute($this->item->sectionid)).'">';
  69. echo $this->item->section;
  70. if ($this->item->params->get('link_section'))
  71. echo '</a>';
  72. if ($this->item->params->get('show_category'))
  73. echo ' - ';
  74. echo "</span>";
  75. }
  76. if ($this->item->params->get('show_category') && $this->item->catid) {
  77. echo "<span>";
  78. if ($this->item->params->get('link_category'))
  79. echo '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->catslug, $this->item->sectionid)).'">';
  80. echo $this->item->category;
  81. if ($this->item->params->get('link_category'))
  82. echo '</a>';
  83. echo "</span>";
  84. }
  85. ?>
  86. </td>
  87. </tr>
  88. </table>
  89. <?php
  90. }
  91. if (isset ($this->item->toc))
  92. echo $this->item->toc;
  93. echo "<div class=\"art-article\">", $this->item->text, "</div>";
  94. if (intval($this->item->modified) != 0 && $this->item->params->get('show_modify_date')) {
  95. echo "<p class=\"modifydate\">";
  96. echo JText::_('Last Updated') . ' (' . JHTML::_('date', $this->item->modified, JText::_('DATE_FORMAT_LC2')) . ')';
  97. echo "</p>";
  98. }
  99. if ($this->item->params->get('show_readmore') && $this->item->readmore) {
  100. ?>
  101. <p>
  102. <span class="art-button-wrapper">
  103. <span class="l"> </span>
  104. <span class="r"> </span>
  105. <a class="readon art-button" href="<?php echo $this->item->readmore_link; ?>">
  106. <?php
  107. if ($this->item->readmore_register) {
  108. echo str_replace(' ', '&nbsp;', JText::_('Register to read more...'));
  109. } elseif ($readmore = $this->item->params->get('readmore')){
  110. echo str_replace(' ', '&nbsp;', $readmore);
  111. } else {
  112. echo str_replace(' ', '&nbsp;', JText::sprintf('Read more...'));
  113. }
  114. ?>
  115. </a>
  116. </span>
  117. </p>
  118. <?php
  119. }
  120. echo "<span class=\"article_separator\">&nbsp;</span>";
  121. echo $this->item->event->afterDisplayContent;
  122. echo "\r\n <!-- /article-content -->\r\n</div>\r\n<div class=\"cleared\"></div>\r\n";
  123. ?>
  124. </div>
  125. <div class="cleared"></div>
  126. </div>
  127. </div>
  128. <?php if ($this->item->state == 0) : ?>
  129. </div>
  130. <?php endif; ?>