Старый 28.10.2014, 03:04   #1   
Registered User
 
Аватар для Zayard
 
Сообщений: 1,029
Регистрация: 14.01.2007
Записей в дневнике: 1

Zayard вне форума Не в сети
Вывод даты создания материала 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();
Та же default.php в компоненте com_content, тут дата по умолчанию выводится

Код:
<?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, 11:55   #2   
Registered User
 
Аватар для Zayard
 
Сообщений: 1,029
Регистрация: 14.01.2007
Записей в дневнике: 1

Zayard вне форума Не в сети
Во спецы тут я смотрю)))
  Ответить с цитированием
Старый 13.11.2014, 12:10   #3   
Registered User
 
Аватар для Zayard
 
Сообщений: 1,029
Регистрация: 14.01.2007
Записей в дневнике: 1

Zayard вне форума Не в сети
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   
Наночлен
 
Аватар для DRON-ANARCHY
 
Сообщений: 30,595
Регистрация: 06.09.2006
Возраст: 36

DRON-ANARCHY вне форума Не в сети
Цитата:
Сообщение от Zayard Посмотреть сообщение
Во спецы тут я смотрю)))
Цитата:
Сообщение от Zayard Посмотреть сообщение
Joomla 1.5
Последний релиз 1.5 версии вышел почти три года назад и вот уже два года, как эта ветка заброшена и даже не поддерживается.
Если ты сейчас зайдешь к специалистам по компьютерной диагностике двигателя с вопросом, в каком месте просверлить дырку в карбюраторе, чтобы лучше тащило, тебе тоже вряд ли кто ответит. Особого смысла держать в памяти такие вещи нет.
  Ответить с цитированием
Поиск в теме: 



Быстрый переход:

  Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения
BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd. Перевод: zCarot
Support by DrIQ & Netwind