Destoon label Daquan, novice must

Source: Internet
Author: User
Tags add time


Core tip: Destoon tags Daquan, novice essentials

Destoon label Daquan, novice must

1. Global tags

Site name: {$DT [sITename]}
Website address: {Dt_path}
Website Logo: {if $MODULE [$moduleid][logo]}{dt_skin}image/logo_{$moduleid}.gif{elseif $DT [logo]}{$DT [Logo]}{else}{dt_ SKIN}IMAGE/LOGO.GIF{/IF}
Copyright information: {$DT [copyright]}
Style path: {Dt_path}
Customer Service Tel: {$DT [telephone]}
ICP Record number: {if $DT [icpno]}<a href= "url" target= "_blank" >{$DT [icpno]}</a>┊{/if}
VIP member name: {VIP}
Real currency name: {$DT [Money_name]}
Real currency unit: {$DT [Money_unit]}
Virtual Credit Name: {$DT [Credit_name]}
Virtual Integration unit: {$DT [Credit_unit]}

Title (site title): {$seo _title}
Meta Keywords (Web keywords): {$head _keywords}
Meta Description (page description): {$head _description}

2. Connection Address
Default individual module connections:
Member: {$MODULE [2][linkurl]}
Supply: {$MODULE [5][linkurl]}
Buy: {$MODULE [6][linkurl]}
Quotes: {$MODULE [7][linkurl]}
Company: {$MODULE [4][linkurl]}
Exhibition: {$MODULE [8][linkurl]}
Info: {$MODULE [21][linkurl]}
Investment: {$MODULE [22][linkurl]}
brand : {$MODULE [13][linkurl]}
Talent: {$MODULE [9][linkurl]}
Know: {$MODULE [10][linkurl]}
Project: {$MODULE [11][linkurl]}
Gallery: {$MODULE [12][linkurl]}
Video: {$MODULE [14][linkurl]}
Download: {$MODULE [15][linkurl]}

Release information: {$MODULE [2][linkurl]}{$DT [File_my]}
Business shop: {$MODULE [2][linkurl]}home.php
View in-station letter: {$MODULE [2][linkurl]}message.php
Manage trading transactions: {$MODULE [2][linkurl]}trade.php
Perfect Enterprise Information: {$MODULE [2][linkurl]}edit.php?tab=2


Registration: {$MOD [linkurl]}{$DT [File_register]}
Login: {$MODULE [2][linkurl]}{$DT [File_login]}
Retrieve password: {$MOD [linkurl]}send.php
VIP page: {$MODULE [2][linkurl]}grade.php
WAP Browsing: {if extend_setting (' wap_enable ')} <a href= "{extendurl (' wap ')}" >wap Browse </a>{/if}
RSS Subscription: {If extend_setting (' feed_enable ')} | <a href= "{extendurl (' feed ')}" >rss subscription </a>{/if}
Market Courier: {$MODULE [7][linkurl]}{rewrite (' Price.php?product=all ')}
Enterprise News: {$MODULE [4][linkurl]}{rewrite (' news.php?more=1 ')}
Announcement: {extendurl (' announce ')}
Promotion: {Extendurl (' spread ')}
Ad: {extendurl (' ad ')}
Links: {extendurl (' link ')}
Application Links: {extendurl (' link ')}{rewrite (' Index.php?action=reg ')}
Message book: {extendurl (' guestbook ')}
Vote: {Extendurl (' vote ')}

3. Home Page Call

Navigation Menu:
<ul>
<li{if $moduleid <4} class= "Menuon" {/if}><a href= "{dt_path}" ><span> Home </span></a> </li>
{Loop $MODULE $m}
{if $m [Ismenu]}
<li{if $m [moduleid]== $moduleid} class= "Menuon" {/if}><a href= "{$m [Linkurl]}" {if $m [Isblank]} target= "_blank "{/if}><span{if $m [style]} style=" color:{$m [style]}; " {/if}>{$m [name]}</span></a></li>
{/if}
{/loop}
</ul>


