


What are the official labels of destoon? destoon official label collection
destoon official tag collection First, what is tag calling? Tag calling is to read the calling number (pagesize) of data from the data table (table) according to the calling condition (condition), sort it by the sorting method (order), and finally output the data through the layout of the tag template. It can be seen that the work of the label is divided into two parts, one is to read the data, and the other is to display the data. Second, label function prototype Tag functions are stored in include/tag.func.php
For example, pass table= destoon&pagesize=10&hello=world The system is equivalent to getting:
Three variables $expires means that the tag cache expiration time is >0 and caches $expires seconds; 0 - the system default tag cache time; -1 - no caching; -2 - cache SQL results; In general, keep the default value and do not need to pass it. 3. Data reading process For example, the following tags: will be converted into the following SQL statement:
The read data will be saved in the $tags array. 4. Data display process 1. Display through label template Pass &template=abc to the label function, for example: This way of writing passes the tag template as null and returns it directly The data is given to the $tags array. At this time, you can directly loop in the template. Here's a complete example:
The first way of writing is generally used for data that is called multiple times, and the second way of writing is generally used for data that is called only once. Five, commonly used parameters and their meanings moduleid moduleid refers to the module ID, which can be queried in the background module management. For data that directly calls the module, after setting the correct module ID, there is no need to pass the table parameter, and the system will automatically obtain it. For example, if moduleid=5 is passed, the system will recognize it as calling supply information and automatically set the table parameter to sell table table refers to the table name, which can be queried in the background database maintenance. For Destoon system tables, there is no need to add a table prefix; for non-Destoon system tables, you need to fill in the complete table name and pass the prefix parameter. For example, for the Destoon system table, pass table=sell. If the table prefix is destoon_, the system will recognize the table name as destoon_sell. For non-Destoon system tables, pass table=tb_abc&prefix= or table=abc&prefix=tb_, the system will recognize the table name as tb_abc fields fields refers to the query field, the default is *. For example, fields=title,addtime can be passed, but generally there is no need to pass it. Destoon's unique tag caching mechanism will automatically cache the query results, so there is no need to worry about efficiency issues. condition condition refers to the condition of the query. If not passed, it is 1, which represents the data of any condition (you need to understand SQL syntax for this item). All Destoon modules are developed according to unified standards, so many conditions are common. For example, status=3 indicates information that passed normally, status=3 and level=1 indicates information with level 1, status=3 and thumb” indicates information with a title picture, etc. order Order refers to the sorting method of data (this requires understanding of SQL syntax). For example, order=addtime desc means to sort by adding time in descending order, order=itemid desc means to sort by itemid in descending order, order=rand() means random data, etc. pagesize pagesize refers to the number of calling data. If not passed, the default is 10. template Template refers to the specified tag template. If not passed, the default is list, which is located in the template directory/tag/list.htm. If passed as null, it means that the tag template is not applied. See the above data display process. Six, other common usage examples 1), Multi-table joint query For example, to query the member and company information of the member named destoon, you can use: {tag(“table=destoon_member m,destoon_company c&prefix=”&condition=m.userid=c.userid and m.username=’destoon’&template=list-com”)} destoon_member and destoon_company are the actual names of the tables (including the table prefix), prefix=" means that the system will no longer automatically add a prefix to the table name 2), control title length Pass the length parameter in the tag. For example, &length=20 means 20 characters in length (one Chinese character occupies 2 characters). Generally, it is recommended to use CSS to hide extra characters (define height and overflow: hidden). Pass the length parameter, and the system will automatically intercept only the title field. If you need to intercept other fields, you can use the dsubstr function. For example, {dsubstr($t[company], 20, ‘…’)} means that the company field is intercepted to 20 characters. After interception, append... to the end.3), set date display format You can pass the datetype parameter in the tag: 1 represents year; 2 means month-day; 3 means year-month-day; 4 means month-day hour: minute; 5 means year-month-day hour: minute; 6 means year-month-day hour:minute:second You can also use the date function directly in the template, for example {date(‘Y-m-d', $t[addtime])} means converting the time into year-month-day format Call information of a certain category Pass the catid parameter in the tag, for example &catid=5 means calling all information with category ID 5. If calling multiple categories, separate the category IDs with commas. For example, &catid=5,6,7 means calling all information with category IDs 5, 6, and 7. Category calls include subcategory information by default. If you do not need to include subcategories, you can set the &child=0 parameter. For example, &catid=5&child=0 means that only the information with category ID 5 is called, excluding the information of subcategories. Call information about a certain region The method of calling regional information is exactly the same as the above method of calling classified information. Just replace catid with areaid. Display the category where the information is located
Copy code
Control the number of columns This item is often used for image layout and can use the cols parameter. For example, if 12 pictures are called and 4 are displayed in one line, with a total of 3 lines, then &pagesize=12&cols=4 is passed. Tag templates that support the cols parameter are limited to thumb-table.htm and list-table.htm. Among them, thumb-table.htm displays the picture list, and list-table.htm displays the text list. If you create a new tag template that supports cols or directly loop $tags, you can refer to the writing methods of the above two templates. The above effects can also be achieved through CSS. There is no need to use a table. Please write it by yourself Show the introduction of the article Use the {$t[introduce]} variable. If you want to intercept the number of words, for example, 80 characters, you can use {dsubstr($t[introduce], 80, ‘…’)} Function prototype tag($parameter, $expires = 0) $parameter represents the string passed to the tag function, and the system automatically converts it into multiple variables For example, passing table=destoon&pagesize=10, the system is equivalent to getting $table = ‘destoon’; $pagesize = 10; two variables $expires represents cache expiration time >0 caches $expires seconds; 0 - system default time; -1 - no cache; -2 - cache SQL; generally keep the default. Constant {DT_SKIN} System style URL. {DT_PATH} Website homepage URL. Variables $tags Save the data called by the tag in an array type, which can be traversed and displayed through loop syntax. $pages Save data paging code, only valid when paging is called. $MODULE[5][name] The name of the module with ID 5. $MODULE[5][linkurl] Module URL with ID 5. $CATEGORY[5][catname] Category name with ID 5 (valid only when variable $CATEGORY exists). $CATEGORY[5][linkurl] Category URL with ID 5 (valid only when variable $CATEGORY exists). Commonly used fields title title; linkurl link; catid category ID; introduce introduction; addtime addition time; commonly used functions dsubstr($string, $length, $suffix = ”) Truncate the string $string to $length and append $suffix at the end (for example..) date($format, $timestamp) Convert timestamp $timestamp to $format (for example Y-m-d) format Label template Templates are saved in the ./template/default/tag/ directory; It is recommended not to delete or modify the built-in templates. It is recommended to create a new template based on the built-in templates and apply them. 1. General description of label format moduleid=9 is the information module ID. Go to module management to view the module ID; article is the directory name of the information module; &length=40 is the number of characters intercepted by the label &pagesize=10 is the number of calls &datetype=2 is to display time and add time 2. Call the latest company to join 4&pagesize=10&order=userid desc&template=list-com”)}–> 3. How to call the supply and demand information and information of one of the corporate members In condition=Riga and username='xxx'? xxx is the member login name 4. How to call a certain category under Supply Purchasing Products The information under the calling category can be set &catid=industry id&child=1 child=1 means calling the subordinate industry at the same time 5. Call the secondary column information list If you are calling in the article module, you can use the above code to change $catid to the column id you want to call. If you need to call the information under the column at the same time, child=1, otherwise child=0 If it is called elsewhere on the website, you can use the following code: Note that the value of moduleid must be consistent with the module id you call Added: The following is successfully called on the homepage But I want the template list inside the information page, that is, each item only displays 22 characters. 6. How to call the information section on the home page? "9" is the ID of your module
7. Company lists cannot control the word count! ! You can modify list-com.htm directly
8.TAG Commonly used tags
9.Others You can specify the label template via &template= If this parameter is not used, the default is list. Located in the template directory tag directory Information level level 1 is recommended articles; level 2 is slideshow pictures; level 3 is recommended pictures and texts; level 4 is headline articles; level 5 is headlines related The above is the entire content of the destoon official tag. You can save it. It will be used many times when using destoon to build a website. Recommended reading: destoon introductory tutorials and skill examples |

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

