Home  >  Article  >  CMS Tutorial  >  Modify the default title length of dedecms

Modify the default title length of dedecms

(*-*)浩
(*-*)浩Original
2019-12-17 14:53:341697browse

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 )

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!

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