Forum categories

Замечания по промежуточной разработке между 0.9.25 - 0.9.26

Обнаруженные некорректности, ошибки в коде и поведении движка их коробки. А также пожелания.


webitproff
webitproff • 2025-03-20 15:45 #1

Cotonti Siena на GitHub


1. добавить файл recentitems.global.php в плагин
и подключить

require_once cot_langfile('recentitems', 'plug');

Потому как в header.tpl не подтягивает локализацию.


2. Tags (Плагин облако тегов) на главной показывает только, если, в конфигурации селектом выбрано "все"

Если выбрать либо "Страницы" либо "Форумы" - на главной облако тегов пустое.

Не работает {INDEX_TAG_CLOUD_ALL_LINK}

ни так {INDEX_TAG_CLOUD_ALL_LINK}
ни так <a href="{INDEX_TAG_CLOUD_ALL_LINK}" class="text-primary">{PHP.L.Tags}</a>

а если прям в здесь же прописать {PHP.R.tags_code_cloud_more} и использовать {PHP|dump}

{PHP.R.tags_code_cloud_more} => "<a class="more" href="{$url}">Все теги</a>"

Смотрю проверку: включена ли опция отображения ссылки "еще теги" в облаке тегов, установлен ли лимит > 0, и достигнуто ли это количество тегов
 

if (Cot::$cfg['plugin']['tags']['more'] && $limit > 0 && $tag_count == $limit) {

Что происходит:

    Cot::$cfg['plugin']['tags']['more'] — проверяется, включена ли настройка плагина tags с ключом more. Эта настройка позволяет отображать ссылку "Показать все теги" или что-то аналогичное.
    $limit > 0 — установлен лимит на количество отображаемых тегов.
    $tag_count == $limit — количество тегов, отображённых сейчас, равно лимиту. Это значит, что потенциально есть ещё теги, но они не показаны из-за ограничения.

Если все три условия выполняются, тогда мы выводим ссылку "Показать все теги" но не работает пока.

вот установки:

{PHP.cfg.plugin.tags.css} => 1
{PHP.cfg.plugin.tags.forums} => 1
{PHP.cfg.plugin.tags.index} => "all"
{PHP.cfg.plugin.tags.lim_forums} => 10
{PHP.cfg.plugin.tags.lim_index} => 25
{PHP.cfg.plugin.tags.lim_pages} => 10
{PHP.cfg.plugin.tags.limit} => 4
{PHP.cfg.plugin.tags.more} => 1
{PHP.cfg.plugin.tags.noindex} => 1
{PHP.cfg.plugin.tags.order} => "Alphabetical"
{PHP.cfg.plugin.tags.pages} => 1
{PHP.cfg.plugin.tags.perpage} => 50
{PHP.cfg.plugin.tags.sort} => "Date"
{PHP.cfg.plugin.tags.title} => 1
{PHP.cfg.plugin.tags.translit} => 1

 

 

This post was edited by webitproff (2025-03-20 16:50, 1 year ago)
🗿

🧙‍♂️ Well met, good traveler! Fate has guided your steps to our humble realm. Here, wise sages and masters of the coding craft ⚒️📜 gather to unravel the mysteries of the code ✨⚙️, share their knowledge, and add new chapters to our chronicles.
⬅️ To the left lie ancient scrolls 📚 filled with forgotten wisdom. ⬆️ Straight ahead, friendly folk offer counsel 💬 to those in need. ➡️ To the right, you may become a chronicler ✍️ yourself, sharing your craft and leaving words of wisdom for those yet to come.
📝 Delay no longer—tell us the name by which you are known, complete the rite of registration 🛡️, and join our fellowship!
🏰 Our brotherhood holds no secret initiation, yet many halls remain closed to wandering guests, for some knowledge 💎 is reserved for those who choose to walk this path beside us.