Home  >  Article  >  CMS Tutorial  >  How does Dreamweaver realize that the ALT attribute of the picture is automatically changed into the title?

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

藏色散人
藏色散人Original
2020-01-04 09:42:492454browse

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

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!

Statement:
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