DynamicPageList2

From Meta, a Wikimedia project coordination wiki
This is an archived version of this page, as edited by 198.140.240.10 (talk) at 18:02, 17 January 2006 (→‎Source). It may differ significantly from the current version.

DynamicPageList2 is a Mediawiki 1.5 (!) extension developed for use on Wikinews, but it can be installed on any wiki. It allows wiki users to dynamically create lists of pages that are listed in a set of categories or namespaces using logical AND and OR.

This is a hack of the original DynamicPageList extension from DynamicPageList featuring many Improvements (see below). Note that it's called DynamicPageList2 for distinction of DynamicPageList. You can use both extensions at the same time, because the new tag is DPL instead of DynamicPageList.

Source

Getting a 404 forthis link, anyone got another link? For me works fine. Ditto for me -S.

http://xover.htu.tuwien.ac.at/~fabian/DynamicPageList2.php.txt

To install it, put the file in your extensions/ directory, and add include("extensions/intersection/DynamicPageList2.php"); to your LocalSettings.php file.

If you are using this extension on a Windows box, make sure to give Read & Execute rights to the user IUSR_MACHINENAME (Anonymous Internet Guest Account) for the extensions directory.

Author

Unendlich (EMail: fabian AT xover.htu.tuwien.ac.at). Bugsreports please per Mail.

...Improvements und Changes

Hack v0.3

New features:

  • Possibility to use "inline" as Outputmode, this creates lists like "Item1 - Item2 - Item3".

Changes:

  • No need for the DPL2UncachedPages Article anymore. Every article using DPL will unset it's cache automatically.

Hack v0.2.1

Bugfixes:

  • Fixed a typo in the code which resulted in wrong queries in some configurations

Hack v0.2

New features:

  • Possibility to use "old" DynamicPageList and DynamicPageList2 at the same time. The tag ist called DPL now

Changes:

  • The tag you must use is <DPL> now
  • The category/namespace separator is '|' now instead of ','.
  • Page for uncached Sites ist DPL2UncachedPages now.

Hack v0.1

New features:

  • combine categories using logical OR and AND:
    category=1st,2nd,3rd
    category=4th,5th
means Articles have to be in (1st OR 2nd OR 3rd category) AND (4th OR 5th category)
  • selecting several namespaces using namespace=1st,2nd,3rd... the result will have to be in namespace 1st OR namespace 2nd ...
  • select articles just by namespace without using any categories
  • sort by pagetitle (ordermethod=title)
  • always invalidate cache on certain specified pages (kind of dirty hack, details: http://bugzilla.wikimedia.org/show_bug.cgi?id=2282)
  • output result categorypage-style (mode=category)
  • removed a bug which made ordermethod=lastedit showing wrong results
  • more logical, structured, beautiful and even smaller code :-)

Changes:

  • removed the option $wgDLPMinResultCount in the code, because it made no sense to me. I don't understand how somebody should use an option 'MinResultCount' (you can delimit many results, but you can't increase results...)
  • suppresserrors=true now only suppresses errors about no results, every other error will be shown
  • If you don't use categories or use more than one category and use the options 'addfirstcategorydate=true' or 'ordermethod=categoryadd' an error message appears.

Note that there could still be bugs in there, though it works perfectly for me at the moment. I would be glad to receive comments or bugreports!

Using DynamicPageList 2

I put this in an other Page: UsingDynamicPageList2