Новости Joomla

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

bakzz

  • Новичок
  • 9
  • 0 / 0
Доработка шаблона A1
« : 21.03.2011, 10:26:08 »
Подскажите, как сделать чтобы в шаблоне A1
1. Не обрезались названия тем, в последних ответах.


2. Что бы темы HOT, считались относительно количества постов в теме, а не просмотров!
« Последнее редактирование: 21.03.2011, 10:48:06 от bakzz »
*

ChaosHead

  • Moderator
  • 5241
  • 451 / 13
Re: Доработка шаблона A1
« Ответ #1 : 21.03.2011, 11:33:51 »
1. В default шаблоне в коде в category.php указывается до скольки символов обрезать. Тут наверно так-же.
*

bakzz

  • Новичок
  • 9
  • 0 / 0
Re: Доработка шаблона A1
« Ответ #2 : 21.03.2011, 12:38:57 »
Спасибо.

Вы не могли мне помочь, я не очень в PHP скриптах.

Вот это файл, с шаблона А1
Код
<?php
/**
 * @version $Id: categories.php 1908 2010-02-07 21:12:09Z severdia $
 * Kunena Component
 * @package Kunena
 *
 * @Copyright (C) 2008 - 2010 Kunena Team All rights reserved
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
 * @link http://www.kunena.com
 *
 * Based on FireBoard Component
 * @Copyright (C) 2006 - 2007 Best Of Joomla All rights reserved
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
 * @link http://www.bestofjoomla.com
 *
 * Based on Joomlaboard Component
 * @copyright (C) 2000 - 2004 TSMF / Jan de Graaff / All Rights Reserved
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
 * @author TSMF & Jan de Graaff
 **/
// Dont allow direct linking
defined ( '_JEXEC' ) or die ();