PHP is widely used in e-commerce, content management systems and API development. 1) E-commerce: used for shopping cart function and payment processing. 2) Content management system: used for dynamic content generation and user management. 3) API development: used for RESTful API development and API security. Through performance optimization and best practices, the efficiency and maintainability of PHP applications are improved.

In PHP, password_hash and password_verify functions should be used to implement secure password hashing, and MD5 or SHA1 should not be used. 1) password_hash generates a hash containing salt values to enhance security. 2) Password_verify verify password and ensure security by comparing hash values. 3) MD5 and SHA1 are vulnerable and lack salt values, and are not suitable for modern password security.

PHP is a scripting language widely used on the server side, especially suitable for web development. 1.PHP can embed HTML, process HTTP requests and responses, and supports a variety of databases. 2.PHP is used to generate dynamic web content, process form data, access databases, etc., with strong community support and open source resources. 3. PHP is an interpreted language, and the execution process includes lexical analysis, grammatical analysis, compilation and execution. 4.PHP can be combined with MySQL for advanced applications such as user registration systems. 5. When debugging PHP, you can use functions such as error_reporting() and var_dump(). 6. Optimize PHP code to use caching mechanisms, optimize database queries and use built-in functions. 7

PHP handles file uploads through the $\_FILES variable. The methods to ensure security include: 1. Check upload errors, 2. Verify file type and size, 3. Prevent file overwriting, 4. Move files to a permanent storage location.

PHP is still dynamic and still occupies an important position in the field of modern programming. 1) PHP's simplicity and powerful community support make it widely used in web development; 2) Its flexibility and stability make it outstanding in handling web forms, database operations and file processing; 3) PHP is constantly evolving and optimizing, suitable for beginners and experienced developers.

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values and handle functions that may return null values.

PHP and Python each have their own advantages, and the choice should be based on project requirements. 1.PHP is suitable for web development, with simple syntax and high execution efficiency. 2. Python is suitable for data science and machine learning, with concise syntax and rich libraries.
