Guest User

Untitled

a guest
Dec 11th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.06 KB | None | 0 0
  1. <?php
  2. /**
  3. * @version $Id: default.php 17137 2010-05-17 07:00:07Z infograf768 $
  4. * @package Joomla.Site
  5. * @subpackage com_content
  6. * @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
  7. * @license GNU General Public License version 2 or later; see LICENSE.txt
  8. */
  9.  
  10. // No direct access
  11. defined('_JEXEC') or die;
  12.  
  13. $app = JFactory::getApplication();
  14. $templateparams = $app->getTemplate(true)->params;
  15. JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers');
  16.  
  17. // Create shortcut to parameters.
  18. $params = $this->item->params;
  19.  
  20. if ($templateparams->get('html5') != 1) :
  21. require(JPATH_BASE.'/components/com_content/views/article/tmpl/default.php');
  22. //evtl. ersetzen durch JPATH_COMPONENT.'/views/...'
  23.  
  24. else :
  25. JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers');
  26. ?>
  27. <article class="item-page<?php echo $this->pageclass_sfx?>">
  28. <?php if ($this->params->get('show_page_heading', 1)) : ?>
  29.  
  30. <?php if ($this->params->get('show_page_heading', 1) And $params->get('show_title')) :?>
  31. <hgroup>
  32. <?php endif; ?>
  33. <h1>
  34. <?php echo $this->escape($this->params->get('page_heading')); ?>
  35. </h1>
  36. <?php endif; ?>
  37. <?php if ($params->get('show_title')|| $params->get('access-edit')) : ?>
  38. <h2>
  39. <?php echo $this->escape($this->item->title); ?>
  40. </h2>
  41. <?php endif; ?>
  42. <?php if ($this->params->get('show_page_heading', 1) And $params->get('show_title')) :?>
  43. </hgroup>
  44. <?php endif; ?>
  45.  
  46. <?php if ($params->get('access-edit') || $params->get('show_print_icon') || $params->get('show_email_icon')) : ?>
  47. <ul class="actions">
  48. <?php if (!$this->print) : ?>
  49. <?php if ($params->get('show_print_icon')) : ?>
  50. <li class="print-icon">
  51. <?php echo JHtml::_('icon.print_popup', $this->item, $params); ?>
  52. </li>
  53. <?php endif; ?>
  54.  
  55. <?php if ($params->get('show_email_icon')) : ?>
  56. <li class="email-icon">
  57. <?php echo JHtml::_('icon.email', $this->item, $params); ?>
  58. </li>
  59. <?php endif; ?>
  60. <?php if ($this->user->authorise('core.edit', 'com_content.article.'.$this->item->id)) : ?>
  61. <li class="edit-icon">
  62. <?php echo JHtml::_('icon.edit', $this->item, $params); ?>
  63. </li>
  64. <?php endif; ?>
  65. <?php else : ?>
  66. <li>
  67. <?php echo JHtml::_('icon.print_screen', $this->item, $params); ?>
  68. </li>
  69. <?php endif; ?>
  70. </ul>
  71. <?php endif; ?>
  72.  
  73. <?php if (!$params->get('show_intro')) :
  74. echo $this->item->event->afterDisplayTitle;
  75. endif; ?>
  76.  
  77. <?php echo $this->item->event->beforeDisplayContent; ?>
  78.  
  79. <?php $useDefList = (($params->get('show_author')) OR ($params->get('show_category')) OR ($params->get('show_parent_category'))
  80. OR ($params->get('show_create_date')) OR ($params->get('show_modify_date')) OR ($params->get('show_publish_date'))
  81. OR ($params->get('show_hits'))); ?>
  82.  
  83. <?php if ($useDefList) : ?>
  84. <dl class="article-info">
  85. <dt class="article-info-term"><?php echo JText::_('COM_CONTENT_ARTICLE_INFO'); ?></dt>
  86. <?php endif; ?>
  87. <?php if ($params->get('show_parent_category') && $this->item->parent_slug != '1:root') : ?>
  88. <dd class="parent-category-name">
  89. <?php $title = $this->escape($this->item->parent_title);
  90. $url = '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->parent_slug)).'">'.$title.'</a>';?>
  91. <?php if ($params->get('link_parent_category') AND $this->item->parent_slug) : ?>
  92. <?php echo JText::sprintf('COM_CONTENT_PARENT', $url); ?>
  93. <?php else : ?>
  94. <?php echo JText::sprintf('COM_CONTENT_PARENT', $title); ?>
  95. <?php endif; ?>
  96. </dd>
  97. <?php endif; ?>
  98. <?php if ($params->get('show_category')) : ?>
  99. <dd class="category-name">
  100. <?php $title = $this->escape($this->item->category_title);
  101. $url = '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->catslug)).'">'.$title.'</a>';?>
  102. <?php if ($params->get('link_category') AND $this->item->catslug) : ?>
  103. <?php echo JText::sprintf('COM_CONTENT_CATEGORY', $url); ?>
  104. <?php else : ?>
  105. <?php echo JText::sprintf('COM_CONTENT_CATEGORY', $title); ?>
  106. <?php endif; ?>
  107. </dd>
  108. <?php endif; ?>
  109. <?php if ($params->get('show_create_date')) : ?>
  110. <dd class="create">
  111. <?php echo JText::sprintf('COM_CONTENT_CREATED_DATE_ON', JHTML::_('date',$this->item->created, JText::_('DATE_FORMAT_LC2'))); ?>
  112. </dd>
  113. <?php endif; ?>
  114. <?php if ($params->get('show_modify_date')) : ?>
  115. <dd class="modified">
  116. <?php echo JText::sprintf('COM_CONTENT_LAST_UPDATED', JHTML::_('date',$this->item->modified, JText::_('DATE_FORMAT_LC2'))); ?>
  117. </dd>
  118. <?php endif; ?>
  119. <?php if ($params->get('show_publish_date')) : ?>
  120. <dd class="published">
  121. <?php echo JText::sprintf('COM_CONTENT_PUBLISHED_DATE', JHTML::_('date',$this->item->publish_up, JText::_('DATE_FORMAT_LC2'))); ?>
  122. </dd>
  123. <?php endif; ?>
  124. <?php if ($params->get('show_author') && !empty($this->item->author )) : ?>
  125. <dd class="createdby">
  126. <?php $author = $this->item->author; ?>
  127. <?php $author = ($this->item->created_by_alias ? $this->item->created_by_alias : $author);?>
  128.  
  129. <?php if (!empty($this->item->contactid ) && $params->get('link_author') == true):?>
  130. <?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY' ,
  131. JHTML::_('link',JRoute::_('index.php?option=com_contact&view=contact&id='.$this->item->contactid),$author)); ?>
  132.  
  133. <?php else :?>
  134. <?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY', $author); ?>
  135. <?php endif; ?>
  136. </dd>
  137. <?php endif; ?>
  138. <?php if ($params->get('show_hits')) : ?>
  139. <dd class="hits">
  140. <?php echo JText::sprintf('COM_CONTENT_ARTICLE_HITS', $this->item->hits); ?>
  141. </dd>
  142. <?php endif; ?>
  143. <?php if ($useDefList) : ?>
  144. </dl>
  145. <?php endif; ?>
  146.  
  147. <?php if (isset ($this->item->toc)) : ?>
  148. <?php echo $this->item->toc; ?>
  149. <?php endif; ?>
  150.  
  151. <?php echo $this->item->text; ?>
  152.  
  153. <?php
  154. $document = &JFactory::getDocument();
  155. $renderer = $document->loadRenderer('modules');
  156. $options = array('style' => 'xhtml');
  157. $position = 'mPosition';
  158. echo $renderer->render($position, $options, null);
  159. ?>
  160.  
  161. <?php echo $this->item->event->afterDisplayContent; ?>
  162. </article>
  163.  
  164. <?php endif; ?>
  165. <jdoc:include type="modules" name="mPosition"/>
Add Comment
Please, Sign In to add comment