[問題] 2.0.11升級到 2.0.12 的 template.php

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

版主: 版主管理群

版面規則
本區是討論關於 phpBB 2.0.X 架設安裝上的問題,只要有安裝任何外掛,請到外掛討論相關版面按照公告格式發表。
(發表文章請按照公告格式發表,違者砍文)
主題已鎖定
頭像
sh85216s
竹貓忠實會員
竹貓忠實會員
文章: 306
註冊時間: 2003-09-04 20:13
來自: 阿里阿度

[問題] 2.0.11升級到 2.0.12 的 template.php

文章 sh85216s »

升級的 patch 有一段關於 includes/template.php 的修正如下:
------------------------------------------------------------------------------------
找到\r

代碼: 選擇全部

             $filename = [color=red]phpbb_realpath[/color]($this->root . '/' . $filename); 
置換為\r

代碼: 選擇全部

             $filename = ($rp_filename = [color=red]phpbb_realpath[/color]($this->root . '/' . $filename)) ? $rp_filename : $filename;
------------------------------------------------------------------------------------

但我的 template.php 中並無類似的字串,不知如何修改?請大家幫忙一下!

由於檔案很大,只貼出可能相關的程式碼.

我的 template.php 相關的程式碼如下:

代碼: 選擇全部

                        // search if this file is part of a sub-template
                        $sub_tpl_file = '';
                        $sub_css_file = '';
                        $sub_img_file = '';
                        $sub_img_path = '';
                        $template_path = 'templates/';
                        $template_name = substr( $this->root, strpos($this->root, $template_path) + strlen($template_path) );
                        $real_root = $this->root;
                        if ( $board_config['version'] > '.0.5' )
                        {
                                $real_root = @[color=red]phpbb_realpath[/color]($this->root);
                        }
                        if (substr($filename, 0, 1) != '/')
                        {
                                $found = false;
                                $num_fids = count($fids);
                                for ($i = 0; !$found && ($i < $num_fids); $i++)
                                {
                                        $key = $fids[$i];
另一段可能相關的程式碼如下:

代碼: 選擇全部

                // Check if sub_templates are defined for this theme
                if ( $board_config['version'] > '.0.5' )
                {
                        $sub_templates_cfg = @[color=red]phpbb_realpath[/color]($this->root . '/sub_templates.cfg');
                }
                else
                {
                        $sub_templates_cfg = $this->root . '/sub_templates.cfg';
                }
                @include($sub_templates_cfg);
                if ( isset($sub_templates) )
                {
請高手幫忙一下,感謝...
架設主機︰Fedora Core 5
上網方式:Hinet ADSL (2M/512K)
安裝程式:Apache + php + MySql
phpBB2 版本: phpBB 2.0.21
phpBB2 連結網址: 小站
赤兔
星球公民
星球公民
文章: 140
註冊時間: 2005-02-08 14:19

文章 赤兔 »

你若有裝 eXtreme Styles mod 就不用改\r
http://phpbb-tw.net/phpbb/viewtopic.php?p=186398#186398
頭像
sh85216s
竹貓忠實會員
竹貓忠實會員
文章: 306
註冊時間: 2003-09-04 20:13
來自: 阿里阿度

文章 sh85216s »

感謝...........................
架設主機︰Fedora Core 5
上網方式:Hinet ADSL (2M/512K)
安裝程式:Apache + php + MySql
phpBB2 版本: phpBB 2.0.21
phpBB2 連結網址: 小站
主題已鎖定

回到「phpBB 2 安裝與使用」