Supesite someone saw a powerful function, I saw some of the use of the pit master, the first time I saw block, I fainted. For the parameter confused, the following collection of some, spare bar.
Supesite Tag Invocation Parameters
Parameters:
Blocktype module name, the system has a module
Blocktype=category System Classification Module
Blocktype=spacenews Information Module
Blocktype=poll Voting Module
Blocktype=spaceblog Log Module
Blocktype=spaceimage Picture Module
Blocktype=spacefile file Module
Blocktype=spacegoods Commodity Module
Blocktype=spacelink Bookmark Module
Blocktype=tag Tag Module
Blocktype=spacetag Tag Article Information module
Blocktype=spacecomment User Reply module
Blocktype=userspace Personal Space List module
Blocktype=announcement Site Bulletin Module
Blocktype=friendlink Site Friendship Link module
Blocktype=spacevideo AV Module
Blocktype=group Circle Module
Blocktype=bbsthread Forum Theme Module
Blocktype=bbsannouncement Forum Bulletin Module
Blocktype=bbsforum Forum Plate Module
Blocktype=bbslink Forum Friendship Link Module
Blocktype=bbsmember Forum Membership Module
Blocktype=bbsattachment Forum Accessory Module
Blocktype=bbspost Forum post Module
Itemid (s) refers to the information of the specified ID, where s is the parameter,
Grade[] Audit level, the system defaults to five levels, the invocation parameters are 1, 2, 3, 4, 5
catid[] Site Classification parameter invocation, that is, specified by this parameter can invoke the specified class of information,
UID Specifies author ID
The GID specifies the ID circle, that is, the information of the specified circle can be called through this parameter, and the user resembles the CATID
Haveattach attachments are included, there are two parameters: 1 indicates, 0 means no
Digest[] Elite level, the system default has three levels, the parameters are 1, 2, 3, respectively, the essence of three-in-one
Top[] Pin level parameter, system default has three top level, parameter is 1, 2, 3
Dateline release time parameter, the parameter can be custom, set to 0 when the release time is not limited, the parameters are measured in seconds, such as: dateline/86400, the information published in the day parameter can also be followed by a sorting parameter, such as: Dateline/86400/ DESC, which represents information published within one day and is called in descending order
Lastpost the last reply scope, the use of its invocation parameters is similar to that of Dateline
Viewnum view scope, that is, this parameter can be called to view the number of information for a certain range
Replynum the range of replies, used in vviewnum similar, and both can be added with sort parameters desc or ASC, i.e. descending and ascending
Trackbacknum Number of reference ranges
Goograte Good rating Range
Badrate Difference Rating Range
I.dateline Time Sorting parameters
I.lastpost Reply Time Sort parameter
I.viewnum View number Sort parameters
I.replynum Reply number Sort parameter
I.trackbacknum Reference Number Sort parameter
I.digest Essence Level sorting parameters
I.goodrate Good scoring sort parameters
I.baddrate Differential Scoring sorting parameters
Limit data Bar Number parameter
Cachetime Cache Parameters
Subjectlen Title Length parameter
Subjectdot the length of the title is truncated and an ellipsis ends, 0 means no display, and 1 indicates the display
ShowDetail whether to show the article details
Messagelen show the length of the detailed content
Messagedot whether the ellipsis is displayed after the detailed content is intercepted
Showcategory whether to display the category column name of the article
To illustrate:
Here is an example, the example of all the parameters are used, in fact, there are many parameters are not required, in the call we often only need the usual parameters, here in order to facilitate the role of the above parameters.
<!--{block name= "spacenews" parameter= "grade/5/catid/1/gid/4/dateline/86400/lastpost/172800/viewnum/10,11/ replynum/11,12/trackbacknum/12,13/goodrate/13,14/badrate/14,15/digest/3/top/3/haveattach/1/showspacename/1/ Showgroupname/1/order/i.dateline desc,i.lastpost Asc,i.viewnum desc/limit/0,10/cachetime/900/subjectlen/34/ Subjectdot/1/showdetail/1/messagelen/100/messagedot/1/showcategory/1/cachename/ceshi/tpl/data "}--><! --Test--
Explanatory notes:
We can read the meaning of this module according to the above parameter description one by one:
GRADE/5 indicates an audit level of 5
CATID/1 is called in the category of the site Category ID 5, where the ID of the good can be clicked in the background to create a new module, and then view the source code, can be viewed;
VIEWNUM/10,11 indicates the number of views between 10 and 11
Order/i.dateline Desc,i.lastpost Asc,i.viewnum desc/This paragraph looks more complicated, actually very simple, actually this is to call the data sort, but the sorting standard has more than just, this means: first sort by time descending, Second sort by reply time ascending, third sort by view number descending,
Cachename/ceshi means that the module variable name is Ceshi, this name is only for you to obtain, the purpose is convenient for you to use this alias when calling the data, and this is the necessary parameters, this name is best in English, of course, can also be Chinese, Chinese words, to be encoded, And the call can only be used after the encoded name, so the strong name is English or letter. This meaning may not be understood, it doesn't matter, give a simple example:
Now I want to display the list of articles in the Web Design section and arrange by the number of views
Then you can do this:
<!--page design Reading--
<!--{block name= "spacenews" parameter= "Order/i.viewnum desc/subjectlen/34/limit/0,15/cachetime/13600/ Showspacename/1/cachename/wangyesheji/tpl/data "}-->
<div id= "Focus" >
<ul class= "Msgtitlelist linelist" >
<!--{Loop $_sblock[wangyesheji] $value}-->
<li><cite><a href= "#uid/$value [uid]#" > $value [username]</a> </cite>[<a href= "#action/$value [type]#" >{$lang [$value [Type]]}</a>] <a href= "$value [url]" > $value [Subject] </a></li>
<!--{/loop}-->
</ul>
</div>
where <!--{loop $_sblock[wangyesheji] $value the Wangyesheji in the}--> is the alias in the module, which is/cachename/wangyesheji
module function is a bright spot of the supesite system, through which you can create the template you need, where to display what module, what content to call, how to style, in your grasp.
In the module management, by selecting the existing template code, according to their own needs, add to the site template file anywhere, you can achieve the forum, Ucenter Home information read display. Select a different base module to view the existing module code below the base module. You can also add modules to your needs by creating a module operation. Only the modules that get the data can be called inside the template, and other class template code is displayed in two modes: template internal call, Javascript call. The data is automatically cached and periodically updated at a specified time interval.
By creating different module codes and placing them in the template, you can flexibly display the data on the forums or Ucenter Home. Select a basic module, on the Create Module wizard page that appears, freely set the requirements for displaying data content within the station, and then get the module code you need after submission. When selecting a module style to fetch data only, the module reads the data that satisfies the condition into the $_sblock[variable name] array, which allows you to freely manipulate the array variable in the template file.
Supesite 7.0 data call settings are located in: Supesite back-up module management, the data call can invoke three aspects of data: Supesite, discuz!, Ucenter Home, but the format of their calling code is the same.
Each theme in the forum invokes a picture of SQL notation!
SELECT * from Discuz710.cdb_posts P INNER joins discuz710.cdb_attachments a on p.tid = A.tid and P.authorid = A.uid WHERE A . isimage =1 GROUP by P.tid ORDER by P.dateline DESC
<!--{block name= "bbsattachment" parameter= "sql/select%20%2a%20from%20discuz710.cdb_posts%20p%20inner%20join% 20discuz710.cdb_attachments%20a%20on%20p.tid%20%3d%20a.tid%20and%20p.authorid%20%3d%20a.uid%20where% 20a.isimage%20%3d1%20group%20by%20p.tid%20order%20by%20p.dateline%20desc/limit/0,6/cachetime/900/subjectlen/50 /showdetail/1/descriptionlen/112/cachename/bbshuandeng01/tpl/data "}-->
<!--{loop $_sblock[' bbshuandeng01 ') $value}-->
<li><a target= "_blank" href= "$value [url]" ><p> $value [subject]</p></a></li>
<!--{/loop}-->
Each theme in the forum invokes a single picture of SQL
Supesite parameter Description