1 頁 (共 1 頁)

[問題]請問發表主題按【送出】之後的程式碼在哪?

發表於 : 2007-01-20 15:39
進藤光
我找了 posting.php 很久,裡面只有一大堆的 if 指令,不知道哪一行程式碼才是 user 按【送出】那時候才會執行的指令?不是看到【您的訊息已經成功發送】那個畫面,而是按【送出】之後會執行的程式碼?
不知道有沒有熟悉內情的站長可以指導我一下?

我想要在【送出】之後新增幾個程式指令測試看看。 :mrgreen:

發表於 : 2007-01-20 16:14
hentaibbc
case 'editpost':
case 'newtopic':
case 'reply':
$username = ( !empty($HTTP_POST_VARS['username']) ) ? $HTTP_POST_VARS['username'] : '';
$subject = ( !empty($HTTP_POST_VARS['subject']) ) ? trim($HTTP_POST_VARS['subject']) : '';
$message = ( !empty($HTTP_POST_VARS['message']) ) ? $HTTP_POST_VARS['message'] : '';
$poll_title = ( isset($HTTP_POST_VARS['poll_title']) && $is_auth['auth_pollcreate'] ) ? $HTTP_POST_VARS['poll_title'] : '';
$poll_options = ( isset($HTTP_POST_VARS['poll_option_text']) && $is_auth['auth_pollcreate'] ) ? $HTTP_POST_VARS['poll_option_text'] : '';
$poll_length = ( isset($HTTP_POST_VARS['poll_length']) && $is_auth['auth_pollcreate'] ) ? $HTTP_POST_VARS['poll_length'] : '';
$bbcode_uid = '';

prepare_post($mode, $post_data, $bbcode_on, $html_on, $smilies_on, $error_msg, $username, $bbcode_uid, $subject, $message, $poll_title, $poll_options, $poll_length);

if ( $error_msg == '' )
{
$topic_type = ( $topic_type != $post_data['topic_type'] && !$is_auth['auth_sticky'] && !$is_auth['auth_announce'] ) ? $post_data['topic_type'] : $topic_type;

submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("\'", "''", $username), str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length);
}
break;
大概是這些吧...
紅色的部份....請去找function.... :-D

發表於 : 2007-01-21 01:01
進藤光
非常感謝!!謝謝!!
我已經做好了!效果如下:

http://bbs.bnw.com.tw/conference/

不知道會不會覺得網頁開啟速度超~~~快?呵呵~~ :mrgreen:
第一次開啟 BNW 會議室首頁的站長可能會比較沒感覺,請關掉網頁視窗,回到這裡重新點選看看?
雖然 phpBB 有內建【風格檔案】快取到檔案、快取到資料庫兩種方式,不過我還不是很滿意,所以想了一個不正當的手段來實驗一下~~~
到底整個網站運作會真的變快?還是變慢?還要觀察、觀察~~ :mrgreen: :mrgreen: :mrgreen:

發表於 : 2007-01-21 02:06
在思緒重疊之前
是真的很快..
妳是做了瞎密挖勾手腳阿!?
怎麼可以快成這樣...

發表於 : 2007-01-21 11:55
進藤光
哈哈~~感謝幫我測試!謝謝!! :mrgreen: :mrgreen: :mrgreen:
因為伺服器主機快不起來,想要有更快的伺服器?行~還要再花$$買新的 Core 2 Duo~~沒這麼多$$每年換新的主機~~ :oops:
所以只好想一些怪招來看看能不能讓網站表面上看起來滿快的,其實一點也沒有變快~~ XDDD :mrgreen: :mrgreen: :mrgreen:

請參考這篇: 假裝跑得很快的 BNW 時尚生活館... 嘻嘻嘻...

我再觀察一陣子,會把這個簡單的密技公佈出來~~希望高手們看到了不會當成笑話~~哈哈~~ :mrgreen:

發表於 : 2007-02-01 18:38
進藤光
經過半個月的測試,效果還不錯,可以減輕一點點 server 的負擔!細節請參考這篇:

假裝跑得很快的 BNW 時尚生活館... 嘻嘻嘻... : http://bbs.bnw.com.tw/conference/viewto ... =5652#5652

原理的說明文章很長,廢話一堆,其實 MOD 只有兩行而已~~ XD :mrgreen: :mrgreen: :mrgreen:

發表於 : 2007-02-03 08:19
Arisa520
進藤光 寫:經過半個月的測試,效果還不錯,可以減輕一點點 server 的負擔!細節請參考這篇:

假裝跑得很快的 BNW 時尚生活館... 嘻嘻嘻... : http://bbs.bnw.com.tw/conference/viewto ... =5652#5652

原理的說明文章很長,廢話一堆,其實 MOD 只有兩行而已~~ XD :mrgreen: :mrgreen: :mrgreen:
只有UNIX能用?!
剛剛試驗的結果
似乎 WIX XP +APPSERV 無法產生檔案?!

發表於 : 2007-02-03 14:10
~倉木麻衣~
可以用php提供的 php_curl 模組

代碼: 選擇全部

extension=php_curl.dll
PHP官方說明文件裡就有一個很簡單的範例可以參考