Article annotation

<< Click to Display Table of Contents >>

Navigation:  Templates >

Article annotation

Displaying of the article annotation can be configured in shortstory.tpl. You can use the following tags:

 

{title}

Article title.

{title limit="x"}

Article title limited by X number of symbols.

{news-id}

Article ID. This ID is used to store this article in the database.

{short-story}

Displays the article annotation text.

{short-story limit="x"}

Displays the article annotation text without HTML formatting limited by X number of symbols.

{author}

Author of the article.

{date}

Publication date. The date format can be configured in system settings.

{rating}

Displays the article rating.

[rating] text [/rating]

Displays the enclosed text if article rating is enabled and hides the contents if it was disabled when adding the article.

[rating-type-1] text [/rating-type-1]

Displays the enclosed text if the first 'Rating' type was enabled in script settings.

[rating-type-2] text [/rating-type-2]

Displays the enclosed text if the second rating type 'Likes only' was enabled in script settings.

[rating-type-3] text [/rating-type-3]

Displays the enclosed text if the third rating type 'Like' or 'Dislike' was enabled in script settings.

[rating-type-4] text [/rating-type-4]

Displays the enclosed text if the fourth rating type 'Like' and 'Dislike' was enabled in script settings.

[rating-minus] text [/rating-minus]

Displays the enclosed text as a link to dislike the article. This link is displayed if the third rating type is used.

[rating-plus] text [/rating-plus]

 

Displays the enclosed text as a link to like the article. This link is displayed if the third rating type is used.

{likes}

Display number of likes

{dislikes}

Display number of dislikes

{vote-num}

Displays the number of users who rated this article.

{ratingscore}

Displays average rating figure containing fractional part amounting from one to five

{comments-num}

Displays the number of comments for this article.

{category}

Article category.

{category-icon}

Link to the category icon. Note, only path to the image is displayed. You should organize its display by yourself, for example <img src="{category-icon}" />.

[category-icon] text [/category-icon]

Displays text enclosed in them, if in the category settings an icon was set for the category where the post is located

[not-category-icon] text [/not-category-icon]

Displays text, if no icon is set for the category where the post is located

{views}

Number of views of the article.

{favorites}

Link to add or remove from Favorites.

[add-favorites] text [/add-favorites]

Link to add the article to Favorites list on the website.

[del-favorites] text [/del-favorites]

Link to remove the article from Favorites list on the website.

[edit] text [/edit]

Link to edit the article.

{link-category}

Link to the list of categories where the article belongs to.

[full-link] and [/full-link]

Link to the full article, for example [full-link]Подробнее…[/full-link].

[com-link] and [/com-link]

Link to comments to this article. Displayed if comments are allowed.

[xfvalue_x]

Value of extra field "x", where "x" is the name of the extra field

[xfvalue_X limit="X2"]

Displays the article annotation text without HTML formatting limited by X2 number of symbols. Text is limited to the last logical word. For example, [xfvalue_test limit="50"] shows the first 50 symbols of the extra field value named test.

[xfgiven_x] [xfvalue_x] [/xfgiven_x]

Displays the extra field "x" if it is not empty. If the field has no value then the text is simply not displayed.

[xfnotgiven_X] [/xfnotgiven_X]

Displays the enclosed text if extra field has not been set when publishing the article, where "х" is the name of the extra field.

[ifxfvalue tagname="tagvalue"] Text [/ifxfvalue]

Displays the enclosed text if the extra field value matches the specified value, where tagmane is a name of the extra field, and tagvalue is its value. The values of tagvalue can be listed separated by commas.

[ifxfvalue tagname!="tagvalue"] Text [/ifxfvalue]

Text between them will be displayed if the extra field value does not match the specified value, where tagmane is a name of the extra field, and tagvalue is its value. The values of tagvalue can be listed separated by commas.

[xfvalue_thumb_url_X]

This tag can be used only if extra field has type "Image". The tag displays only the URL for the thumbnails of the uploaded image, where "х" is the name of the extra field.

[xfvalue_image_url_X]

This tag can be used only if extra field has type "Image". The tag displays only the URL for the full size image of the uploaded image, where "х" is the name of the extra field.

[xfvalue_image_description_X]

This tag can be used only if extra field has type "Image". The tag displays only the description for the image of the uploaded image, where "х" is the name of the extra field.

[xfvalue_X image="Nr"]

Display the uploaded images separately for extra fields of "Image Gallery" type, where "X" is the name of the extra field, and "Nr" is the number of image from the gallery. For example, if you apply [xfvalue_test image="2"], then image number two will be displayed that loaded into an additional field named "test".

[xfvalue_X image-url="Nr"]

