17DST→一起创造价值's Archiver

bluelovers 发表于 2007-11-17 22:05

發新主題時 可以選擇發送到哪個版塊 v2

[quote]採用來自 DST 成員 金字塔 的概念
其實當初在 做這插件的時候
就有想到 選擇版塊時 一併更換主題分類不過那時候 覺得想到的方式 很醜
心情 也不是很好 所以弄的非常簡陋 醜[/quote]

如果發現安裝失敗 懷疑 可能哪邊我少PO步驟 歡迎把錯誤情形PO出來

[quote]另外 順便問一下(不能也沒有關係^^ 問問而已)
1. 可以將我的網站連結放在DST首頁嗎?
2. 發佈之後 能保有我的網站連結嗎?

Bluelovers.風
[url]http://discuz.bluelovers.net/[/url]
[img]http://discuz.bluelovers.net/images/logo.jpg[/img][/quote]

開啟 templates.lang.php

找[code]'post_newthread' => '發新話題',[/code]底下加上[code]'post_newthread_forumselect' => '主題發佈版塊',
        'post_newthread_forumselect_none' => '不改變發帖版區',[/code]開啟 newthread.inc.php

找[code]if(!submitcheck('topicsubmit', 0, $seccodecheck, $secqaacheck)) {[/code]底下加上[code]// bluelovers
        require_once DISCUZ_ROOT.'./include/forum.func.php';
        $forumselect = forumselect();
//        $forumselect = str_replace('<option value="'.$fid.'">', '<option value="'.$fid.'" selected="selected">', $forumselect);
        // bluelovers[/code]開啟 post_newthread.htm

找[code]<form method="post" id="postform" action="post.php?action=newthread&fid=$fid&extra=$extra&topicsubmit=yes" $enctype>[/code]改為[code]<form method="post" id="postform" action="post.php?action=newthread&extra=$extra&topicsubmit=yes" $enctype>[/code]找[code]<!--{if $secqaacheck}-->
                        <tr><th><label for="secanswer">{lang secqaa}</label></th>
                        <td><div id="secquestion"></div><input type="text" name="secanswer" id="secanswer" size="25" maxlength="50" tabindex="1" />
                        <script type="text/javascript">ajaxget('ajax.php?action=updatesecqaa', 'secquestion');</script></td>
                        </tr>
                <!--{/if}-->[/code]底下加上[code]<!--{if !$special}-->
                        <tr>
                                <th>
                                        {lang post_newthread_forumselect}
                                </th>
                                <td>
                                        <select name="fid" size="1" style="width: 20em;" onchange="ajaxget('post.php?action=typeselect&amp;selecttypeid='+(!isnull($('postform').typeid) ? typeid.options[typeid.selectedIndex].value : 0)+'&amp;special=$special&amp;modelid=$modelid&amp;fid='+this.options[this.selectedIndex].value+'&amp;sid=$sid', 'typeselect', 'threadtypeswait')">
                                                <option value="$fid" selected="selected">{lang post_newthread_forumselect_none}</option>
                                                <option value=""> </option>
                                                $forumselect
                                        </select>
                                </td>
                        </tr>
                <!--{/if}-->[/code]找[code]$typeselect[/code]改為[code]<div id="typeselect" style="float: left;">$typeselect</div> [/code]開啟 post.php

找[code]}elseif($action == 'threadtypes') {
        threadtype_optiondata();
        $template = intval($operate) ? 'search_typeoption' : 'post_typeoption';
        include template($template);
        exit;[/code]底下加上[code]}elseif($action == 'typeselect') {
       
        $typeselect = typeselect($selecttypeid, $special, '', $modelid);
       
        showmessage($typeselect);
        exit;[/code]如果是升級安裝

開啟 post_editor.htm

找[code]<!--{if $action == 'newthread'}-->
        <select name="fid" size="10" style="width: 99%;">
                <option value="$fid" selected="selected">不改變目標版區</option>
                <option value=""> </option>
                $forumselect
        </select>
        <!--{/if}-->[/code]改成以下 或者 清除代碼[code]<!--{if 0 && $action == 'newthread'}-->
        <select name="fid" size="10" style="width: 99%;">
                <option value="$fid" selected="selected">不改變目標版區</option>
                <option value=""> </option>
                $forumselect
        </select>
        <!--{/if}-->[/code]直接借用他所繪製的概念圖
[img]http://img204.imageshack.us/img204/8493/20071116baf51398ab30bfcwu0.gif[/img]

[[i] 本帖最后由 bluelovers 于 2007-11-18 01:15 编辑 [/i]]

金字塔.月 发表于 2007-11-18 02:11

很好。我来继续测试:)

