[轉貼]在CPG中登入及登出依然在CPG中...v1.3補充

CPG Running Discuss
關於 CPG 架設使用操作討論,非本程式相關問題一律砍文!

版主: 版主管理群

回覆文章
jiachi
星球普通子民
星球普通子民
文章: 3
註冊時間: 2004-06-10 15:12

[轉貼]在CPG中登入及登出依然在CPG中...v1.3補充

文章 jiachi » 2004-07-02 13:19

我來補充一下CPG v1.3.0的,
基本上這一版已經不需要修改code了,
以下是 1.3.0 版這部分的code

代碼: 選擇全部

// Logout
function udb_logout_page()
{
   if (PHPBB_LOGOUT_GET) {

       udb_redirect(LOGIN_REDIR.LOGOUT_FLAG);
   } else {
       echo(REDIR1.PHPBB_WEB_PATH.LOGIN_REDIR.LOGOUT_FLAG.REDIR2);
      exit();
   }
}
如上,已經內建處理的程式了,
不過必須在phpbb資料夾裡建立一個檔案 cpg_redir.php :

代碼: 選擇全部

<?php
if (!$_SERVER['HTTP_HOST']) {
  $cpg_host=$HTTP_SERVER_VARS['HTTP_HOST'];
} else {
  $cpg_host=$_SERVER['HTTP_HOST'];
}
$cpg_path='/gallery';
header("Location: http://".$cpg_host.$cpg_path);
exit;
?>
Important - before you save the file, you must ensure that:
$cpg_path - contains the the path in which Coppermine is installed
$cpg_host - contains the domain pointer to Coppermine. If Coppermine and phpBB are installed on the same server and domain (the "normal" case), you should leave the default value. Otherwise you should provide a string constant which contains the domain where Coppermine is installed (for example: 'www.my-other-domain.com').
If you change both variables make sure that either $cpg_host contains a trailing slash or $cpg_path contains a leading slash. In other words, the concatenation of the two variables must result in a correct path such as http://www.my-other-domain.com/my_gallery_dir

以上經過測試可以順利在cpg與phpbb之間轉換頁面.

回覆文章

回到「Coppermine Photo Gallery」