Display the URL for uploaded full images separately for extra fields of "Image Gallery" type, where "X" is the name of the extra field, and "Nr" is the number of image from the gallery.

[xfvalue_X image-thumb-url="Nr"]

Display the thumb URL for uploaded images separately for extra fields of "Image Gallery" type, where "X" is the name of the extra field, and "Nr" is the number of image from the gallery.

[xfvalue_X image-description="Nr"]

Display the Description for uploaded images separately for extra fields of "Image Gallery" type, where "X" is the name of the extra field, and "Nr" is the number of image from the gallery.

[xfgiven_X image="NR"] Text [/xfgiven_X image="NR"]

Display the text enclosed in them if an image with the specified number is present and loaded in an additional field, where X is the name of the additional field, and NR is the number of images

[xfnotgiven_X image="NR"] Text [/xfnotgiven_X image="NR"]

Display the text enclosed in them if the image with the specified number is missing in the additional fiel, where X is the name of the additional field, and NR is the number of images

[xfvalue_X video="Nr"]

Display the videos uploaded for an additional field with the type "Video playlist" with the selected number separately. Where "X" is the name of the additional field, and "Nr" is the number of the video from the playlist

[xfvalue_X video-url="Nr"]

Display uploaded URLs for an additional field with the "Video playlist" type, individually. Where "X" is the name of the additional field, and "Nr" is the number of the video from the playlist

[xfvalue_X video-description="Nr"]

Display video descriptions uploaded for an additional field with the "Video playlist" type, separately. Where "X" is the name of the additional field, and "Nr" is the number of the video from the playlist

[xfgiven_X video="Nr"] Text [/xfgiven_X video="Nr"]

Display the text enclosed in them if the video with the specified number is present and uploaded in an additional field, where X is the name of the additional field, and Nr is the number of the video

[xfnotgiven_X video="Nr"] Text [/xfnotgiven_X video="Nr"]

Display the text enclosed in them if the video with the specified number is not in the additional field, where X is the name of the additional field, and NR is the number of the video

[xfvalue_X audio="Nr"]

Display the audio uploaded separately for an additional field with the "Audio Playlist" type. Where "X" is the name of the additional field, and "Nr" is the number of the audio file from the playlist

[xfvalue_X audio-url="Nr"]

Display uploaded URLs for an additional field with the "Audio Playlist" type, individually. Where "X" is the name of the additional field, and "Nr" is the number of the audio file from the playlist

[xfvalue_X audio-description="Nr"]

Display the descriptions of the audio file uploaded for an additional field with the "Audio Playlist" type, separately. Where "X" is the name of the additional field, and "Nr" is the number of the audio file from the playlist

[xfgiven_X audio="Nr"] Text [/xfgiven_X audio="Nr"]

Display the text enclosed in them if the audio with the specified number is present and loaded in an additional field, where X is the name of the additional field, and Nr is the number of the audio file

[xfnotgiven_X audio="Nr"] Text [/xfnotgiven_X audio="Nr"]

Display the text enclosed in them if the audio with the specified number is missing in the additional field, where X is the name of the additional field, and Nr is the number of the audio file

[xfvalue_X format="Format"]

It is intended for displaying additional fields with the type “Date and time” where X is the name of the additional field, and “Format” this is the output format of the date and time specified in the field. You can output this additional field in different date and time formats, and not only in the format specified for the default field in the field settings. For example, the tag [xfvalue_test format="j F Y H:i"] displays the date and time specified in the field in time format j F Y H:i.

[group=X]text[/group]

Displays the text to a specific user groups. Where X is a list of user group IDs separated by commas.

[category=X]text[/category]

Displays the text if the user is in X category. Where X is the ID of your category. It is allowed to specify categories separated by commas.

[has-category] text [/has-category]

Displays the text enclosed in them, if the publication is in any category

[not-has-category] text [/not-has-category]

Displays the text enclosed in them, if the publication does not have any categories

[tags] text [/tags]

Displays the text if the article contains keywords assigned for a tag cloud.

{tags}

Displays clickable keywords of the article.

{full-link}

Displays the full permanent address of the article.

[edit-date] text [/edit-date]

Displays the text if the text or the article has been edited.

{edit-date}

Displays the date when the article has been edited.

{edit-date=date format}

Displays the date when the publication was edited in the format specified in the tag. Thus, you can set your own format for the editing date, or output not only the entire date, but also its individual parts. The date format is set according to the format used in PHP. For example, the tag {edit-date=d} displays the day of the month, and the tag {edit-date=F} displays the name of the month, and the tag {edit-date=d-m-Y H:i} displays the full date and time

{editor}

Displays the login of user who edited the article.

[edit-reason] text [/edit-reason]

Displays the text if edit reason has been specified.

{edit-reason}

Displays the edit reason.

{date=date fromat}

Displays the date in the specified format. It allows you to display both the full date and its separate parts. The date format is set in accordance with the PHP format. For example, {date=d} tag displays the day of the article or comment publication, and {date=F} tag displays the name of the month. {date=d-m-Y H:i} displays the full date and time.

{approve}

Displayed only when a user is viewing his/her profile and shows the status of his/her news that are awaiting moderation.

[fixed] text [/fixed]

Displays the enclosed text if this article is fixed.

[not-fixed] text [/not-fixed]

Displays the enclosed text if this article is not fixed.

[day-news] text [/day-news]

Displays the link to all the news published in the same day as the given article. This tag can be used in conjunction with {date}.

[catlist=1,2....] text [/catlist]

Displays the enclosed text if the article belongs to the specified categories.

[not-catlist=1,2....] text [/not-catlist]

Displays the enclosed text if the article does not belong to the specified categories.

{login}

Displays the name of the user who added the article as a simple text without a link to his profile.

[poll] text [/poll]

Displays the enclosed text if this publication has a voting.

{poll}

Displays the voting of this article.

[not-poll] text [/not-poll]

Displays the enclosed text if  if this publication has no voting.

[profile] text [/profile]

Displays the link to the article's author profile, without the use of pop-up miniprofile window.

[complaint]

text

[/complaint]

Displays the enclosed text as a link to writing a complaint to the article.

{category-url}

Displays the full URL to the category where the article belongs to. This tag displays only the URL in its pure form, without any formatting or ready reference.

[comments]

text

[/comments]

Displays the enclosed text if there are comments for this article.

[not-comments]

text

[/not-comments]

Displays the enclosed text if there are no comments for this article.

{image-x}

Displays the URL of images that are in the article annotation, where x is the number of picture in the article. For example,{image-1} will display URL of the first image in the article annotation.

[image-x] text [/image-x]

Displays the enclosed text only if there is an image number X in the article.

[not-image-x] text [/not-image-x]

Display text included in them, in case picture under the number X is not in the news

[tags=tag1,tag2,tag3] text [/tags]

Displays the enclosed text when a visitor views the page with the listed keywords from the tag cloud, where tag1, tag2, tag3 are keywords from the tag cloud.

[not-tags=tag1,tag2,tag3] text [/not-tags]

Displays the text on any page except the specified ones.

 

[declination=X] text [/declination]

Changes endings according to the specified number. X is a number and "text" is a word with its endings. Endings are specified separated by "|" symbol. This tag is useful to be used with other tags that display, for example, number of views of the article or number of comments. For example, [declination={comments-num}]commen|t|ts[/declination] displays the following, depending on the number of comments: "comment", "comments".

[newscount=x] text [/newscount]

Displays the enclosed text if the article number X is shown, where X is the number of the displayed article. For example,[newscount=1] text [/newscount] displays the text when the first article on the page is shown.

[not-newscount=X] text [/not-newscount]

Displays the enclosed text when any article is shown except the article number X. This tag is useful if you want to display any design elements in all the articles, except the specified ones. For example, if you need not show something in the first article on the page.

{banner_x}

Displays the banner added in the Manage banners section of Administration Panel. Where X is the name of the banner.

[not-news] текст [/not-news]

Displays the enclosed text if there are no articles by the given criteria. Thus, you can use your own message instead of the standard one if there are no articles in a given section of the site. You can make unique messages for every section.

[if field = "value"] text [/if]

display the text enclosed in it if the field value is equal to the specified value

 

[if field = "value"] text [/if] - shows the text if the field is equal to 'value’ parameter

[if field != "value"]text[/if] - shows the text if the field is not equal to 'value’ parameter

[if field > "1"] text [/if] - shows the text if the field is greater than 'value’ parameter

[if field >= "2"] text [/if] - shows the text if the field is greater than or equal to 'value’ parameter

[if field < "3"] text [/if] - shows the text if the field is less than 'value’ parameter

[if field <= "4"] text [/if] - shows the text if the field is less than or equal to 'value’ parameter

[if field ~ "value"] text [/if] - shows the text if there is word 'value’ in the field

[if field !~ "value"] text [/if] - shows the text if the word 'value’ is NOT in the field

 

Combined use:

 

[if field > "3" AND field2 < "5"] text [/if] shows the text if “field” field is greater than three, and field2 is less than 5

[if field > "3" OR field2 < "5"] text [/if] shows the text if “field” field is greater than three or field2 is less than 5, that is, if any of the conditions match

 

Names for field:

 

id - Unique ID number of the story (number)

autor - Story author login (text)

date - Story date (date in British format, for example, “2020-09-01” or “10 September 2020”, or “next Thursday”, or “+1 day”, or in unix format; if the equal sign is used then the story date is rounded to the minute)

short_story - Short story text (text)

full_story - In the short story template, this is the number of characters in the full description. The full story template contains the full text.

title - Story title text (text)

descr - Meta tag describing a story (text)

keywords - “Keywords” meta tag (text)

category - List of categories to which it belongs (text, separated with commas)

alt_name - Title in Latin alphabet to form the page address when using the CNC. (text)

comm_num - Number of comments (number)

allow_comm - Comments allowed or not (number, 1 or 0)

allow_main - Story posted on the main page or not (number, 1 or 0)

approve - Story posted on the website or under moderation (number, 1 or 0)

fixed - Story fixed or not (number, 1 or 0)

symbol - Symbol code (text)

tags - List of tags from the tag list for the tag cloud (text, separated with commas)

news_read - Number of views (number)

allow_rate - Story rating allowed or not (number, 1 or 0)

rating - Story rating, total sum of all values (number)

vote_num - Number of people who voted in the rating (number)

votes - Voting allowed in a story (number, 1 or 0)

view_edit - Display the reason for editing or not (number, 1 or 0)

disable_index - Web indexing allowed or not (number, 1 or 0)

editdate - Story edit date (date in British format, for example, “2020-09-01” or “10 September 2020”, or “next Thursday”, or “+1 day”, or in unix format; if the equal sign is used then the date is rounded to the minute)

editor - Login of the last editor of the post (text)

reason - Reason for editing a story (text)

user_id - Post author ID (number)

xfield_x - Value of the additional field in a post, where x is a name of the additional field. For example, xfield_test value of the additional “test” field

If the output of all information about the author's profile is enabled in your site settings, you can additionally use the following tags:

{profile-link}

Shows link to the post's author profile

{foto}

Shows link to the post's author avatar

{fullname}

Shows post's author full name

[fullname] текст [/fullname]

Shows text embedded into tags, if author's full name is specified on the profile

[not-fullname] текст [/not-fullname]

Shows text embedded into tags, if author's full name is not specified on the profile

{land}

Shows author's country

[land] текст [/land]

Shows text embedded into tags, if country is specified on the author's profile

[not-land] текст [/not-land]

 Shows text embedded into tags, if country is not specified on the author's profile

{signature}

Shows author's signature

[signature] текст [/signature]

Shows text embedded into tags, if signature is specified on the author's profile

[not-signature] текст [/not-signature] 

Shows text embedded into tags, if signature is not specified on the author's profile

{user-info} 

Shows post's author user info

[user-info] текст [/user-info]

Shows text embedded into tags, if user info is specified on the author's profile

[not-user-info] текст [/not-user-info] 

Shows text embedded into tags, if user info is not specified on the author's profile

[online] текст [/online] 

Shows text embedded into tags, if the post's author is online

[offline] текст [/offline] 

Shows text embedded into tags, if the post's author is offline

{mail}

Shows user E-mail

[pm] Текст [/pm]

Shows link with caption "Text" for sending a private message to the post's author

{group}

Shows user group

{registration}

Shows user registration date

{lastdate}

Shows user last visit date

{group-icon}

Shows user group icon

{time_limit}

Shows group access expiring date for temporary groups

[time_limit] текст [/time_limit]

Shows text embedded into tags, if a user is a member of temporary group

{comm-num}

Shows number of comments posted by user

{comments-url} 

Shows link to user's comments

[comm-num] текст [/comm-num]

Shows text embedded into tags, if a user posted comments on the site

[not-comm-num] текст [/not-comm-num]

Shows text embedded into tags, if a user didn't post comments on the site

{news} 

Shows links to user's posts

{rss}

Shows link to user's RSS feed

{news-num}

Shows number of user's posts

[news-num] текст [/news-num] 

Shows text embedded into tags, if a user published posts on the site

[not-news-num] текст [/not-news-num]

Shows text embedded into tags, if a user didn't publish posts on the site

{all-pm}

Shows total number of user's private messages

{favorite-count}

Shows total number of posts added to the bookmarks by user

[profile_xfvalue_X] 

Shows value of additional field "X" from the user profile

[profile_xfgiven_X] текст [/profile_xfgiven_X] 

Shows text embedded into tags, if user profile has additional field "X"

[profile_xfnotgiven_X] текст [/profile_xfnotgiven_X]

Shows text embedded into tags, if user profile has no additional field "X"

[author-group=X] текст [/author-group]

Shows text embedded into tags, if post's author is a member of specified "X" user group. Group names can be separated with a comma, e.g. 1,2,3

[not-author-group=X] текст [/not-author-group]

Shows text embedded into tags, if post's author is not member of specified "X" user group. Group names can be separated with a comma, e.g. 1,2,3