[分享] 全討論區立即導向不等待

phpBB 3 MOD Support
無論是官方或非官方認證之外掛,安裝與使用問題討論。
(發表文章請按照公告格式發表,違者砍文)

版主: 版主管理群譯文組

版面規則
請注意!您的提問必須遵守發問格式,違者砍文。
主題已鎖定
matuser
星球公民
星球公民
文章: 37
註冊時間: 2003-10-26 16:07

[分享] 全討論區立即導向不等待

文章 matuser »

●主機作業系統:Linux
●您的上網方式:3G
●您安裝的程式:Apache + php + MySql
●您的 phpBB 版本:phpBB 3.0.4
●您的 domain (網域名稱) : http://www.matuser.net
●您的 phpBB 連結網址: http://www.matuser.net/phpBB3/

其實心靈老師已經有分享過,不過美中不足每個動作(登入,登出,發文,刪文 .... )都要更正一次
延續看著官網的討論,網友GurlzLubme發表終極修改方案
只是我對照自己的code似乎不太一樣,所以貼上來讓大家參考,也提供給有這方面需求的朋友
(因為不是正式外掛,所以貼這裡,勿怪)

Open:
includes/functions.php
Find:

代碼: 選擇全部

* Meta refresh assignment
* Adds META template variable with meta http tag.
*
* @param int $time Time in seconds for meta refresh tag
* @param string $url URL to redirect to. The url will go through redirect() first before the template variable is assigned
* @param bool $disable_cd_check If true, meta_refresh() will redirect to an external domain. If false, the redirect point to the boards url if it does not match the current domain. Default is false.
*/
function meta_refresh($time, $url, $disable_cd_check = false)
{
	global $template;

	$url = redirect($url, true, $disable_cd_check);
	$url = str_replace('&', '&', $url);
Replace with:

代碼: 選擇全部

* Meta refresh assignment
* Adds META template variable with meta http tag.
*
* @param int $time Time in seconds for meta refresh tag
* @param string $url URL to redirect to. The url will go through redirect() first before the template variable is assigned
* @param bool $disable_cd_check If true, meta_refresh() will redirect to an external domain. If false, the redirect point to the boards url if it does not match the current domain. Default is false.
*/
function meta_refresh($time, $url, $disable_cd_check = false)
{
	global $template;

	$url = redirect($url, false, $disable_cd_check);
	$url = str_replace('&', '&', $url);
* 其實就是 $url = redirect($url, false, $disable_cd_check); 的true 改成 false 就可以囉 :-D
yehrussell
竹貓忠實會員
竹貓忠實會員
文章: 551
註冊時間: 2006-01-03 07:48

Re: [分享] 全討論區立即導向不等待

文章 yehrussell »

請問這是發文時候,不用等待修正時間嗎?
謝謝
##### 以下為 '基本的發問格式' #####
●主機作業系統:租用主機
●快速架站程式: (請務必註明版本,如果安裝在自己電腦上才填寫)
●您的上網方式:
●您安裝的程式:Apache + php + MySql 或其他
PHP 版本: 8.1.24 + MySQL(i) 5.7.44
●您的 phpBB 版本: phpBB 3.3.15
●您的 domain (網域名稱) :herb-tw.com
●您的 phpBB 連結網址: https://herb-tw.com/phpBB/
philipchiu
星球公民
星球公民
文章: 101
註冊時間: 2007-06-09 18:27

Re: [分享] 全討論區立即導向不等待

文章 philipchiu »

matuser 寫:●主機作業系統:Linux
●您的上網方式:3G
●您安裝的程式:Apache + php + MySql
●您的 phpBB 版本:phpBB 3.0.4
●您的 domain (網域名稱) : http://www.matuser.net
●您的 phpBB 連結網址: http://www.matuser.net/phpBB3/

其實心靈老師已經有分享過,不過美中不足每個動作(登入,登出,發文,刪文 .... )都要更正一次
延續看著官網的討論,網友GurlzLubme發表終極修改方案
只是我對照自己的code似乎不太一樣,所以貼上來讓大家參考,也提供給有這方面需求的朋友
(因為不是正式外掛,所以貼這裡,勿怪)

Open:
includes/functions.php
Find:

代碼: 選擇全部

* Meta refresh assignment
* Adds META template variable with meta http tag.
*
* @param int $time Time in seconds for meta refresh tag
* @param string $url URL to redirect to. The url will go through redirect() first before the template variable is assigned
* @param bool $disable_cd_check If true, meta_refresh() will redirect to an external domain. If false, the redirect point to the boards url if it does not match the current domain. Default is false.
*/
function meta_refresh($time, $url, $disable_cd_check = false)
{
	global $template;

	$url = redirect($url, true, $disable_cd_check);
	$url = str_replace('&', '&', $url);
Replace with:

代碼: 選擇全部

* Meta refresh assignment
* Adds META template variable with meta http tag.
*
* @param int $time Time in seconds for meta refresh tag
* @param string $url URL to redirect to. The url will go through redirect() first before the template variable is assigned
* @param bool $disable_cd_check If true, meta_refresh() will redirect to an external domain. If false, the redirect point to the boards url if it does not match the current domain. Default is false.
*/
function meta_refresh($time, $url, $disable_cd_check = false)
{
	global $template;

	$url = redirect($url, false, $disable_cd_check);
	$url = str_replace('&', '&', $url);
* 其實就是 $url = redirect($url, false, $disable_cd_check); 的true 改成 false 就可以囉 :-D
我的沒有這行
找到以下這行把false改為true後效果明顯改善,但不清楚這樣改會否有後遺症; function redirect($url, $return = false, $disable_cd_check = true) //false
成功需苦幹,逆境應自強。
學問勤中得,富裕儉中求。

●架設主機作業系統:Linux DiskStation 2.4.22-uc0 #722 Sun Feb 11 04:54:33 CST 2007 ppc
●快速架站程式:Apache 2.0 Handler Mysql 4.1.15
●免費空間連結:NAS
●上網方式:ADSL (netvigator)。
●phpBB3版本:phpBB (3.02)。
●domain(網域名稱) :philipschiu.com
●phpBB 連結網址: http://www.philipschiu.com:8080/phpbb
●安裝外掛:
1. ACP Announcement Centre (公告中心)1.0.3.a
2. Top5 List v1.0.3
3. JSCookMenu_forumlist_mod_111
4. Simple Hide BBcode MOD
暫時移除
Test Account
Username: testing
password: testing
matuser
星球公民
星球公民
文章: 37
註冊時間: 2003-10-26 16:07

Re: [分享] 全討論區立即導向不等待

文章 matuser »

yehrussell 寫:請問這是發文時候,不用等待修正時間嗎?
謝謝
發文按"送出"以後,不用再等待幾秒或是按連結才能看到自己的發文
philipchiu 寫:我的沒有這行
找到以下這行把false改為true後效果明顯改善,但不清楚這樣改會否有後遺症; function redirect($url, $return = false, $disable_cd_check = true) //false
我不懂PHP語法,不過redirect的字面意思應該是重新導向沒錯 ;-)
我想,唯一缺點就是發文節奏會變得比較直覺吧
頭像
心靈捕手
默默耕耘的老師
默默耕耘的老師
文章: 8535
註冊時間: 2004-04-30 01:54
來自: Taiwan

Re: [分享] 全討論區立即導向不等待

文章 心靈捕手 »

matuser 寫:
yehrussell 寫:請問這是發文時候,不用等待修正時間嗎?
謝謝
發文按"送出"以後,不用再等待幾秒或是按連結才能看到自己的發文
philipchiu 寫:我的沒有這行
找到以下這行把false改為true後效果明顯改善,但不清楚這樣改會否有後遺症; function redirect($url, $return = false, $disable_cd_check = true) //false
我不懂PHP語法,不過redirect的字面意思應該是重新導向沒錯 ;-)
我想,唯一缺點就是發文節奏會變得比較直覺吧
依個人經驗:
有時候發文 (或重新編輯) 完後, 不見得需要回到 "檢視您送出的內容" 頁面,
而是希望回到 "最近流覽的版面" 或其他連結.

因為這樣, 才能真正加速處理版面文章.
施比受有福,祝福您好運! ^_^
歡迎光臨★★心靈捕手★★ :: 討論區
https://wang5555.dnsfor.me/phpBB3/
philipchiu
星球公民
星球公民
文章: 101
註冊時間: 2007-06-09 18:27

Re: [分享] 全討論區立即導向不等待

文章 philipchiu »

心靈捕手 寫:
matuser 寫:
yehrussell 寫:請問這是發文時候,不用等待修正時間嗎?
謝謝
發文按"送出"以後,不用再等待幾秒或是按連結才能看到自己的發文
philipchiu 寫:我的沒有這行
找到以下這行把false改為true後效果明顯改善,但不清楚這樣改會否有後遺症; function redirect($url, $return = false, $disable_cd_check = true) //false
我不懂PHP語法,不過redirect的字面意思應該是重新導向沒錯 ;-)
我想,唯一缺點就是發文節奏會變得比較直覺吧
依個人經驗:
有時候發文 (或重新編輯) 完後, 不見得需要回到 "檢視您送出的內容" 頁面,
而是希望回到 "最近流覽的版面" 或其他連結.

因為這樣, 才能真正加速處理版面文章.
依前輩說;我修改的位置是正確的囉 :$
成功需苦幹,逆境應自強。
學問勤中得,富裕儉中求。

●架設主機作業系統:Linux DiskStation 2.4.22-uc0 #722 Sun Feb 11 04:54:33 CST 2007 ppc
●快速架站程式:Apache 2.0 Handler Mysql 4.1.15
●免費空間連結:NAS
●上網方式:ADSL (netvigator)。
●phpBB3版本:phpBB (3.02)。
●domain(網域名稱) :philipschiu.com
●phpBB 連結網址: http://www.philipschiu.com:8080/phpbb
●安裝外掛:
1. ACP Announcement Centre (公告中心)1.0.3.a
2. Top5 List v1.0.3
3. JSCookMenu_forumlist_mod_111
4. Simple Hide BBcode MOD
暫時移除
Test Account
Username: testing
password: testing
頭像
心靈捕手
默默耕耘的老師
默默耕耘的老師
文章: 8535
註冊時間: 2004-04-30 01:54
來自: Taiwan

Re: [分享] 全討論區立即導向不等待

文章 心靈捕手 »

philipchiu 寫:依前輩說;我修改的位置是正確的囉 :$
抱歉! 我並不清楚您的修改是對或不對.
我的意思是: 有些 "等待" 是有其意義的.
施比受有福,祝福您好運! ^_^
歡迎光臨★★心靈捕手★★ :: 討論區
https://wang5555.dnsfor.me/phpBB3/
頭像
SCR
竹貓忠實會員
竹貓忠實會員
文章: 330
註冊時間: 2006-03-11 23:21
來自: 網路的小角落

Re: [分享] 全討論區立即導向不等待

文章 SCR »

此修改的確有 Bug .
當你改完後,試著按下"檢視誰在線上"看看,論壇馬上就出現差不多死當的模樣.
知難非行易,知易反行難~~
philipchiu
星球公民
星球公民
文章: 101
註冊時間: 2007-06-09 18:27

Re: [分享] 全討論區立即導向不等待

文章 philipchiu »

我的沒問題
成功需苦幹,逆境應自強。
學問勤中得,富裕儉中求。

●架設主機作業系統:Linux DiskStation 2.4.22-uc0 #722 Sun Feb 11 04:54:33 CST 2007 ppc
●快速架站程式:Apache 2.0 Handler Mysql 4.1.15
●免費空間連結:NAS
●上網方式:ADSL (netvigator)。
●phpBB3版本:phpBB (3.02)。
●domain(網域名稱) :philipschiu.com
●phpBB 連結網址: http://www.philipschiu.com:8080/phpbb
●安裝外掛:
1. ACP Announcement Centre (公告中心)1.0.3.a
2. Top5 List v1.0.3
3. JSCookMenu_forumlist_mod_111
4. Simple Hide BBcode MOD
暫時移除
Test Account
Username: testing
password: testing
頭像
SCR
竹貓忠實會員
竹貓忠實會員
文章: 330
註冊時間: 2006-03-11 23:21
來自: 網路的小角落

Re: [分享] 全討論區立即導向不等待

文章 SCR »

philipchiu 寫:我的沒問題
你的不是沒有問題,而是你所修改的方法跟原發文者的修改法不同.所以不會出現我所說的問題.
況且....................我剛到你的論壇去做測試.發現你的修改法也根本沒啥作用!!無法實踐立即導向功能.
知難非行易,知易反行難~~
主題已鎖定

回到「[3.0.x] 外掛問題討論」