In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Dream weaving dedecms to achieve alphabet index search function? This problem may be often seen in our daily study or work. I hope you can gain a lot from this question. The following is the reference content that the editor brings to you, let's take a look at it!
DEDE system with "alphabetical index" function
The implementation method is as follows
The first step: first, we must modify the database structure and add the fields that store Pinyin.
Modify the dede_ Archives table to add pytitle,varchar (250). Null is allowed. The following is the SQL for creating the table, which is for reference only. The red part is the new part, which can be directly modified by phpmyadmin.
CREATE TABLE `dede_ archives` (`ID`int (11) unsigned NOT NULL auto_increment, `typeid` int (11) unsigned NOT NULL default '0stories, `typeid2` int (11) unsigned NOT NULL default' 0blocks, `sortrank` int (11) NOT NULL default '0questions, `iscommend` smallint (6) NOT NULL default' 0blocks, `ismake`smallint (6) NOT NULL default '0questions, `channel`int (11) NOT NULL default' 1levels, `arcrank` smallint (6) NOT NULL default '0blocks, `click` int (11) unsigned NOT NULL default' 0cycles, `money` smallint (6) NOT NULL default'0' `title` varchar (80) NOT NULL default ", `colortitle` varchar (36) NOT NULL default", `color` varchar (10) NOT NULL default ", `writer`varchar (30) NOT NULL default", `source`varchar (50) NOT NULL default ", `litpic` varchar (100) NOT NULL default", `pubdate`int (11) NOT NULL default '0mm, `senddate`int (11) NOT NULL default' 0mm, `arcatt` smallint (6) NOT NULL default '0mm, `adminID` int (11) NOT NULL default' 0mm, `memberID `int (11) unsigned NOT NULL default '0mm, `membertion` varchar (250) NOT NULL default " `keywords` varchar (60) NOT NULL default ", `templet` varchar (60) NOT NULL default", `lastpost` int (11) NOT NULL default '0mm, `postnum` int (11) NOT NULL default' 0mm, `redirecturl` varchar (150) NOT NULL default ", `mtype`int (11) NOT NULL default '0mm, `userip` varchar (20) NOT NULL default", `locklike id` smallint (6) NOT NULL default' 0mm, `likeid` varchar (240,240) default ", `pytitle`varchar (250,250) default NULL,PRIMARY KEY (`ID`), KEY `click` (`click`), KEY `senddate` (`sdateend`), KEY `typeid` (`typeid`) KEY `arcrank` (`arcrank`), KEY `sortrank` (`sortrank`), KEY `pubdate` (`pubdate`), KEY `litpic` (`litpic`), KEY `typeid2` (`typeid2`) ENGINE=MyISAM DEFAULT CHARSET=gbk
Step 2: get the pinyin initials of the article title and save it to the database.
The files that need to be modified are:
Article_add.php 、 article_add_action.php 、 article_edit.php 、 article_eidt_action.php
There are four files controlled by adding articles and modifying articles respectively.
Modify the article_add.php to:
Save Pinyin in bold
Add an option to save pinyin.
Modify the article_edit.php to:
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.