ФорумыCMSCotontiНастройки плагинов для отображения на титульной странице
1  20.08.2024 19:59


Сообщения: 10

Настройки плагинов для отображения последних сообщений с Форума, Статей , Комментариев :

<!-- BEGIN: MAIN -->
<section class="flex_block_style_1">

<aside class="div_info_block_main_page">

	<!-- IF {PHP.cot_modules.forums} -->
	<div class="aside_body">

		<!-- IF {PHP.usr.maingrp} > 1 --> 			
		{PHP|sedby_topiclist('forman.topiclist',{PHP.cfg.menu7},'ft_updated desc')}
		<!-- ELSE -->     			
		{PHP|sedby_topiclist('forman.topiclist',{PHP.cfg.menu7},'ft_updated DESC','','black','-0PIC18Compiler;')}
		<!-- ENDIF -->
	</div>
	<!-- ENDIF -->

	<!-- IF {PHP.cot_modules.page} -->
	<div class="aside_body">

		<!-- IF {PHP.usr.maingrp} > 1 --> 	
		{PHP|sedby_pagelist('pagelist', {PHP.cfg.menu8}, 'page_date DESC','')}
		<!-- ELSE -->     			
		{PHP|sedby_pagelist('pagelist', {PHP.cfg.menu8}, 'page_date DESC','','black','-0PIC18Compiler;')}
		<!-- ENDIF -->	
	</div>
	<!-- ENDIF -->

	<!-- IF {PHP.cot_plugins_active.comments} -->
	<div class="aside_body">

		<!-- IF {PHP.usr.maingrp} > 1 -->          
			{PHP|sedby_comlist('comlist.aside',{PHP.cfg.menu9},'com_date desc','')}
		<!-- ELSE -->                 
			{PHP|sedby_comlist('comlist.aside',{PHP.cfg.menu9},'RAND()',{PHP.cfg.menu5})}
		<!-- ENDIF -->	
	</div>
	<!-- ENDIF -->


	<!-- IF {INDEX_POLLS} -->
	<div class="div_block_polls">
		<div class="div_block_default div_title_polls">
			{PHP.L.Polls}
		</div>
		{INDEX_POLLS}
	</div>
	<!-- ENDIF -->
	
	<!-- IF {PHP.out.whosonline} -->
	<div class="div_block_online">
		<div class="div_block_default div_title_online">
			{PHP.L.Online}
		</div>
		<div class="div_options_online">
			<a href="{PHP|cot_url('plug','e=whosonline')}">{PHP.out.whosonline}</a>
			<!-- IF {PHP.out.whosonline_reg_list} -->:<br />{PHP.out.whosonline_reg_list}<!-- ENDIF -->
		</div>
	</div>
	<!-- ENDIF -->

</aside>

<section class="div_info_block_3">
			<div class="div_block_default div_new_atsite">
				{PHP.L.DarkB_new_on_site}
			</div>

		<!-- IF {PHP.usr.maingrp} > 1 --> 	
			{PHP|sedby_pagelist('pagelist.newpages', {PHP.cfg.menu6}, 'page_date DESC','page_marknew = 1','','','','','','page')}
		<!-- ELSE --> 	
			{PHP|sedby_pagelist('pagelist.newpages', {PHP.cfg.menu6}, 'page_date DESC','page_marknew = 1','','','','','','page')}
		<!-- ENDIF -->			
</section>
</section>
<!-- END: MAIN -->

 

Добавлено 1 день спустя:

  1. Создаем экстраполе com_usermaingrp в таблице комментов
  2. Пишем $usr[‘maingrp’] в данное экстраполе через хук comments.send.new
  3. Вывод комментов через
{PHP.usr.maingrp|sedby_comlist(‘comlist’, 5, ‘com_date DESC’, ‘com_usermaingrp = $this’)}

 

Отредактировано: Kabak (18.09.2024 05:49, 5 месяцев назад)