?>
<?php foreach ( $this->categories [0] as $section ) { ?>
<div class="forumlist sectionsuffix-<?php echo intval($section->id);?>">
<div class="catinner">
<span class="corners-top"><span></span></span>
<div class="body-top1"><div class="body-top2"><div class="body-top3"><div class="body-top4"></div></div></div></div>
<ul class="topiclist">
<li class="header">
<dl class="icon cat_<?php echo intval($section->id);?>">
<dt><?php echo CKunenaLink::GetCategoryLink ( 'listcat', intval($section->id), $this->escape($section->name), 'follow', $class = 'ktitle kl' );?></dt>
<dd class="topics"><?php echo JText::_('COM_KUNENA_GEN_TOPICS');?></dd>
<dd class="posts"><?php echo JText::_('COM_KUNENA_GEN_REPLIES');?></dd>
<dd class="lastpost"><span><?php echo JText::_('COM_KUNENA_GEN_LAST_POST');?></span></dd>
<dd class="tk-toggler"><a class="ktoggler close" rel="catid_<?php echo intval($section->id); ?>"></a></dd>
</dl>
</li>
</ul>
<?php if (!empty($section->description)) : ?>
<div class="tksection-desc km">
<?php echo KunenaParser::parseBBCode ( $section->description ); ?>
</div>
<?php endif; ?>
<div  id="catid_<?php echo intval($section->id); ?>">
<ul class="topiclist forums">
<?php if (empty ( $this->categories [$section->id] )) { ?>
<li class="row categorysuffix-<?php echo intval($category->id);?>" style="padding:5px !important;">
<?php echo '' . JText::_('COM_KUNENA_GEN_NOFORUMS'). ''; ?>
</li>
<?php } else { ?>
<?php
foreach ( $this->categories [$section->id] as $category ) { ?>
<li class="row categorysuffix-<?php echo intval($category->id);?>">
<dl class="icon <?php if ($this->config->shownew && $this->my->id != 0) { ?>caticon<?php echo intval($category->new)? '-new':'-nonew'; ?><?php } else { ?>caticon-notlogin<?php } ?>">
<dt class="catname">
<span class="cattitle">
<?php echo CKunenaLink::GetCategoryLink ( 'showcat', intval($category->id), $this->escape($category->name ) );?>
</span>
<?php if (!empty($category->description)): ?>
<span class="catdesc">
<?php echo KunenaParser::parseBBCode ($category->description)?>
</span>
<?php endif ?>
<?php if (! empty ( $this->modlist [$category->id] )) : ?>
<span class="tkthead-moderators ks">
<?php
// get the Moderator list for display
$modslist = array();
foreach ( $this->modlist [$category->id] as $mod ) {
$modslist[] = CKunenaLink::GetProfileLink ( intval($mod->userid) );
}
echo JText::_('COM_KUNENA_GEN_MODERATORS'). ': ' . implode(', ', $modslist);
?>
</span>
<?php endif; ?>
<?php if (! empty ( $this->pending [$category->id] )) : ?>

<span class="tkalert ks">
<?php echo CKunenaLink::GetCategoryReviewListLink ( intval($category->id), intval($this->pending [$category->id]). ' ' . JText::_('COM_KUNENA_SHOWCAT_PENDING'), 'nofollow' ); ?>
</span>
<?php endif; ?>
<?php
if ($category->review) :
echo CKunenaTools::showIcon ( 'kforummoderated', JText::_('COM_KUNENA_GEN_MODERATED') );
endif;
if ($category->locked) :
echo CKunenaTools::showIcon ( 'kforumlocked', JText::_('COM_KUNENA_GEN_LOCKED_FORUM') );
endif;
?>
</dt>
<dd class="topics">
<span>
<?php echo CKunenaTools::formatLargeNumber ( intval($category->numTopics) )?>
</span>
</dd>
<dd class="posts">
<span>
<?php echo CKunenaTools::formatLargeNumber ( intval($category->numPosts) )?>
</span>
</dd>
<?php if ($category->numTopics != 0) { ?>
<dd class="lastpost">
<?php if ($category->new) {
echo CKunenaTools::showIcon ( 'catunreadeicon', JText::_('COM_KUNENA_GEN_FORUM_NEWPOST') );
} ?>
<?php
if ($this->config->avataroncat > 0) :
$profile = KunenaFactory::getUser((int)$category->userid);
$useravatar = $profile->getAvatarLink('klist_avatar');
if ($useravatar) :
?>
<span class="tklatest-avatar">
<?php echo CKunenaLink::GetProfileLink ( intval($category->userid), $useravatar ); ?>
</span>
<?php
endif;
endif;
?>
<span>
<b>
<?php
echo CKunenaLink::GetThreadPageLink ( 'view', intval($category->catid), intval($category->thread), intval($category->page), intval($this->config->messages_per_page), KunenaParser::parseText(substr(( $category->subject ), 0, 20)." ..."), intval($category->id_last_msg))."&nbsp;&nbsp;";
echo CKunenaLink::GetThreadPageLink ( 'view', intval($category->catid), intval($category->thread), intval($category->page), intval($this->config->messages_per_page), '<img class="" src="' . KUNENA_URLICONSPATH . 'icon_topic_latest.gif" border="0" alt="' . JText::_('COM_KUNENA_SHOW_LAST'). '" title="' . JText::_('COM_KUNENA_SHOW_LAST'). '"/>', intval($category->id_last_msg), $rel='follow');
?></b>
</span>
<?php
echo '<br /><span class="nowrap ks">'.JText::_('COM_KUNENA_BY'). ' ';
echo CKunenaLink::GetProfileLink ( intval($category->userid), $this->escape($category->mname) ).'</span>';
echo '<br /><span class="nowrap ks" title="' . CKunenaTimeformat::showDate ( $category->time_last_msg, 'config_post_dateformat_hover' ). '">' . CKunenaTimeformat::showDate ( $category->time_last_msg, 'config_post_dateformat' ). '</span>';
?>
</dd>
<?php } else { ?>
<dd class="lastpost nopost">
<span>
<?php echo JText::_('COM_KUNENA_NO_POSTS'); ?>
</span>
</dd>
<?php } ?>
<?php if (! empty ( $this->childforums [$category->id] )) : ?>
<dd style="padding: 0 0 5px 45px;clear:left;border-left:0px;">
<span class="tkchild-title ks">
<?php //echo count ( $this->childforums [$category->id] ) == 1 ? JText::_('COM_KUNENA_CHILD_BOARD') : JText::_('COM_KUNENA_CHILD_BOARDS')?>
</span>
<?php foreach ( $this->childforums [$category->id] as $childforum ) : ?>
<span class="tkchild-name ks tkchild-column-<?php echo $this->params->get('numChildcolumn')?>">
<?php
echo $childforum->htmlCategoryIcon;
echo CKunenaLink::GetCategoryLink ( 'showcat', intval($childforum->id), $this->escape($childforum->name), '','', KunenaParser::stripBBCode ( $childforum->description ) );
echo '<span class="tkchild-count ks">(' . $this->escape($childforum->numTopics). "/" . $this->escape($childforum->numPosts). ')</span>';
?>
</span>
<?php endforeach; ?>
</dd>
<?php endif; ?>
</dl>
</li>
<?php } ?>
</ul>
<?php } ?>
<div class="body-bottom1"><div class="body-bottom2"><div class="body-bottom3"><div class="body-bottom4"></div></div></div></div>
</div>
<span class="corners-bottom"><span></span></span>
</div>
</div>

<?php
$sss = $section->id;
if (JDocumentHTML::countModules ('kunena_section_' . $sss) && $this->params->get('adsStyle') == 'template') : ?>
<div class="forumlist">
<div class="catinner">
<span class="corners-top"><span></span></span>
<ul class="topiclist">
<li class="header">
<dl class="icon">
<dt>
<a class="ktitle kl"><?php echo JText::_('COM_KUNENA_TEMPLATE_SECTIONS_ADS'); ?></a>
</dt>
</dl>
</li>
</ul>
<ul class="topiclist forums">
<li class="row">
<dl class="icon">
<dt></dt>
<dd class="tk-banner">
<?php CKunenaTools::showModulePosition('kunena_section_' . $sss); ?>
</dd>
</dl>
</li>
</ul>
<span class="corners-bottom"><span></span></span>
</div>
</div>
<?php else : ?>
<div class="tk-simple-banner">
<?php CKunenaTools::showModulePosition('kunena_section_' . $sss); ?>
</div>
<?php endif ?>
<?php
}
?>

