導讀:織夢文章織夢文章織夢5.6的圖集圖片ALT默認是提取注釋的,需要手動添加,比較懶,不想手動添加的,那么請使用下面的方法,就能實現圖集圖片ALT自動提取標題。織夢的模板織夢文章模板。

織夢5.6的圖集圖片ALT默認是提取注釋的,需要手動添加,比較懶,不想手動添加的,那么請使用下面的方法,就能實現圖集圖片ALT自動提取標題。
1、查找文件:include/arc.archives.class.php
2、查找(209位置)
//設置全局環境變量 $this->Fields['typename'] = $this->TypeLink->TypeInfos['typename']; @SetSysEnv($this->Fields['typeid'],$this->Fields['typename'],$this->Fields['id'],$this->Fields['title'],'archives'); } //完成附加表信息讀取 unset($row); 在 @SetSysEnv($this->Fields['typeid'],$this->Fields['typename'],$this->Fields['id'],$this->Fields['title'],'archives');
3、加入下面代碼
//替換圖片描述為標題 $this->Fields['body'] = str_ireplace("<img " , "<img alt='".$this->Fields['title'].",手機壁紙下載(www.plbz.net)",$this->Fie織夢模板下載ld織夢后臺模板s['body']); $this->Fields['imgurls'] = str_ireplace("<img " , "<img alt='".$this->Fields['title'].",手機壁紙下載(www.plbz.net)",$this->Fields['imgurls']); $this->Fields['introduce'] = str_ireplace("<img " , "<img alt='".$this->Fields['title'].",手機壁紙下載(www.plbz.net)",$this->Fields['introduce']);
演示:

手機壁紙:http://www.plbz.net/
相關織夢的模板織夢文章模板。
關鍵詞標簽: 織夢 標題 圖集
聲明: 本文由我的SEOUC技術文章主頁發布于:2023-07-21 ,文章織夢DeDeCms5.6圖集中圖片ALT自動提取標題的修改方主要講述標題,圖集,織夢網站建設源碼以及服務器配置搭建相關技術文章。轉載請保留鏈接: http://www.bifwcx.com/article/web_32680.html