dede常用标签 待续......

[field:arcurl /]

[field:description function="gbk_substr(@me,150)"/]

[field:pubdate function="MyDate('Y-m-d',@me)"/]

{dede:pagelist istitem='index,pre,next,end,' listsize='5' /}  \include\arc.listview.class.php

{dede:php} PHP代码{/dede:php}
{dede:php}print_r($refObj->Fields);{/dede:php}
{dede:php}echo '<meta property="og:image" content="'.$refObj->Fields['litpic'].'"/>';{/dede:php}

 

\include\taglib\channel.lib.php
{dede:channel typeid='45' currentstyle="<a href='~typelink~' title='~typename~' class='select'>~typename~</a>"}
<a href="[field:typeurl/]" title="[field:typename/]">[field:typename/]</a>
{/dede:channel}
if(($row['id']==$typeid || ($topid==$row['id'] && $type=='top') ) && $currentstyle!='' ){
替换
if(($row['id']==$refObj->TypeLink->TypeInfos['id'] || ($topid==$row['id'] && $type=='top') ) && $currentstyle!='' ){

\helpers\archive.helper.php
{dede:field.id function=GetTags(@me)/}  [field:id function=GetTags(@me)/]
function GetTags($aid){
    global $dsql;
    $tags = '';
    $query = "SELECT tag FROM `#@__taglist` WHERE aid='$aid' ";
    $dsql->Execute('tag',$query);
    while($row = $dsql->GetArray('tag')){
        //$tags .= ($tags=='' ? "<a href='/tags.php?/".$row['tag']."/'>".$row['tag'].'</a>' : '&nbsp;&nbsp;'."<a href='/tags.php?/".$row['tag']."/'>".$row['tag'].'</a>');
            $z = rawurlencode($row['tag']);
            $a = "<a href='/tags.php?/".$z."/'>".$z."</a>";
            $tags .= ($tags=='' ? $a : '&nbsp;&nbsp;'.$a);
    }
    return $tags;
}

猜你喜欢

转载自blog.csdn.net/leejing623/article/details/88089788
今日推荐