Если это ваш первый визит, рекомендуем почитать справку по форуму. Для размещения своих сообщений необходимо зарегистрироваться. Для просмотра сообщений выберите раздел. |
Вывод даты создания материала joomla |
|
Опции темы |
28.10.2014, 03:04 | #1 |
Registered User
|
Вывод даты создания материала joomla
Как правильно организовать вывод даты материала Joomla 1.5 в шаблоне?
Имеем default.php в корне шаблона: Код:
<?php defined('_JEXEC') or die; require_once dirname(__FILE__) . str_replace('/', DIRECTORY_SEPARATOR, '/../../../functions.php'); // Create component view for Joomla! 1.5 or 1.6. // The classes are defined in ../../../functions.php file and encapsulate // version-specific queries and formatting. if ($GLOBALS['version']->RELEASE == '1.6') { $component = new ArtxContent16($this, $this->params); $article = $component->article($this->item, $this->print); JHtml::addIncludePath(JPATH_COMPONENT . DS . 'helpers'); } else { $component = new ArtxContent15($this, $this->params); $article = $component->article($this->article, $this->print); } echo $component->beginPageContainer('item-page'); if ($component->showPageHeading && $article->title != $component->pageHeading) echo $component->pageHeading(); $params = $article->getArticleViewParameters(); if ($article->titleVisible) { $params['header-text'] = $this->escape($article->title); if (strlen($article->titleLink)) $params['header-link'] = $article->titleLink; } // Change the order of "if" statements to change the order of article metadata header items. if (!$article->print && $article->showPdfIcon) $params['metadata-header-icons'][] = $article->pdfIcon(); if ($article->showPrintIcon) $params['metadata-header-icons'][] = $article->print ? $article->printScreenIcon() : $article->printPopupIcon(); if ($article->showEmailIcon) $params['metadata-header-icons'][] = $article->emailIcon(); if (!$article->print && $article->canEdit) $params['metadata-header-icons'][] = $article->editIcon(); if ($article->showHits && $article->hits) $params['metadata-header-icons'][] = $article->hitsInfo(); if ($article->showUrl) $params['metadata-header-icons'][] = $article->urlInfo(); // Build article content $content = ''; if (!$article->showIntro) $content .= $article->event('afterDisplayTitle'); $content .= $article->event('beforeDisplayContent'); $content .= $article->content(); $content .= $article->event('afterDisplayContent'); $params['content'] = $content; // Change the order of "if" statements to change the order of article metadata footer items. if ($article->showParentCategory || $article->showCategory) $params['metadata-footer-icons'][] = $article->categories();; // Render article echo $article->article($params); echo $component->endPageContainer(); Код:
<?php if ($this->params->get('show_create_date')) : ?> <tr> <td valign="top" class="createdate"> <?php echo JHTML::_('date', $this->article->created, JText::_('DATE_FORMAT_LC3')) ?> </td> </tr> <?php endif; ?> |
13.11.2014, 12:10 | #3 |
Registered User
|
if (strlen($article->created))
$params['metadata-header-icons'][] = "<span class=\"my-postdateicon\">" . $article->createdDateInfo($article->created) . "</span>"; if (strlen($article->modified)) $params['metadata-header-icons'][] = "<span class=\"my-postdateicon\">" . $article->modifiedDateInfo($article->modified) . "</span>"; if (strlen($article->published)) $params['metadata-header-icons'][] = "<span class=\"my-postdateicon\">" . $article->publishedDateInfo($article->published) . "</span>"; if (strlen($article->author)) $params['metadata-header-icons'][] = "<span class=\"my-postauthoricon\">" . $article->authorInfo($article->author, $article->authorLink) . "</span>"; не помогает |
14.11.2014, 12:03 | #4 |
Наночлен
Сообщений: 30,595
Регистрация: 06.09.2006
Возраст: 36
Не в сети |
Последний релиз 1.5 версии вышел почти три года назад и вот уже два года, как эта ветка заброшена и даже не поддерживается.
Если ты сейчас зайдешь к специалистам по компьютерной диагностике двигателя с вопросом, в каком месте просверлить дырку в карбюраторе, чтобы лучше тащило, тебе тоже вряд ли кто ответит. Особого смысла держать в памяти такие вещи нет. |