Home > CMS Tutorial > PHPCMS > body text

What should I do if the phpcms recommendation bits cannot be sorted?

藏色散人
Release: 2020-07-14 10:20:45
Original
2195 people have browsed it

The solution to the problem that phpcms cannot be sorted: first find and open the "content/content.php" file; then find the content on line 454 of the text; then change the recommended sorting; and finally save the modified file.

What should I do if the phpcms recommendation bits cannot be sorted?

Solution to phpcms V9 recommendation bits cannot be sorted

/phpcms/modules/content/content.php  454行
/**
  * 排序
  */
public function listorder() {
    if(isset($_GET['dosubmit'])) {
       $catid = intval($_GET['catid']);
       if(!$catid) showmessage(L('missing_part_parameters'));
       $modelid = $this->categorys[$catid]['modelid'];
       $this->db->set_model($modelid);
       foreach($_POST['listorders'] as $id => $listorder) {
          $this->db->update(array('listorder'=>$listorder),array('id'=>$id));
        //更改推荐排序开始--新添加的
        $r = $this->db->get_one(array('id'=>$id));
        if($r['posids']){
          $this->db_config = pc_base::load_config('database');
          $tablepre = $this->db_config['default']['tablepre'];
          $this->db->table_name = $tablepre."position_data";
          $this->db->update(array('listorder'=>$listorder),array('id'=>$id,modelid=>$modelid));
        } 
        //更改推荐排序结束--
       }
       showmessage(L('operation_success'));
    } else {
       showmessage(L('operation_failure'));
    }
}
Copy after login

Recommendation: "phpcms tutorial"

The above is the detailed content of What should I do if the phpcms recommendation bits cannot be sorted?. 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