Extension:Dynamic Article List

From MediaWiki.org

Jump to: navigation, search
Manual on MediaWiki Extensions
List of MediaWiki Extensions
Dynamic Article List

Release status: unknown

Implementation Tag
Description 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.
  1. Newly Posted Articles
  2. Recently Updated Articles
  3. Recent Discussions
  4. Most Popular Articles

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

Author(s) Zengji
Download no link

Contents

[edit] 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.

  1. Newly Posted Articles
  2. Recently Updated Articles
  3. Recent Discussions
  4. 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.

[edit] Working

I got it working on 1.9.2 and 1.11.0 (User:Dynasource) with only the DynamicArticleList.php

Did you have to edit the php files to get this working? I see an error message when trying to implement in 1.11.0--86.130.11.27 20:23, 15 October 2007 (UTC)

[edit] 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".

[edit] Installation

  • Follow the links below to download source code.
  • 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)
    • Or right-click -> "save target" and save the files as .php (Anonymous - 08:53, 26 July 2007 (UTC))
    • Yes, just rename them, it works.
  • 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", found in your root wiki directory.

[edit] Usage

[edit] 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 .

[edit] Samples

A sample snapshot of Dynamic Article List is shown below.

Image:Sample Dynamic Article List 1.png

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 underlying wiki codes are:


<DynamicArticleList>
  title=Newly Posted Articles
  type=new
  count=512412412412
</DynamicArticleList>


Another sample snapshot of Dynamic Article List is shown below.

Image:Sample Dynamic Article List 2.png

When "type" is set to hot ,
The output record format would be Page Title - (accessed times)

The underlying wiki codes are:


<DynamicArticleList>
  title=Most Popular Articles
  type=hot
  count=5
</DynamicArticleList>

Personal tools