mfpg 发表于 2007-6-16 08:41

斑竹能否给论坛加上“只看楼主贴子”的功能呀?

源代码我都找到了。

http://www.discuz.net/thread-264064-1-1.html

=============================================
Discuz! 5 修改方法如下

打开 viewthread.php



1 找到Copy to clipboardCODE:
$thread['subjectenc'] = rawurlencode($thread['subject']);下面添加Copy to clipboardCODE:
$authorid = $thread['authorid'];2 找到Copy to clipboardCODE:
      $multipage = multi($thread['replies'] + 1, $ppp, $page, "viewthread.php?tid=$tid&extra=$extra".(isset($highlight) ? "&highlight=".rawurlencode($highlight) : ''));删除

3 找到Copy to clipboardCODE:
      $postlist = $attachtags = array();下面添加Copy to clipboardCODE:
      $extrasql = !empty($originator) ? "AND p.authorid='$authorid'" : '';4 找到Copy to clipboardCODE:
                WHERE p.tid='$tid' AND p.invisible='0' ORDER BY dateline LIMIT $start_limit, $ppp");替换成Copy to clipboardCODE:
                WHERE p.tid='$tid' $extrasql AND p.invisible='0' ORDER BY dateline LIMIT $start_limit, $ppp");替换后在下面添加Copy to clipboardCODE:
      if(!empty($originator)) {
                $query_count = $db->query("SELECT COUNT(*) FROM {$tablepre}posts WHERE tid='$tid' AND authorid='$authorid'");
                $thread['posts'] = $db->result($query_count,0);
                $multipage = multi($thread['posts'], $ppp, $page, "viewthread.php?tid=$tid&extra=$extra&originator=yes".(isset($highlight) ? "&highlight=".rawurlencode($highlight) : ''));      
      } else {
                $multipage = multi($thread['replies'] + 1, $ppp, $page, "viewthread.php?tid=$tid&extra=$extra".(isset($highlight) ? "&highlight=".rawurlencode($highlight) : ''));

      }打开viewthread.htm文件

1 找到Copy to clipboardCODE:
<a href="viewthread.php?action=printable&tid=$tid" target="_blank">{lang thread_printable}</a> |下面添加Copy to clipboardCODE:
<!--{if !$originator}--><a href="viewthread.php?tid=$thread&extra=$extra&originator=yes">只看楼主</a><!--{else}--><a href="viewthread.php?tid=$thread&extra=$extra">阅读全部</a><!--{/if}-->========================分隔线================================

斑竹 发表于 2007-6-16 11:27

谢谢支持和建议,
但从上次论坛插件被利用入侵之后,基于安全原因我们一般不会再安装非官方或非官方插件。

斑竹 发表于 2007-8-1 07:56

现在已经有这个功能 :D :vic:
页: [1]
查看完整版本: 斑竹能否给论坛加上“只看楼主贴子”的功能呀?