Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[经验] 教你修正插件升级2.0后回复不能跳转问题,问答、分类信息、秘密等一系列插件

[复制链接]
zhb80217 发表于 2009-8-18 07:45:01 | 显示全部楼层 |阅读模式
本帖最后由 zhb80217 于 2009-8-18 17:48 编辑

一般都是找到view文件夹里的*_view.htm文件里面的以下代码:
<input type="button" id="reply_submit_btn" name="reply_submit_btn" class="submit" value="回复" onclick="ajaxpost('commentform', 'comment_status', 'reply_reload')" />

改成:
<input type="button" id="reply_submit_btn" name="reply_submit_btn" class="submit" value="回复" onclick="ajaxpost('commentform', 'reply_reload')" />

如果还不行,找下这个文件里是否少了以下代码:
        function reply_reload(cid, result) {
                $("comment_message").value = "";
                window.location.reload();
        }
此代码应当加在顶部<script type="text/javascript">与</script>之间

另外还有另一问题,就是头像显示错误。也很容易修改的。
找到所有模板文件中的
<img src="<!--{avatar($value[uid],small)}-->" alt="$value[username]" class="avatar" />
改成
<!--{avatar($value[uid],small)}-->

找到
<img src="<!--{avatar($uid,small)}-->" alt="$space[username]" class="avatar" />
改成<!--{avatar($uid,small)}-->

以上指此类似核心的插件修改方法。在此我们应感谢最初写此程序的朋友,为后面很多人与插件提供了方便。
其他插件如有人要升级修改,可以给我发信息。有空的话,可以免费搞定。也请比我会的,多多帮助别人

评分

1

查看全部评分

风扣 发表于 2009-8-18 08:46:57 | 显示全部楼层
支持你........
回复

使用道具 举报

abcnic18 发表于 2009-8-18 09:39:11 | 显示全部楼层
谢谢分享
回复

使用道具 举报

wade8 发表于 2009-8-18 14:31:47 | 显示全部楼层
强烈顶你!
我找的好苦啊
回复

使用道具 举报

wade8 发表于 2009-8-18 14:41:39 | 显示全部楼层
本帖最后由 wade8 于 2009-8-18 14:45 编辑

冰凉秘密插件按你说的方法改了还是不能解决回复跳转的问题。原本已经有那段代码了
function reply_reload(cid, result) {
                $("comment_message").value = "";
                window.location.reload();
        }
--------------------------------------------------------------------
以下是秘密的原代码:


<!--{eval $_TPL['titles'] = array($mimi['title'], '晒秘密');}-->
<!--{template header}-->
<!--{template mimi/view/mimi_header}-->
<script type="text/javascript">
var arrids = [$str_ids];
var total_score = {$mimi[score]} ;
        function closeSide() {
                if ($('div_main').className == 'side_right') {
                        $('div_main').className = 'side_right side_right_close';
                        $('a_showSide').innerHTML = '&laquo; 打开侧边栏';
                        $('a_showSide').className = 'openside';
                } else {
                        $('div_main').className = 'side_right';
                        $('a_showSide').innerHTML = '&raquo; 关闭侧边栏';
                        $('a_showSide').className = '';
                }
                $('a_showSide').blur();
        }
        function show_trace(id) {
                ajaxget('do.php?ac=ajax&op=trace&blogid='+$id, 'trace_ul');
                return false;
        }
        function show_trace_all() {
                ajaxget('do.php?ac=ajax&op=traceall&blogid='+$id+'&ajaxdiv=trace_div', 'trace_div');
                return false;
        }
        function reply_reload(cid, result) {
                $("comment_message").value = "";
                window.location.reload();
        }
       
        function sum_score() {
                var has_score = 0;
                for( id in arrids ) {
                        has_score += parseInt( $("text_score_" + arrids[id]).value );
                }
                return has_score;
        }
       
        function show_self(id) {
                $("alt_msg_" + id ).innerHTML = "不能给自己加分";
                $("alt_msg_" + id ).style.display = 'block';
        }
        function hide_it(id) {
                $("alt_msg_" + id ).style.display = 'none';
        }
        function show_score(id) {
                var has_score = sum_score();
                var leave_score = {$mimi[score]} - has_score;
                var color = leave_score < 0 ? 'red' : 'blue';
                $("alt_msg_" + id ).innerHTML = "悬赏积分: {$mimi[score]} <br />已经给分: " + has_score + "<br />还剩: <font color="+color+">" + leave_score + "</font>";
                $("alt_msg_" + id ).style.display = 'block';
        }
        function checkForm() {
                var has_score = sum_score();
                var leave_score = {$mimi[score]} - has_score;
                if( leave_score > 0 ) {
                        alert("您的悬赏分未分配完, 请重新分配");
                        return false;
                } else if( leave_score < 0 ) {
                        alert("您给出的分值之和比您的悬赏分还多,请重新分配");
                        return false;                       
                }
                if( !confirm("确定结束吗?结束后不能再次修改 ") ) {
                        return false;
                }
                return true;               
        }
</script>
<div class=div_layout>

<div class="h_status">

</div>

        <div class=left>
                        <div>
                                <div overflow="hidden" height="407" width="560">
<div class="side_right">
        <div class="wide">
                <div class="post_list a_list">
