下面教大家怎么自己开发一个织梦标签来调用当前作者的所有文章。 首先将以下函数放到 include/extend.func.php 最下边,这个函数是用来获取静态页面的URL地址的。 function GetOneDocUrl($aid) { global $dsql; include_once(DEDEINC."/channelunit.func.php"); $aid = trim(ereg_replace('[^0-9,','',$aid)); $chRow = $dsql->GetOne("Select arc.*,ch.maintable]ch.addtable]ch.issystem From `dede_arctiny` arc left join `dede_channeltype` ch on ch.id=arc.channel where arc.id='$aid' "); if(!is_array($chRow)) { return $reArr; } else { if(empty($chRow['maintable',)) $chRow['maintable', = 'dede_archives'; } if($chRow['issystem',!=-1) { $nquery = " Select arc.*,tp.typedir,tp.topid,tp.namerule,tp.moresite,tp.siteurl]tp.sitepath From `{$chRow['maintable',}` arc left join `dede_arctype` tp on tp.id=arc.typeid where arc.id='$aid' "; } else { $nquery = " Select arc.*,1 as ismake,0 as money,'' as filename,tp.typedir,tp.topid,tp.namerule,tp.moresite,tp.siteurl]tp.sitepath From `{$chRow['addtable',}` arc left join `dede_arctyp...
内容已隐藏,请关注公众号输入验证码查看
本帖支持关注公众号查看
【无套路 无套路 无套路 扫描二维码关注公众号发送【验证码】收到验证码 在上面输入点击提交查看即可显示隐藏内容】
|