调用查看作者的所有文章帝国CMS实现查看作者的所有文章一共2种方法一、链接到搜索页注意:因为一般搜索字节为2个字节,而最先注册的前9位会员会员id为个位数(即;1个字节),所以要先把搜索字节设置为1个字节 后台–系统–系统设置–系统参数设置–搜索设置–搜索关键字(这里把默认的“2到20”中的2修改为1格式:/e/search/?searchget=1&keyboard=会员ID&show=userid&member=1列表内容模板(list.var) 调用:<a href=”e/search/?searchget=1&keyboard=[!–userid–]&show=userid&member=1″>[!–username–]</a>内容页:方法1、调用作者多种信息<?php$userr=sys_ShowMemberInfo(0,”);?><span>会员头像:<img src=”<?=$userr[userpic]?$userr[userpic]:$public_r[newsurl].’e/data/images/doimg.gif’?>”></span> <br><span>会员:<?=$userr[username]?></span> <br><span>会员ID:<?=$userr[userid]?></span> <br><span>注册时间:<?=$userr[registertime]==null?””:date(‘y-m-d’,$userr[registertime])?></span> <br><span>会员积分:<?=$userr[userfen]?>分</span> <br><span>发布新闻:<?=$empire->gettotal(“select count(*) as total from {$dbtbpre}ecms_news where userid=’$navinfor[userid]’ and ismember=1″)?>条</span> <br><span>会员组:<?=$userr[groupname]?></span><br><span>作者文章列表2:<a href=”<?=$public_r[newsurl]?>e/search/?searchget=1&keyboard=<?=$userr[userid]?>&show=userid&member=1″>文章列表</a></span><br>方法2、直接用链接(不好使,在没有作者的文章中链接会链到会员ID为1的会员,但名称却是管理员的)<a href=”[!–news.url–]e/search/?searchget=1&keyboard=[!–userid–]&show=userid&member=1″>[!–username–]</a>方法3、灵动标签调用[e:loop={‘selfinfo’,1,0,0,”userid=’$navinfor[userid]’ and classid=’$navinfor[classid]’ and id=$navinfor[id] and ismember=1″}]<a href=”<?=$public_r[newsurl]?>e/search/?searchget=1&keyboard=<?=$bqr[‘userid’]?>&show=userid&member=1″ target=”_blank”><?=$bqr[‘username’]?></a>[/e:loop] 注释:<?=$public_r[newsurl]?>网站根目录 <?=$bqr[‘userid’]?>会员id mid=1数据模型id tempid=6列表模板ID==============================================================================================================二、链接到作者空间(PHP文件本文章最后提供)使用说明:使用时可用list.php或list2.php,①、list.php链接到会员空间的文章列表, 格式: e/space/list.php?mid=1&userid=2②list2.php自定义的作者文章列表,可用自己制作的 格式:e/space/list2.php?mid=1&tempid=9&userid=2注释:mid=1数据模型id tempid=9列表模板ID(和数据模型关联) userid=2作者id注意:list2.php可选择模板(tempid=模板ID),而list.php不可选,即list.php选择了模板也还会自动链接到会员空间的文章列表—————————————————————————————————————-列表内容模板(list.var) 调用<a href=”[!–news.url–]e/space/list2.php?mid=1&tempid=9&userid=[!–userid–]”>[!–username–]</a>例子:下列将链接到作者空间文章列表<a href=”http://127.0.0.1/dg/e/space/list.php?mid=3&tempid=1&userid=1″>王伟</a><a href=”[!–news.url–]e/space/list.php?mid=3&tempid=1&userid=[!–userid–]”>[!–username–]</a>————————————————————————————————内容页调用方法1、调用作者多种信息<?php$userr=sys_ShowMemberInfo(0,”);?><span>会员头像:<img src=”<?=$userr[userpic]?$userr[userpic]:$public_r[newsurl].’e/data/images/doimg.gif’?>”></span> <br><span>会员:<?=$userr[username]?></span> <br><span>会员ID:<?=$userr[userid]?></span> <br><span>注册时间:<?=$userr[registertime]==null?””:date(‘y-m-d’,$userr[registertime])?></span> <br><span>会员积分:<?=$userr[userfen]?>分</span> <br><span>发布新闻:<?=$empire->gettotal(“select count(*) as total from {$dbtbpre}ecms_news where userid=’$navinfor[userid]’ and ismember=1″)?>条</span> <br><span>会员组:<?=$userr[groupname]?></span><br><span>作者文章列表:<a href=”<?=$public_r[newsurl]?>e/space/list.php?userid=<?=$userr[userid]?>&mid=1″>文章列表</a></span><br>方法2、直接用链接(不好使,在没有作者的文章中链接会链到会员ID为1的会员,但名称却是管理员的)<a href=”[!–news.url–]e/space/list.php?mid=1&tempid=1&userid=[!–userid–]”>[!–username–]</a>方法3、灵动标签调用[e:loop={‘selfinfo’,1,0,0,”userid=’$navinfor[userid]’ and classid=’$navinfor[classid]’ and id=$navinfor[id] and ismember=1″}]作者文章列表:<a href=”<?=$public_r[newsurl]?>e/space/list.php?userid=<?=$bqr[‘userid’]?>&mid=1″ target=”_blank”><?=$bqr[‘username’]?></a><br>[/e:loop] 注释:<?=$public_r[newsurl]?>网站根目录 <?=$bqr[‘userid’]?>会员id mid=1数据模型id tempid=6列表模板ID
list2.php下载