织梦dede自定义dede:php与dede:sql使用变量

织梦技巧

php文件

require_once(dirname(__FILE__)."/../../include/common.inc.php");require_once DEDEINC.'/arc.partview.class.php';$arc = new PartView();$tempfile = $cfg_basedir.$cfg_templets_skin.'/mood_ranking.htm';//模板文件$arc->SetTemplet($tempfile);$arc->Display();

模板文件

{dede:php}$refObj->Fields['ranktime'] = time()-($day*86400);{/dede:php}{dede:sql sql="SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath FROM `58pic_archives` arc LEFT JOIN `58pic_arctype` tp ON arc.typeid=tp.id where arc.arcrank>-1 AND arc.typeid=8 ORDER BY arc.id desc limit 0, 10"}[field:id runphp=yes]$id=@me;@me='';$url=GetOneArchive($id);@me=$url['arcurl'];[/field:id] - [field:title/]{/dede:sql}

标签:
吃喝网尾部