Home > CMS Tutorial > DEDECMS > body text

How does Dreamweaver realize that the ALT attribute of the picture is automatically changed into the title?

藏色散人
Release: 2020-01-04 09:42:49
Original
2390 people have browsed it

How does Dreamweaver realize that the ALT attribute of the picture is automatically changed into the title?

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"];  //找到标题值
Copy after login

around line 107

Add a sentence

$fields['title'] = str_replace("'",'',$title);
Copy after login

I say around because it is It can be placed anywhere in similar sentences.

The second step is to replace

alt='[field:alttext /]'
Copy after login

in article_image.htm with:

alt='[field:title /]'
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!