When Zhimeng DedeCMS publishes documents, some upload pictures, some do not have pictures, and the documents without pictures are replaced with Baidu/Google advertising pictures to make the article page display more consistent and beautiful.
The method is as follows:
Open the article template file: article_article.htm
Find the article content tag:
<table width='100%'>
<tr>
<td>{dede: field. body/} (responsible editor: {dede: adminname/})</td>
</tr>
</table>
Label the original article content: {dede: field. body/}
Replace with:
{dede:field name='body' runphp='yes'}
if(strpos(@me,'img')) @me=@me;
Else @ me='<div style="float: right;">Google ads are placed here</div>'@ me;
Statement: All articles on this site, unless otherwise specified or marked, are originally published on this site. No individual or organization is allowed to copy, embezzle, collect and publish the content of this website to any website, book and other media platforms without the consent of this website. If the content of this website infringes upon the legitimate rights and interests of the original author, please contact us for handling.