DokuWiki

It's better when it's simple

ユーザ用ツール

サイト用ツール


ja:tips:integrate_with_phpbb3

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

ja:tips:integrate_with_phpbb3 [2011-01-14 13:19] – 作成 61.213.142.216ja:tips:integrate_with_phpbb3 [2011-01-14 15:43] (現在) 61.213.142.216
行 1: 行 1:
 ====== phpBB3(の認証)との連携 ====== ====== phpBB3(の認証)との連携 ======
 ===== 特徴 ===== ===== 特徴 =====
-  * phpBB の認証システムを用いるので、phpBB にログインしていればDokuWikiに再ログインする必要はない(逆も同様)。もちろんログアウトも同じです。+  * phpBB の認証システムを用いるので、phpBB にログインしていればDokuWikiに再ログインする必要ありません(逆も同様)。もちろんログアウトも同じです。
   * Using phpBB's groups for DokuWiki's access control list. Some default groups are already implemented (even if they are not displayed on DokuWiki's configuration page):   * Using phpBB's groups for DokuWiki's access control list. Some default groups are already implemented (even if they are not displayed on DokuWiki's configuration page):
     * //REGISTERED//: default group (replaces group //user//)     * //REGISTERED//: default group (replaces group //user//)
行 9: 行 9:
 ==== 失われる機能 ==== ==== 失われる機能 ====
   * ユーザ登録   * ユーザ登録
