demotag.lib.php
1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
if(!defined('DEDEINC')){
exit("Request Error!");
}
/**
* 这仅是一个演示标签
*
* @version $Id: demotag.lib.php 1 9:29 2010年7月6日Z tianya $
* @package DedeCMS.Taglib
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc.
* @license http://help.dedecms.com/usersguide/license.html
* @link http://www.dedecms.com
*/
/*>>dede>>
<name>演示标签</name>
<type>全局标记</type>
<for>V55,V56,V57</for>
<description>这仅是一个演示标签</description>
<demo>
{dede:demotag /}
</demo>
<attributes>
</attributes>
>>dede>>*/
function lib_demotag(&$ctag,&$refObj)
{
global $dsql,$envs;
//属性处理
$attlist="row|12,titlelen|24";
FillAttsDefault($ctag->CAttribute->Items,$attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
$revalue = '';
//你需编写的代码,不能用echo之类语法,把最终返回值传给$revalue
//------------------------------------------------------
$revalue = 'Hello Word!';
//------------------------------------------------------
return $revalue;
}