To invoke the login module:
{if $DT [Page_login]}
{Template ' user ', ' Chip '}
{/if}

Call Classification module:
{PHP $mid = 5;}
{Template ' catalog ', ' Chip '}


4. Invocation of individual module data


Supply:

Latest Supply Information:
1.<!--{tag ("Moduleid=5&condition=status=3&length=34&condition=status=3&pagesize=5&order =addtime Desc&template=list-trade ")}-->


2.<!--{php $tags =tag ("moduleid=5&condition=status=3&length=34&condition=status=3&pagesize=5 &order=addtime desc&template=null ");} -
{Loop $tags $k $t}
<li><span class= "F_r" >[{area_pos ($t [Areaid], '/', 1)}]</span><a href= "{$t [Linkurl]}" target= "_ Blank "title=" {$t [Alt]} ">{$t [title]}</a></li>
{/loop}

It is theoretically necessary for the website manager to have a certain knowledge of html+css and to have a preliminary understanding of Php+mysql.
The calling procedure actually reads the call number bar data from the data table according to the invocation criteria, sorts it in sorted order, and ultimately outputs the data through the layout of the label template.
Function prototype tag ($parameter, $expires = 0) $parameter represents a string passed to the tag function, the system automatically converts it to multiple variables such as passing table=destoon&pagesize=10, the system is equivalent to getting $ Table = &lsquo;destoon&rsquo;; $pagesize = 10;
Two variables $expires indicates cache expiration >0 cache $expires sec; 0 &ndash; system default time; -1 &ndash; Not cached; -2 &ndash; Cache SQL; The general situation remains the default.
Variable $tags saves the data called by the tag in an array type, which can be traversed through the loop syntax.
$pages Save the data paging code, only valid when paging is called. $
Path module paths. Characters commonly used section title title; Linkurl link; catid category ID; introduce introduction; Addtime add time;
Common functions Dsubstr ($string, $length, $suffix = &rdquo;) Truncate string $string to $length length, trailing append $suffix (for example:)
Set_style ($string, $style = &rdquo;, $tag = &lsquo;span&rsquo;) Place the string $string in the $taghtml label and set the style to $style Linkurl ($linkurl, $absurl = 0) To fix the relative path $linkurl to the absolute path (prevent link errors)
Date ($format, $timestamp) converts timestamp $timestamp to $format (for example, y-m-d) format
The label template template is saved in the./template/default/tag/directory, it is recommended that you do not delete or modify your own templates, and recommend that you create a new template and apply it on your own template.
Category:destoon Tag Invocation
Comments (0)
Destoon Show Area posted Byjinpeng998on Monday, 12 July, 2010
Show Area:
The required function is Include/module.func.php/get_mainarea ($areaid, $area);
PHP page: $AREA =cache_read (&lsquo;area.php&rsquo;);//Read cache file
Static page call: <table width=&rdquo;100%&rdquo; Cellpadding=&rdquo;3&prime;>
{php $mainarea = Get_mainarea (0, $AREA)}
{Loop $mainarea $k $v}
{if $k%2==0}<tr>{/if}
<td><a href=&rdquo; {$MOD [Linkurl]} {rewrite (&lsquo;search.php?areaid=&rsquo;. $v [' Areaid '].&rsquo;&typeid=&rsquo;. $typeid)}&rdquo;>{$v [areaname]}</a></td>
{if $k%2==1}</tr>{/if}
{/loop}
</table>
Another way is to directly tag the call,, yes, directly from the Destoon database to take out information
Category:destoondestoon Show Area
Comments (0)
Destoon Learning Tag Call posted Byjinpeng998on Sunday, 11 July, 2010
Link: $t [linkurl]
Supply module MORE: $MODULE [---module ID---][linkurl] module ID put the mouse on the link below it appears moduleid=? You can see
Picture path: $t
;
Information Module MORE: {$MOD [linkurl]}{$c [Linkurl]}
See which field the name belongs to? &mdash;&mdash; Select &ndash; Right &mdash; see name value eg Name=post[brand] is the brand field
The first page of each module is the index.htm of its template/folder
pagesize=&rdquo;. $MOD [pagesize].&rdquo; Can be written as pagesize=4; remember not to add single quotes or double quotes
Calling Paging:
Paging tab:
<!&ndash; {tag (&ldquo;moduleid= $moduleid &c=3
$dtype &catid= $catid &pagesize=4&page= $page &showpage=1&datetype=5&order=&rdquo. $MOD [order].&rdquo;&template=list-sell&rdquo;)}&ndash;>
Paging: {if $showpage && $pages}<div class=&rdquo;pages&rdquo;>{$pages}</div>{/if}
Call Classification:
Main methods
$maincat = Get_maincat (0, $CATEGORY);
Get_maincat (0, $CATEGORY) &mdash;&mdash; in include/global_func.php
$childcat = Get_maincat (0, $CATEGORY, 1);&mdash; Call the 1 level directory under the Super column
0 represents the most root directory 1 represents the level 1 of the directory level manually set the default is 1
If 0 is changed to 3 then the directory of CATID is 3
Small Note: $CATEGORY = Cache_read (&lsquo;category-&rsquo;. $moduleid. &rsquo;. php&rsquo;); This file is in the common.inc.php page of the module page
Call
{Loop $maincat $k $v}
{If $k% $DT [page_subcat]==0}<tr>{/if}
<td>
<a href=&rdquo; {$MOD [Linkurl]} {$v [Linkurl]}&rdquo;>{set_style ($v [catname], $v [style])}</a> <span> ({$ITEMS [$v [CATID]]}) </ Span>
</td>
{If $k% $DT [page_subcat]== ($DT [page_subcat]-1)}</tr>{/if}
{/loop}
Attention:
There must be $maincat in the PHP page under its Module modules folder
$MOD [Linkurl] is the module also the home address $v [Linkurl] The following table page plus CATID
Category:destoon Tag Invocation
Comments (0)
Very good destoon business-to-business label call Manual Posted Byjinpeng998on Sunday, 11 July, 2010
Destoon Business-to-business label call Manual what is a label call?
The label call is to read the call quantity (pagesize) bar data from the Data table (table) according to the invocation criteria (condition) and sort by sort (order), eventually outputting the data through the layout of the label 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.
Label function prototypes
Label function saved in include/tag.func.php
Tag ($parameter, $expires = 0)
$parameter A string that is passed to the tag function, the system automatically converts it to multiple variables
such as passing Table=destoon&pagesize=10&hello=world
System is equivalent to getting
$table = &lsquo;destoon&rsquo;;
$pagesize = 10;
$hello = &lsquo;world&rsquo;;
Three variables
$expires indicates the label cache expiration Time
>0 cache $expires sec; 0 &ndash; System default tag cache time; -1 &ndash; Not cached; -2 &ndash; Cache SQL results;
The general situation remains by default and does not need to be passed.
Data read process
For example, the following tags:
<!&ndash; {tag (&ldquo;table=sell&c=3&order=addtime desc&pagesize=10&prime;)}&ndash;>
will be converted to the following SQL statement:
SELECT *
From B2bfenlei_sell
WHERE status=3
ORDER by Addtime DESC
LIMIT 0,10
The read data is stored in the $tags array.
Data display Process

