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

首頁 > CMS > 織夢DEDE > 正文

DedeCMS 僅限會員發表評論的修改方法

2024-07-12 09:07:27
字體:
來源:轉載
供稿:網友
只有會員才可以發表評論。 實現原理:判斷是否登錄,是,則加載評論框和按鈕等,否,則提示只有注冊或登錄后才可以發表評論。
 
下面列出需要修改的文件的代碼: 
 
1、文章頁模板article_article.htm (以下代碼插入你模板的合適位置):
 
Copy to ClipboardLiehuo.Net Codes引用的內容:[www.CUOxin.com]
<div class="box"> 
<h2><a name="comment">評論內容</a></h2> 
<p> </p> 
<div class="content"> 
<form action="{dede:field name='phpurl'/}/feedback.php" method="post" name="feedback"> 
<input type="hidden" name="action" value="send" /> 
<input type="hidden" name="comtype" value="comments"> 
<input type="hidden" name="aid" value="{dede:field name="id"/}" /> 
<input type="hidden" name="isconfirm" value="yes" /> 
<p> 
<script language='javascript' type='text/javascript' src="{dede:field name='phpurl'/}/feedback_js.php?aid={dede:field name='id'/}"></script> 
<br></p> 
<p><label for="txaArticle"></label></p> 
<div class="dcmp-userinfo" id="_ajax_feedback"> 
請您<b><a target="_blank" href="{dede:global.cfg_memberurl/}/index_do.php?fmdo=user&dopost=regnew"><font size="4" color="#008000">注冊</font></a></b>或者<b><a target="_blank" href="{dede:global.cfg_memberurl/}/login.php"><font size="4" color="#008000">登錄</font></a></b>后發表評論! 忘記密碼了?點擊<b><a target="_blank" href="{dede:global.cfg_memberurl/}/resetpassword.php"><font color="#008000" size="4">這里</font></a></b>找回密碼! 
</div> 
<script language="javascript" type="text/javascript">CheckLogin();</script> 
</p><br> 
</form> 
</div></div>
2、member目錄下的ajax_feedback.php (全部內容):
 
Copy to ClipboardLiehuo.Net Codes引用的內容:[www.CUOxin.com]
<?php 
require_once(dirname(__FILE__)."/config.php"); 
AjaxHead(); 
if($myurl == '') 
exit(''); 
$uid = $cfg_ml->M_LoginID; 
$face = $cfg_ml->fields['face'] == '' ? $GLOBALS['cfg_memberurl'].'/images/nopic.gif' : $cfg_ml->fields['face']; 
?> 
<p> 
<div class="dcmp-mood"> 
<strong>評價:</strong> 
<ul> 
<li><input type="radio" name="feedbacktype" checked="1" value="feedback" id="dcmp-stand-neu" /><label for="dcmp-stand-neu"><img src="/templets/images/cmt-neu.gif" />中立</label> 
<li><input type="radio" name="feedbacktype" value="good" id="dcmp-stand-good" /><label for="dcmp-stand-good"><img src="/templets/images/cmt-good.gif" />好評</label> 
<li><input type="radio" name="feedbacktype" value="bad" id="dcmp-stand-bad" /><label for="dcmp-stand-bad"><img src="/templets/images/cmt-bad.gif" />差評</label> 
</ul> 
</div> 
</p> 
<div class="dcmp-mood"> 
<strong>表情:</strong> 
<ul> 
<li><input type="radio" name='face' value='6' checked="1" /><img src="/templets/images/mood/ico-mood-6.gif" /></li> 
<li><input type="radio" name='face' value='4'/><img src="/templets/images/mood/ico-mood-4.gif" /></li> 
<li><input type="radio" name='face' value='3'/><img src="/templets/images/mood/ico-mood-3.gif" /></li> 
<li><input type="radio" name='face' value='5'/><img src="/templets/images/mood/ico-mood-5.gif" /></li> 
<li><input type="radio" name='face' value='2'/><img src="/templets/images/mood/ico-mood-2.gif" /></li> 
<li><input type="radio" name='face' value='1'/><img src="/templets/images/mood/ico-mood-1.gif" /></li> 
<li><input type="radio" name='face' value='7'/><img src="/templets/images/mood/ico-mood-7.gif" /></li> 
</ul> 
</div> 
<p><textarea cols="60" name="msg" rows="5" class="ipt-txt" style="width:600px; height:100px;" ></textarea></p> 
以用戶名 <?php echo $cfg_ml->M_UserName; ?> 發表評論,請控制在200字以內。系統會自動記錄你的IP地址,請勿發布非法信息! 
<p>驗證碼:<input name="validate" type="text" id="validate" size="10" style="height:15px;width:50px;margin-right:6px;" class="nb" /> 
<img src='<?php echo $cfg_cmsurl;?>/include/vdimgck.php' width='50' height='20' /> 
<input type="submit" id="submit" value="提交評論" class="button" /> 
<?php if($cfg_feedback_ck=='Y') { ?> 
</p> 
<?php } ?>
3、templets目錄下plus里的feedback_templet_js.htm (全部內容):
 
