Занимаясь редактирования шаблона вы могли заметить, что некоторые функции для генерации ссылок имеют захардкоденную часть.
Попробуем отвязать их преобразуется в простые пути.
В файле: engine/bullet_energy/classes/link.class.phpНайти:
public function cat_linck($id = '', $name = '')
{
if($this->cpu) {
if($this->type) {
$result = "<a href=\"{$this->root}{$this->router['main']}/{$this->router['tree']}{$id}{$this->endLinckSymbol}\">" ;
} else {
$result = "<a href=\"{$this->root}{$this->router['main']}/{$this->router['tree']}/{$id}-{$name}{$this->endLinckSymbol}\">" ;
}
} else {
$result = "<a href=\"{$this->root}?do={$this->router['main']}&action=categories&id={$id}\">" ;
}
return $result ;
}
public function topic_linck($id = '', $name = '')
{
if($this->cpu) {
if($this->type) {
$result = "<a href=\"{$this->root}{$this->router['main']}/{$this->router['topic']}{$id}{$this->endLinckSymbol}\">" ;
} else {
$result = "<a href=\"{$this->root}{$this->router['main']}/{$this->router['topic']}/{$id}-{$name}{$this->endLinckSymbol}\">" ;
}
} else {
$result = "<a href=\"{$this->root}?do={$this->router['main']}&action=showtopic&id={$id}\">" ;
}
return $result ;
}
Заменить на:
public function cat_linck($id = '', $name = '', $micro = false)
{
if($this->cpu) {
if($this->type) {
$result = "{$this->root}{$this->router['main']}/{$this->router['tree']}{$id}{$this->endLinckSymbol}" ;
} else {
$result = "{$this->root}{$this->router['main']}/{$this->router['tree']}/{$id}-{$name}{$this->endLinckSymbol}" ;
}
} else {
$result = "{$this->root}?do={$this->router['main']}&action=categories&id={$id}" ;
}
return $result ;
}
public function topic_linck($id = '', $name = '')
{
if($this->cpu) {
if($this->type) {
$result = "{$this->root}{$this->router['main']}/{$this->router['topic']}{$id}{$this->endLinckSymbol}" ;
} else {
$result = "{$this->root}{$this->router['main']}/{$this->router['topic']}/{$id}-{$name}{$this->endLinckSymbol}" ;
}
} else {
$result = "{$this->root}?do={$this->router['main']}&action=showtopic&id={$id}" ;
}
return $result ;
}
Далее в следующих файлах произвести примерные изменения:
Найти:
parent::$tpl->set('[linckTopic]', parent::$link->topic_linck($row['id_topic'], totranslit($row['title'], true, true))) ;
Заменить на:
parent::$tpl->set('[linckTopic]', '<a href="'.parent::$link->topic_linck($row['id_topic'], totranslit($row['title'], true, true)).'">') ;
Искать совпадения по фразам: cat_linck, topic_linck
Данная модификация позволяет организовать более гибкие возможности по оформлению ссылок на топики и категории и многое другое.
Пример:
parent::$tpl->set('[linckTopic]', '<a class="no_linck" href="'.parent::$link->topic_linck($row['id_topic'], totranslit($row['title'], true, true)).'">') ;