b2b-destoon--template Tag Call code large Collection

Source: Internet
Author: User
Tags add time comments function prototype
Destoon template Tag Call code large collection     Beginners Learn the following labels for Destoon to business-to-business systems, and are familiar with the following tabs to learn Destoon easily. 1. Global Label 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 keyword): {$head _ Keywords} Meta Description (page description): {$head _description} 2. Connection address default Individual module connection: {$MODULE [2][linkurl]}  supply: {$MODULE [5][ linkurl]}  buy: {$MODULE [6][linkurl]}  quotes: {$MODULE [7][linkurl]}  company: {$MODULE [4][linkurl]}  show: {$ module[8][linkurl]}  information: {$MODULE [21][linkurl]} : {$MODULE [22][linkurl]}  brand: {$MODULE [13][linkurl ]}  talent: {$MODULE [9][linkurl]}  know: {$MODULE [10][linkurl]}  topic:{$MODULE [11][linkurl]}  gallery: {$MODULE [12][linkurl]} video: {$MODULE [14][linkurl]} download: {$MODULE [15][linkurl]} publish information: {$ module[2][linkurl]}{$DT [file_my]} business shop: {$MODULE [2][linkurl]}home.php View station letter: {$MODULE [2][linkurl]}message.php Manage trading transactions: {$MODULE [2][linkurl]}trade.php]: {$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 Express: {$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 ')} Request a link: {extendurl (' link ')}{rewrite (' Index.php?action=reg ')} message book: { Extendurl (' guestbook ')} votes: {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> call Login module: {if $DT [Page_login]} { Template ' user ', ' chip '} {/if} call Classification module: {php $mid = 5;} {Template ' catalog ', ' Chip '} 4. Call for each 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} calls theoretically requires a certain html+css knowledge of the site manager and php+ MySQL has a preliminary understanding. 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 = ' Destoon '; $pagesize = 10; Two variables $expires indicates cache expiration >0 cache $expires seconds; 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 of the path module. Characters commonly used section title title; Linkurl link; catid category ID; introduce introduction; Addtime add time; common function dsubstr ($string, $length, $suffix = ") string $string Intercept as $length long, trailing append $suffix (e.g.:) Set_style ($string, $style = ", $tag = ' span ') to place the string $string in the $taghtml tag and set the style to $style Linkurl ($linkurl, $absurl = 0) fixes the relative path $linkurl to an absolute path (prevents link errors) date ($format, $timestamp) converts the timestamp $timestamp to $format ( For example, y-m-d) format label template template is saved in the./template/default/tag/directory; We recommend that you do not delete or modify your own template, and recommend that you create a new template and apply it on your own template. Category:destoon tag Call Comments (0) Destoon Show region posted BYjinpeng998on Monday, 12 July, 2010 display Area: Required function is Include/module.func.php/get_mainarea ($areaid, $area); PHP page: $AREA =cache_read (' area.php '); Read cache file static page call: <table width= "100%" cellpadding= "3&prime;> {php $mainarea = Get_mainarea (0, $AREA)} {loop $mai Narea $k $v} {if $k%2==0}<tr>{/if} <td><a href= "{$MOD [Linkurl]}{rewrite (' search.php?areaid= '. $v [' Areaid ']. ' &typeid= '. $typeid)} ">{$v [areaname]}</a></td> {if $k%2==1}</tr>{/if} {/loop} </table > Another way is to directly tag call,, yes, directly from the Destoon database to remove information Category:destoondestoon display area Comments (0) Destoon learning tag Call Posted Byjinpeng998on Sunday, 11 July, 2010 Links: $t [Linkurl] Supply module MORE: $MODULE [---module ID---][linkurl] module ID Place the mouse on the link below it appears moduleid=. You can see the picture path: $t; Information Module MORE: {$MOD [linkurl]}{$c [Linkurl]} to see which field the name belongs to. --Check &ndash; right-see name value eg Name=post[brand] That's the brand field. The first page of each module is index.htm pagesize= under its template/folder. $MOD [pagesize]. Can be written as pagesize=4; remember not to add single quotes or double quotation marks to paging: pagination tab: <!&ndash; {tag ("moduleid= $moduleid &c=3 $dtype &catid= $catid &pagesize=4&page= $page &showpage=1&datetype=5&order= ". $MOD [order]." &template=list-sell ")}&ndash;> paging: {if $showpage && $pages}<div class=" pages ">{$pages}</ DIV&GT;{/IF} Call Classification: Main method $maincat = Get_maincat (0, $CATEGORY); Get_maincat (0, $CATEGORY)--$childcat in the include/global_func.php = Get_maincat (0, $CATEGORY, 1);-Call Super column 1 level directory 0 for the most root directory 1 Directory level 1 for Level manual setting defaults to 1 if 0 is changed to 3 for a directory with a CATID of 3 small note: $CATEGORY = cache_read (' category-'. $moduleid. PHP ') This file calls {loop $maincat $k $v} {if $k% $DT [page_subcat]==0}<tr>{/if} <td> <a on the common.inc.php page of the module page href= "{$MOD [linkurl]}{$v [Linkurl]}" >{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} NOTE: In its module There must be $maincat in the PHP page of the module folder $MOD [Linkurl] is the module also the home address $v [Linkurl] Its following table page plus CATID category:destoon tag call Comments (0)

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.