There are only 8 custom attributes for the article content of Zhimeng Dedecms by default. What can we do if we don't use them enough when making website calls? We need to add some flag attributes in the database to make separate calls.
1. Add custom attribute:
System ->SQL command line tool ->
Insert into ` dede_arcatt ` (sortid, att, attname) values (9,'d ',' channel slide ');
alter table `dede_archives` modify `flag` set ('c','h','p','f','s','j','a','b','d') default NULL;
Meaning: growth of "homepage header [x]" is personality
Note:
Line 1 of the code: values (9,'d ',' channel slide (new custom attribute) ') are self defined according to our needs, where 9 is the value of sortid, which is non repeatable, that is, every time a custom attribute is added, the value of sortid should be increased to 10,11,12..., and so on! D is the value of alt and the mark of custom attribute. It cannot be repeated with the existing mark symbol. The "channel slide" is a Chinese name, which is convenient for people to intuitively curb the meaning of custom attribute. It can be changed to "network", "news headlines", etc. as needed.
Line 2 of the code: set ('c ',' h ',' p ',' f ','s',' j ',' a ',' b ','d'). The letters in the brackets correspond to the existing marking symbols and the marking symbols to be added, and are entered in order. The order cannot be changed. For example, the 9th digit of d corresponds to the custom attribute "comment d" added in the first line of code.
2. To modify a custom attribute:
UPDATE `dede_arcatt` SET `attname` = '123' WHERE CONVERT( `dede_arcatt`.`att` USING utf8 ) = 's' LIMIT 1 ;
Meaning: change "scroll [s]" to "123"
3. To delete a custom attribute:
DELETE FROM ` dede_arcatt`WHERE CONVERT(dede_arcatt`,`att`USING utf8)+`x`LIMIT 1
Meaning: delete "homepage header [x]" as a personality
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.