WeavingHow does Meng realize that the ALT attribute of the picture is automatically changed to the title?
DreamWeaver DEDECMS realizes that the ALT attribute of the picture is automatically changed into the title
Recommended learning: Dreamweaver cms
The first step, \include \taglib\channel\img.lib.php file, around line 77, add
$dsql= new DedeSql(false);//建立新连接 $rs = $dsql->GetOne("Select title from cmsxx_archives where"); //打开数据库 $title=$rs["title"]; //找到标题值
around line 107
Add a sentence
$fields['title'] = str_replace("'",'',$title);
I say around because it is It can be placed anywhere in similar sentences.
The second step is to replace
alt='[field:alttext /]'
in article_image.htm with:
alt='[field:title /]'
The third step is to generate and get it done
The above is the detailed content of How does Dreamweaver realize that the ALT attribute of the picture is automatically changed into the title?. For more information, please follow other related articles on the PHP Chinese website!