名站网址导航为大驾家提供DedeCMS站点程序站点教程相关的知识,比如织梦程序安装教程,织梦程序系统故障等教程。在站点中图片有alt无论是对站点还是对各大搜索引擎都是有好处的,之前给也大驾家介绍过,但是想要alt自动具体调用文章文章标题还要再做调整。
找到 Include/ arc.archives.class.php
$this->Fields['typename'] = $this->TypeLink->TypeInfos['typename']; @SetSysEnv($this->Fields['typeid'],$this->Fields['typename'],$this->Fields['id'],$this->Fields['title'],'archives');
后面加上如下相关具体代码如下:
//替换文章BODY Alt为文档文章标题
$this->Fields['body'] = str_ireplace(array('alt=""','alt=\'\''),'',$this->Fields['body']);
$this->Fields['body'] = preg_replace("@ [\s]{0,}alt[\s]{0,}=[\"'\s]{0,}[\s\S]{0,}[\"'\s] @isU"," ",$this->Fields['body']);
$this->Fields['body'] = str_ireplace("<img " ,"<img alt=\"".$this->Fields['title']."\" ",$this->Fields['body']);
关于DedeCMS站点程序站点教程相关的知识,就说到这里了希望能帮助朋友们。dedecms网站程序织梦程序做中英文(多语言)站点步骤