Guide Category

134

Basic Main tag and page displays

The basic layout of your page in the template file main.tpl This file loads the engine in the first place and connect it to any other engine components, which is the main file to load all modules and display results. {AJAX}, {info}, {content}, {custom} these tags are used for the correct News conclusions.
dlestarter
Basic Main tag and page displays The basic layout of your page in the template file main.tpl This file loads the engine in the first place and connect it to any other engine components, which is the main file to load all modules and display results. {AJAX}, {info}, {content}, {custom} these tags are used for the correct News conclusions.
Tag {AJAX} acquires and prints the group of javascript necessary for normal functioning of the engine in general and AJAX technology in particular as well as jquery in 9.x version. Recommended to be placed at the beginning of the template after the tag <body>
Tag {info} displays and handling the engine information and errors on the actions performed (such as "Login failed, bad password" or "All fields" etc.). This tag is recommended to be placed before the tag {content}
Tag {content}, is used for the general engine and content and display of articles and other built-in modules in the engine
Tag {tags}, is used for the list of the tag cloud (specific keywords and tag clouds in the news)
Tag [sort]{sort}[/sort], is used for selection of news sorts page which allow to be viewed and sorted in different orders.
Tag {custom}, is used to display the news or items in a custom format which has the following options:
{custom id="1,2,5-8" category="2,3,5-8" author="x" days="x" template="custom" aviable="global" from="0" limit="10" fixed="yes" order="date" cache="yes"}

Options

id is the ID list of news that you want to print, separated by a comma with no spaces. You can also specify a range of ID news using dashes. 1,4-8,11 example displays news ID 1, news id 4 to 8, as well as ID 11.
- category is a list of category ID to be displayed news, separated by comma (,) and no spaces allowed.

- template is the template file that will be used to display the news in this case it will custom.tpl, if you are using multiple templates on the site, this file must be created in each template. This template uses tags similar to the short news.

- aviable option is to specify which section will be displayed when you browse inside your website. The available options as following:

  • global - all sections in the entire website
  • main  - only in the main page
  • date  - when viewing news for some dates
  • cat  - when viewing category
  • showfull - when viewing the full news
  • search - when viewing search and search results
  • userinfo  - when viewing user info and profile
  • register - show in the registration page
  • stats - when viewing site statistics
  • pm - when viewing personal message (PM)
  • feedback - when using feedback/contact form
  • favorites - when viewing bookmarks/favorite page
  • newposts - when viewing the new posts
  • addnews - when adding news to the site
  • lastcomments - when viewing the most recent comments
  • static - when viewing static pages
  • catalog - when viewing the page directory
  • alltags - when viewing the tag cloud page
  • tags - when viewing the news from the tag cloud

You can combine the multiple sections by using the "|" symbol, for example aviable="userinfo|register|main" will show custom page when view user profile, site registration and main homepage. (the options should not use any spaces between section names)

- from is used for specific number of article to start or begin with (0 is started from the first article)

- limit is to specify how many items or articles will be displayed

- order the sort order of news can take the following values:
    - date - sort news by date
    - rating - sort news by rating
    - reads - Sorting News by Views
    - comments - sort news by comments
    - title - sort news by title
    - rand - sort news randomly

- author news, when specifying this parameter will be displayed only news posted by specific user. Use only one author. For example, the tag {custom author="admin" limit="5"} displays 5 News posted by user "admin".

- days specifies the time period, where x is the number of days for which the output of publication. For example, the tag {custom days="2" limit="5"} displays 5 News for the last 2 days.

- cache (only accept the value yes or no - is to sets the output to cache or not cache is recommended to reduce the load.

- fixed takes values ​​yes or no or only-sets to consider whether the derivation of publications, that news has been committed or not. If the specified value only, it will be displayed only recorded news.

- Attention: All the parameters of this tag is optional, you need to specify at least one of any option, all other options if they are not specified, will be taken from the general settings of the script. for example:

{custom id="1,2" order="date"} - displays news with ID 1 and 2, and sort them by date
{custom category="2,7" from="5" cache="yes"} - displays news from categories 2 and 7, while the number of news will be taken from the script configuration, and sampling will be carried out after 5 news that meets this condition
{custom order="date" from="9" limit="5"} - 5 displays the latest news, starting with the tenth news
Caution: You must specify all the parameters required and must comply with the order
Note: remember that each use of the {custom} tag creates an additional load on the database, because is an additional display of the same news or article, so use it wisely if you want to save on resources.
Tag [aviable=section]Text[/aviable], displays the text concluded in tag if the specified section(s) of the site can be seen and displayed:
    - The tag available options are similar available to sections listed above for {custom} tag.
    - for example:
        [aviable=userinfo|register|main] Text[/aviable]
        This will display the text enclosed within tags when viewing a user profile, during registration and in the main page.

    Additional Tag: you can also specify the tag [not-aviable=userinfo|register|main] Text [/not-aviable] which is completely opposite to the "aviable" tag and display text available everywhere except the listed sections.
Tag [category=X]Text[/category], displays a text enclosed in tags can be seen if the specified category.
    - Tag uses a category ID and allows the multiple categories to be specified:
        [category=1,2,3] Text [/category]
        This will display the text enclosed in tags, if a user browses category whatever category ID is equal to 1 or 2 or 3.

    Additional Tag: you can also specify the tag [not-category=1,2,3] Text [/not-category] which is completely opposite to the tag category and display the text everywhere except for these specified categories.
Tag [group=X]Text[/group], displays the text concluded in tag if the user belongs to a specified usergroup members:
    - Tag uses a group ID and allows the multiple groups to be specified
        [group=1,2,3] Text [/group]
        This will display the text enclosed in tags, if the user is an administrator, Moderator or editor.

    Additional Tag: you can also specify the tag [not-group=1,2,3] Text [/not-group] which is completely opposite to the tag group and display text for all groups except the listed groups.
[page-count=1,2,3] text [/page-count]
Will display the text enclosed in them if the user is at a certain page number in the navigation on the news, regardless of the section of the site where it is 1,2,3 page numbers to navigate. This tag allows flexibly customize the output of certain information on a particular page and useful information for the blocks and advertising. You can use this tag in conjunction with other sections of the site and the home's category.

For example, a combination of tags [aviable=cat][category=1][page-count=1] text [/page-count][/category][/aviable] will withdraw the text only if the user is viewing the first page of the category with id1, and while it looks brief news, and move to another page in this category, this text will not see it.
[not-page-count=1,2,3] text [/not-page-count]
Displays the text published in the tags on any page numbers other than those of the tag.
{banner_name} this tag is to display the advertising information on this site. The name of banner is generated in Advertising Module within Admin CP.
[banner_name] text [/banner_name] displays the text enclosed in tag, if the specified banner is displayed on a web page.
{inform_name} this tag is to display the RSS informers and news from other sites. Name and all the settings for this tag set in Admin CP.
[static=Page Name] Text [/static] display the text enclosed in tags, if a visitor views a static page with the specified name.
[not-static=Page Name] Text [/not-static] will display the text enclosed in tags, if the visitor view the other static page than static page with the specified name.
You can also add one theme files to another file, using the tag {include file="my_block.tpl"} This tag attaches the file to the template my_block.tpl. The tag is intended easy to edit or modify the content separately if your site have the complex layout and styles with multiple tags..

Related Tutorials

Review/Leave Comment

comments powered by Disqus