将默认模板文件ajaxfeedback2.htm更改成ajaxfeedback.htm放到模板目录下面 文件下载
在文章模板head下加入以下代码
相应位置猜一下代码
评论位置加入调用评论模板代码
另外默认添加上是不正常显示留言窗口的。需要在系统设置里面---其他选项--模板引擎禁用标签吧PHP代码去掉即可
系统默认样式提取
删除支持--反对--在模板里面删除同时在plus--feedback_ajax.php文件下删除 ;评论内容样式也是这文件更改
在文章模板head下加入以下代码
<link href="{dede:global.cfg_templets_skin/}/style/dedecms.css" rel="stylesheet" media="screen" type="text/css" /> <script language="javascript" type="text/javascript" src="{dede:global.cfg_cmsurl/}/include/dedeajax2.js"></script> <script language="javascript" type="text/javascript"> <!-- function CheckLogin(){ var taget_obj = document.getElementById('_ajax_feedback'); myajax = new DedeAjax(taget_obj,false,false,'','',''); myajax.SendGet2("{dede:global.cfg_cmsurl/}/member/ajax_feedback.php"); DedeXHTTP = null; } function postBadGood(ftype,fid) { var taget_obj = document.getElementById(ftype+fid); var saveid = GetCookie('badgoodid'); if(saveid != null) { var saveids = saveid.split(','); var hasid = false; saveid = ''; j = 1; for(i=saveids.length-1;i>=0;i--) { if(saveids[i]==fid && hasid) continue; else { if(saveids[i]==fid && !hasid) hasid = true; saveid += (saveid=='' ? saveids[i] : ','+saveids[i]); j++; if(j==10 && hasid) break; if(j==9 && !hasid) break; } } if(hasid) { alert('您刚才已表决过了喔!'); return false;} else saveid += ','+fid; SetCookie('badgoodid',saveid,1); } else { SetCookie('badgoodid',fid,1); } myajax = new DedeAjax(taget_obj,false,false,'','',''); myajax.SendGet2("{dede:field name='phpurl'/}/feedback.php?aid="+fid+"&action="+ftype+"&fid="+fid); } function postDigg(ftype,aid) { var taget_obj = document.getElementById('newdigg'); var saveid = GetCookie('diggid'); if(saveid != null) { var saveids = saveid.split(','); var hasid = false; saveid = ''; j = 1; for(i=saveids.length-1;i>=0;i--) { if(saveids[i]==aid && hasid) continue; else { if(saveids[i]==aid && !hasid) hasid = true; saveid += (saveid=='' ? saveids[i] : ','+saveids[i]); j++; if(j==20 && hasid) break; if(j==19 && !hasid) break; } } if(hasid) { alert("您已经顶过该帖,请不要重复顶帖 !"); return; } else saveid += ','+aid; SetCookie('diggid',saveid,1); } else { SetCookie('diggid',aid,1); } myajax = new DedeAjax(taget_obj,false,false,'','',''); var url = "{dede:global.cfg_phpurl/}/digg_ajax.php?action="+ftype+"&id="+aid; myajax.SendGet2(url); } function getDigg(aid) { var taget_obj = document.getElementById('newdigg'); myajax = new DedeAjax(taget_obj,false,false,'','',''); myajax.SendGet2("{dede:global.cfg_phpurl/}/digg_ajax.php?id="+aid); DedeXHTTP = null; } --> </script> |
相应位置猜一下代码
<!-- //顶踩 --> <div class="newdigg" id="newdigg"> <div class="diggbox digg_good" onmousemove="this.style.backgroundPosition='left bottom';" onmouseout="this.style.backgroundPosition='left top';" onclick="javascript:postDigg('good',{dede:field.id/})"> <div class="digg_act">顶一下</div> <div class="digg_num">({dede:field.goodpost/})</div> <div class="digg_percent"> <div class="digg_percent_bar"><span style="width:{dede:field.goodper/}%"></span></div> <div class="digg_percent_num">{dede:field.goodper/}%</div> </div> </div> <div class="diggbox digg_bad" onmousemove="this.style.backgroundPosition='right bottom';" onmouseout="this.style.backgroundPosition='right top';" onclick="javascript:postDigg('bad',{dede:field.id/})"> <div class="digg_act">踩一下</div> <div class="digg_num">({dede:field.badpost/})</div> <div class="digg_percent"> <div class="digg_percent_bar"><span style="width:{dede:field.badper/}%"></span></div> <div class="digg_percent_num">{dede:field.badper/}%</div> </div> </div> </div> <script language="javascript" type="text/javascript">getDigg({dede:field.id/});</script> <!-- //顶踩部份的源码结束 --> |
{dede:include file='ajaxfeedback.htm' /} |
另外默认添加上是不正常显示留言窗口的。需要在系统设置里面---其他选项--模板引擎禁用标签吧PHP代码去掉即可
系统默认样式提取
@charset "utf-8"; /* CSS Document */ .mt1{/* ( margin-top * 1 ) */ margin-top:8px; } .tbox{ margin:0 0 8px 0; border-bottom:1px solid #DADADA; overflow:hidden; background:url(../images/green_skin.png) 0 -294px repeat-x; } .tbox dt{ height:24px; border:1px solid #DADADA; overflow:hidden; clear:both; } .tbox dd{ border-left:1px solid #DADADA; border-right:1px solid #DADADA; /*padding:4px 4px 0px;*/ overflow:hidden; } .tbox dt strong{ height:24px; line-height:24px; !important;line-height:25px; padding-left:8px; padding-right:4px; display:block; float:left; color:#316301; letter-spacing:1px; } .tbox dt strong a{ color:#316301; } .tbox dt strong a:hover{ color:#596F37; text-decoration:none; } .tbox dt span.more{ float:right; position:relative; line-height:25px; padding-right:8px; color:#596F37; } .tbox dt span.more a{ color:#596F37; text-decoration:none; } .tbox dt span.more a:hover{ color:#ff3333; text-decoration:underline; } .tbox dt span.label{ height:25px; float:right; overflow:hidden; padding-right:1px; padding-top:2px; } .tbox dt span.label a{ height:26px; display:block; padding:0px 7px 0px 8px; line-height:26px; border-left:1px solid #DADADA; float:left; color:#666; text-decoration:none; overflow:hidden; letter-spacing:1px; } .tbox dt span.label a:hover{ color:#360; } .tbox dt span.label a.thisclass{ background:#FFF; color:#333; border-top:3px solid #DADADA; } .tbox dt span.linklabel{ float:left; margin-left:10px; overflow:hidden; padding-right:1px; padding-top:2px; } .tbox dt span.linklabel a{ height:20px; display:block; padding:0px 7px 0px 8px; margin:0 5px; line-height:20px; border-left:1px solid #DADADA; border-top:1px solid #DADADA; border-right:1px solid #DADADA; float:left; color:#666; text-decoration:none; overflow:hidden; letter-spacing:1px; } .tbox dt span.linklabel a:hover{ color:#360; } .tbox dt span.linklabel a.thisclass{ background:#FFF; color:#333; } .dede_comment_post{ padding:5px; } .dcmp-stand{ float:right; margin-top:-18px; padding-right:10px; position:relative; clear:both; color:#999; } .dcmp-stand strong{ font-weight:normal; color:#444; } .dcmp-stand input{ margin-right:2px; } .dcmp-stand img{ vertical-align:middle; margin-right:2px; } .dcmp-content{ padding-top:8px; } .dcmp-content textarea{ height:100px; width:450px; float:left; } .clr{ clear:both; } .ipt-txt{ line-height:15px; padding:4px 5px; border-width:1px; border-style:solid; border-color:#666 #BBB #BBB #666; font-size:12px; } .dcmp-post{ height:35px; overflow:hidden; clear:both; color:#444; padding:5px 0 10px 0; } .dcmp-post .dcmp-userinfo{ float:left; margin-right:6px; } .dcmp-post .dcmp-userinfo input{ height:13px; padding-right:0px; } .dcmp-post .dcmp-userinfo input,.dcmp-post .dcmp-userinfo img{ vertical-align:middle; margin:5px; } .dcmp-post .dcmp-submit{ float:left; padding-top:6px; } .dcmp-post .dcmp-submit input,.dcmp-post .dcmp-submit button{ vertical-align:middle; } .dcmp-post .dcmp-submit button{ width:70px; height:25px; border:none; background:url(../images/btn-bg2.gif) no-repeat; line-height:25px; letter-spacing:1px; overflow:hidden; color:#444; cursor:pointer; margin-left:5px; } /*评论 ------------*/ .decmt-box2{ width:98%; padding:6px 5px; margin:0px auto; overflow:hidden; clear:both; } .decmt-box2 span.fr{ float:right; } .decmt-box2 span.title{ float:right; line-height:20px; width:600px; } .decmt-box2 ul{ } .decmt-box2 ul li{ width:100%; border-bottom:1px dashed #ccc; padding-bottom:10px; overflow:hidden; } .decmt-box2 ul li a.plpic{ float:left; width:40px; height:40px; padding:2px; border:1px solid #DFD9B9; background:#F9FDED; margin-right:5px; overflow:hidden; } .decmt-box2 ul li p{ float:left; width:630px; line-height:22px; } .decmt-box2 .comment_act{ float:left; width:630px; line-height:20px; color:#aeaeae; } .decmt-box2 .comment_act a{ color:#aeaeae; } .decmt-box{ width:98%; padding:6px 5px; margin:0px auto; overflow:hidden; clear:both; } .decmt-box span.fr{ float:right; } .decmt-box span.title{ float:left; line-height:20px; width:600px; } .decmt-box ul{ } .decmt-box ul li{ width:100%; border-bottom:1px dashed #ccc; padding-bottom:10px; overflow:hidden; } .decmt-box ul li a.plpic{ float:left; width:40px; height:40px; padding:2px; border:1px solid #DFD9B9; background:#F9FDED; margin-right:5px; overflow:hidden; } .decmt-box ul li p{ float:left; width:630px; line-height:22px; } .decmt-box .comment_act{ float:left; width:630px; line-height:20px; color:#aeaeae; } .decmt-box .comment_act a{ color:#aeaeae; } .decmt-box1{ width:98%; padding:6px 5px; margin:0px auto; overflow:hidden; clear:both; } .decmt-box1 span.fr{ float:right; } .decmt-box1 span.title{ float:left; line-height:20px; width:600px; } .decmt-box1 ul{ } .decmt-box1 ul li{ width:100%; border-bottom:1px dashed #ccc; padding:10px 0; overflow:hidden; } .decmt-box1 ul li a.plpic{ float:left; width:40px; height:40px; padding:2px; border:1px solid #DFD9B9; background:#F9FDED; margin-right:5px; overflow:hidden; } .decmt-box1 ul li p{ float:left; width:880px; line-height:22px; } .decmt-box1 .comment_act{ float:left; width:880px; line-height:20px; color:#aeaeae; } .decmt-box1 .comment_act a{ color:#aeaeae; } .dede_comment .decmt-box .decmt-title{ line-height:19px; color:#999; font-family:Tahoma; } .dede_comment .decmt-box .decmt-title span{ margin-right:2px; vertical-align:middle; } .dede_comment .decmt-box .decmt-title .moodico{ height:18px; width:18px; display:inline-block; } .dede_comment .decmt-box .decmt-title .username{ color:#669; } .dede_comment .decmt-box .decmt-title .username a{ color:#669; } .dede_comment .decmt-box .decmt-title .username a:hover{ text-decoration:none; color:#690; } .dede_comment .decmt-box .decmt-title .ip{ color:#669; font-size:11px; } .dede_comment .decmt-box .decmt-title .date{ color:#555; font-size:11px; } .dede_comment .decmt-box .decmt-act{ float:right; margin-top:-18px; padding-right:10px; position:relative; clear:both; color:#999; } .dede_comment .decmt-box .decmt-act span{ margin-right:7px; } .dede_comment .decmt-box .decmt-act span a{ color:#888; } .dede_comment .decmt-box .decmt-content{ color:#555; line-height:21px; clear:both; width:99%; margin:2px auto 0px; /* background:url(../images/ico-comment-quote.gif) 0px 4px no-repeat; text-indent:18px;*/ } .dede_comment .decmt-box .decmt-content img{ vertical-align:middle; } .decmt-box,.decmt-content .decmt-box,.dede_comment .decmt-box .decmt-box { background:#FFE; border:1px solid #CCC; margin:6px auto; } .dede_comment .decmt-box .decmt-box .decmt-title{ text-indent:4px; } .dede_comment .decmt-box .decmt-box .decmt-content{ color:#555; } .nocomment{ padding:10px; color:#666; } .dede_comment_post{ padding:5px; } .dcmp-title{ line-height:25px; } .dcmp-title strong{ color:#444; font-weight:normal; } .dcmp-title small{ font-size:12px; color:#999999; } .dcmp-stand{ float:right; margin-top:-18px; padding-right:10px; position:relative; clear:both; color:#999; } .dcmp-stand strong{ font-weight:normal; color:#444; } .dcmp-stand input{ margin-right:2px; } .dcmp-stand img{ vertical-align:middle; margin-right:2px; } .dcmp-content{ padding-top:8px; } .dcmp-content textarea{ height:100px; width:450px; float:left; } .dcmp-content1{ /*width:700px;*/ padding-top:8px; } .dcmp-content1 textarea{ height:100px; width:700px; float:left; } .dcmp-mood{ height:25px; width:212px; margin-top:8px; float:right; } .dcmp-mood strong{ float:left; color:#444; font-weight:normal; line-height:25px; } .dcmp-mood ul{ float:left; } .dcmp-mood ul li{ float:left; margin-right:8px; height:30px; } .dcmp-mood ul li input,.dcmp-mood ul li img{ vertical-align:middle; margin-right:4px; *margin-right:0px; } |
删除支持--反对--在模板里面删除同时在plus--feedback_ajax.php文件下删除 ;评论内容样式也是这文件更改
转载请注明:DEDEcms» DEDE使用默认评论
标签: