导读:织梦文章织梦文章织梦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自动提取标题的修改方主要讲述标题,图集,织梦网站建设源码以及服务器配置搭建相关技术文章。转载请保留链接: https://www.seouc.com/article/web_32680.html