Difference between revisions of "DPL:Requests for new features"
Line 1: | Line 1: | ||
__TOC__ | __TOC__ | ||
− | ::''Please add requests for new features <font color=red> | + | ::''Please add requests for new features <font color=red> at the beginning</font> of this document. If possible make syntax suggestions and give an example for the desired behaviour!'' |
::''Old requests (which have been resolved) can be found in the [[DPL:Requests for new features Archive]]. | ::''Old requests (which have been resolved) can be found in the [[DPL:Requests for new features Archive]]. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Inverting "includematch" == | == Inverting "includematch" == |
Revision as of 13:55, 20 July 2007
Contents
- 1 Inverting "includematch"
- 2 Add a parameter to SpecialPage to just show the output (without the DPL edit window)
- 3 Invoke SpecialPage with Multiple Parameters
- 4 Be PostgreSQL compliant
- 5 Returning categories only
- 6 Multiple columns with headingmode
- 7 Test against MW 1.10
- 8 rss feed from dpl
- 9 Create a special page for searching pages with DPL
- 10 display Table of Contents for an article
- 11 PostgreSQL
- Please add requests for new features at the beginning of this document. If possible make syntax suggestions and give an example for the desired behaviour!
- Old requests (which have been resolved) can be found in the DPL:Requests for new features Archive.
Inverting "includematch"
Question
It is easy with regex to match pages "which contain some word".(ie. /.*abc.*/s -> page which contain word "abc"). But it become complicated for generating list of "which page which doesn't contain word 'abc'".
Proposal
How about adding new parameter "excludematch". So we can specify like
includematch=/.*abc.*/s excludematch=/.*def.*/s
which should result a list of pages that contain word "abc" but doesn't contain word "def".
Temporary Code
For some one who need quick resolution, I just put some code here: Invertion of includematch. Cause this is a quick fix, rather than adding new parameter (excludematch), it work with special char preffix. For the sample on proposal, used this instead
includematch=/.*abc.*/s,~/.*def.*/s
The character "~" will convert the meaning of includematch to "which doesn't match". (BTW it also include a temporary fix for counter. see "List Counter doesn't work correctly" on DPL:Bug Reports Archive)
Add a parameter to SpecialPage to just show the output (without the DPL edit window)
Request
- The functionality below is great to insert links to the DPL special page, but it lacks an option for "dummy" users that just click on the link and want to see the output, not the DPL edit window.
- A parameter just for the SpecialPage called "showDPLeditbox" would help getting that to work. Here is a fast crack at the functionality, but I am not really a PHP guy:
$edit = 1; $wikitext .= $wgRequest->getText('wikitext1') ? $wgRequest->getText('wikitext1') : str_replace( "&&", "\n", $par ); $wikitext .= "\n".$wgRequest->getText('wikitext2'); $wikitext .= "\n".$wgRequest->getText('wikitext3'); $wikitext .= "\n".$wgRequest->getText('wikitext4'); $wikitext .= "\n".$wgRequest->getText('wikitext5'); $wikitext .= "\n".$wgRequest->getText('wikitext6'); $wikitext .= "\n".$wgRequest->getText('wikitext7'); $cmds = split("\n",$wikitext); $wikitext=''; foreach ($cmds as $cmd) { if ($cmd=="") continue; if (preg_match('/=\?/',$cmd)) continue; if (preg_match('/^debug/',$cmd)) $wikitext= $cmd."\n".$wikitext; if (preg_match('/^noeditbox/',$cmd)) $edit=0; else $wikitext .= $cmd."\n"; } $action = $mytitle->escapeLocalUrl(); if ($wikitext) { $wgOut->addHtml("<table><tr><td>\n"); if ($edit) { $wgOut->addHTML("<form method='post' action=\"{$action}\">" . "<textarea rows=8 name=wikitext1>$wikitext</textarea>" . "<input type='submit' value='" . wfMsg('dpl2_createreport')."' >" ); $wgOut->addHtml(" <a href=../index.php/Special:DynamicPageListSP>reset</a>" . "</form>\n"); }
Reply
A good idea. It will find its way into Release 1.2.2. Gero 00:12, 22 June 2007 (CEST)
Invoke SpecialPage with Multiple Parameters
Request
You might consider integrating the patch I propose in DPL:Manual - DPL Special Page with Parameters.
Reply
Thank you for this good idea! Your proposal will find its way into the next release. Gero 08:31, 26 May 2007 (CEST)
Be PostgreSQL compliant
Request
As of DPL 1.1.7, usage of DPL in a PostgreSQL-based MediaWiki requires further effort, which I describe in DPL:Manual - DPL with PostgreSQL.
- I don't know if there is a common syntax between MySQL and PostgreSQL for the database functions - if not, my solution is easy to install.
- But the need for a patch is really nasty. I think with my patch, DPL still works with MySQL as well. If so, could you kindly incorporate it.
I'd be curious if you consider this a feature request or a bug report…
Returning categories only
Request
Somewhat related to the "Multiple columns with headingmode" question: I would like to be able to return only the categories that a set of pages belong to and not the pages themselves. That is, I would like to get behavior similar to ordermethod=category,sortkey and headingmode where all the categories that a set of pages is returned as the list itself (and the pages thrown away). Ideally, it would be possible to format the list of categories returned. Perhaps if a headingmode=userformat was created, that would be sufficient as you could throw away the rest of the data with mode=userformat without a defined listseparators. (Example application: Of all pages in a certain given category, what are all the other categories those pages are in?)
Answer
This is really a very interesting idea! Although it adds another portion of complexity to the code of DPL I tried to implement this feature. By setting "goal=categories" you state that you are going for a result which consists of the category set which is referenced by the pages this report would normally produce. I hope this is a very elegant solution as it allows you to use most of the existing selection criteria to define the (intermediate) page set which is then used to look for the categories. Some options do not make sense in that context but modt of them still are applicable. What do you think about this approach? Could you please test it (release 1.1.8)?
- Gero 10:53, 12 May 2007 (CEST)
- Looks good! I've been able to successfully nest calls to DPL (e.g. return the categories for a set of pages and then pass those categories back into another DPL call). Thanks. --Austin
Multiple columns with headingmode
Request
Maybe this is doable already but I couldn't figure it out: I want to use ordermethod=category,sortkey and headingmode but I want it in multi-column form (or have more user control regarding the output format). There's a column parameter but it doesn't seem to work with headingmode. Another possibility is if I could use mode=userformat and somehow simulate the behavior of multi-column headingmode. I realize that the columns might not be all the same length as there could be different number of pages in each category. I think the simplest implementation would be to put one category heading in each column and ignore the list under each category.
Test against MW 1.10
Request
MW 1.10 is just out. Is there a way that this website gets upgraded so that DPL supports the latest MW version ?
rss feed from dpl
Request
A DPL might also have an according RSS feed. For example, a calendar might give a feed with the upcoming events from now on. --Eiland 09:30, 16 April 2007 (CEST).
Response
I haven´t worked with RSS generation so far. Is there a php library or a mediwiki module for that purpose? --Gero 22:08, 23 April 2007 (CEST)
- Plenty of MediaWiki Extensions for RSS... should be easy to integrate with DPL :) --141.14.26.126 13:16, 29 April 2007 (CEST)
- Which one would you suggest? Can you do the integration? Gero 20:12, 2 May 2007 (CEST)
Request
I have a similar request... Make each DPL into an RSS feed! --Dmb 11:20, 1 June 2007 (CEST)
Wait... that was me talking ... I just recognized my IP... (oh my memory!)
Well... you could start by looking here...
- http://meta.wikimedia.org/wiki/User:Mafs/RSS
- http://meta.wikimedia.org/wiki/RSS_into_Wiki
- http://www.mediawiki.org/wiki/GISWiki/RSS
That should certainly help with the details. Unfortunately I cannot do the integration myself or I would happily do it immediately. Thanks for the brilliant product and keep up the good work! --Dmb 11:24, 1 June 2007 (CEST)
Create a special page for searching pages with DPL
Request
- It could be interesting to have a special page that does a search based on a DPL. The DPL parameters would be set in a form (that could be enhanced in time with some common values).
- The current search functionality in Mediawiki is quite limited, and DPL adds much power here.
- Example: I want all the pages edited by user X in category Y and category Z, etc...
- This is just a random idea, as I sometime had to query by editing a page and doing a preview without saving. Being able to do a DPL search and get a result set on a page without having to edit a page would be nice.
--Ycombarnous 14:55, 10 April 2007 (CEST)
Reply
- I created the base frame for such a "specials" page. But I will not have time to work on it. See the source archive, and feel free to start coding. -- Gero 19:44, 21 April 2007 (CEST)
- I know it's quite a lot of work. I will try and make a static proposal for the page, and work on it as time allows. thanks. --Ycombarnous 10:32, 23 April 2007 (CEST)
- I also thought this would be useful so I implemented something very simple and more general. It's a special page that is a generic wikitext parser (and so works with DPL and any other parser extension). It lets you bookmark a link to a search query via DPL for example. See here for an example. The source code is here. --Austin
- This looks interesting, Austin! Maybe we can build a simple solution based on your extension --Gero 20:17, 26 April 2007 (CEST)
- Well, there is a first trial version of DPL-special-page available with version 1.1.4. I started with the code from Austin and added my ideas. Have a look! --Gero 14:48, 30 April 2007 (CEST)
- It's a good start, but I was actually thinking more to someting like Bugzilla boolean charts (go to a bugzilla install, in "advanced search", and see the section at bottom (called Advanced Searching Using Boolean Charts). Basically, you have per line:
- the field you want to set a value on
- the type of matching you look for (would correspond to match / in / not in for DPL)
- and finally your value
- in addition, you can add as many lines as you want
- It would require some javascripting telling for each field the corresponding matching available, plus if several lines use the same field with different criteria, a concatention would be needed. What do you think? --Ycombarnous 17:07, 30 April 2007 (CEST)
- What you described would certainly be a much better way to implement it. I was only looking for a "developer´s help tool" which offers the big variety of available parameters and allows a quick trial&error-cycle. I will not find time to do anything beyond that, I´m afraid.
- Gero 20:10, 2 May 2007 (CEST)
Simple Forms extension
Extension:SimpleForms can work very well with DPL, it's still under development, but the DPL example on the page works and is a basis for making more complex query forms/reports. OrganicDesign main page shows the example working. --Nad 03:31, 29 April 2007 (CEST)
display Table of Contents for an article
Request
the incudepage feature could be enhanced to include the TOC only; a %TOC% variable would ebe useful ...
PostgreSQL
does not work on PostgreSQL. maybe there's somebody here who can and is interested in adding of postgresql support... 89.178.255.5 04:30, 24 March 2007 (CET)