Difference between revisions of "DPL:Catlist"
Line 29: | Line 29: | ||
The output equals {{Catlist|category=something}} but it appears as a special page | The output equals {{Catlist|category=something}} but it appears as a special page | ||
− | [http://myhost/mywiki/index.php | + | [http://myhost/mywiki/index.php?title=Special:Call/Catlist,category=something some text] |
This can be used within another wiki or from the command line and it | This can be used within another wiki or from the command line and it | ||
shows how the comma separators alos work within an URL. | shows how the comma separators alos work within an URL. | ||
Line 40: | Line 40: | ||
* [[:Special:Call/Catlist,name=Five random articles ..,namespace=main,randomcount=5|Five random articles in the main namespace ..]] | * [[:Special:Call/Catlist,name=Five random articles ..,namespace=main,randomcount=5|Five random articles in the main namespace ..]] | ||
* Gero: [[Special:Call/Catlist,name=The latest 10 edits of user Gero,modifiedby=Gero,count=10,ordermethod=lastedit,order=descending,addeditdate=true|latest 10 edits]] | * Gero: [[Special:Call/Catlist,name=The latest 10 edits of user Gero,modifiedby=Gero,count=10,ordermethod=lastedit,order=descending,addeditdate=true|latest 10 edits]] | ||
+ | * a remote call to this wiki:[http://semeb.com/dpldemo/index.php?title=Special:Call/Catlist,category=Belgium looking for articles in category 'Belgium'] |
Revision as of 10:50, 26 July 2007
This page will only run if you use the latest (1.2.8) DPL version. You also need the 'Call extension' (contained in the download) and 'SimpleForms'.
This is an effort to bring the power of DPL to the average user who is probably not willing to write complex scripts.
It is based on mw:Extension:Simple_Forms as was suggested by User:Nad. At the moment the layout doesn´t look very nice -- mainly because SimpleForms has trouble with table formatting. It doesn´t seem to be possible to use table layout within the #form extension body ..
Anyway, the good message is: The GUI is NOT hardcoded within php but it is contained in a 'normal' wiki article (Template:Catlist). So it is open for your improvements. Therefore the current DPL special page will die sooner or later.
Template Catlist contains a completely parameterized DPL query and a form definition with an action which again calls the very same template. To make this possible, a nice little tricky extension called Call extension was added. This extension allows to call a mediawiki article and pass parameters via the command line. The called page appears as a special page and has the name of the called template.
With Call you can invoke a mediawiki article and pass parameters to the article ..
- via the URL by using the classical notation with ampercent separators
- via wiki link notation by using a comma separated list of arguments
For example you can write something like
[[Special:Call/Catlist|some text]] This 'calls' Template:Catlist note the difference to {{Catlist}} which would include the template The called template page appears as a special page to the user, but normally he will not notice this as we implicitly change the page title of that special page to the template´s name. [[Special:Call/Catlist,category=something|some text]] This 'calls' Template:Catlist with parameter 'category' set to 'something' The output equals {{Catlist|category=something}} but it appears as a special page [http://myhost/mywiki/index.php?title=Special:Call/Catlist,category=something some text] This can be used within another wiki or from the command line and it shows how the comma separators alos work within an URL. From the browsers command line you can use also http://myhost/mywiki/index.php/Special:Call/Catlist&category=something
Try the following links:
- Five random articles in the main namespace ..
- Gero: latest 10 edits
- a remote call to this wiki:looking for articles in category 'Belgium'