Home > CMS Tutorial > DEDECMS > body text

Modify the default title length of dedecms

(*-*)浩
Release: 2019-12-17 14:53:34
Original
1726 people have browsed it

Modify the default title length of dedecms

When using dede to call the list title, you will find that the number of words in the title text is not fully displayed. That is because the default title length of dede is 30 characters. In order to display the title completely, Make the following changes! (Recommended learning: 梦Weavercms)

1. Enter the background – system – system settings – basic system parameters – other options – change the document title to the length you want to the maximum extent. The original default is 60 (here changed to 200)

2. Log in to the database and change the title field in the database table dede_archives table. The original default is 60 (here changed to 200).

ALTER TABLE `dede_archives` CHANGE `title` `title` VARCHAR( 200 )
Copy after login

Solve dedecms UTF -8 Ways to display too short number of words in the title of the homepage article

Cause analysis: Because one Chinese character encoded in UTF-8 occupies 3 bytes, and GBK occupies 2 bytes, so the original $ titlelen = AttDef($titlelen,30) is equivalent to taking the largest 30 bytes, so only 11 Chinese characters are displayed at most.

Solution:

Enter the backend of dedecms, go to "Tag Source Code Management" in "Template Management", find arclist.lib.php, and click "Edit" , find the statement "$titlelen = AttDef($titlelen,30);" and change 30 to 60 or a larger value.

Of course you can also find arclist.lib.php in the \include\taglib directory, modify it in the same way, and then transfer it to your space.

The above is the detailed content of Modify the default title length of dedecms. 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!