*

ChaosHead

  • Moderator
  • 5241
  • 451 / 13
Re: Доработка шаблона A1
« Ответ #3 : 21.03.2011, 12:42:31 »
Код
echo CKunenaLink::GetThreadPageLink ( 'view', intval($category->catid), intval($category->thread), intval($category->page), intval($this->config->messages_per_page), KunenaParser::parseText(substr(( $category->subject ), 0, 20)." ..."), intval($category->id_last_msg))."&nbsp;&nbsp;";
Вот тут 20 меняйте на нужное вам число побольше.
*

bakzz

  • Новичок
  • 9
  • 0 / 0
Re: Доработка шаблона A1
« Ответ #4 : 21.03.2011, 12:52:23 »
Спасибо огромное, помогло. а по второму вопросу не подскажите? в каком направлении искать?

зы. как туть дать в репу?
*

ChaosHead

  • Moderator
  • 5241
  • 451 / 13
Re: Доработка шаблона A1
« Ответ #5 : 21.03.2011, 13:39:48 »
По поводу второго вопроса - без понятия. У меня и шаблона такого нет. Он же платный вроде.
p.s. У вас сообщений мало, чтобы плюсовать. Да и не важно это особо.
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Настройка внешнего шаблона Kunena

Автор z-17

Ответов: 4
Просмотров: 2922
Последний ответ 24.12.2018, 00:04:12
от REB
Как сохранить оригинальный вид шаблона Kunena?

Автор Vasilich

Ответов: 2
Просмотров: 942
Последний ответ 08.08.2018, 16:09:49
от Vasilich
Правильное переопределение шаблона (оверрайд, override) Kunena 4 \ Kunena 5 в Joomla

Автор ChaosHead

Ответов: 51
Просмотров: 15566
Последний ответ 27.05.2017, 19:57:29
от ChaosHead
Вопросик по редактированию шаблона Kunena 1.7, Joomla 1.5.25

Автор Porohok

Ответов: 0
Просмотров: 915
Последний ответ 03.04.2017, 14:40:28
от Porohok
Fatal Error после установки шаблона JF Sirena

Автор Modis

Ответов: 0
Просмотров: 1264
Последний ответ 09.03.2017, 15:01:54
от Modis