OSDN Git Service

初回コミット(v2.6.17.1)
[magic3/magic3.git] / templates / s / default / html / com_content / frontpage / default_item.php
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
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->item->params->get('show_title')) {
15  ob_start();
16 ?>
17  <h2 class="art-postheader"><?php echo JHTML::_('image.site', 'postheadericon.png', null, null, null, JText::_("postheadericon"), array('width' => '32', 'height' => '32')); ?> 
18 <?php
19  artxFragmentBegin(ob_get_clean());
20  if ($this->item->params->get('link_titles') && $this->item->readmore_link != '')
21   artxFragmentContent('<a href="' . $this->item->readmore_link . '" class="PostHeader">' . $this->escape($this->item->title) . '</a>');
22  else
23   artxFragmentContent($this->escape($this->item->title));
24  ob_start();
25 ?>
26
27 </h2>
28
29 <?php
30  artxFragmentEnd(ob_get_clean());
31 }
32 artxFragmentBegin("<div class=\"art-postheadericons art-metadata-icons\">\r\n");
33   if ($this->params->get('show_url') && $this->article->urls)
34     artxFragment('', '<a href="http://' . $this->item->urls . '" target="_blank">' . $this->item->urls . '</a>', '', ' | ');
35 if ($this->item->params->get('show_create_date')) {
36 artxFragment('', JHTML::_('date', $this->item->created, JText::_('DATE_FORMAT_LC2')), '', ' | ');
37 }
38 if (($this->item->params->get('show_author')) && ($this->item->author != "")) {
39   artxFragment('', JText::sprintf('Written by', ($this->item->created_by_alias ? $this->item->created_by_alias : $this->item->author)), '', ' | ');
40 }
41 if ($this->item->params->get('show_pdf_icon'))
42   artxFragment('', JHTML::_('icon.pdf', $this->item, $this->item->params, $this->access), '', ' | ');
43 if ($this->item->params->get('show_print_icon'))
44   artxFragment('', JHTML::_('icon.print_popup', $this->item, $this->item->params, $this->access), '', ' | ');
45 if ($this->item->params->get('show_email_icon'))
46   artxFragment('', JHTML::_('icon.email', $this->item, $this->item->params, $this->access), '', ' | ');
47 if ($canEdit)
48   artxFragment('', JHTML::_('icon.edit', $this->item, $this->item->params, $this->access), '', ' | ');
49 artxFragmentEnd("\r\n</div>\r\n");
50 artxFragmentEnd("\r\n</div>\r\n");
51 echo "<div class=\"art-postcontent\">\r\n    <!-- article-content -->\r\n";
52 if (!$this->item->params->get('show_intro'))
53  echo $this->item->event->afterDisplayTitle;
54 echo $this->item->event->beforeDisplayContent;
55 if (($this->item->params->get('show_section') && $this->item->sectionid) || ($this->item->params->get('show_category') && $this->item->catid)) {
56 ?>
57 <table class="contentpaneopen<?php echo $this->item->params->get('pageclass_sfx' ); ?>">
58 <tr>
59  <td>
60 <?php
61 if ($this->item->params->get('show_section') && $this->item->sectionid && isset($this->item->section)) {
62  echo "<span>";
63  if ($this->item->params->get('link_section'))
64   echo '<a href="'.JRoute::_(ContentHelperRoute::getSectionRoute($this->item->sectionid)).'">';
65  echo $this->item->section;
66  if ($this->item->params->get('link_section'))
67   echo '</a>';
68  if ($this->item->params->get('show_category'))
69   echo ' - ';
70  echo "</span>";
71 }
72 if ($this->item->params->get('show_category') && $this->item->catid) {
73  echo "<span>";
74  if ($this->item->params->get('link_category'))
75   echo '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->catslug, $this->item->sectionid)).'">';
76  echo $this->item->category;
77  if ($this->item->params->get('link_category'))
78   echo '</a>';
79  echo "</span>";
80 }
81 ?>
82  </td>
83 </tr>
84 </table>
85 <?php
86 }
87 if (isset ($this->item->toc))
88  echo $this->item->toc;
89 echo "<div class=\"art-article\">", $this->item->text, "</div>";
90 if (intval($this->item->modified) != 0 && $this->item->params->get('show_modify_date')) {
91  echo "<p class=\"modifydate\">";
92  echo JText::_('Last Updated') . ' (' . JHTML::_('date', $this->item->modified, JText::_('DATE_FORMAT_LC2')) . ')';
93  echo "</p>";
94 }
95 if ($this->item->params->get('show_readmore') && $this->item->readmore) {
96 ?>
97 <p>
98  <span class="art-button-wrapper">
99   <span class="l"> </span>
100   <span class="r"> </span>
101   <a class="readon art-button" href="<?php echo $this->item->readmore_link; ?>">
102   <?php
103    if ($this->item->readmore_register) {
104     echo str_replace(' ', '&nbsp;', JText::_('Register to read more...'));
105    } elseif ($readmore = $this->item->params->get('readmore')){ 
106     echo str_replace(' ', '&nbsp;', $readmore);
107    } else {
108     echo str_replace(' ', '&nbsp;', JText::sprintf('Read more...'));
109    }
110   ?>
111   </a>
112  </span>
113 </p>
114 <?php
115 }
116 echo "<span class=\"article_separator\">&nbsp;</span>";
117 echo $this->item->event->afterDisplayContent;
118 echo "\r\n    <!-- /article-content -->\r\n</div>\r\n<div class=\"cleared\"></div>\r\n";
119 ?>
120
121 </div>
122
123                 <div class="cleared"></div>
124     </div>
125 </div>
126
127
128 <?php if ($this->item->state == 0) : ?>
129 </div>
130 <?php endif; ?>