国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > CMS > 帝國Empire > 正文

帝國CMS內容頁調用當前文章作者信息及調用會員除了當前文章以外的其他相關文章

2024-08-28 12:25:03
字體:
來源:轉載
供稿:網友
內容頁調用當前文章作者信息及調用會員除了當前文章以外的其他相關文章


一、調用會員信息:
把以下代碼加到內容頁模板里即可

<?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>

二、調用用戶發過的其他文章信息(會員投稿文章):


1、php調用
調用當前會員投稿的文章(5條):
---------------------
<?php 
$sql=$empire->query("select * from {$dbtbpre}ecms_news where userid='$navinfor[userid]' and classid='$navinfor[classid]' and id<>$navinfor[id] and ismember=1 order by newstime asc limit 5"); 
while($r=$empire->fetch($sql)) 
if($navinfor[ismember]==1)

$titleurl=sys_ReturnBqTitleLink($r);//鏈接 
?> 

<li><a href="<?=$titleurl?>" target="_blank" title="<?=$r[title]?>" ><?=esub($r[title],40)?></a></li> 
<?php
}
else
{
?>
暫時沒有其他文章
<?php 

?>





2、靈動標簽調用
----------------------
[e:loop={"select * from [!db.pre!]ecms_news where userid='$navinfor[userid]' and classid='$navinfor[classid]' and id<>$navinfor[id] and ismember=1 order by newstime desc limit 10",0,24,0}]
<?php
if($navinfor[ismember]==1)
{
?>

<li><a href="<?=$bqsr[titleurl]?>" title="<?=$bqr[title]?>"><?=esub($bqr[title],50)?></a></li>
<?php
}
else
{
?>
暫時沒有其他文章
<?php
}
?>
[/e:loop]



[e:loop={'selfinfo',10,0,0,"userid='$navinfor[userid]' and classid='$navinfor[classid]' and id<>$navinfor[id] and ismember=1"}]
 <?php
if($navinfor[ismember]==1)
{
?>

<li><a href="<?=$bqsr[titleurl]?>" title="<?=$bqr[title]?>"><?=esub($bqr[title],50)?></a></li>
<?php
}
else
{
?>
暫時沒有其他文章
<?php
}
?>
[/e:loop]  



==============================================調用用戶發過的其他文章信息注釋========================================================
注釋:id<>$navinfor[id]或and id!=$navinfor[id] 意思為:不等于當前文章id

  ①、classid='$navinfor[classid]'  意思為:只調用當前欄目的文章(如果刪除它后,會調用會員在整個模型中其他欄目發過的文章)

  ②、classid也可以指定顯示欄目的id 格式如:classid=34 或  classid in (2,3))

  ③、classid還可以排除當前欄目  格式如:classid<>$navinfor[classid]  即:調用當前發布者在其他欄目發布的信息

     “暫時沒有其他文章”可以刪除

注意:以上(調用用戶發過的其他文章信息)除了不能調用后臺“站長”發布的文章外,能調出“會員”和“游客”的文章
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 阿瓦提县| 绥中县| 贺兰县| 宿州市| 上高县| 盐山县| 巴彦淖尔市| 汝南县| 揭阳市| 治县。| 蓝田县| 洪江市| 周至县| 班玛县| 扬中市| 项城市| 海南省| 临海市| 包头市| 黄龙县| 辉县市| 秦安县| 濉溪县| 仪陇县| 屏东县| 高要市| 温州市| 乌兰察布市| 长泰县| 手机| 长春市| 兴安盟| 连南| 凤翔县| 铜鼓县| 满城县| 会宁县| 随州市| 天津市| 长宁区| 安塞县|