Dede automatically reviews the modification of the latest articles published by Members

Source: Internet
Author: User

Introduction: this is the latest release of Dede's automatic review of members.ArticleDetailed page of the modification method, describes the related knowledge, skills, experience, and some PHP source code.

Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 342964 'rolling = 'no'>

Dede automatically reviews the modification of the latest articles published by Members-published on: Dede technology-Dede tutorial

Some time ago I sent an article "Let Dede update articles randomly", which can hold some articles and update the homepage. however, documents that have not been reviewed cannot be automatically published. I analyzed whether Dede's article has been reviewed and released, which is mainly determined by the value of the arcrank parameter. therefore, it is easy to automatically review and publish Dede articles. dede Technology

<? PHP
// Automatically generate the HTML Version
If (isset ($ _ Get ['pub'])
{
Require_once (dirname (_ file _). "/include/common. Inc. php ");
Require_once dedeinc. "/arc. partview. Class. php ";
// Release the review manuscript
Require_once (dedeinc. "/arc. Archives. Class. php ");
For ($ I = 1; $ I <= 1; $ I ++ ){
$ ROW = $ dsql-> getone ("select * From 'dede _ arctiny 'Where arcrank =-1 order by ID limit 1 ″);
$ Id = $ row ['id'];
$ IQUERY = "Update 'dede _ arctiny 'set arcrank = 0 where id =' $ id '";
$ Dsql-> executenonequery ($ IQUERY );
$ Iquery2 = "Update 'dede _ archives 'set arcrank = 0, ismake = 1 where id =' $ id '";
$ Dsql-> executenonequery ($ iquery2 );
$ Dsql-> executenonequery ("Update 'dede _ taglist' set 'arcrank '= 0 where aid =' $ id '");
$ AC = new archives ($ id );
$ Rurl = $ ac-> makehtml ();
}
// Update the homepage
$ Globals ['_ arclistenv'] = 'index ';
$ ROW = $ dsql-> getone ("select * From 'dede _ homepageset '");
$ Row ['templet'] = mftemplet ($ row ['templet']);
$ Pv = new partview ();
$ PV-> settemplet ($ pai_basedir. $ pai_templets_dir. "/". $ row ['templet']);
$ PV-> savetohtml (dirname (_ file _). '/index.html ');
Include (dirname (_ file _). '/index.html ');
Exit ();
}
Else
{
Header ('HTTP/1.1 301 moved permanently ');
Header ('location: index.html ');
}
?>

The aboveCodeUpdate the arcrank value. no published article arcrank =-1. the published article arcrank = 0. therefore, the self-audit document is to find the article whose arcrank is-1 and change the arcrank attribute of the article to 0.

Find the file:

$ ROW = $ dsql-> getone ("select * From 'dede _ arctiny 'Where arcrank =-1 order by ID limit 1 ″);

Change attributes:

$ Iquery2 = "Update 'dede _ archives 'set arcrank = 0, ismake = 1 where id =' $ id '";
$ Dsql-> executenonequery ($ iquery2 );

Update related tables: Dede tutorial

$ Dsql-> executenonequery ($ iquery2 );
$ Dsql-> executenonequery ("Update 'dede _ taglist' set 'arcrank '= 0 where aid =' $ id '");

The above changes are often made and the page is regenerated. the system will automatically review "unreviewed manuscripts ". all are automated. of course, you can also set a column to limit the scope of automatic review, which depends on the specific requirements.

Post information: Dede technology bar | classification: Dede tutorial | Address: http://598080707.net/1/37.html

Love J2EE follow Java Michael Jackson video station JSON online tools

Http://biancheng.dnbcw.info/php/342964.html pageno: 6.

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: info-contact@alibabacloud.com 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.