Сквозная нумерация сообщений IPS4

В IPB 3 на странице темы была сквозная нумерация сообщений, т.е. 1, 2, 3, 4 …, это служило больше для визуальной составляющей:

В IPS Suite 4 данной возможности нет, но легко добавляется на уровне шаблонов.

Открыть  Appearance > Themes > Your skin > Templates > forums > front > topics > topic

Найти:

{{$postCount=0; $timeLastRead = $topic->timeLastRead(); $lined = FALSE;}}

Вставить ниже:

{{$currentPage = \IPS\Request::i()->page;}}
{{$commentPerPage = \IPS\Settings::i()->forums_posts_per_page;}}
{{if empty( $currentPage )}}
    {{$commentPosition = 0;}}
{{else}}
    {{$currentPage = $currentPage-1;}}
    {{$commentPosition = $currentPage*$commentPerPage;}}
{{endif}}

Найти:

{{$postCount++;}}

Вставить ниже:

{{$commentPosition++;}}
{{$comment->position = $commentPosition;}}

 

Открыть Appearance > Themes > Your skin > Templates > forums > front > topics > post

Найти:

{{if $comment->mapped('first') }}

Вставить выше:

<li><span class='ipsComment_count'>#{$comment->position}</span></li>

Оставьте комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *