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.

{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}" />.

{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_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".

[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.

[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.

{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.

[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.