How to automatically replace the alt and title attributes of the content image with the information title when adding information to Empire CMS

888u

Last update at :2024-03-13,Edit by888u

Using Empire CMS to build a website, I want to automatically replace the alt and title attributes of the content image with the information title when adding information. How to achieve this? Let’s take a look at how Empire CMS automatically replaces the alt and title attributes of the content image with the information title when adding information.

Here’s how to do it:

1. Put the following code into /e/class/userfun.php (put it before the last?>)

2. In the model, the text field is usually newstext (it can also be other fields). Fill in user_imgalt in the field processing function text box as shown below:

3. When publishing information, you can automatically replace the image alt and title attributes with the information title!

Recommended site searches: godaddy domain name registration, multi-IP site group server, US virtual space, registration query, website registration query, legendary server rental, registration space, Dalian virtual host, how to query domain name registration number, domain name query network, < /p>

How to automatically replace the alt and title attributes of the content image with the information title when adding information to Empire CMS

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码