[教學] phpBB3 RC3 安裝後必要的修正

phpBB Installation & Usage Support
phpBB 3 安裝於各類型作業平台之問題討論;外掛問題,請到相關版面依發問格式發表!
(發表文章請按照公告格式發表,違者砍文)

版主: 版主管理群

版面規則
本區是討論關於 phpBB 3.0.X 架設安裝上的問題,只要有安裝任何外掛,請到外掛討論相關版面按照公告格式發表。
(發表文章請按照公告格式發表,違者砍文)
主題已鎖定
Mac
百戰天龍馬蓋先
百戰天龍馬蓋先
文章: 2590
註冊時間: 2003-02-02 02:28
來自: MacphpBBMOD
聯繫:

[教學] phpBB3 RC3 安裝後必要的修正

文章 Mac »

原文:http://www.phpbb.com/community/viewtopi ... 6&t=564095

打開 includes/mcp/mcp_ban.php

尋找

代碼: 選擇全部

             $ban            = request_var('ban', '', ($mode === 'user') true ? false);
取代為

代碼: 選擇全部

             $ban            = request_var('ban', '', ($mode === 'user') ? true : false);
打開 includes/functions_module.php

尋找

代碼: 選擇全部

              // Include MOD _info files for populating language entries within the menus
              if (file_exists($user->lang_path . 'mods'))
              {
                 $add_files = array();

                 foreach (glob($user->lang_path . 'mods/info_' . strtolower($this->p_class) . '_*.' . $phpEx, GLOB_NOSORT) as $file)
                 {
                    $add_files[] = 'mods/' . substr(basename($file), 0, -(strlen($phpEx) + 1));
                 }

                 if (sizeof($add_files))
                 {
                    $user->add_lang($add_files);
                 }
              }
取代為

代碼: 選擇全部

          // Include MOD _info files for populating language entries within the menus
          if (file_exists($user->lang_path . 'mods'))
          {
             $add_files = array();
             $info_files = @glob($user->lang_path . 'mods/info_' . strtolower($this->p_class) . '_*.' . $phpEx, GLOB_NOSORT);

             if (!is_array($info_files))
             {
                $dir = @opendir($user->lang_path . 'mods');

                if ($dir)
                {
                   while (($entry = readdir($dir)) !== false)
                   {
                      if (strpos($entry, 'info_' . strtolower($this->p_class) . '_') === 0 && substr(strrchr($entry, '.'), 1) == $phpEx)
                      {
                         $add_files[] = 'mods/' . substr(basename($entry), 0, -(strlen($phpEx) + 1));
                      }
                   }
                   closedir($dir);
                }
             }
             else
             {
                foreach ($info_files as $file)
                {
                   $add_files[] = 'mods/' . substr(basename($file), 0, -(strlen($phpEx) + 1));
                }
             }

             if (sizeof($add_files))
             {
                $user->add_lang($add_files);
             }
          }

可能的問題:下一次更新到 RC4 或是正式版的時候,執行自動更新檔時,會發生找不到代碼的問題(因為已經被你事先修改過了),因此,到時候你會需要把修正好的代碼恢復成 RC3 一開始的樣子才能執行自動更新檔


~Mac
+ 關於 phpBB 使用問題請在版面發問,私人訊息提供其他不相干或是隱私的事情聯絡之用。

phpBB 官網 | 竹貓星球 | MacphpBBMOD | 我的服務
主題已鎖定

回到「[3.0.x] 安裝與使用」