Dede: channelartlist statement of DEDECMS to exclude the specified typeid (feasible)

Source: Internet
Author: User

First find \ include \ taglib \ channelartlist. lib. php, and back up this file for security reasons. Open channelartlist. lib. php to find $ attlist

$ Attlist = 'typeid | 0, row | 20, cacheid | ';
$ Attlist = 'typeid | 0, row | 20, cacheid |, notypeid | 0'; // A parameter-notypeid to be excluded is added here

Search again:

$ Dsql-> SetQuery ("Select id, typename, typedir, isdefault, ispart, defaultname, namerule2, moresite, siteurl, sitepath from '##__ arctype' where $ tpsql order by sortrank asc limit $ totalnum ");

Add it before it (note that it is added before it ):

// Deny the specified ID if ($ notypeid! = 0) {$ tpsql = $ tpsql. "and not (id in ($ notypeid ))";}

After saving the file, when the template is called again:

{Dede: channelartlist typeid = '7' notypeid = '8 '}

Specifically, the subitem "8" in notypeid = '8 & prime; is effective.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.