辛苦你了!

多多开心,有些事情自身无法控制的时候,我们转移焦点,把焦点放在如何去面对等等会更好:)

bluelovers 发表于 2007-11-18 20:38

覺得沒必要隱藏了
畢竟 就算是顯示著 也沒佔太大位子
用戶 不會去用 就不會去用 不用特別 藏起來

LiHu 发表于 2007-11-30 16:41

已经测试过了
比第一版好的很多
很好,很强大

LiHu 发表于 2007-11-30 18:06

严重bug:在如dst新手互助这种板块发帖,只能发悬赏,出现的就是:指定的版块不存在,请返回。

img 发表于 2007-12-2 17:10

bug。。切换不同版块。。。其下的 主题分类不变。。。

bluelovers 发表于 2007-12-3 04:32

回复 5# 的帖子

終於有人發現這個問題
我還打算既然沒人發現 就懶的發佈修正辦法

開啟 post_newthread.htm

找[code]<!--{if !$special}-->
                        .. 中間 省略 自行判斷 ...
                <!--{/if}-->[/code]改為[code]<!--{if !$special}-->
                        .. 中間 省略 自行判斷 ...
                <!--{else}-->
                        <input type="hidden" name="fid" value="$fid" />
                <!--{/if}-->[/code]-------------------------------------------

回复 6# 的帖子

那就是你安裝上有錯誤或遺漏 才會主題分類 沒有變化

img 发表于 2007-12-3 05:04

谢谢您的解答! 很喜欢您这个修改。。。
我想是因为我建立了一个新的special模板造成的 special7....

我有修改[code]        <!--{if $special}-->
                <input type="hidden" name="special" value="$special" />
        <!--{/if}-->[/code]为[code]        <!--{if $special && $special != 7}-->
                <input type="hidden" name="special" value="$special" />
        <!--{/if}-->[/code]但还是无效。。

请问我还需要修改那里呢?

非常感谢你的好插件。。对于分论坛比较多情况非常实用!

img 发表于 2007-12-3 05:16

我也有该[code]<!--{if !$special}-->
                        <tr>
   .................
                                        <select name="fid" size="1" style="width: 20em;" onchange="ajaxget('post.php?action=typeselect&amp;selecttypeid='+(!isnull($('postform').typeid) ? typeid.options[typeid.selectedIndex].value : 0)+'&amp;special=$special&amp;modelid=$modelid&amp;fid='+this.options[this.selectedIndex].value+'&amp;sid=$sid', 'typeselect', 'threadtypeswait')">
......................
                <!--{/if}-->[/code]这里的
<!--{if !$special}-->

<!--{if !$special || $special ==7}-->

也不行的。。

img 发表于 2007-12-3 05:35

修改过了post_newthread.htm内所有关于special == 7 的地方,

还是不行。。。

在ie7和 ff 2.0.10 下都不能切换主题分类。。

ie7下提示缺少对象, 如图:


盼望解答。。非常感谢您!

img 发表于 2007-12-3 07:46

郁闷。。几个小时了。。都不知道问题出在哪里.....偏偏又是那么简单的修改..

难道是因为ie7 和  ff ?

bluelovers 能给我您改好的那3个文件吗。。。。

我直接替换掉看看可以不。。

谢谢!

img 发表于 2007-12-3 17:42

确认此hack有bug...

全新下载了dz6安装并仔细按说明修改。。。

在vista下的ie7和firefox 2.0.10

下均不在切换 目标版块的时候 即时更新 主题分类。。

ie7下提示js错误,缺少对象。。附图看10#

非常喜欢这个hack, 希望作者bluelovers 能修正此bug。。

热烈期待中。。

img 发表于 2007-12-3 21:02

找到错误了。。。isnull未定义。。。

修改:[code]                <!--{if !$special}-->
                        <tr>
                                <th>
                                        {lang post_newthread_forumselect}
                                </th>
                                <td>
                                        <select name="fid" size="1" style="width: 20em;" onchange="ajaxget('post.php?action=typeselect&amp;selecttypeid='+($('postform').typeid ? typeid.options[typeid.selectedIndex].value : 0)+'&amp;special=$special&amp;modelid=$modelid&amp;fid='+this.options[this.selectedIndex].value+'&amp;sid=$sid', 'typeselect', 'threadtypeswait')">
                                                <option value="$fid" selected="selected">{lang post_newthread_forumselect_none}</option>
                                                <option value=""> </option>
                                                $forumselect
                                        </select>
                                </td>
                        </tr>
                <!--{/if}-->[/code]

页: [1]

Powered by Discuz! Archiver 7.0.0  © 2001-2009 Comsenz Inc.