Tags

Tags. What is it and how to use

Insert information content output.

Using tags you can customize the output of information content very flexibly.

In the administration panel a step-by-step guide is available for creating your own tags.

You can create your own tags following the example of existing ones.

All tag template files in the directory: /template/default/tag/


Displaying the number of users on any page

<!--{php $member_num = tag("table=member&condition=groupid>4", 0, "num")}--> Users: {$member_num}


Inserting a news list display tag on any page

{if isset($MODULE[21])} <!--{tag("moduleid=21&condition=status=3&pagesize=10&datetype=2&order=addtime desc&template=list-index-cat-all&length=40")}--> {/if}

{if isset($MODULE[21])} - module definition.

moduleid=21 - module ID. The ID can be viewed in the section: Settings - Modules

status=3 - status 3 = active (moderation completed).

pagesize=10 - number of news items displayed.

datetype=2 - format of the date added.

order=addtime desc - sorting by: date added, descending.

list-index-cat-all - tag template used.

length=40 - limit the number of characters in the topic (title). 40 - number of characters displayed.


Inserting a FAQ list display tag on any page (we do not use templates)

{if isset($MODULE[22])} <!--{php $tags=tag("table=help&condition=status=3&pagesize=1&order=addtime desc&template=null");}--> {loop $tags $t} <a href="{$t[linkurl]}">{$t[title]}</a> {/loop} {/if}

{if isset($MODULE[22])} - module definition.

moduleid=22 - module ID. The ID can be viewed in the section: Settings - Modules

status=3 - status 3 = active (moderation completed).

order=addtime desc - sorting by: date added, descending.

{$t[title]} - title.

{$t[linkurl]} - content URL.


Inserting a tag to display a list of information from a cloned module into any module

Clone a module - See section: Settings - Modules

{if isset($MODULE[100])} <!--{tag("moduleid=100&condition=status=3&catid=4&pagesize=10&datetype=2&order=addtime desc&template=list-cat&length=50")}--> {/if}

{if isset($MODULE[100])} - module definition.

pagesize=10 - number of articles to be displayed.

moduleid=100 - module ID. The ID can be viewed in the section: Settings - Modules

status=3 - status 3 = active (moderation completed).

catid=4 - ID of the category from which to display information. Of all categories - do not use this variable.

pagesize=10 - amount of information displayed.

datetype=2 - format of the date added.

order=addtime desc - sorting by: date added, descending.

list-cat - tag template used.

length=50 - limit the number of characters in the topic (title). 50 - number of characters displayed.


Inserting a tag for displaying articles and categories

{if isset($MODULE[21])} {php $tags = tag("moduleid=21&table=article_21&length=32 &condition=status=3 &pagesize=10&order=addtime desc&template=null")} {loop $tags $t} <p><span class="f_gray f_r">{date('Y-m-d',$t[addtime])}</span> <span class="f_l"> {php $tagss = tag("moduleid=21&table=category&condition=moduleid=21 and catid=".$t[catid]."&template=null")} {loop $tagss $tt} <a href="{$tt[linkurl]}">{dsubstr($tt[catname],22)}</a> {/loop} </span> <a href="{$t[linkurl]}">{$t[title]}</a></p> {/loop} {/if}

{if isset($MODULE[21])} - module definition.

pagesize=10 - number of articles to be displayed.

moduleid=21 - module ID. The ID can be viewed in the section: Settings - Modules

status=3 - status 3 = active (moderation completed).

pagesize=10 - amount of information displayed.

order=addtime desc - sorting by: date added, descending.

length=32 - limit the number of characters in the topic (title). 32 - number of characters displayed.

{dsubstr($tt[catname],22)} - limit the number of characters in the category name. 22 - number of characters displayed.


Date formats

datetype=1 - year datetype=2 - month-day datetype=3 - year-month-day datetype=4 - month-day-hours-minutes datetype=5 - year-month-day-hours-minutes datetype=6 - year-month-day-hours-minutes-seconds datetype=7 - day-month-year datetype=8 - day-month datetype=9 - day-month-hours-minutes datetype=10 - day-month-year-hours-minutes datetype=11 - day-month-year-hours-minutes-seconds

Last updated