<table width="570" border="0" cellspacing="0" cellpadding="0">

  <tr>
    <td height="31"><div align="center"><strong>以下是有人冒充$mimi[title]发布的秘密!</strong></div></td>
  </tr>
  <tr>
    <td height="1" background="mimi/css/bg_line.gif"></td>
  </tr>
  <tr>
    <td height="23"><div align="center">被冒充者:<b style="color:red;">$mimi[title]</b>
                         <span class="pipe">|</span>                       
                        一共有$mimi[view_count] 次阅读   <span class="pipe">|</span>       
                        性别: <a href="mimi.php?do=mimi&type=$mimi['typeid']">{$gEumsType[$mimi[typeid]]}</a></div></td>
  </tr>
  <tr>
    <td><br><br>$mimi[content]<br><br></td>
  </tr>
    <tr>
    <td height="1" background="mimi/css/bg_line.gif"></td>
  </tr>
    <tr>
    <td><div align="right">       
                                  发布时间: <!--{date('Y-m-d H:i',$mimi[dateline])}-->  &nbsp; &nbsp;<!--{if $_SGLOBAL[supe_uid] == $mimi['uid']}-->
                                <a href="mimi.php?do=mimi&ac=post&id=$id&op=edit">编辑信息</a><span class="pipe">|</span>
                                <a href="mimi.php?do=mimi&ac=cp&id=$id&op=delete" id="blog_delete_$blog[blogid]" onclick="ajaxmenu(event, this.id, 99999)">删除</a>
                                <!--{elseif $_SGLOBAL[supe_uid] == ADMIN_ID }-->
                                <a href="mimi.php?do=mimi&ac=cp&id=$id&op=delete" id="blog_delete_$blog[blogid]" onclick="ajaxmenu(event, this.id, 99999)">删除</a>
                                <!--{/if}-->        </div> </td>
  </tr>

</table>
               
                </div>
        </div>       
</div>
</div>                       
                        </div>
<div><br><br><br>
<h2>评论</h2><br>
                                <div class=mimi>
       
<form action="mimi.php?do=mimi&ac=cp&op=finish" onsubmit="return checkForm()" method="post">
<!--{loop $reply $value}-->
<div style="color:#999999; padding:4px; margin:0px; text-align:left; border:1px dotted #ccc">
<table width="560" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100" rowspan="2"><div align="center">
    <div class="avatar48" align="left"><a href="space.php?uid=$value[uid]"><!--{avatar($value[uid],small)}--></a></div><a href="space.php?uid=$value[uid]" id="author_$value[id]">$value[username]</a>
                                </td>
    <td height="57">$value[content]</td>               
  </tr>
  <tr>
    <td> <div align="right">       
                                  评论时间: <!--{date('Y-m-d H:i',$value[dateline])}-->  &nbsp; &nbsp;<span class="pipe">|</span>
                                  <!--{if $value[uid]==$_SGLOBAL[supe_uid] || $_SGLOBAL[supe_uid] == ADMIN_ID }-->
                        <a href="mimi.php?do=mimi&ac=cp&op=replydelete&mimi_id={$mimi[id]}&id=$value[id]" id="c_$value[id]_delete" onclick="return confirm('确定删除吗?')">删除</a>
                        <!--{/if}--></div></td>
  </tr>
</table>
        </div>        <br>
<!--{/loop}-->
       
                <input type="hidden" name="mimi_id" id="mimi_id" value="$mimi[id]"  />
                <input type="hidden" name="theurl" value="$theurl"  />
        </form>
<br>
                <form id="commentform" name="commentform" action="mimi.php?do=mimi&ac=cp&op=reply" method="post" class="quickpost">
                       
                        <table cellpadding="0" cellspacing="0">
                                <tr>
                                        <td>
                                        <textarea id="comment_message" name="content" rows="5" onkeydown="ctrlEnter(event, 'reply_submit_btn');"></textarea></td>
                                </tr>
                                <tr>
                                        <td>
                                                <input type="hidden" name="refer" value="$theurl" />
                                                <input type="hidden" name="mimi_id" value="$mimi_id">
                                                <input type="hidden" name="mimi_title" value="$mimi[title]"  />
                                                <input type="hidden" name="mimi_uid" value="$mimi[uid]"  />
                                                <input type="button" id="reply_submit_btn" name="reply_submit_btn" class="submit" value="回复" onclick="ajaxpost('commentform', 'comment_status', 'reply_reload')" />
                                                <span id="comment_status"></span>
                                        </td>
                                </tr>
                        </table>
                </form>



                                </div>

                        </div>

        </div>

<div id="wajinbar">


       
       
  </div>
        </div>       
<!--{template footer}-->
回复

使用道具 举报

 楼主| zhb80217 发表于 2009-8-18 17:39:11 | 显示全部楼层
5# wade8


直接删除代码中的: 'comment_status', 就可以啦
回复

使用道具 举报

ishangwg 发表于 2009-8-18 17:55:05 | 显示全部楼层
LZ你很强大
回复

使用道具 举报

wade8 发表于 2009-8-19 12:54:55 | 显示全部楼层
6# zhb80217


试了,不行!!!
回复

使用道具 举报

 楼主| zhb80217 发表于 2009-8-19 17:14:07 | 显示全部楼层
8# wade8


有更新缓存吗?
回复

使用道具 举报

binyufei 发表于 2009-8-19 23:32:33 | 显示全部楼层
不行就换一个用吧
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-6-3 23:11 , Processed in 0.147706 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表