WordPress 中文文档

Dynamic Article List

From WordPress Chinese

Jump to: navigation, search


对应中文条目:MediaWiki扩展:动态文章列表



目录

Introduction

DynamicArticleList is a Mediawiki 1.5 extension. It is designed to provide add-on sort ability among all posted articles. Now four types of Dynamic Article List have been implemented.


  • Newly Posted Articles
  • Recently Updated Articles
  • Recent Discussions
  • Most Popular Articles


User could easily find the latest or most popular topics cross site with the help of Dynamic Article List.



This extension is written with the help from Dynamic Page List.


Prerequisite

  • PHP 5 or above is needed.
  • Dynamic Article List strongly depends on "recentchanges" table, however Mediawiki engine 1.5.0 preiodically flushes old entries from the "recentchanges" table. It's recommended to disable the auto-deletion feature. - Open Article.php in "includes" folder, comment the line "$dbw->query( $sql )" at the start of function "editUpdates".

Installation

  • Copy the contents in pdf out, and create corresponding php source files.
  • What do you mean by pdf out? Is this a piece of freeware I haven't heard of before? (To convert the files I had to use Gmail and send the pdf's to myself. I then viewed them in html and saved them. I had five minutes of formatting issues afterwards; but the extension worked perfectly.) :ChrisG 03:07, 6 January 2006 (UTC)
  • I believe the author intended for one to open the pdf's in your pdf reader of choice (Acrobat, XPdf, etc.) and select all the text, use the clipboard to copy it, and paste it into a new php file. Your method worked too, of course. (*; Jcobbers 14:46, 8 February 2006 (UTC)
  • Copy DynamicArticleList.php to "extensions" folder.
  • Copy CategoryTravelerBase.php , CategoryNode.php , CategoryUtil.php to "includes" folder.
  • Add a line require_once( "extensions/DynamicArticleList.php" ); into "LocalSettings.php".

Usage

Tag and its Parameters

Tag Name DynamicArticleList
Parameters title (optional) Title of the output article list
type (optional) Type of dynamic article list (new/update/discussion/hot)
count (optional) Output count of articles
categoryRoot (optional) Name of category where (including its children) all articles reside


Note:


  • If "categoryRoot" is set, Dynamic Article List will only retrieve articles in this category and its children. If not, all articles will be candidates.
  • The value of parameter "type" could be one of the following (default is new ):
  • new => Newly Posted Articles
  • update => Recently Updated Articles
  • discussion => Recent Discussions
  • hot => Most Popular Articles
  • The default value of "count" is 5 .

Samples

A sample snapshot of Dynamic Article List is shown below.



Image:Sample Dynamic Article List 1.pn



When "type" is set to new ,

The output record format would be Page Title (author) - [create time]

When "type" is set to update or discussion ,

The output record format would be Page Title (last editor) - [update time]



The underlaying wiki codes are:




<DynamicArticleList>

 title=Newly Posted Articles
 type=new
 count=512412412412

</DynamicArticleList>

</pre>



Another sample snapshot of Dynamic Article List is shown below.



Image:Sample Dynamic Article List 2.pn



When "type" is set to hot ,

The output record format would be Page Title - (accessed times)



The underlaying wiki codes are:




<DynamicArticleList>

 title=Most Popular Articles
 type=hot
 count=5

</DynamicArticleList>

</pre>


对应中文条目:MediaWiki扩展:动态文章列表



原文网址:[" rel="nofollow|http://meta.wikimedia.org/wiki/Dynamic_Article_List]

用户