Новости Joomla

0 Пользователей и 1 Гость просматривают эту тему.
  • 2 Ответов
  • 1889 Просмотров
*

squid

  • Захожу иногда
  • 85
  • 4 / 0
  • :P
Не хочеться чтобы отображался текс самой статьи, а только название... но при этом, если убрать в шаблоне
Код: php
<?php echo $e['text']; ?>
то не отображаеться, сколько комментариев там...



Возможно ли проделать такое для MyBlog, а для обычных статей оставить как есть?
*

squid

  • Захожу иногда
  • 85
  • 4 / 0
  • :P
Re: Отображение комментариев в MyBlog
« Ответ #1 : 25.06.2010, 19:13:28 »
up
*

squid

  • Захожу иногда
  • 85
  • 4 / 0
  • :P
Re: Отображение комментариев в MyBlog
« Ответ #2 : 26.06.2010, 17:02:29 »
здесь надо изменить что-то...?


Код: php
<?php
// no direct access
(defined('_VALID_MOS') OR defined('_JEXEC')) or die('Restricted access');
/*
 *
 * Template for links (Readmore and Add comment) attached to content items on frontpage and blogs
 *
 */
class jtt_tpl_links extends JoomlaTuneTemplate
{
function render()
{
$readmoreLink = $this->getReadmoreLink();
$commentsLink = $this->getCommentsLink();

$hitsCount = '';

if ($this->getVar('show_hits', 0) == 1) {
$content = $this->getVar('content-item');


if (!isset($content->hits)) {
$dbo = & JCommentsFactory::getDBO();
$dbo->setQuery('SELECT hits FROM #__content WHERE id = ' . intval($content->id));
$cnt = (int) $dbo->loadResult();
} else {
$cnt = (int) $content->hits;
}

$hitsCount = JText::_('Hits'). ': ' . $cnt;
}

if ($readmoreLink != '' || $commentsLink != 'commentsLink') {
?>
<div class="jcomments-links"><?php echo $readmoreLink; ?> <?php echo $commentsLink; ?> <?php echo $hitsCount; ?></div>
<?php
        }
}

/*
*
* Display Readmore link
*
*/
function getReadmoreLink()
{
if ($this->getVar('readmore_link_hidden', 0) == 1) {
return '';
}

$link  = $this->getVar('link-readmore');
$text  = $this->getVar('link-readmore-text');
$title = $this->getVar('link-readmore-title');
$css   = $this->getVar('link-readmore-class');

return '<a class="' . $css . '" href="'. $link .'" title="' . $title . '">' . $text . '</a>';
}

/*
*
* Display Comments or Add comments link
*
*/
function getCommentsLink()
{
if ($this->getVar('comments_link_hidden') == 1) {
return '';
}

$style = $this->getVar('comments_link_style');
$count = $this->getVar('comments-count');
$link  = $this->getVar('link-comment');
$css   = $this->getVar('link-comments-class');

if ($count == 0) {
return '<a href="' . $link . '#addcomments" class="' . $css . '">' . JText::_('Add comment'). '</a>';
} else {
$text = JText::sprintf('Read comments', $count);

if ($this->getVar('use-plural-forms', 0)) {
$comments_pf = JText::_('comments_pf');

if ($comments_pf != '') {
global $mainframe;
$pf = JoomlaTuneLanguageTools::getPlural($mainframe->getCfg('lang'), $count, $comments_pf);
if ($pf != '') {
$text = JText::sprintf('COMMENTS2', $count, $pf);
}
}
}

switch($style) {
case -1:
return '<span class="' . $css . '">' . $text . '</span>';
break;
default:

return '<a href="' . $link . '#comments" class="' . $css . '">' . $text . '</a>';
break;
}
}
}
}
?>
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

JEvents - неправильное отображение всплывающей подсказки

Автор Mihas_01

Ответов: 2
Просмотров: 1424
Последний ответ 28.11.2016, 08:11:38
от Mihas_01
Отображение разных шаблонов в зависимости от домена сайта

Автор NeuroZ

Ответов: 4
Просмотров: 1345
Последний ответ 25.01.2016, 18:37:50
от dmitry_stas
Mobile Joomla - Отображение

Автор JDV

Ответов: 15
Просмотров: 2887
Последний ответ 21.12.2015, 18:43:37
от vetkrs
mobile Joomla отображение статьи

Автор xDD

Ответов: 3
Просмотров: 1155
Последний ответ 27.10.2015, 23:09:55
от beliyadm
Отображение галереи Joomla 3

Автор hellydan

Ответов: 8
Просмотров: 1743
Последний ответ 12.03.2015, 15:45:13
от hellydan