Copy to ClipboardLiehuo.Net Codes引用的內容:[www.CUOxin.com]
{dede:config pagesize='5'/} 
{dede:datalist} 
<?php 
if($fields['userid']!='') $spaceurl = $cfg_basehost.'/member/index.php?uid='.$fields['userid']; 
else $spaceurl = "#"; 
if($fields['username']=='匿名') $spaceurl = "#"; 
$fields['bgimg'] = 'cmt-neu.gif'; 
$fields['ftypetitle'] = '該用戶表示中立'; 
if($fields['ftype']=='bad') { 
$fields['bgimg'] = 'cmt-bad.gif'; 
$fields['ftypetitle'] = '該用戶表示差評'; 
else if($fields['ftype']=='good') { 
$fields['bgimg'] = 'cmt-good.gif'; 
$fields['ftypetitle'] = '該用戶表示好評'; 
?> 
document.write("<div class='decmt-box'>"); 
document.write("<div class='decmt-title'>"); 
document.write("<span class='moodico'><img src='{dede:global.cfg_templeturl/}/images/mood/ico-mood-<?php if($fields['face']>0) echo $fields['face'];?>.gif'/></span>"); 
document.write("<span class='username'><a href='<?php echo $spaceurl;?>'>{dede:field.username/}</a></span>"); 
document.write("<span class='date'>{dede:field.dtime function=GetDateMk(@me)/}</span>"); 
document.write("<span>評論<img src='{dede:global.cfg_templeturl/}/images/{dede:field.bgimg/}' alt='{dede:field.ftypetitle/}' /></span>"); 
document.write("</div>"); 
document.write("<div class='decmt-act'>"); 
document.write("</div>"); 
document.write("<div class='decmt-content'>{dede:field.msg function='jstrim(@me,500)'/}"); 
document.write(" "); 
document.write("<span id='goodfb{dede:field.id/}'><a href=#goodfb{dede:field.id/} onclick=postBadGood('goodfb',{dede:field.id/})>支持</a>[{dede:field.good/}]</span>"); 
document.write("<span id='badfb{dede:field.id/}'><a href=#badfb{dede:field.id/} onclick=postBadGood('badfb',{dede:field.id/})>反對</a>[{dede:field.bad/}]</span>"); 
document.write("</div>"); 
document.write("</div>"); 
{/dede:datalist}
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 岳池县| 娱乐| 柳江县| 白玉县| 吴堡县| 勐海县| 卓资县| 安远县| 平和县| 北流市| 资溪县| 荃湾区| 富川| 通江县| 华坪县| 盱眙县| 柳河县| 延长县| 平遥县| 遂川县| 桂林市| 莱州市| 奉贤区| 晋江市| 巨野县| 界首市| 马鞍山市| 双柏县| 孟州市| 东平县| 四子王旗| 晋宁县| 琼海市| 乌鲁木齐县| 巴南区| 新建县| 汉沽区| 黔南| 宜城市| 灌阳县| 阳泉市|