
針對程序版本:V1.7.5
第一處:320行左右,首頁TDK修改。
// TDK無話調(diào)用參數(shù)TDK,所以修改如下,2024年7月27修改
if($this->cityinfo){
$siteinfo = unserialize($this->cityinfo->site);
if(!$siteinfo['title']) {
$content = str_replace('{pboot:pagetitle}', $this->config('city_index_title'), $content); //siteinfo['title']為空的時候使用分站參數(shù)設(shè)置
$content = str_replace('{pboot:pagekeywords}', $this->config('city_index_keywords'), $content); //siteinfo['title']為空的時候使用分站參數(shù)設(shè)置
$content = str_replace('{pboot:pagedescription}', $this->config('city_index_description'), $content); //siteinfo['title']為空的時候使用分站參數(shù)設(shè)置
}else{
$content = str_replace('{pboot:pagetitle}', $siteinfo['title'], $content); //siteinfo['title']不為空的時候使用本城市的設(shè)置
$content = str_replace('{pboot:pagekeywords}', $siteinfo['keywords'], $content); //siteinfo['title']不為空的時候使用自己本城市的設(shè)置
$content = str_replace('{pboot:pagedescription}', $siteinfo['description'], $content); //siteinfo['title']不為空的時候使用自己本城市的設(shè)置
}
}else{
$content = str_replace('{pboot:pagetitle}', $this->config('index_title') ?: '{pboot:sitetitle}-{pboot:sitesubtitle}', $content); //非城市分站的時候使用全局
};第二處:360行,列表頁TDK修改。需要注意配置參數(shù)中的設(shè)置是否調(diào)用了固定的
// TDK無話調(diào)用參數(shù)TDK,所以修改如下,2024年7月27修改
if($this->cityinfo){
$siteinfo = unserialize($this->cityinfo->site);
if(!$siteinfo['title']) {
$content = str_replace('{pboot:pagetitle}', $this->config('list_title') ?: ($pagetitle . '_' . $this->config('city_title')), $content);//非城市分站的時候使用全局
$content = str_replace('{pboot:pagekeywords}', $this->config('city_keywords'), $content);
$content = str_replace('{pboot:pagedescription}',$this->config('city_description'), $content);
}else{
$content = str_replace('{pboot:pagetitle}', $this->config('list_title') ?: ($pagetitle . '_' . $siteinfo['title']), $content);//非城市分站的時候使用全局
$content = str_replace('{pboot:pagekeywords}', $siteinfo['keywords'], $content);
$content = str_replace('{pboot:pagedescription}', $siteinfo['description'], $content);
}
}else{
$content = str_replace('{pboot:pagetitle}', $this->config('list_title') ?: ($pagetitle . '_{pboot:sitetitle}-{pboot:sitesubtitle}'), $content);//非城市分站的時候使用全局
$content = str_replace('{pboot:pagekeywords}', '{sort:keywords}', $content);
$content = str_replace('{pboot:pagedescription}', '{sort:description}', $content);
};第三處:414行左右。詳情頁的KEYWORDS修改。
// TDK無話調(diào)用參數(shù)TDK,所以修改如下,2024年7月27修改
if($this->cityinfo){
$siteinfo = unserialize($this->cityinfo->site);
if(!$siteinfo['title']) {
$content = str_replace('{pboot:pagekeywords}', $this->config('city_index_keywords'), $content);
}else{
$content = str_replace('{pboot:pagekeywords}', $siteinfo['keywords'], $content);
}
}else{
$content = str_replace('{pboot:pagekeywords}', '{content:keywords}', $content);
};第四處:單頁也需要設(shè)置一下keywords修改,和詳情頁一樣。標(biāo)題的顯示需要注意配置參數(shù)中的設(shè)置是否調(diào)用了固定的
// TDK無話調(diào)用參數(shù)TDK,所以修改如下,2024年7月27修改
if($this->cityinfo){
$siteinfo = unserialize($this->cityinfo->site);
if(!$siteinfo['title']) {
$content = str_replace('{pboot:pagekeywords}', $this->config('city_index_keywords'), $content);
}else{
$content = str_replace('{pboot:pagekeywords}', $siteinfo['keywords'], $content);
}
}else{
$content = str_replace('{pboot:pagekeywords}', '{content:keywords}', $content);
};