[外掛強化]聊天室Shoutbox1.0(2.31)

MODs Released by Other phpbb Sites
非官方認證通過之 MOD ,或許有安全性之疑慮,所有問題由原發表者回覆!

版主: 版主管理群

主題已鎖定
動機不明
喝咖啡的綠皮猴
喝咖啡的綠皮猴
文章: 1179
註冊時間: 2002-03-06 20:37
來自: GOP (重啟)

[外掛強化]聊天室Shoutbox1.0(2.31)

文章 動機不明 »

前言:這個外掛很棘手,稍一不注意就無法使用了... -.-|||

來源:http://www.phpbb2-users.de/modules.php? ... for_phpBB2
引用原文:(shoutbox_install[delete].txt)
########################################################
## Mod Title: Shoutbox for phpBB (Alternative)
## Mod Version: 1.0
## Rev Date: Mar 14, 2002
## Author: ciaran < salmanrushdie at email.com >
## Description: Shoutbox 2.31 integrated with phpBB2
##
## Installation Level: Beginner
## Installation Time: 5 Minutes
## Files To Edit: 2 phpBB + 2 config
## (1) index.php
## (2) templates\subSilver\index_body.tpl
## (3) $shoutbox_dir\shoutbox_auth.php (for config purposes)
## (3) $shoutbox_dir\shoutboxconf.php (for config purposes)
##
## Included Files: 16
## in zip file: shoutbox_phpbb2.zip
########################################################
## Credits:
## * Based onl Shoutbox (c) 2001 Brett Taylor
## [ http://www.addict.net.nz/~glutnix ] [ glutnix at addict.net.nz ]
## * Inspired by postexitus' original SB Mod
##
########################################################
## EDIT PHPBB2 FILES
##
=================== [ EDIT: index.php ] ===================
=================== [ LOOK FOR ] ===================
if( $is_auth_ary[$forum_id]['auth_view'] )
{

=================== [ ADD AFTER ] ===================
if($forum_data[$j]['forum_name'] == "Shoutbox")
{
$folder_image = "<img src=\"mods/shoutbox/shoutbox.gif\" alt=\"Shoutbox\" />";

$template->assign_block_vars("catrow.shoutrow", array(
"FOLDER" => $folder_image)
);
}
else
{

=================== [ LOOK FOR ] ===================
"U_VIEWFORUM" => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"))
);

=================== [ REPLACE ] ===================
"U_VIEWFORUM" => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"))
);
}

======= [ EDIT: templates\subSilver\index_body.tpl ] ======
=================== [ LOOK FOR ] ===================
<!-- END forumrow -->
<!-- END catrow -->

=================== [ REPLACE ] ===================
<!-- END forumrow -->
<!-- BEGIN shoutrow -->
<tr>
<td class="row1" align="center" valign="middle" height="75">{catrow.shoutrow.FOLDER}</td>
<td class="row1" width="100%" height="75" colspan="4" align="center"><iframe bgcolor="{T_BODY_BGCOLOR}" src="mods/shoutbox/viewshoutbox.php" width="100%" height="100%" frameborder="0"></iframe></td>
</tr>
<!-- END shoutrow -->
<!-- END catrow -->
=================== [ REPLACE ] ===================
=================== [ DONE ] ===================
##
########################################################
## SET UP SHOUTBOX FORUM
##
## * Create a forum called "Shoutbox." Feel free to stick it under any category. I personally have made a "Shoutbox" category.
## * Change the permissions... View, Read, Post, Delete (to whichever user/group you want... all of these can be different users/groups), and Moderators. The rest should be stuck at "Admin."
## * Lock the Shoutbox forum
## * Now edit your two configuration files in your shoutbox directory:
## (1) shoutboxconf.php
## (2) shoutbox_auth.php
##
## *** NOTE!!! DELETE THE TWO FILES:
## (1) SHOUTBOX_CREATE_TABLES[DELETE].SQL
## (2) SHOUTBOX_INSTALL[DELETE].TXT
##
## ... you're done!
##
########################################################
補充不足之處:
1. 資料庫加入(即shoutbox_create_tables[delete].sql)

