熊..
如果伺服器比較沒那麼操的時候可以用看看
這是分析BT附件的插件程式
我是從
http://club.muzone.cn/viewthread.php?tid=17456&extra=
這邊找到分析程式
然後經過安裝失敗之後找到原因
必須要先安裝Zend Optimizer才可以運作
程式下載頁面
http://www.shopex.cn/download-supportsys.php
x86-windows版本下載
http://www.shopex.cn/download/supportsys/windows/ZendOptimizer-2.5.5-Windows-i386.exe
下載安裝的時候
會問說要安裝在iis還是apach
我是安裝在IIS..測試正常
然後開始安裝BT分析插件的時候
其中有的部分說明有問題
我貼一下我的安裝方式
=========================
1、把目錄下的所有文件複製到論壇目錄。
2、打開"viewthread.php":
查找:
require_once DISCUZ_ROOT.'./include/discuzcode.php'; 在下面添加:
require_once './chclib.php'; 查找:
} else {
$attach['attachimg'] = 0;
} 在下面添加:
if($extension == "torrent"){
$attach[btinfo] = btfilef("attachments/".$attach[attachment]);
} 3、打開"include\attachment.php":
查找:
11 => 'image.gif' 替換成:
11 => 'image.gif',
12 => 'torrent.gif' 查找:
if(preg_match("/image|^(jpg|gif|png|bmp)\t/", $type)) {
$typeid = 11; 在下面添加:
} elseif(preg_match("/torrent|^(torrent)\t/", $type)) {
$typeid = 12; 4、打開"discuzcode.php":
查找:
if(!defined('IN_DISCUZ')) {
exit('Access Denied');
} 在下面添加:
require_once "bt_hack.php"; 5、打開語言包"templates.lang.php":
查找:
$language = array
( 在下面添加:
'bt_downname' => '下載名稱',
'bt_filehash' => '較驗代碼',
'bt_filenums' => '文件個數',
'bt_filelists' => '文件列表',
'bt_attachment' => '附件信息',
'bt_fileinfo' => 'TORRENT文件信息',
'bt_bit' => '字節',
'bt_trackerl' => 'Announce列表',
'bt_comm' => '文件注釋',
'bt_seeds' => '查看種子信息',
'bt_tracker' => '發布服務器',
'bt_server' => '主力Announce',
'bt_trackerl' => '服務器列表',
'bt_comm' => '注釋',
'lookhash' => '查看',
'attach_file_name' => '文件名',
'attach_file_type' => '文件類型',
'attach_file_size' => '文件大小',
'attach_file_download' => '下載文件', 6、打開模板"viewthread.htm":
查找:(這邊可能會因為修改過的套版有點出入..但是很好找的)
<!--{if $attachelist[$post[pid]]}-->
<!--{eval $attacount = 0; }-->
<blockquote><!--{loop $attachelist[$post[pid]] $vkey $attach}-->
{lang attachment} <!--{echo ++$attacount }--> : $attach[attachicon] <a href="attachment.php?aid=$attach[aid]&checkid=$attach[checkid]&download=1" target="_blank">$attach[filename]</a> ($attach['dateline'], $attach[attachsize]
<!--{if $attach[creditsrequire]}-->, {lang creditsrequire_attach}{lang credit_title} $attach[creditsrequire] {lang credit_unit}<!--{/if}-->
<!--{if $attach[downloads]}-->,{lang downloads}¡G $attach[downloads]<!--{/if}--> )
<!--{if $attach['attachimg']}-->
<br><br><!--{if !$attachimgcheck}-->
<img src="$attachurl/$attach[attachment]" border="0" onload="if(this.width>screen.width*0.5) {this.resized=true; this.width=screen.width*0.6; this.alt='{lang click_open_newwindow}';}" onmouseover="if(this.resized) this.style.cursor='hand';" onclick="if(this.resized) window.open(this.src);">
<!--{else}-->
<a href="attachment.php?aid=$attach[aid]&checkid=$attach[checkid]" target="_blank"><img src="attachment.php?aid=$attach[aid]&checkid=$attach[checkid]" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.6; this.alt='{lang click_open_newwindow}';}" onmouseover="if(this.resized) this.style.cursor='hand';"></a>
<!--{/if}-->
<!--{/if}-->
<br><!--{/loop}--></blockquote>
<!--{/if}--> 替換為:
<!--{if $attachelist[$post[pid]]}-->
<!--{eval $attacount = 0; }-->
<blockquote><!--{loop $attachelist[$post[pid]] $vkey $attach}-->
{lang attachment} <!--{echo ++$attacount }--> :
<!--{if !$attach['attachimg']}-->
<table cellspacing="0" cellpadding="0" border="0" width="97%" align="center">
<tr><td bgcolor="{BORDERCOLOR}">
<table border="0" cellspacing="1" cellpadding="4" width="100%">
<tr class="header" >
<td width= "100%" colspan="4" align="center"><b>
<!--{if $attach[btinfo][is_bt] == "yes"}-->
{lang bt_attachment}
<!--{else}-->
{lang attachment}
<!--{/if}-->
</b></td>
</tr>
<tr bgcolor="{ALTBG1}">
<td align=center width="15%" nowrap> {lang attach_file_name}:</span></td>
<td align="center" width="35%"><span class="small"> $attach[filename]</span></td>
<td align=center width="15%" nowrap> {lang attach_file_type}:</td>
<td align="center" width="35%"><span class="small">$attach[attachicon] $attach['attachtype']</span></td>
</tr>
<tr bgcolor="{ALTBG2}">
<td align=center width="15%" nowrap><span class="small"> {lang attach_file_size}:</span></td>
<td align=center width="35%"><span class="small"> $attach[attachsize]</td>
<td align=center width="15%" nowrap><span class="small"> {lang attach_download_count}:</span></td>
<td align=center width="35%"><span class="smalltxt"> $attach[downloads] </span></td>
</tr>
<!--{if $attach[btinfo][is_bt] == "yes"}-->
<tr class="header" >
<td colspan="4" align="center"><b>{lang bt_fileinfo}</b></td>
</tr>
<tr bgcolor="{ALTBG1}">
<td align=center nowrap> {lang bt_downname}:</span></td>
<td align="center"><span class="small"> $attach[btinfo][filedname]</span></td>
<td align=center nowrap> {lang bt_filehash}:</td>
<td align="center"><span class="small"><a href="###" onclick="javascript:window.open('showhash.php?msg=$attach[btinfo][infoh]','hash','width=500,height=70')">{lang lookhash}</a></span></td>
<tr bgcolor="{ALTBG1}">
<td colspan="4" align="center"><span class="small"><a href="###" onclick="javascript:window.open('showhash.php?msg=$attach[btinfo][yinfoh]&action=seeds','hash','width=500,height=70')">{lang bt_seeds}</a></span></td>
</tr>
</tr>
<tr bgcolor="{ALTBG2}">
<td align=center nowrap><span class="small"> {lang attach_file_size}:</span></td>
<td align=center><span class="small"> $attach[btinfo][tosize] ($attach[btinfo][tolsizebit] {lang bt_bit})</td>
<td align=center nowrap><span class="small"> {lang bt_filenums}:</span></td>
<td align=center><span class="smalltxt"> $attach[btinfo]['filesnum']</span></td>
</tr>
<tr bgcolor="{ALTBG2}">
<td align=center nowrap><span class="small"> {lang bt_server}:</span></td>
<td align=center><span class="small"> $attach[btinfo][announce]</td>
<td align=center nowrap><span class="small"> {lang bt_tracker}:</span></td>
<td align=center> <b><a target="_blank" href="$attach[btinfo][tracker]">$attach[btinfo][tracker]</a></b></td>
</tr>
<!--{if $post[$attach[pid]]['commp'] == "yes"}-->
<tr bgcolor="{ALTBG2}">
<td align=center>{lang bt_comm}</td>
<td colspan="3"><span class="small">$attach[btinfo]['comm']</span>
</td>
</tr>
<!--{/if}-->
<!--{if $attach[btinfo]['annlistp'] == "duo"}-->
<tr bgcolor="{ALTBG2}">
<td align=center>{lang bt_trackerl}</td>
<td colspan="3"><span class="small">$attach[btinfo]['annlist']</span>
</td>
</tr>
<!--{/if}-->
<!--{if $attach[btinfo]['filems'] == "duo"}-->
<tr bgcolor="{ALTBG2}">
<td align=center>{lang bt_filelists}</td>
<td colspan="3"><span class="small">$attach[btinfo]['filelists']</span>
</td>
</tr>
<!--{/if}-->
<!--{/if}-->
<tr bgcolor="{ALTBG2}"><td width="100%" colspan=4 align=center>
<a href="attachment.php?aid=$attach[aid]&checkid=$attach[checkid]&download=1" target="_blank">{lang attach_file_download}</a>
<!--{if $attach[creditsrequire]}--><br><br>{lang creditsrequire_attach} {lang credit_title} $attach[creditsrequire] {lang credit_unit}
<!--{/if}-->
</td></tr></table></td></tr></table>
<!--{else}-->
$attach[attachicon] <a href="attachment.php?aid=$attach[aid]&checkid=$attach[checkid]&download=1" target="_blank">$attach[filename]</a> ($attach['dateline'], $attach[attachsize]
<!--{if $attach[creditsrequire]}-->, {lang creditsrequire_attach}{lang credit_title} $attach[creditsrequire] {lang credit_unit}<!--{/if}-->
<!--{if $attach[downloads]}-->,{lang downloads}: $attach[downloads]<!--{/if}--> )
<!--{/if}-->
<!--{if $attach['attachimg']}-->
<br><br><!--{if !$attachimgcheck}-->
<img src="attachment.php?aid=$attach[aid]&checkid=$attach[checkid]&small=1" border="0" onload="if(this.width>screen.width*0.5) {this.resized=true; this.width=screen.width*0.6; this.alt='{lang click_open_newwindow}';}" onmouseover="if(this.resized) this.style.cursor='hand';" onclick="if(this.resized) window.open('attachment.php?aid=$attach[aid]&checkid=$attach[checkid]');">
<!--{else}-->
<a href="attachment.php?aid=$attach[aid]&checkid=$attach[checkid]" target="_blank"><img src="attachment.php?aid=$attach[aid]&checkid=$attach[checkid]&small=1" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.6; this.alt='{lang click_open_newwindow}';}" onmouseover="if(this.resized) this.style.cursor='hand';"></a>
<!--{/if}-->
<!--{/if}-->
<br><!--{/loop}--></blockquote>
<!--{/if}--> 大致上修改差不多這樣就正常顯示了
我測試過一次種子的確有顯示過
小弟本身對PHP一竅不通:L
如果有任何問題我會"盡力"幫大家看看(看的懂得話)
如果大家正常安裝成功
也請歡迎發布給其他人參考樣本看看
以及發表一下安裝心得
謝謝各位..
PS..
我把相關的檔案附加上來
慢慢測試吧=.="
章魚有看到的話幫忙弄份心得報告啊~
[桂正和 在 2005-6-8 05:22 PM 作了最後編輯]
|