1, through the label template display
Pass &TEMPLATE=ABC to the label function, for example:
<!&ndash; {tag (&ldquo;table=&hellip;&template=abc&rdquo;)}&ndash;>
The default label template is saved in the template directory/tag/directory, for example &TEMPLATE=ABC will invoke the template catalog/tag/abc.htm template to display the data
If the label template is placed in another directory, such as Def, the &DIR=DEF&TEMPLATE=ABC is passed and the template directory/def/abc.htm template is called

2, directly in the template loop data
<!&ndash; {PHP $tags =tag (&ldquo;table=&hellip;&template=null&rdquo;);} &ndash;>
This notation passes the label template null, and returns the data directly to the $tags array, which can be looped directly in the template.
The following is a complete example:
<!&ndash; {PHP $tags =tag (&ldquo;table=&hellip;&template=null&rdquo;);} &ndash;>
{Loop $tags $t}
&hellip;
{/loop>

The first one is generally used for multiple invocations of data, and the second is typically used for data that is called only once.
Common parameters and meanings
ModuleID
ModuleID refers to the module ID, which can be queried in the background module management. For directly invoking the module's data, after setting the correct module ID, the table parameter will not be passed, and the system will get it automatically.
For example, by passing moduleid=5, the system will recognize the call provisioning information and automatically set the table parameter to sell
Table
Table refers to the name, which can be queried in the background database maintenance. For Destoon system tables, no table prefixes are required; for non-destoon system tables, complete table names are required, and prefix parameters are passed
For example, for Destoon system tables, passing Table=sell, if the table prefix is b2bfenlei_, the system will recognize the table named B2bfenlei_sell
For non-destoon system tables, passing table=tb_abc&prefix= or table=abc&prefix=tb_, the system will recognize the table named TB_ABC
Fields
Fields refers to the field of the query, which by default is an asterisk. such as Fields=title,addtime can be passed, but in general there is no need to pass, and Destoon's unique tag caching mechanism automatically caches query results without worrying about efficiency issues.


Order
Order refers to the sorting method of the data (this item requires an understanding of SQL syntax).
For example Order=addtime desc means descending by add time, Order=itemid desc means descending by itemid, Order=rand () representing random data, and so on.
PageSize
PageSize refers to the number of call data, which, if not passed, defaults to 10.

Template
The template refers to the specified label templates, if not passed, the default is list, which is located in the template directory/tag/list.htm, if passed to null, indicates that the label template is not applied. See the data display procedure above.
Other common usage examples
Control title length
Pass the length parameter in the label, for example, &LENGTH=20 is 20 characters long (GBK a Chinese character is 2 characters, UTF-8 a Chinese character is 3 characters), it is generally recommended to hide extra characters with CSS (define height and overflow: Hidden
Pass the length parameter, the system only automatically intercepts the title field, if you need to intercept other fields, you can use the DSUBSTR function
For example {dsubstr ($t [Company], &lsquo;&hellip;&rsquo;)} indicates that the Intercept company field is 20 characters, and after interception, the end is appended &hellip;
Set Date display format
The Datetype parameter can be passed in the label:


1 means year;
2 means month-day;
3 means year-month-day;
4 means month-day time: minute;
5 means year-month-day time: minute;
6 = year-month-day time: minutes: seconds
You can also use the DATE function directly in the template, for example {date (&lsquo; y-m-d&rsquo;, $t [addtime])} means converting time to year-month-day format
Call information for a taxonomy
Pass the CATID parameter in the tag, for example &catid=5 represents all information that invokes the class ID of 5.
If multiple classifications are called, separate the classification IDs with commas, for example &catid=5,6,7 for all information that calls the class ID 5, 6, 7.
The classification call contains the information for the subcategory by default, and you can set the &child=0 parameter if you do not need to include a subcategory.
For example, &catid=5&child=0 indicates that only the information for the class ID 5 is called, not the subcategory.
Call information for a region
Call the region information and the above call classification information exactly the same way, the CATID can be changed to Areaid.
Show information in the category
<a href=&rdquo; {$MODULE [$moduleid][linkurl]} {$CATEGORY [$t [catid]][linkurl]}&rdquo;>{$CATEGORY [$t [catid]][catname]}</a>
Number of control columns
This item is commonly used for the layout of pictures and can be used with the cols parameter.
For example, call 12 pictures, one row shows 4, a total of 3 rows, then pass &pagesize=12&cols=4
Label templates that support cols parameters are limited to thumb-table.htm and list-table.htm
Where thumb-table.htm displays a list of pictures, list-table.htm displays a list of text
If you create a new label template or a direct loop $tags that supports cols, you can refer to the above two templates
The above effects can also be implemented through CSS, without the use of tables, please write your own
Show an introduction to an article
Use {$t [introduce]} variable, if you want to intercept words, such as 80 characters, you can use {dsubstr ($t [introduce], &lsquo;&hellip;&rsquo;)}
Summary
The label seems complex and difficult to understand, in fact, after understanding the meaning of each parameter and invoking the process, you will learn that the label is actually simple and free, flexible and easy to use, powerful.
A number of invocation examples and label templates are available in the default template, which you can refer to and debug in learning.
Tag call is the necessary knowledge to make template, I hope you can grasp it soon.

Part II

1. General description of the label format
<!&ndash; {tag

(&ldquo;moduleid=9&table=article_9&length=40&condition=status=3&pagesize=

10&datetype=2&order=ad

Dtime desc&target=_blank&rdquo;)}&ndash;>

Moduleid=9 is the information module ID, module ID to the module management view;
Article is the directory name of the information module;
&LENGTH=40 is a label to intercept the number of words
&PAGESIZE=10 is the number of call bars
&datetype=2 is display time add time

2. Call the latest join enterprise
<!&ndash; {Tag (&ldquo;moduleid=4&table=company&condition=groupid>4&pagesize=10&order=userid desc &template=list-com&rdquo;)}&ndash;>


3. How to call one of the business members of the supply and demand information and information
In condition= Riga and username=&rsquo;xxx&rsquo; XXX is the member login name

4. How to call a category under the supply of buy products
The information under the call classification can be set &catid= industry id&child=1 Child=1 represents the industry that calls subordinates at the same time


5. Call the Level two column information list
<!&ndash; {tag (&ldquo;moduleid= $moduleid &table=article_$moduleid&catid= $catid &child=1
&condition=status=3&order=&rdquo;. $MOD [order].&rdquo;&pagesize=6&datetype=2&target=_blank&rdquo;)}&ndash;>
If you are in the article module call can use the above code $catid instead of the column ID you want to call
If you need to call the information under the column child=1 can otherwise child=0
If it is called elsewhere on the site, you can use the following code:
<!&ndash; {tag

(&ldquo;moduleid=9&table=article_9&catid= $catid &child=1&condition=status=3&order= Addtime

desc&pagesize=6&datetype=2&target=_blank&rdquo;)}&ndash;>
Note that the value of ModuleID is consistent with the module ID that you call
Add:
The following is a successful home call
<!&ndash; {tag

(&ldquo;moduleid=9&table=article_9&catid= $catid &child=1&condition=status=3&order= Addtime

desc&pagesize=6&datetype=2&target=_blank&rdquo;)}&ndash;>
But I want a list of templates inside the page, which means that only 22 characters are displayed per bar.


6. Home Information column how to call here
&ldquo;9&rdquo; for the ID of your module
{php $C = get_maincat (0, Cache_read (&lsquo;category-9.php&rsquo;));}
{Loop $C $k $v}
<a href=&rdquo; {$MODULE [9][linkurl]} {$v [linkurl]}&rdquo;>{$v [catname]}</a>
{/loop}
7. List of companies can not control the number of words!!
You can modify list-com.htm directly
{$t [Company]} is {dsubstr ($t [Company], $length)}
8.TAG Common Tags
{$CATEGORY [$t [catid]][' CatName ']} belongs to the column name; {timetodate ($t [' Addtime '], $datetype)}

Release time
9. Other
You can specify the label template by &template=.
If this parameter is not used, the default is List
In Template catalog Tag directory
Level 1 is the recommended article, Level 2 is a slideshow, 3 is recommended, 4 is the headline, and level 5 is headline related.


10, the following, how to call out the company's phone number and the list page in the company's template first and the other label properties, how to call out
Join on list-company.htm page

<li class= "F_gray" > main: {$t [business]}</li>

<li class= "F_gray" > Address: {$t [address]}</li>

<li class= "F_gray" > Tel: {$t [telephone]}</li>

<li class= "F_gray" > Fax: {$t [fax]}</li>

<li class= "F_gray" > Email: {$t [mail]}</li>

650) this.width=650; "title=" returns home "src="/favicon.ico "style=" border:0px; "alt=" Favicon.ico "/>

Destoon label Daquan, novice must

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.