Для Joomla, Kunena это самый лучший форум. Но как и все хорошее, форум Kunena нуждается в небольших улучшениях.
Форум Kunena - хитрости
Последняя версия Kunena довольно криво переведена на русский. Проблема там в utf-8. Можно отсюда скачать исправленную версию. Так же из этого архива вырезаны ненужные языки, оставлен только русский.
Как удалить ссылку Kunena 5
Берем файл lkunena\libraries\kunena\controller\application\display.php
В самом конце код:
final public function poweredBy()
{
$templateText = (string) $this->template->params->get('templatebyText');
$templateName = (string) $this->template->params->get('templatebyName');
$templateLink = (string) $this->template->params->get('templatebyLink');
$credits = '<div style="text-align:center">';
$credits .= JHtml::_(
'kunenaforum.link', 'index.php?option=com_kunena&view=credits',
JText::_('COM_KUNENA_POWEREDBY'), '', '', 'follow',
array('style' => 'display: inline; visibility: visible; text-decoration: none;'));
$credits .= ' <a href="https://www.kunena.org" rel="follow"
target="_blank" style="display: inline; visibility: visible; text-decoration: none;">'
. JText::_('COM_KUNENA') . '</a>';
if (trim($templateText)) {
$credits .= ' :: <a href ="' . $templateLink . '" rel="follow" target="_blank" style="text-decoration: none;">'
. $templateText . ' ' . $templateName . '</a>';
}
$credits .= '</div>';
return $credits;
}
}
заменяем на:
final public function poweredBy()
{
$templateText = (string) $this->template->params->get('templatebyText');
$templateName = (string) $this->template->params->get('templatebyName');
$templateLink = (string) $this->template->params->get('templatebyLink');
$credits = '<div style="text-align:center">';
$credits .= JHtml::_(
'kunenaforum.link', 'index.php?option=com_kunena&view=credits',
JText::_(''), '', '', 'follow',
array('style' => 'display: inline; visibility: visible; text-decoration: none;'));
$credits .= '';
if (trim($templateText)) {}
$credits .= '</div>';
return $credits;
}
}
Как удалить название форума из Title
По умолчанию title у форума выгляди так "Название темы - Название форума - Название сайта".
Название сайта можно убрать в Общих настройках Joomla.
А вот название форума удаляется из titla здесь:
Берем файл kunena\libraries\kunena\controller\display.php
строка 273 $title = $title . ' - ' . KunenaFactory::getConfig()->board_title;
делаем $title = $title;
И наш title содержит только название темы.
В некоторых сборках Joomla есть Kunena 3. Вся вкусность там в индивидуальных шаблонах Kunena. При обновлении Kunena до 4 версии, шаблоны работают. А вот при апдейте до Kunena 5, эти темплейты перестают функционировать.
Потому и приходится в отдельных случаях работать с Kunena 4.
В файле \libraries\kunena\view.php сменить:
$credits .= ' <a href="https://www.kunena.org" rel="follow" target="_blank" style="display: inline; visibility: visible; text-decoration: none;">'.JText::_('COM_KUNENA').'</a>';
if ($this->ktemplate->params->get('templatebyText'))
{
$credits .= ' :: ;
}
на:
$credits .= JHtml::_('kunenaforum.link', 'index.php?option=com_kunena&view=credits', JText::_(''), '', '', 'follow', array('style'=>'display: inline; visibility: visible; text-decoration: none;'));
$credits .= ' ';
if ($this->ktemplate->params->get('templatebyText'))
{
$credits .= ' ';
}
и строку 778:
$title = KunenaFactory::getConfig()->board_title .': '. $title;
на:
$title = $title;
Комментарии
RSS лента комментариев этой записи