代碼: 選擇全部

DROP TABLE IF EXISTS shoutbox;
CREATE TABLE shoutbox (
  id int(11) NOT NULL auto_increment,
  name varchar(30) NOT NULL default '',
  shout varchar(255) NOT NULL default '',
  url varchar(100) NOT NULL default '',
  timestamp int(10) unsigned NOT NULL default '0',
  ipaddress text NOT NULL,
  PRIMARY KEY  (id)
) TYPE=MyISAM;
2. 控制台內的版面管理,建立一個新分區:Shoutbox (可自定名稱),建立新版面\r

3. 開啟 shoutbox_auth.php
修改

代碼: 選擇全部

$shoutbox_forum_id = [color=red]25[/color]; <--(紅字需對應剛剛新開的版) 
搜尋

代碼: 選擇全部

############################ END EDITABLE PORTION ###############################
後面加入\r

代碼: 選擇全部

define('IN_PHPBB', true);
4. 開啟 shoutboxconf.php
修改\r

代碼: 選擇全部

$linelength = "[color=red]120[/color]";
// maximum length of a line for word wrapping

$maxshoutlen = "[color=red]200[/color]";
// maximum length of a shout in total. (120 was chosen as this is around
// the limit for SMS messages).  If you do change this, realise that 
// the forms in the supplied files have maximum length values in them.
5. 新增一個檔案:shoutbox_langpack_chinese_traditional_taiwan.php(中文語系檔)
註:原先的英文語系檔不可刪除,否則無法顯示

6. 開啟 viewshoutbox.php
尋找\r

代碼: 選擇全部

<div align="center"><b>[ <a href="javascript:void(0);" onClick="MM_openBrWindow('expanded.php','expanded','scrollbars=no,width=300,height=550')"><?=_SHOUT?></a> ]</b> [ <a href="viewshoutbox.php"><?=_REFRESH?></a> ]</div>
改為\r

代碼: 選擇全部

<div align="center"><b>[ <a href="javascript:void(0);" onClick="MM_openBrWindow('expanded.php','expanded','scrollbars=no,width=600,height=550')"><?=進入?></a> ]</b> [ <a href="viewshoutbox.php"><?=重新整理?></a> ]</div>
7. 建立 mods/shoutbox
複製所有檔案到目錄下

8. 建立屬於自己的風格檔案,若你沒有換過風格則可以省掉此步驟(例:shoutbox_DesertStorm.css)

9. 修改台北時差\r
打開 shoutboxconf.php

代碼: 選擇全部

$timezonecorrection = ($use_time);
為\r

代碼: 選擇全部

$timezonecorrection = ($use_time) - 8;
10. 佔用資源問題
開啟shoutboxconf.php
尋找這一段\r

代碼: 選擇全部

$maxshoutlife = "[color=red]90000[/color]";
將數字改為你要的就可以了,單位是秒 (此段由godbless提供)

完工!
非官方外掛問題區公告: [必看]請配合發問格式及明確主題發問(2006 02/24更新)
七點要求:
1. 發問前先搜尋,確定沒有重複後再發表
2. 主題要明確
3. 依照發問格式
4. 禁連續推文
5. 請盡量減少使用地方性語言
6. 解決問題後請修改第一篇主題,並感謝曾經幫過你的前輩們 ^^
7. 請不要將檔案內容完整貼出喔! 只要提供問題行及上下各五行就可以了
天霜
竹貓忠實會員
竹貓忠實會員
文章: 882
註冊時間: 2003-04-15 19:40
來自: 星之鄉學園
聯繫:

文章 天霜 »

最後由 天霜 於 2005-03-08 13:08 編輯,總共編輯了 1 次。
不回答來自 私人訊息, 電子郵件, 及時通 的相關 phpBB 問題
除非是個人疏失所造成的問題

這世界還有拼命守護的價值嗎...
Mowd
竹貓忠實會員
竹貓忠實會員
文章: 326
註冊時間: 2002-06-26 01:17
來自: 台北
聯繫:

文章 Mowd »

主題已鎖定

回到「非官方認證外掛」