1.首先安裝完phpBB2
接著在/phpBB2/資料夾下
2.建立一個資料夾gallery
3.然後把CPG的內容複製到gallery內\r
4.接著打開include/init.inc.php
將代碼
代碼: 選擇全部
// define('UDB_INTEGRATION', 'phpbb');
改成
代碼: 選擇全部
define('UDB_INTEGRATION', 'phpbb');
5.再打開bridge/phpbb.inc.php
修改以下地方\r
代碼: 選擇全部
// database configuration
define('PHPBB_DB_NAME', 'phpBB'); // 資料庫名稱\r
define('PHPBB_BD_HOST', 'localhost'); // 資料庫伺服器\r
define('PHPBB_DB_USERNAME', 'root'); // 資料庫使用者名稱\r
define('PHPBB_DB_PASSWORD', 'XXXXXXXX'); // 資料庫使用者密碼\r
// The web path to your phpBB directory
// If your URL to your board is for example 'http://yoursite_name.com/phpBB2/',
// you'll have to set the below var to '/phpBB2/'.
define('PHPBB_WEB_PATH', '/phpBB2/');
6.安裝CPG
執行網址http://yourdomain/phpBB2/gallery/index.php
使用者名稱及密碼同phpBB的系統管理者
DB的位置、名稱、使用者、密碼皆同phpBB
剩下的標頭檔不用改\r
縮圖程式請自行安裝...並輸入位址
7.在/phpBB2/底下增加cpg_redir.php
內容如下:
代碼: 選擇全部
<?php
if (!$_SERVER['HTTP_HOST']) {
$cpg_host=$HTTP_SERVER_VARS['HTTP_HOST'];
} else {
$cpg_host=$_SERVER['HTTP_HOST'];
}
$cpg_path='/phpBB2/gallery';
header("Location: http://".$cpg_host.$cpg_path);
exit;
?>
\r
至此就安裝完成了....
至於其他的修改如下
1.在phpBB之下加入一個連結至CPG
代碼: 選擇全部
#
#-----[ OPEN ]-------------------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]----------------------------------------
#
'U_GROUP_CP' => append_sid('groupcp.'.$phpEx),
#
#-----[ AFTER, ADD ]----------------------------------
#
// Coppermine Photo Gallery
'L_CPG' => $lang['CPG'],
'U_CPG' => append_sid('gallery/index.'.$phpEx),
#
#-----[ OPEN ]-------------------------------------------------------
# also for other templates
templates/subSilver/overall_header.tpl
#
#-----[ FIND ]----------------------------------------
#
<a href="{U_FAQ}">{L_FAQ}</a>
#
#-----[ AFTER, ADD ]----------------------------------
# this step will add a link into your header menu
<a href="{U_CPG}">{L_CPG}</a>
#
#-----[ OPEN ]-------------------------------------------------------
# also for all other language packs
language/lang_english/lang_main.php
#
#-----[ FIND ]----------------------------------------
#
//
// Errors (not related to a
// specific failure on a page)
//
$lang['Information'] = 'Information';
$lang['Critical_Information'] = 'Critical Information';
#
#-----[ BEFORE, ADD ]---------------------------------
#
//
// Coppermine Photo Gallery
//
$lang['CPG'] = 'Album';
#
#-----[ 繁體中文 ]---------------------------------
#
//
// Coppermine Photo Gallery
//
$lang['CPG'] = '相簿藝廊';
2.在CPG底下加上phpBB的連結
代碼: 選擇全部
#open
/phpBB2/gallery/themes/你的風格/theme.php
#find
<!-- BEGIN album_list -->
#before,add
<a href=http://your website/>your首頁</a> ::
完整教學就這樣了....
事實上...我寫的並沒有比我給你看的那兩個連結還多什麼....
SO....我真的不明白你的問題點....