OSDN Git Service

初回コミット(v2.6.17.1)
[magic3/magic3.git] / templates / car_city_v1 / html / com_content / article / default.php
1 <?php
2 defined('_JEXEC') or die('Restricted access'); // no direct access
3 require_once dirname(__FILE__) . str_replace('/', DIRECTORY_SEPARATOR, '/../../../functions.php');
4
5 $canEdit = ($this->user->authorize('com_content', 'edit', 'content', 'all') || $this->user->authorize('com_content', 'edit', 'content', 'own'));
6
7 echo artxPost(artxPageTitle($this, $this->params->get('show_page_title', 1) && $this->params->get('page_title') != $this->article->title), null);
8 ?>
9 <div class="art-Post">
10     <div class="art-Post-body">
11 <div class="art-Post-inner">
12 <?php
13 artxFragmentBegin("<div class=\"art-PostMetadataHeader\">\r\n");
14 if ($this->params->get('show_title')) {
15  ob_start();
16 ?>
17  <h2 class="art-PostHeader"> 
18 <?php
19  artxFragmentBegin(ob_get_clean());
20  if ($this->params->get('link_titles') && $this->article->readmore_link != '')
21   artxFragmentContent('<a href="' . $this->article->readmore_link . '" class="PostHeader">' . $this->escape($this->article->title) . '</a>');
22  else
23   artxFragmentContent($this->escape($this->article->title));
24  ob_start();
25 ?>
26
27 </h2>
28
29 <?php
30  artxFragmentEnd(ob_get_clean());
31 }
32 artxFragmentEnd("\r\n</div>\r\n");
33 artxFragmentBegin("<div class=\"art-PostHeaderIcons art-metadata-icons\">\r\n");
34   if ($this->params->get('show_url') && $this->article->urls)
35    artxFragment('', '<a href="http://' . $this->item->urls . '" target="_blank">' . $this->item->urls . '</a>', '', ' | ');
36 if ($this->params->get('show_create_date')) {
37   artxFragment('', JHTML::_('image.site', 'PostDateIcon.png', null, null, null, JText::_("PostDateIcon"), array('width' => '17', 'height' => '18')) . JHTML::_('date', $this->article->created, JText::_('DATE_FORMAT_LC2')), '', ' | ');
38 }
39 if (($this->params->get('show_author')) && ($this->article->author != "")) {
40   artxFragment('', JHTML::_('image.site', 'PostAuthorIcon.png', null, null, null, JText::_("PostAuthorIcon"), array('width' => '14', 'height' => '14')) . JText::sprintf('Written by', ($this->article->created_by_alias ? $this->article->created_by_alias : $this->article->author)), '', ' | ');
41 }
42 if (!$this->print && $this->params->get('show_pdf_icon'))
43  artxFragment('', JHTML::_('icon.pdf',  $this->article, $this->params, $this->access), '', ' | ');
44 if (!$this->print && $this->params->get('show_print_icon' ))
45  artxFragment('', JHTML::_('icon.print_popup', $this->article, $this->params, $this->access), '', ' | ');
46 if (!$this->print && $this->params->get('show_email_icon'))
47  artxFragment('', JHTML::_('icon.email', $this->article, $this->params, $this->access), '', ' | ');
48 if (!$this->print && $canEdit)
49  artxFragment('', JHTML::_('icon.edit', $this->article, $this->params, $this->access), '', ' | ');
50
51 if ($this->print)
52  artxFragment('', JHTML::_('icon.print_screen',  $this->article, $this->params, $this->access, array('class' => 'art-metadata-icon')), '', ' | ');
53 artxFragmentEnd("\r\n</div>\r\n");
54 echo "<div class=\"art-PostContent\">\r\n";
55 if (!$this->params->get('show_intro'))
56  echo $this->article->event->afterDisplayTitle;
57 echo $this->article->event->beforeDisplayContent;
58 if (($this->params->get('show_section') && $this->article->sectionid) || ($this->params->get('show_category') && $this->article->catid)) {
59 ?>
60 <table class="contentpaneopen<?php echo $this->params->get('pageclass_sfx' ); ?>">
61 <tr>
62         <td>
63 <?php
64 if ($this->params->get('show_section') && $this->article->sectionid && isset($this->article->section)) {
65  echo "<span>";
66  if ($this->params->get('link_section'))
67   echo '<a href="'.JRoute::_(ContentHelperRoute::getSectionRoute($this->article->sectionid)).'">';
68  echo $this->article->section;
69  if ($this->params->get('link_section'))
70   echo '</a>';
71  if ($this->params->get('show_category'))
72   echo ' - ';
73  echo "</span>";
74 }
75 if ($this->params->get('show_category') && $this->article->catid) {
76  echo "<span>";
77  if ($this->params->get('link_category'))
78   echo '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->article->catslug, $this->article->sectionid)).'">';
79  echo $this->article->category;
80  if ($this->params->get('link_category'))
81   echo '</a>';
82  echo "</span>";
83 }
84 ?>
85         </td>
86 </tr>
87 </table>
88 <?php
89 }
90 if (isset ($this->article->toc))
91  echo $this->article->toc;
92 echo "<div class=\"art-article\">";
93 echo $this->article->text;
94 echo "</div>";
95 if (intval($this->article->modified) !=0 && $this->params->get('show_modify_date')) {
96  echo "<p class=\"modifydate\">";
97  echo JText::_('Last Updated' ) . ' (' . JHTML::_('date', $this->article->modified, JText::_('DATE_FORMAT_LC2')) . ')';
98  echo "</p>";
99 }
100 echo "<span class=\"article_separator\">&nbsp;</span>";
101 echo $this->article->event->afterDisplayContent;
102 echo "\r\n</div>\r\n<div class=\"cleared\"></div>\r\n";
103 ?>
104
105 </div>
106
107                 <div class="cleared"></div>
108     </div>
109 </div>
110