1 頁 (共 1 頁)

[問題]會員推薦連結

發表於 : 2006-05-21 05:50
fayeng
有關連結:http://phpbb-tw.net/phpbb/viewtopic.php ... 8%E8%96%A6

有沒有大大曾經成功裝上這個外掛?
該外掛提供出一個連結,給會員再推薦新的會員,連結到您的論壇,並可在個人檔案裡列入計算,共有幾個被推薦新會員,這點是非常吸引的,可以讓新建論壇作有效的宣傳,以人傳人的方法,可能會有更多忠實會員加入。

我也不例外馬上裝設這個外掛,但安裝完成後卻失敗了。
出現問題:

代碼: 選擇全部

Warning:  Cannot modify header information - headers already sent by (output started at /ha/fayeng/public_html/phpBB/language/lang_chinese_traditional_taiwan/lang_referral.php:84) in/ha/fayeng/public_html/phpBB/includes/page_header.php on line 606

Warning:  Cannot modify header information - headers already sent by (output started at /ha/fayeng/public_html/phpBB/language/lang_chinese_traditional_taiwan/lang_referral.php:84) in/ha/fayeng/public_html/phpBB/includes/page_header.php on line 608

Warning:  Cannot modify header information - headers already sent by (output started at /ha/fayechai/public_html/phpBB/language/lang_chinese_traditional_taiwan/lang_referral.php:84) in/ha/fayeng/public_html/phpBB/includes/page_header.php on line 609
又因為這個外掛只有英文,我爬文很久發現了有大大曾經將lang_referral.php中文化了,相關連結:http://aikenlin.idv.tw/phpbb2/viewtopic.php?t=2481
(本站預設語系你繁體中文)此外掛裡language file 內另外還有admin_referral.php和lang_referral_history.php, 都只有英文,那會不會有影響呢?(同樣放在lang_chinese_traditional_taiwan 內)

問題page_header.php 595-613 如下:

代碼: 選擇全部

// Add no-cache control for cookies if they are set
//$c_no_cache = (isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid']) || isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_data'])) ? 'no-cache="set-cookie", ' : '';

// Work around for "current" Apache 2 + PHP module which seems to not
// cope with private cache control setting
if (!empty($_SERVER['SERVER_SOFTWARE']) && strstr($_SERVER['SERVER_SOFTWARE'], 'Apache/2'))
{
	header ('Cache-Control: no-cache, pre-check=0, post-check=0');
}
else
{
	header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
}
header ('Expires: 0');
header ('Pragma: no-cache');

$template->pparse('overall_header');

?>
如果有大大成功裝上這個外掛,希望可以提供有關心得和注意地方供大家分享,而我呢就只有這樣失敗之分享了,>_<''

發表於 : 2006-05-21 08:27
jwxinst
據我所知...
這個mod最後的板本並不是目前竹貓裡找到的
phpbb官方下載的是作者最後一次上傳給官方的
而作者早就已經將他的domain賣給了朋友
這支外掛他早就沒有更新了, 不過在2005年8月他終於更新了

我在回這篇文章的確我還沒有去翻中文化
建議你:

目前你所裝的型號可能太舊了
因為那是2003年的板本, 經過這麼久的時候都應該有很多差異
所以請你把檔案灰復到修改之前....
(在翻譯中, 馬上再上傳...)

發表於 : 2006-05-21 10:56
jwxinst

發表於 : 2006-05-21 20:55
點心貓
jwxinst大大...

我以成功安裝,但 top_referrals.php 好像有點問題,
推薦了新會員也沒有排行榜....

我的討論區
http://www.weihk.com

會員名稱: test1234
登入密碼: test1234

發表於 : 2006-05-21 21:56
點心貓
找到問題了

templates\subSilver\top_referral_body.tpl

代碼: 選擇全部

# 
# 
#-----[ FIND ]------------------------------------------ 
# 
<!-- BEGIN words -->
<!--
	<tr>
		<td class="{words.ROW_CLASS}" align="center"><span class="genmed">{words.TOP_REFERRALS_USER}</span></td>
		<td class="{words.ROW_CLASS}" align="center"><span class="genmed">{L_TOTAL_REFERRALS}: {words.REFERRAL_URL}</span></td>
	</tr>
	-->
               <tr>
		<td class="{words.ROW_CLASS}" align="center"><span class="genmed">{words.REFERRAL_LINK}</span></td>
	</tr>
	<!-- END words -->

# 
#-----[ REPLACE ]------------------------------------------ 
# 
<!-- BEGIN words -->
	
	<tr>
		<td class="{words.ROW_CLASS}" align="center"><span class="genmed">{words.TOP_REFERRALS_USER}</span></td>
		<td class="{words.ROW_CLASS}" align="center"><span class="genmed">{L_TOTAL_REFERRALS}: {words.REFERRAL_URL}</span></td>
	</tr>
	<tr>
		<td class="{words.ROW_CLASS}" align="center"><span class="genmed">{words.REFERRAL_LINK}</span></td>
	</tr>
	<!-- END words -->
多了兩個
<--
-->

發表於 : 2006-05-22 07:37
fayeng
jwxinst大大,
我已從新裝上以及成功了,多謝你啊﹗


但我想問分數會加在哪裡?

發表於 : 2006-05-22 08:02
fayeng
點心貓 寫:找到問題了

templates\subSilver\top_referral_body.tpl

代碼: 選擇全部

