Pages, Articles & News
Tools & Plugins
Example / Placeholder Title


Description as an example placeholder. Sample text content for further customization of the "Index36" template.

You are free to edit and customize the template however you like. If you don’t have time or enough knowledge — you can always order template adaptation by contacting me via GitHub or private messages on the digital goods marketplace.

2025-07-18 23:09

Перенос темы в другой раздел. в селекторе убираем родительские категории, если есть дочерние.

Все эти лайфхаки придется выполнять повторно при обновлении движка на своем сайте.

после кода:

$jumpbox[cot_url('forums')] = Cot::$L['Forums'];
foreach (Cot::$structure['forums'] as $key => $val)
{
	if (cot_auth('forums', $key, 'R') && strpos($val['path'], '.'))
	{
		($val['tpath'] == $s) || $movebox[$key] = $val['tpath'];
		$jumpbox[cot_url('forums', 'm=topics&s=' . $key, '', true)] = $val['tpath'];
	}
}

 

добавить код:

// Формируем список подкатегорий с отступами вместо родительской
$movebox = [];
foreach (Cot::$structure['forums'] as $key => $val) {
	if (cot_auth('forums', $key, 'R') && strpos($val['path'], '.')) {
		$depth = substr_count($val['path'], '.');
		$indent = str_repeat('› ', $depth); // нормальный визуальный отступ
		$title = $indent . $val['title'];
		($val['tpath'] == $s) || $movebox[$key] = $val['tpath'];
		$jumpbox[cot_url('forums', 'm=topics&s=' . $key, '', true)] = $val['tpath'];
		$movebox[$key] = $title;
	}
}

 

 

This post was edited by webitproff (2025-07-18 23:14, 10 months ago)
2025-07-19 00:08

немного криво, но пока и так сойдет 💯

Account