來源: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;
3. 開啟 shoutbox_auth.php
修改
代碼: 選擇全部
$shoutbox_forum_id = [color=red]25[/color]; <--(紅字需對應剛剛新開的版)
代碼: 選擇全部
############################ END EDITABLE PORTION ###############################
代碼: 選擇全部
define('IN_PHPBB', true);
修改\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.
註:原先的英文語系檔不可刪除,否則無法顯示
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>
代碼: 選擇全部
<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>
複製所有檔案到目錄下
8. 建立屬於自己的風格檔案,若你沒有換過風格則可以省掉此步驟(例:shoutbox_DesertStorm.css)
9. 修改台北時差\r
打開 shoutboxconf.php
代碼: 選擇全部
$timezonecorrection = ($use_time);
代碼: 選擇全部
$timezonecorrection = ($use_time) - 8;
開啟shoutboxconf.php
尋找這一段\r
代碼: 選擇全部
$maxshoutlife = "[color=red]90000[/color]";
完工!