# 
# 
#-----[ FIND ]------------------------------------------ 
# 
<!-- BEGIN words -->
<!--
	<tr>
		<td class="{words.ROW_CLASS}" align="center"><span class="genmed">{words.TOP_REFERRALS_USER}</span></td>
		<td class="{words.ROW_CLASS}" align="center"><span class="genmed">{L_TOTAL_REFERRALS}: {words.REFERRAL_URL}</span></td>
	</tr>
	-->
               <tr>
		<td class="{words.ROW_CLASS}" align="center"><span class="genmed">{words.REFERRAL_LINK}</span></td>
	</tr>
	<!-- END words -->

# 
#-----[ REPLACE ]------------------------------------------ 
# 
<!-- BEGIN words -->
	
	<tr>
		<td class="{words.ROW_CLASS}" align="center"><span class="genmed">{words.TOP_REFERRALS_USER}</span></td>
		<td class="{words.ROW_CLASS}" align="center"><span class="genmed">{L_TOTAL_REFERRALS}: {words.REFERRAL_URL}</span></td>
	</tr>
	<tr>
		<td class="{words.ROW_CLASS}" align="center"><span class="genmed">{words.REFERRAL_LINK}</span></td>
	</tr>
	<!-- END words -->
多了兩個
<--
-->
還有這裡也要修改:

代碼: 選擇全部

# 
#-----[ FIND ]------------------------------------------ 
# 

<!-- <th class="thTop">{L_TOTAL_REFERRALS}</th> -->

# 
#-----[ REPLACE ]------------------------------------------ 
#

<th class="thTop">{L_TOTAL_REFERRALS}</th>


發表於 : 2006-05-25 05:46
fayeng
不知道大大有沒有這個問題?
沒有被推薦的新會員註冊後,都是劃一顯示在某一位舊會員的排行榜內。

即是說,以竹貓大大這個支援站作例子,按會員註冊就會跳到agreement這一頁,選好了over 13歲後就會去到這一頁:http://phpbb-tw.net/phpbb/profile.php?m ... greed=true
但是我的就會是這樣子:http://phpbb-tw.net/phpbb/profile.php?m ... greed=true&ruid=10←多了這個,
所以每當非推薦人士所註冊的時候都會加在http://phpbb-tw.net/phpbb/profile.php?mode=register&agreed=true&ruid=10←這個會員的排行榜內。

(別怪我的表達能力啊﹗但希望大大們明白我的意思吧﹗)

我應該查看哪一個file呢?應該要注意什麼呢?

發表於 : 2006-05-25 07:42
jwxinst
嗯先謝謝兩位, 剛剛更新了
UTF-8的用戶請小心一點, 請盡快更新這個mod裡的語系檔案
lang_referral.php 和lang_referral_history.php
(因為編碼上有誤....)


至於你所說的問題, 本人認識應該是因為這幾個原因:
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php

這個安裝指導裡你可以看到都是新量這一項新的代碼
$ruid;

這個應該就是John Albel所指的 referral checkpoint

而修改中這段新的
//
// START - REFERRAL MOD - AbelaJohnB
// "U_AGREE_OVER13" => append_sid("profile.$phpEx?mode=register&agreed=true"),
// "U_AGREE_UNDER13" => append_sid("profile.$phpEx?mode=register&agreed=true&coppa=true"))
//
"U_AGREE_OVER13" => append_sid("profile.$phpEx?mode=register&agreed=true&ruid=$ruid"),
"U_AGREE_UNDER13" => append_sid("profile.$phpEx?mode=register&agreed=true&coppa=true&ruid=$ruid"))
//
// END - REFERRAL MOD - AbelaJohnB
//
好像是一種驗證的ckeckpoint
因為這個ruid從判斷後會把資料分送到資料庫裡
新增的phpbb_referral (資料表), 就是在註冊時和ruid對應的table....
(能力有限, 只能這樣子解釋...)

因為自己電腦壞了很久都沒有裝外掛
上來都是看看貼子而已....
實戰還是沒有....


不過我個人認為, 這不曉得是否是一種正常的現象
首先如果沒有推薦人應該會被判斷成「無」的情況
那麼這個「NONE」在REFERRAL裡我是看不到有一段碼是.....


因為在 referral_view.php裡

代碼: 選擇全部

//
// Generate SQL
//
$sql = "SELECT r.*, u.username, u.user_id FROM " . REFERRAL_TABLE . " r, " . USERS_TABLE . " u WHERE r.ruid = '" . $ruid . "' AND r.ruid = u.user_id ORDER BY referral_time DESC";
if( !$result = $db->sql_query($sql) )
也是這樣子判斷, 可是怎麼亂跑這就奇怪了.....

如果可以請提供你的論壇, 測試帳號....
我會想法子再架一個測試論壇裝這個外掛

發表於 : 2006-05-25 07:45
jwxinst
啊, 重點就是: ruid是對的
那是referral模組新增的

至於你所說跑到另外一個會員就必需要集合各位大大的討論一起看看
因為這個外掛蠻好用的
(只是個人有心無力....不能更新....)

發表於 : 2006-05-25 08:15
fayeng
我作出了這樣的修改,測試過還ok啊﹗
在myadmin 裡把referral id 的 value 10 改為0,這樣就可以了。
或者是我之前sql 放錯了而已,不過現在已經成功了,先謝謝大大的幫忙啊﹗

發表於 : 2006-05-25 09:02
jwxinst
:-o 解決就好了.....
我這兩天再看看- -