花魁直播高品质美女在线视频互动社区 - 花魁直播官方版

 歡迎來(lái)到素材無(wú)憂網(wǎng),按 + 收藏我們
登錄 注冊(cè) 退出 找回密碼

pbootcms建站中英文站搜索結(jié)果頁(yè)標(biāo)題面包屑是中文怎么修改

時(shí)間: 2024-02-25 10:02 閱讀: 作者:素材無(wú)憂網(wǎng)

在使用pbootcms搭建英文站時(shí)會(huì)發(fā)現(xiàn)搜索結(jié)果頁(yè)的面包屑為中文,標(biāo)題為英文,該如何處理?可二次開(kāi)發(fā)來(lái)增加英文站對(duì)應(yīng)文字來(lái)解決。
修改方法
parser = new ParserController();
        $this->htmldir = $this->config('tpl_html_dir') ? $this->config('tpl_html_dir') . '/' : '';
    }
    // 內(nèi)容搜索@mk-lang 增加英語(yǔ)
    public function index()
    {
        if (cookie('lg') == 'cn') {
            $searchtpl = request('searchtpl');
            if (! preg_match('/^[w]+.html$/', $searchtpl)) {
                $searchtpl = 'search.html';
            }            
            $content = parent::parser($this->htmldir . $searchtpl); // 框架標(biāo)簽解析
            $content = $this->parser->parserBefore($content); // CMS公共標(biāo)簽前置解析
            $pagetitle = get('keyword') ? get('keyword') . '-' : '';
            $content = str_replace('{pboot:pagetitle}', $this->config('search_title') ?: $pagetitle . '搜索結(jié)果-{pboot:sitetitle}-{pboot:sitesubtitle}', $content);
            $content = $this->parser->parserPositionLabel($content, 0, '搜索', homeurl('search')); // CMS當(dāng)前位置標(biāo)簽解析
            $content = $this->parser->parserSpecialPageSortLabel($content, - 1, '搜索結(jié)果', homeurl('search')); // 解析分類標(biāo)簽
            $content = $this->parser->parserSearchLabel($content); // 搜索結(jié)果標(biāo)簽
            $content = $this->parser->parserAfter($content); // CMS公共標(biāo)簽后置解析
            echo $content; // 搜索頁(yè)面不緩存
            exit();
        } else {
            $searchtpl = request('searchtpl');
            if (! preg_match('/^[w]+.html$/', $searchtpl)) {
                $searchtpl = 'search.html';
            }           
            $content = parent::parser($this->htmldir . $searchtpl); // 框架標(biāo)簽解析
            $content = $this->parser->parserBefore($content); // CMS公共標(biāo)簽前置解析
            $pagetitle = get('keyword') ? get('keyword') . '-' : '';
            $content = str_replace('{pboot:pagetitle}', $this->config('search_title') ?: $pagetitle . 'The search results-{pboot:sitetitle}-{pboot:sitesubtitle}', $content);
            $content = $this->parser->parserPositionLabel($content, 0, 'Search', homeurl('search')); // CMS當(dāng)前位置標(biāo)簽解析
            $content = $this->parser->parserSpecialPageSortLabel($content, - 1, 'The search results', homeurl('search')); // 解析分類標(biāo)簽
            $content = $this->parser->parserSearchLabel($content); // 搜索結(jié)果標(biāo)簽
            $content = $this->parser->parserAfter($content); // CMS公共標(biāo)簽后置解析
            echo $content; // 搜索頁(yè)面不緩存
            exit();
        }
    }
}
pb3.0.3版本替換
parser = new ParserController();
        $this->htmldir = $this->config('tpl_html_dir') ? $this->config('tpl_html_dir') . '/' : '';
    }
    // 內(nèi)容搜索
    public function index()
    {
        if (cookie('lg') == 'cn') {
            $searchtpl = request('searchtpl');
            if (! preg_match('/^[w]+.html$/', $searchtpl)) {
                $searchtpl = 'search.html';
            }            
            $content = parent::parser($this->htmldir . $searchtpl); // 框架標(biāo)簽解析
            $content = $this->parser->parserBefore($content); // CMS公共標(biāo)簽前置解析
            $pagetitle = get('keyword') ? get('keyword') . '-' : '';
            $content = str_replace('{pboot:pagetitle}', $this->config('search_title') ?: $pagetitle . '搜索結(jié)果-{pboot:sitetitle}-{pboot:sitesubtitle}', $content);
            $content = $this->parser->parserPositionLabel($content, 0, '搜索', Url::home('search')); // CMS當(dāng)前位置標(biāo)簽解析
            $content = $this->parser->parserSpecialPageSortLabel($content, - 1, '搜索結(jié)果', Url::home('search')); // 解析分類標(biāo)簽
            $content = $this->parser->parserSearchLabel($content); // 搜索結(jié)果標(biāo)簽
            $content = $this->parser->parserAfter($content); // CMS公共標(biāo)簽后置解析
            echo $content; // 搜索頁(yè)面不緩存
            exit();
        } else {
            $searchtpl = request('searchtpl');
            if (! preg_match('/^[w]+.html$/', $searchtpl)) {
                $searchtpl = 'search.html';
            }            
            $content = parent::parser($this->htmldir . $searchtpl); // 框架標(biāo)簽解析
            $content = $this->parser->parserBefore($content); // CMS公共標(biāo)簽前置解析
            $pagetitle = get('keyword') ? get('keyword') . '-' : '';
            $content = str_replace('{pboot:pagetitle}', $this->config('search_title') ?: $pagetitle . 'The search results-{pboot:sitetitle}-{pboot:sitesubtitle}', $content);
            $content = $this->parser->parserPositionLabel($content, 0, 'Search', Url::home('search')); // CMS當(dāng)前位置標(biāo)簽解析
            $content = $this->parser->parserSpecialPageSortLabel($content, - 1, 'The search results', Url::home('search')); // 解析分類標(biāo)簽
            $content = $this->parser->parserSearchLabel($content); // 搜索結(jié)果標(biāo)簽
            $content = $this->parser->parserAfter($content); // CMS公共標(biāo)簽后置解析
            echo $content; // 搜索頁(yè)面不緩存
            exit();
        }
    }
}

版權(quán)聲明: 本站資源均來(lái)自互聯(lián)網(wǎng)或會(huì)員發(fā)布,如果侵犯了您的權(quán)益請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)刪除!謝謝!

轉(zhuǎn)載請(qǐng)注明: pbootcms建站中英文站搜索結(jié)果頁(yè)標(biāo)題面包屑是中文怎么修改

標(biāo)簽: pbootcms建站  
相關(guān)文章
推薦文章
模板推薦