Новости Joomla

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

Ogirok1

  • Осваиваюсь на форуме
  • 16
  • 3 / 0
После обновления форума  Kunena (на версию, если не ошибаюсь  2.02) в префиксы Title добавилось "Topic:".
Теперь тайтл выглядит так: Topic:имя Темы-имя сайта.

Также есть префиксы "Topic: Re:"  , "Category Index".

Падскажите, плз, как убрать такие префиксы. В настройках Kunena такой опции не обнаружил.
« Последнее редактирование: 29.11.2012, 22:23:14 от Ogirok1 »
*

Ogirok1

  • Осваиваюсь на форуме
  • 16
  • 3 / 0
*

Ogirok1

  • Осваиваюсь на форуме
  • 16
  • 3 / 0
вот нашел в Панель управления -  Forum Tools, но чето пока не работает, или не так пользуюсь
« Последнее редактирование: 02.12.2012, 23:41:09 от Ogirok1 »
*

Ogirok1

  • Осваиваюсь на форуме
  • 16
  • 3 / 0
Вот нашел на форуме кунена:
Цитировать
Change Page/Post Title   
The standard format for post titles is:

(Forum Name) :: Topic: (Post Title) (page #/total pages)

I preferred a much more clean look:

(Post Title) :: (Forum Name)

1) To move the forum name to the end, you need to edit /administrator/libraries/view.php, and look for "public function setTitle($title)".

2) To remove the excess elements to the rest, such as removing "Topic:" and the page numbers, edit /views/topic/view.html.php and look for "protected function _prepareDocument($type)".

Hope...
*

Ogirok1

  • Осваиваюсь на форуме
  • 16
  • 3 / 0
вот код с файла "view.html.php"
Код
protected function _prepareDocument($type){
if ($type=='default'){
$this->headerText =  JText::_('COM_KUNENA_MENU_LATEST_DESC');
$this->title = JText::_('COM_KUNENA_ALL_DISCUSSIONS');

$page = intval ( $this->state->get('list.start') / $this->state->get('list.limit') ) + 1;
$pages = intval ( ($this->total-1) / $this->state->get('list.limit') ) + 1;

$title = JText::sprintf('', $this->topic->subject). " ({$page}/{$pages})";
$this->setTitle($title);

// TODO: use real keywords, too
$keywords = $this->escape ( "{$this->topic->subject}, {$this->category->name}, {$this->category->getParent()->name}, {$this->config->board_title}" );
$this->setKeywords ( $keywords );

// Create Meta Description form the content of the first message
// better for search results display but NOT for search ranking!
$description = KunenaHtmlParser::stripBBCode($this->topic->first_post_message, 182);
$description = preg_replace('/\s+/', ' ', $description); // remove newlines
$description = preg_replace('/^[^\w0-9]+/', '', $description); // remove characters at the beginning that are not letters or numbers
$description = trim($description); // Remove trailing spaces and beginning
if ($page) {
$description .= ' - ' . $page . '/' . $pages;  //avoid the "duplicate meta description" error in Google webmaster tools
}
$this->setDescription ( $description );

} elseif($type=='create') {

$this->title = JText::_ ( 'COM_KUNENA_POST_NEW_TOPIC' );
$this->setTitle($this->title);
// TODO: set keywords and description

} elseif ($type=='reply'){

$this->title = JText::_ ( 'COM_KUNENA_POST_REPLY_TOPIC' ). ' ' . $this->topic->subject;
$this->setTitle($this->title);
// TODO: set keywords and description

} elseif($type=='edit'){

$this->title = JText::_ ( 'COM_KUNENA_POST_EDIT' ). ' ' . $this->topic->subject;
$this->setTitle($this->title);
// TODO: set keywords and description

}
}

Подскажите, что изменить в етом коде, чтобы  в тайтлах не отображалось типа " Topics in: Тема"
« Последнее редактирование: 06.12.2012, 02:13:58 от Ogirok1 »
*

mexlist

  • Осваиваюсь на форуме
  • 44
  • 1 / 0
  • http://авто-информ.рф
У меня после обновления Kunena до версии 2.0.3 Title там стал выглядеть вот так: "Тема: название темы (i/i) - Форум - Название сайта"

Ориентируясь на ваше последнее сообщение я нашел файл components/com_kunena/views/topic/view.html.php
В этом файле (почти в самом конце) нашел функцию protected function _prepareDocument($type) и в ней строчку
$title = JText::sprintf('COM_KUNENA_VIEW_TOPICS_DEFAULT', $this->topic->subject). " ({$page}/{$pages})";
заменил на
$title = $this->topic->subject . " ({$page}/{$pages})" . " - " . $this->category->name . " - " . $this->category->getParent()->name;

В итоге тайт темы выглядит так: "Название темы (i/i) - название категории - название родительской категории - Форум - Сайт"

Может кому будет полезно :-)
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Не подхватывается файл локализации компонента Kunena v6.0.3

Автор Александр Кардаш

Ответов: 1
Просмотров: 1564
Последний ответ 02.04.2023, 18:12:09
от Александр Кардаш
Нужна помощь в переносе форума с Kunena на wordpress и любой плагин форума

Автор Zoltar22

Ответов: 0
Просмотров: 1281
Последний ответ 19.10.2022, 04:32:49
от Zoltar22
Форум Kunena. нет поля для ввода текста

Автор sarvasvova

Ответов: 2
Просмотров: 1730
Последний ответ 02.08.2022, 09:32:31
от crimeafrend
Kunena при создании новой темы не выводит поле для ввода текста

Автор sarvasvova

Ответов: 0
Просмотров: 3054
Последний ответ 18.11.2021, 00:31:10
от sarvasvova
Русификация Kunena

Автор pavel82

Ответов: 5
Просмотров: 28315
Последний ответ 04.06.2021, 14:44:49
от Elya