-  * Full name display (phpBB doesn't have full name information in the user profile by default, username is displayed instead)+  * フルネームの表示(phpBBがデフォルトでユーザプロフィールにフルネームの情報を持っていません。代わりにユーザ名が表示されます。)
   * メディアマネージャとの連携。Wikiで画像が全く表示されない。(パスの問題?)((現在は完全に動作しているようです。下のコメントセクションを参照して下さい。))   * メディアマネージャとの連携。Wikiで画像が全く表示されない。(パスの問題?)((現在は完全に動作しているようです。下のコメントセクションを参照して下さい。))
   * Language support   * Language support
行 24: 行 24:
 ==== inc/auth/phpbb3.class.php を作成 ==== ==== inc/auth/phpbb3.class.php を作成 ====
 **inc/auth/** ディレクトリに **phpbb3.class.php** というファイル名で次の内容のファイルを作成して下さい。 **inc/auth/** ディレクトリに **phpbb3.class.php** というファイル名で次の内容のファイルを作成して下さい。
 +(エラーが発生するようであれば、コメントセクションにあるように修正して下さい。)
  
 <file php phpbb3.class.php><?php <file php phpbb3.class.php><?php
行 212: 行 213:
  
 ==== inc/utf8.php を編集 ==== ==== inc/utf8.php を編集 ====
-**inc/utf8.php**にはすでにphpBBによって定義された次のいくつかの関数があります。+**inc/utf8.php**にはすでにphpBBによって定義された次の関数があります。
   * utf8_strlen   * utf8_strlen
   * utf8_substr   * utf8_substr
行 255: 行 256:
  
 ==== feed.php を編集 ==== ==== feed.php を編集 ====
-Knowing we have just renamed the cache class (see above) and knowing this class is called in feed.php, we also need to rename the calling to make RSS/Atom feeds works. +cacheクラスの名前を変更した(上記参照)ので、このクラスが呼び出される feed.php でも、RSS/Atom フィードが生成されるように名前を変更しましょう。  
-Find:+ 
 +変更前:
 <code php> <code php>
 $cache = new cache($key, '.feed'); $cache = new cache($key, '.feed');
 </code> </code>
-and replace with:+変更後:
 <code php> <code php>
 $cache = new wiki_cache($key, '.feed'); $cache = new wiki_cache($key, '.feed');
 </code> </code>
  
-Otherwise you will have a very nice "XML Parsing Error". +もしこれを変更しないと "XML Parsing Error" が発生します。 
-==== Edit inc/common.php ==== +==== inc/common.php を編集 ==== 
-To synchronize phpBB3's and Dokuwiki's dateformat and timezone you have to change the function dformat() in inc/common.php.+phpBBとDokuWikiの日付フォーマットとタイムゾーンを同期するため、inc/common.php ファイルの dformat() 関数を変更しましょう。(コメントセクションにあるように、この修正を行うと逆にエラーが発生する可能性があります。)
  
-Search for:+変更前:
 <code php>function dformat($dt=null,$format=''){ <code php>function dformat($dt=null,$format=''){
   global $conf;   global $conf;
行 280: 行 282:
   return strftime($format,$dt);   return strftime($format,$dt);
 }</code> }</code>
-and replace it with:+変更後:
 <code php>function dformat($dt=null){ <code php>function dformat($dt=null){
   global $user;   global $user;
行 290: 行 292:
 }</code> }</code>
  
-So Dokuwiki uses the date configurations of phpBB3.+DokuWikiはphpBB3の日付設定を使用します。
  
-==== Set configuration variables ==== +==== 変数をセットする ==== 
-The last thing we have to do is: enable it! The file **conf/local.protected.php** is the best location to do so, because DokuWiki doesn't touch this file. If the file doesn't exist, you have to create it. Add these lines:+最後にすることは、今までの変更を適用することです。**conf/local.protected.php** ファイルはDokuWikiが操作しないので最も良い場所です。もしこのファイルがない場合は、新たに作成して下さい。そして、ファイルに次の記述を追加して下さい。
 <code php><?php <code php><?php
 /* /*
行 303: 行 305:
 $conf['authtype'] = 'phpbb3'; $conf['authtype'] = 'phpbb3';
 ?></code> ?></code>
-$phpbb_root_path has to be the relative path to phpBB from the DokuWiki directory, e.g. if phpBB is installed on the same level as DokuWiki, e.g. DokuWiki in **var/user/dokuwiki** and phpBB in **var/user/forum/****$php_root_path** has to be set to **../forum/**.+$phpbb_root_path DokuWikiのディレクトリから見たphpBBの相対パスです。例えば、DokuWikiを"**var/user/dokuwiki**"に、phpBBを"**var/user/forum/**"というように、phpBBをDokuWikiと同じ階層にインストールしたのであれば、**$php_root_path** **../forum/**というようにしなければいけません。
  
 I did this, but it wouldn't authenticate me. I tried pasting it in local.php, and it worked just fine. Is there a step missing? I did this, but it wouldn't authenticate me. I tried pasting it in local.php, and it worked just fine. Is there a step missing?
  
-===== phpBB3 Settings ===== +===== phpBB3の設定 ===== 
-==== Cookie Settings ====+==== cookieの設定 ====
  
-In order for the above integration to work well, it is important that the cookie settings in the phpBB3 ACP (admin control panel) are set right. For example, with wrong cookie settings, first logging in at your phpBB3 forum, then browsing your DokuWiki pages will forcibly log you out when you next load a page of your forum.+上で行った変更がうまく動くようにするためには、phpBB3ACP (admin control panel)でのcookieを正しく設定することが重要です。例えば、cookieの設定が間違っていると、まずphpBB3にログインし、あるページをロードするとDokuWikiから強制的にログアウトさせられます。
  
-If your phpBB3 forum is installed at **%%www.yourdomain.com/phpBB3/%%** and your DokuWiki is installed at **%%www.yourdomain.com/dokuwiki/%%**, then you should //not// set the "Cookie path" on the "Cookie Settings" page in the phpBB3 ACP to **/phpBB3/** -- that will cause the very behaviour mentioned in the example above. +もし、phpBB3を"**%%www.yourdomain.com/phpBB3/%%**"に、DokuWikiを"**%%www.yourdomain.com/dokuwiki/%%**"にインストールしている場合は、phpBB3ACPで“cookie 設定”の“cookie パス”を"**/phpBB3/**"と設定しては**いけません**。正しくは、“cookie パス”には"**/**"と設定して下さい。
-Instead, set the "Cookie pathto **/**, and it should work as expected.+
 <carstenfuchs@t-online.de> <carstenfuchs@t-online.de>
  
-==== Security Settings ==== +==== セキュリティ設定 ==== 
-An other thing to check in the phpbb3 ACP is  "Validate referrer" in the Security settings. If this setting is set to "Validate path too" the integration will not work and you will experience exactly the same issue that is described above in case of wrong cookie path. For this reason please set "Validate referrer" to "Validate host" or "none" but never to "Validate path"+phpBB3のACPで他にチェックすることは、セキュリティ設定の“リファラ設定”です。もし、この設定が“ホストとスクリプトパス”になっていると、上記の間違ったcookieパスの設定のように、うまく動作しません。このため、“リファラ設定”では“ホストとスクリプトパス”または“なし”を選択して下さい。
-Be care...+
  
  
行 326: 行 326:
  
  
-===== Credits ===== +===== クレジット ===== 
-  * Thanks to [[http://www.phpbb.com/community/memberlist.php?mode=viewprofile&u=199689|Nathan Brittles]] who gave me the basic ideas in a [[http://www.phpbb.com/community/viewtopic.php?f=72&t=590246|thread]] in the official phpBB forum. +  * phpBBの公式フォーラムの[[http://www.phpbb.com/community/viewtopic.php?f=72&t=590246|スレッド]]で基本的なアイデアをくれた[[http://www.phpbb.com/community/memberlist.php?mode=viewprofile&u=199689|Nathan Brittles]]さんに感謝します。 
-===== Comments =====+===== コメント =====
   * //Integration with Mediamanager, pictures are not shown in the wiki anymore (pathproblem?)// I just followed these instructions and I got no problem with Mediamanager, using DokuWiki 2009-02-14 and phpBB3 3.0.4, all works fine :-) and by the way, thanks for this page!   * //Integration with Mediamanager, pictures are not shown in the wiki anymore (pathproblem?)// I just followed these instructions and I got no problem with Mediamanager, using DokuWiki 2009-02-14 and phpBB3 3.0.4, all works fine :-) and by the way, thanks for this page!
  
行 405: 行 405:
   * I had some problems getting this integration to work, it would not authenticate. But, I found the problem: If $_SERVER['PHP_AUTH_USER'] is set on your server, it will try to log in with that. If you have that problem, you can either unset it, or remove the corresponding code in inc/auth.php   * I had some problems getting this integration to work, it would not authenticate. But, I found the problem: If $_SERVER['PHP_AUTH_USER'] is set on your server, it will try to log in with that. If you have that problem, you can either unset it, or remove the corresponding code in inc/auth.php
      
-  * I found a solution to make it work with the most recent version (Anteater) of dokuwiki. You basically have to declare the global variables before the class is declared: +  * 私は、DokuWikiの最新バージョン(Anteater)でこれを解決する方法を見つけました。要するに、クラスが宣言される前にグローバル変数を宣言します。 
-  * At the beginning of the file phpbb3.class.php insert the global variables:+  * phpbb3.class.php ファイルの最初にグローバル変数を追加します。
  
 <code php><?php <code php><?php
行 454: 行 454:
 { {
  
-HERE THE REST OF THE ORIGINAL phpbb3.class.php CODE FROM THE TOP OF THIS SIDE</code> +この下には、手順の一番上にある phpbb3.class.php のコードが続きます。</code> 
- +  
-I don't really understand why it works now, so I haven't added it to the instructions in case it's a security risk. --- //Eivind 2010/09/12 // +  今、私はこれがなぜうまく動作するのか分からないので、セキュリティの問題が起こるのを避けるために手順には加えていません。--- //Eivind 2010/09/12 //
ja/tips/integrate_with_phpbb3.txt · 最終更新: 2011-01-14 15:43 by 61.213.142.216

特に明示されていない限り、本Wikiの内容は次のライセンスに従います: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki