【点评插件】
1、升级数据库,后台-工具-数据库-升级。- CREATE TABLE `zy_postinner` (
- `uid` INT( 8 ) NOT NULL ,
- `name` CHAR( 15 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
- `pid` INT( 15 ) NOT NULL ,
- `ptid` INT( 15 ) NOT NULL ,
- `msg` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
- `time` INT( 10 ) NOT NULL
- ) ENGINE = MYISAM ;
- ALTER TABLE `cdb_posts` ADD `zy_postinner` INT( 5 ) NOT NULL ;
复制代码 2、新建aa_zyhome_postinner模版- {eval $zyhome=$_GET['zyhome'];}
- <!--{if ($zyhome=="postinner")}-->
- {eval $zyshowpd=0;}
- {eval require_once './include/discuzcode.func.php';}
- {eval $zyact=$_GET['zyact'];}
- <!--{if ($zyact=="delete")}-->
- <!--{if ($_GET[ptid] && $_GET[pid])}-->
- {eval $q2 = $db->query("SELECT p.zy_postinner,p.authorid,t.subject,p.tid,p.fid FROM cdb_posts p LEFT JOIN cdb_threads t ON t.tid=p.tid WHERE p.pid = " . $_GET[pid]);}
- {eval $asdfgh = $db->fetch_array($q2);}
- {eval $q2=$db->fetch_array($db->query("SELECT * FROM zy_postinner WHERE pid=".$_GET[pid]." and ptid=".$_GET[ptid]));}
- <!--{if ($q2[uid] ==$discuz_uid || $discuz_uid == 1)}-->
- <!--{if ($asdfgh[zy_postinner] > 0 )}-->
- {eval $q2=$db->query("UPDATE cdb_posts SET zy_postinner = " . ($asdfgh[zy_postinner]-1) . " WHERE pid = " . $_GET[pid]);}
- <!--{/if}-->
- {eval $q2=$db->query("DELETE FROM zy_postinner WHERE pid=".$_GET[pid]." and ptid=".$_GET[ptid]);}
- <!--{/if}-->
- {eval $zyact="get";}
- <!--{/if}-->
- <!--{/if}-->
- <!--{if ($zyact=="post")}-->
- {eval $msg=$_POST["msg"];}
- {eval $msgt = str_replace(Chr(10), "", $msg);}
- {eval $msgt = str_replace(" ", "", $msgt);}
- <!--{if ($msgt=="")}-->
- 不能只含有空格或回车
- <div class="zypi_postbox_btn"><a href="javascript:void 0" onclick="zypi_togglebox(this)" id="gtrf_$pid" style="display:none;">我也说一句</a></div>
- {eval die;}
- <!--{/if}-->
- {eval $msg=str_replace(Chr(10), " ", $msg);}
- <!--{if ($discuz_uid==0)}-->
- 你还没登录
- {eval die;}
- <!--{/if}-->
- {eval $pid=$_POST["pid"];}
- {eval $toptid=$_POST["ptid"];}
- {eval $q2 = $db->query("SELECT ptid FROM zy_postinner ORDER BY ptid DESC LIMIT 1");}
- {eval $ptid = $db->fetch_array($q2);}
- {eval $q2 = $db->query("SELECT p.zy_postinner,p.authorid,t.subject,p.tid,p.fid FROM cdb_posts p LEFT JOIN cdb_threads t ON t.tid=p.tid WHERE p.pid = " . $pid);}
- {eval $asdfgh = $db->fetch_array($q2);}
- <!--{if $toptid>0}-->
- {eval $q2=$db->query("SELECT uid,name FROM zy_postinner WHERE ptid = " . $toptid);}
- {eval $c=$db->fetch_array($q2);}
- <!--{if $c[uid]>0}-->
- {eval $q2=$db->query("SELECT id FROM cdb_promptmsgs ORDER BY id DESC LIMIT 1");}
- {eval $a=$db->fetch_array($q2);}
- {eval $q2=$db->query("INSERT INTO cdb_promptmsgs VALUES(" . ($a[id]+1) . ",6," . $c[uid] . ",0,1," . $GLOBALS[timestamp] . ",'<div class=\"f_thread\"><a href=\"space.php?uid=" . $discuz_uid . "\">" . $discuz_userss . "</a>回复了您在主题<a href=\"redirect.php?goto=findpost&ptid=" . $asdfgh[tid] . "&pid=" . $pid . "\">" . $asdfgh[subject] . "</a>中的点评</div>',0)");}
- {eval $q2=$db->query("SELECT number FROM cdb_prompt WHERE uid = " . $c[uid] . " AND typeid = 6");}
- {eval $a=$db->fetch_array($q2);}
- <!--{if $a[number]>0}-->
- {eval $q2=$db->query("UPDATE cdb_prompt SET number=" . ($a[number]+1) . " WHERE uid = " . $c[uid] . " AND typeid = 6");}
- <!--{else}-->
- {eval $q2=$db->query("INSERT INTO cdb_prompt VALUES(" . $c[uid] . ",6,1)");}
- <!--{/if}-->
- {eval $msg="回复 " . $c[name] . " :" . $msg;}
- <!--{/if}-->
- <!--{/if}-->
- {eval $q2 = $db->query("INSERT INTO zy_postinner VALUES('$discuz_uid','$discuz_userss','$pid','" . ($ptid[ptid]+1) . "','$msg'," . $GLOBALS[timestamp] . ")");}
- {eval $q2=$db->query("UPDATE cdb_posts SET zy_postinner = " . ($asdfgh[zy_postinner]+1) . " WHERE pid = " . $pid);}
- {eval $q2=$db->query("UPDATE cdb_threads SET lastpost = " . $GLOBALS[timestamp] . " , lastposter = '" . $discuz_userss . "' WHERE tid = " . $asdfgh[tid]);}
- {eval $q2=$db->query("SELECT todayposts FROM cdb_forums WHERE fid=" . $asdfgh[fid]);}
- {eval $b=$db->fetch_array($q2);}
- {eval $q2=$db->query("UPDATE cdb_forums SET todayposts = " . $b[todayposts] . ",lastpost='" . $asdfgh[tid] . "\t" . $asdfgh[subject] . "\t" . $GLOBALS[timestamp] . "\t" . $discuz_userss . "' WHERE fid=" . $asdfgh[fid]);}
- <!--{if ($discuz_uid!=$asdfgh[authorid] && $c[uid]<=0)}-->
- {eval $q2=$db->query("SELECT id,new FROM cdb_promptmsgs WHERE uid=" . $asdfgh[authorid] . " AND typeid = 6 AND actor = '" . $pid . "\tpostinner'");}
- {eval $a=$db->fetch_array($q2);}
- {eval $newnotice=0;}
- <!--{if $a[id]>0}-->
- {eval $q2=$db->query("UPDATE cdb_promptmsgs SET dateline = " . $GLOBALS[timestamp] . ",new = 1 WHERE uid=" . $asdfgh[authorid] . " AND typeid = 6 AND actor = '" . $pid . "\tpostinner'");}
- <!--{if $a[new]==0}-->
- {eval $newnotice=1;}
- <!--{/if}-->
- <!--{else}-->
- {eval $q2=$db->query("SELECT id FROM cdb_promptmsgs ORDER BY id DESC LIMIT 1");}
- {eval $a=$db->fetch_array($q2);}
- {eval $q2=$db->query("INSERT INTO cdb_promptmsgs VALUES(" . ($a[id]+1) . ",6," . $asdfgh[authorid] . ",0,1," . $GLOBALS[timestamp] . ",'<div class=\"f_thread\">您在主题<a href=\"redirect.php?goto=findpost&ptid=" . $asdfgh[tid] . "&pid=" . $pid . "\">" . $asdfgh[subject] . "</a>中的点评有了新回复</div>','" . $pid . "\tpostinner')");}
- {eval $newnotice=1;}
- <!--{/if}-->
- <!--{if $newnotice==1}-->
- {eval $q2=$db->query("SELECT number FROM cdb_prompt WHERE uid = " . $asdfgh[authorid] . " AND typeid = 6");}
- {eval $a=$db->fetch_array($q2);}
- <!--{if $a[number]>0}-->
- {eval $q2=$db->query("UPDATE cdb_prompt SET number=" . ($a[number]+1) . " WHERE uid = " . $asdfgh[authorid] . " AND typeid = 6");}
- <!--{else}-->
- {eval $q2=$db->query("INSERT INTO cdb_prompt VALUES(" . $asdfgh[authorid] . ",6,1)");}
- <!--{/if}-->
- <!--{/if}-->
- <!--{/if}-->
- {eval $zyact="get";}
- <!--{/if}-->
- <!--{if ($zyact=="get")}-->
- {eval $pid=$_GET["pid"];}
- {eval $page=$_GET["page"];}
- {eval $upper=5*$page-5;}
- {eval $q2=$db->query("SELECT * FROM zy_postinner WHERE pid = $pid ORDER BY ptid DESC LIMIT $upper,5");}
- {eval $zyhomeshow=Array();}
- {eval $i=0;}
- {eval while ($asdfgh=$db->fetch_array($q2)) $zyhomeshow[$i++] = $asdfgh ; }
- {eval $q2 = $db->query("SELECT zy_postinner FROM cdb_posts WHERE pid = " . $pid);}
- {eval $asdfgh = $db->fetch_array($q2);}
- <!--{if ($asdfgh[zy_postinner] != 0)}-->
- <h3><span class="icon_ring vm"></span>点评</h3>
- <!--{/if}-->
- {eval $maxpage=ceil($asdfgh[zy_postinner]/5);}
- <!--{loop $zyhomeshow $thing}-->
- <div id="zypostinner_<!--{echo $thing[ptid]}-->" class="zypi_in" onmouseover="zypi_showover(this)" onmouseout="zypi_showout(this)" style="clear: left;
- padding: 0.5em 0;">
- <div class="zypi_in1"><img src="uc_server/avatar.php?uid=<!--{echo $thing[uid]}-->&size=small" /></div>
- <div class="zypi_in2">
- <p class="zypi_in2_in1">
- <span style="float: left;">
- <a href="space.php?uid=<!--{echo $thing[uid]}-->"><!--{echo $thing[name]}--></a>
-
- </span>
- <div style="margin-left: 100px;">
- <em class="zypi_in2_in2"><!--{echo discuzcode(preg_replace("/\s?\[at\](.+?)\[\/at\]\s?/ies", "", $thing[msg]), 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0);}--></em>
-
- <span style="color: #999;">{eval $postime=dgmdate("$dateformat $timeformat", $thing[time] + $timeoffset * 3600);}发表于 <!--{echo $postime;}--> {eval $lastip = $db->fetch_array($db->query("SELECT * FROM cdb_members WHERE uid=".$thing[uid]));}<!--{if $discuz_uid && in_array($adminid, array(1, 2, 3))}-->IP:$lastip[lastip]<!--{/if}--></span>
- <!--{if ($thing[uid] ==$discuz_uid || $discuz_uid == 1)}-->
- <a onclick="zypi_delete($thing[ptid],$pid);" style="cursor: pointer;color:#999;">删除</a>
- <!--{/if}-->
- </div>
- </p>
-
- </div>
- <div class="zypi_in3"></div>
- <div class="zypi_in4"><button class="hfta" onclick="zypi_reply(this)">回复</button></div>
- </div>
- <!--{/loop}-->
- <div class="zypi_btmbar">
- <div class="zypi_pages pages">
- <!--{if $maxpage>1}-->
- <!--{if ($page>1 && $maxpage>1)}-->
- <a href="javascript:void 0" onclick="zypi_gotopage(this,1)">首页</a>
- <a href="javascript:void 0" onclick="zypi_gotopage(this,<!--{echo ($page-1);}-->)">上一页</a>
- <!--{/if}-->
- {eval $i=0;}
- {eval while ($i<$maxpage) echo("<a href='javascript:void 0' " . (++$i==$page?"":"onclick='zypi_gotopage(this," . $i . ")'") . ">" . ($i==$page?"<b>" . $i . "</b>":$i) . "</a>") ; }
- <!--{if $page<$maxpage}-->
- <a href="javascript:void 0" onclick="zypi_gotopage(this,<!--{echo ($page+1);}-->)">下一页</a>
- <a href="javascript:void 0" onclick="zypi_gotopage(this,<!--{echo ($maxpage);}-->)">尾页</a>
- <!--{/if}-->
- <!--{/if}-->
- </div>
- <div class="zypi_postbox_btn"><a href="javascript:void 0" onclick="zypi_togglebox(this)" id="gtrf_$pid" style="display:none;">我也说一句</a></div>
- </div>
- {eval die;}
- <!--{/if}-->
- {eval die;}
- {echo $GLOBALS[timestamp];}
- <!--{/if}-->
复制代码 3、新建postinner模版- var zhangyupostinner = ["#header", "<div id='zyco'></div>", ".zypi_postbox", "display", "none", "textarea", "class", "zypi_postbox_btn_hover", "class", "zypi_postbox_btn", "button", "click", "textarea", ".zypi_postbox", "display", "none", ".zypi_postbox_btn", "class", "zypi_postbox_btn_hover", "textarea", "button", "click", "textarea", "id", "zypostinner_", "", ".zypi_in2 .zypi_in2_in1 span a", "span:eq(0)", "回复: ", "span.zypi_ptid_hide", "a", "span", "", "", "不能发送空信息!", "id", "zypi_", "", "button,textarea", "disabled", ".zypi_ptid_hide", ".zypi_pages a b", "POST", "faq.php?zyhome=postinner&zyact=post&pid=", "&page=", ".zypi_show", ".zypi_postbox_btn", "class", "zypi_postbox_btn_hover", "button,textarea", "disabled", "", "span", "", "a", "button,textarea", "disabled", "网络错误!", "id", "zypi_", "", "faq.php?zyhome=postinner&zyact=get&pid=", "&page=", "disabled", "true", "网络错误!", ".zypi_in4", ".zypi_in4"];
- $jq(document).ready(function() {
- $jq(zhangyupostinner[0]).after(zhangyupostinner[1])
- });
- function zypi_togglebox(obj) {
- var obj = $jq(obj);
- var pbox = obj.parent().parent().parent().parent().find(zhangyupostinner[2]);
- if (pbox.css(zhangyupostinner[3]) == zhangyupostinner[4]) {
- pbox.show().find(zhangyupostinner[5]).focus();
- obj.parent().attr(zhangyupostinner[6], zhangyupostinner[7])
- } else {
- pbox.hide();
- obj.parent().attr(zhangyupostinner[8], zhangyupostinner[9])
- };
- pbox.find(zhangyupostinner[10]).unbind(zhangyupostinner[11]).click(function() {
- zypi_post($jq(this).parent().parent().find(zhangyupostinner[12]))
- })
- };
- function zypi_reply(obj) {
- obj = $jq(obj);
- var pbox = obj.parent().parent().parent().parent().find(zhangyupostinner[13]);
- if (pbox.css(zhangyupostinner[14]) == zhangyupostinner[15]) {
- pbox.show();
- obj.parent().parent().parent().parent().find(zhangyupostinner[16]).attr(zhangyupostinner[17], zhangyupostinner[18])
- };
- pbox.find(zhangyupostinner[19]).focus();
- pbox.find(zhangyupostinner[20]).unbind(zhangyupostinner[21]).click(function() {
- zypi_post($jq(this).parent().parent().find(zhangyupostinner[22]))
- });
- var ptid = obj.parent().parent().attr(zhangyupostinner[23]).replace(zhangyupostinner[24], zhangyupostinner[25]);
- var pauthor = obj.parent().parent().find(zhangyupostinner[26]).html();
- pbox.find(zhangyupostinner[27]).html(zhangyupostinner[28] + pauthor);
- pbox.find(zhangyupostinner[29]).html(ptid);
- pbox.find(zhangyupostinner[30]).show()
- };
- function zypi_unreply(obj) {
- obj = $jq(obj).hide().parent().parent();
- obj.find(zhangyupostinner[31]).html(zhangyupostinner[32])
- };
- function zypi_post(txtobj) {
- var txtobj = $jq(txtobj);
- if (txtobj.val() == zhangyupostinner[33]) {
- showDialog(zhangyupostinner[34]);
- return
- };
- var txtpid = txtobj.parent().parent().parent().attr(zhangyupostinner[35]).replace(zhangyupostinner[36], zhangyupostinner[37]);
- $jq(txtobj).parent().parent().find(zhangyupostinner[38]).attr(zhangyupostinner[39], true);
- var ptid = txtobj.parent().parent().find(zhangyupostinner[40]).html();
- var pgb = $jq(txtobj).parent().parent().parent().find(zhangyupostinner[41]);
- if (pgb.length > 0x0) {
- pgb = pgb.html()
- } else {
- pgb = 0x1
- };
- $jq.ajax({
- type: zhangyupostinner[42],
- url: zhangyupostinner[43] + txtpid + zhangyupostinner[44] + pgb,
- data: {
- pid: txtpid,
- msg: txtobj.val(),
- ptid: ptid
- },
- success: function(msg) {
- $jq(txtobj).parent().parent().parent().find(zhangyupostinner[45]).html(msg).find(zhangyupostinner[46]).attr(zhangyupostinner[47], zhangyupostinner[48]);
- $jq(txtobj).parent().parent().find(zhangyupostinner[49]).attr(zhangyupostinner[50], false);
- $jq(txtobj).val(zhangyupostinner[51]);
- $jq(".zypi_postbox.dialog").hide();
- txtobj.parent().parent().find(zhangyupostinner[52]).html(zhangyupostinner[53]);
- txtobj.parent().parent().find(zhangyupostinner[54]).hide()
- },
- error: function() {
- $jq(txtobj).parent().parent().find(zhangyupostinner[55]).attr(zhangyupostinner[56], false);
- showDialog(zhangyupostinner[57])
- }
- })
- };
- function zypi_showall(obj) {
- zypi_gotopage(obj, 2)
- };
- function zypi_gotopage(obj, page) {
- obj = $jq(obj);
- var pid = obj.parent().parent().parent().parent().attr(zhangyupostinner[58]).replace(zhangyupostinner[59], zhangyupostinner[60]);
- $jq.ajax({
- url: zhangyupostinner[61] + pid + zhangyupostinner[62] + page,
- success: function(msg) {
- obj.parent().parent().parent().html(msg)
- },
- error: function() {
- obj.attr(zhangyupostinner[63], zhangyupostinner[64]);
- showDialog(zhangyupostinner[65])
- }
- })
- };
- function zypi_showover(obj) {
- $jq(obj).find(zhangyupostinner[66]).show()
- };
- function zypi_showout(obj) {
- $jq(obj).find(zhangyupostinner[67]).hide()
- }
- function zypi_delete(ptid,pid) {
- $jq.ajax({
- url:"faq.php?zyhome=postinner&zyact=delete&ptid="+ptid+"&pid="+pid+"&page=1",
- success: function(msg) {
- $jq("#zypi_"+pid+" .zypi_show").html(msg)
- },
- error: function() {
- showDialog("删除失败")
- }
- })
- };
复制代码 4、其他头部加- <script src="templates/default/postinner.htm"></script>
- <script src="templates/default/dp_move.htm"></script>
复制代码 5、css_common模版加- /*----------点评---------------*/
- .dialog{position:absolute; margin:10px;}
- .dialog-title {width: 450px;margin-bottom: -30px;position: relative;height: 30px;cursor: move;}
- .zypi .zypi_in{position:relative;}
- .icon_ring:hover{border: 2px solid rgb(225, 244, 221);background: rgb(242, 108, 79);}
- .icon_ring {background: rgb(255, 244, 221);border-radius: 10px;border: 2px solid rgb(242, 108, 79);border-image: none;width: 8px;height: 8px;overflow: hidden;margin-right: 5px;display: inline-block;box-shadow: 0px 0px 1px rgba(0,0,0,0.2);-moz-border-radius: 10px;-webkit-border-radius: 10px;}
- .vm {vertical-align: middle;}
- .bar_cm {height: 25px;line-height: 25px;background: #F2F2F2;}
- .nxt {background-image: url(图片1);background-position: 90% 50%;line-height: 26px;float: left;display: inline;padding: 0 20px 0 8px;height: 26px;border: 1px solid;border-color: #C2D5E3;background-color: #FFF;background-repeat: no-repeat;color: #333;cursor: pointer;}
- .cmmnt {background: url(图片2) no-repeat 0 50%;}
- .psti {margin-left: 120px;line-height: 24px;}
- .flbc {float: left;width: 20px;height: 20px;overflow: hidden;text-indent: -9999px;background: url(图片3) no-repeat 0 0;cursor: pointer;}
- #return_comment {float: left;font-size: 14px;font-weight: 700;color: #369;margin-top: 10px;margin-left: 10px;}
- .zypi h3{padding: 5px;background-color: #FFF4DD;color: #F26C4F;background-position: 100% 50%;margin: 2em 0 2em -20px;padding: 5px 45px 5px 20px;width: 240px;background: #FFF4DD url(图片4) no-repeat 100% 50%;color: #F26C4F;font-size: 14px;}
- .zypi .zypi_in3{clear:both;}
- .zypi .zypi_in1{float:left;}
- .zypi .zypi_in1 img{width: 24px;height: 24px;}
- .zypi .zypi_in2 .zypi_in2_in1 span a{color:#369;font-weight: 700;}
- .zypi .zypi_in2 .zypi_in2_in1 span em{color: #333;margin-left: 55px;}
- .zypi .zypi_in2 .zypi_in2_in1{color:#cacaca;}
- .zypi .zypi_in2{margin-left: 30px;line-height: 24px;}
- .zypi_in2_in2 img {max-height: 24px;max-width: 24px;margin-bottom: -7px;}
- .zypi .zypi_in .zypi_in4{position:absolute;right:5px;bottom:5px;display:none;}
- .zypi .zypi_showevery,.zypi .zypi_pages{margin:8px;float:left;}
- .zypi .zypi_pages a{display:inline-block;margin: 0 4px 0 0;}
- .zypi .zypi_postbox{width: 620px;z-index: 99;height: 170px;border: #cacaca 8px solid;margin: -6px 5px 0 5px;display:none;background-color: #fff;border-radius: 9px;}
- .zypi .zypi_postbox textarea {width: 596px;height: 55px;margin-left: 8px;margin-bottom: 5px;}
- .zypi .zypi_ptid_hide{display:none;}
- .zypi .zypi_pages a{color:#333;}
- .zypi .zypi_pages b{color:#000000;}
- .zypi{margin:10px 0 20px 0;}
- .fpd cite {float: left;margin: 2px 5px 0 0;width: 20px;height: 20px;background: url(图片5) no-repeat;text-indent: -9999px;line-height: 20px;overflow: hidden;cursor: pointer;}
- .fpd cite.tb_color {background-position: -60px 0;}
- .float_close_a {width: 20px;margin-top: -118px;margin-right: -148px;height: 20px;overflow: hidden;text-indent: -9999px;background: url(../../images/default/newclose.gif) no-repeat 0 0;}
- .float_close_a:hover { background-position: 0 -20px; }
- .fpd cite.tb_smilies {background-position: -20px -20px;}
- .dp_num {border: none;background: none;color: #369;font-weight: 700;width: 20px;padding-left: 5px;}
- .dp_shuru {float: right;margin: 10px;}
- .dp_fb{vertical-align: middle;overflow: hidden;margin-right: 3px;border: 1px solid #999;background: #E5E5E5 url(图片6) repeat-x 0 0;cursor: pointer;-moz-box-shadow: 0 1px 0 #E5E5E5;-webkit-box-shadow: 0 1px 0 #E5E5E5;box-shadow: 0 1px 0 #E5E5E5;border-color: #235994;background-color: #06C;background-position: 0 -48px;color: #FFF !important;width: 45px;}
复制代码 6、viewthread_node模版找- <td class="postcontent postbottom">
复制代码 在下边加- <!---------------- 仿X3点评 ---------------->
- {eval $q2=$db->query("SELECT * FROM zy_postinner WHERE pid = " . $post[pid] . " ORDER BY ptid DESC LIMIT 5");}
- {eval $zyhomeshow=Array();}
- {eval $i=0;}
- {eval while ($asdfgh=$db->fetch_array($q2)) $zyhomeshow[$i++] = $asdfgh ; }
- <div id="zypi_$post[pid]" class="zypi">
- <div class="zypi_show">
- <!--{if ($post[zy_postinner] != 0)}-->
- <h3><span class="icon_ring vm"></span>点评</h3>
- <!--{/if}-->
- <!--{loop $zyhomeshow $thing}-->
- <div id="zypostinner_<!--{echo $thing[ptid]}-->" class="zypi_in" onmouseover="zypi_showover(this)" onmouseout="zypi_showout(this)" style="clear: left;
- padding: 0.5em 0;">
- <div class="zypi_in1"><img src="uc_server/avatar.php?uid=<!--{echo $thing[uid]}-->&size=small" /></div>
- <div class="zypi_in2">
- <p class="zypi_in2_in1">
- <span style="float: left;">
- <a href="space.php?uid=<!--{echo $thing[uid]}-->"><!--{echo $thing[name]}--></a>
-
- </span>
- <div style="margin-left: 100px;">
- <em class="zypi_in2_in2"><!--{echo discuzcode(preg_replace("/\s?\[at\](.+?)\[\/at\]\s?/ies", "", $thing[msg]), 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0);}--></em>
-
- <span style="color: #999;">{eval $postime=dgmdate("$dateformat $timeformat", $thing[time] + $timeoffset * 3600);}发表于 <!--{echo $postime;}--> {eval $lastip = $db->fetch_array($db->query("SELECT * FROM cdb_members WHERE uid=".$thing[uid]));}<!--{if $discuz_uid && in_array($adminid, array(1, 2, 3))}-->IP:$lastip[lastip]<!--{/if}--></span>
- <!--{if ($thing[uid] ==$discuz_uid || $discuz_uid == 1)}-->
- <a onclick="zypi_delete($thing[ptid],$post[pid]);" style="cursor: pointer;color:#999;">删除</a>
- <!--{/if}-->
- </div>
- </p>
- </div>
- <div class="zypi_in3"></div>
- <div class="zypi_in4"><button class="hfta" onclick="zypi_reply(this)">回复</button></div>
- </div>
- <!--{/loop}-->
- <div class="zypi_btmbar">
- <!--{if $post[zy_postinner]>5}--><div class="zypi_showevery"><a class="nxt" onclick="zypi_showall(this)">下一页</a></div><!--{/if}-->
- <!--{if ($discuz_uid)}-->
- <div class="zypi_postbox_btn"><a href="javascript:void 0" onclick="zypi_togglebox(this)" id="gtrf_$post[pid]" style="display:none;">我也说一句</a></div>
- <!--{/if}-->
- </div>
- </div>
- <div class="s_clear"></div>
- <div class="zypi_postbox dialog">
- <div class="dialog-title" style="width: 580px!important;"></div>
- <em id="return_comment" fwin="comment">点评</em>
- <div style="width: 600px; border: 1px solid; border-color: #999 #CCC #CCC #999;margin: 35px 0 0 8px;">
- <div class="bar_cm">
- <div class="fpd">
- <cite href="javascript:;" title="{lang e_bold}" class="tb_bold" onclick="seditor_insertunit('gtrf_$post[pid]', '[b]', '[/b]')">B</cite>
- <cite href="javascript:;" title="{lang e_forecolor}" class="tb_color" id="gtrf_$post[pid]forecolor" onclick="showColorBox(this.id, 2, 'gtrf_$post[pid]')">Color</cite>
- <cite href="javascript:;" title="{lang e_url}" class="tb_link" onclick="seditor_insertunit('gtrf_$post[pid]', '[url]', '[/url]')">Link</cite>
- <cite href="javascript:;" class="tb_smilies" id="gtrf_$post[pid]smilies" onclick="showMenu({'ctrlid':this.id,'evt':'click','layer':2});return false">Smilies</cite>
- <script type="text/javascript" src="forumdata/cache/smilies_var.js?{VERHASH}" reload="1"></script>
- <script type="text/javascript" reload="1">smilies_show('gtrf_$post[pid]smiliesdiv', $smcols, 'gtrf_$post[pid]');</script>
- </div>
- </div>
- </div>
- <SCRIPT LANGUAGE="JavaScript">
- function textCounter(field, countfield, maxlimit) {
- if (field.value.length > maxlimit)
- field.value = field.value.substring(0, maxlimit);
- else
- countfield.value = maxlimit - field.value.length;
- }
- function runExht(){
- var winEx2 = window.open("", "winEx2", "width=500,height=300,status=yes,menubar=no,scrollbars=yes,resizable=yes"); winEx2.document.open("text/html", "replace");
- winEx2.document.write(unescape(event.srcElement.parentElement.children[0].value));
- winEx2.document.close();
- }
- function saveFileht()
- {
- var win=window.open('','','top=10000,left=10000');
- win.document.write(document.all.asdfht.innerText)
- win.document.execCommand('SaveAs','','e:\\webjx\\test.htm')
- win.close();
- }
- function paste()
- {asdf.focus()
- document.execCommand("Paste")}
- </SCRIPT>
- <p>
- <form name=myform action="">
- <textarea name="message" cols="28" rows="5" onkeydown="textCounter(message,remLen,80);" onkeyup="textCounter(message,remLen,80);" id="gtrf_$post[pid]message"></textarea>
- <div class="dp_shuru">您还可以输入:<input class="dp_num" name="remLen" type="text" value="80" size="5" readonly="readonly">个字符</div>
- </form>
- <a href="javascript:void 0" class="float_close_a" onclick="document.getElementById('gtrf_$post[pid]').click();" style="float:right;display:block!important;">X</a></p>
- <p style="padding: 8px 10px; height: 26px;border-top: 1px solid #CCC; background: #F2F2F2;"><button class="dp_fb">发布</button><span></span><span class="zypi_ptid_hide"></span> <a href="javascript:void 0" onclick="zypi_unreply(this)" style="display:none">X</a></p>
- </div>
- </div>
- <!------------------- 仿X3点评end -------------------->
复制代码 接着找- <!--{if $allowpostreply}-->
复制代码 在上边加- <!--{if $discuz_uid}--><a class="zypi_postbox_btn cmmnt" href="javascript:;" onclick="document.getElementById('gtrf_$post[pid]').click();">点评</a><!--{/if}-->
复制代码 7、最后在faq模版最上边加- {subtemplate aa_zyhome_postinner}
复制代码 |