网页特效代码_站长素材站移动版

DeDecms教程

主页 > CMS教程 > DeDecms教程 >

织梦DeDeCms5.6图集中图片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 $this->Fields['imgurls'] = str_ireplace("<img " ,  
"<img $this->Fields['introduce'] = str_ireplace("<img " ,  
"<img 			

演示:

织梦DeDeCms5.6图集中图片ALT自动提取标题的修改方法  

(责任编辑:admin)

    468x60