Last update at :2024-03-15,Edit by888u
As a website editor, I often need to modify article titles, so how can I quickly modify them in Empire CMS? It's a good idea to modify the title of messages in bulk. The following introduces the method of implementing batch modification of information titles in Imperial CMS.
The following modification method can be used for both the e/data/html/list/alllistinfo.php file and the e/data/html/list/listinfo.php file, or a customized system model list file.
The first step is to find $ignamer=$ftnr[‘igr’]; and insert the following code in the next line
function dp_editmoreinfotitle($add,$userid,$username){ global $empire,$dbtbpre,$class_r; $classid=(int)$add['classid']; $infoid=$add['infoid']; $n1=$add['title']; $count=count($infoid); $tbname=$class_r[$classid]['tbname']; if(!$classid||!$tbname||!$count) { printerror("Please select the information that needs to be modified",'history.go(-1)',1,0,1); } //Operation permissions $doselfinfo=CheckLevel($userid,$username,$classid,"news"); if(!$doselfinfo['doeditinfo'])//Edit permissions { printerror("Insufficient permissions",'history.go(-1)',1,0,1); } $dopubid=0; $donum=0; $dolog=''; //Primary table $infotb=''; for($i=0;$i<$count;$i++) { $doinfoid=(int)$infoid[$i]; if(empty($infotb)) { //direction chart $index_r=$empire->fetch1("select classid,checked from {$dbtbpre}ecms_".$tbname."_index where id='$doinfoid' limit 1"); if(!$index_r['classid']) { continue; } //return table $infotb=ReturnInfoMainTbname($tbname,$index_r['checked']); } $do1=$n1[$i]; $empire->query("update ".$infotb." set title='$do1' where id='$doinfoid'"); } printerror("Modification successful",$_SERVER['HTTP_REFERER'],1,0,1); } $enews=$_POST['enews']; if($enews=="EditMoreInfoTitle"){ hCheckEcmsRHash(); dp_editmoreinfotitle($_POST,$logininid,$loginin); }The second step is to search for =$r[title]?> After finding it, do the following
Delete =$r[title]?> and and in the previous and next lines (delete 3 lines in total) and replace them with the code:
The third step is to find insert a line above it and enter the code:
Supplementary instructions
1. After the modification is completed, the style may not be liked by everyone, so you can modify the style according to your own preferences.
2. Please back up the e/data/html/list folder when backing up your website.
3. It can be expanded to batch modify authors, sources, pictures, tags, keywords, etc.
More examples of batch modification
1. Modify member information in batches
2. Modify tag attributes in batches
3. Batch modify information titles and file names
Recommended site searches: overseas hosts, free IP addresses in mainland China, Taiwan hosts, Hong Kong vps hosts, domain name registration query free space, US and European cloud servers, query whether domain names are registered, corporate email, US PHP hosts,
发表评论