Difference between revisions of "DPL:Requests for new features"

From FollowTheScore
Jump to: navigation, search
(requests at bottom (consistent with other pages), restored unresolved requests)
m (Table row/column header switch)
Line 55: Line 55:
 
::I'm not a programmer, Gero...I just have ideas and what I want to do programmatically that I can already do (and have done for years) manually. Perhaps creating a "table" mode that deals with all table-related parameters like <tt>header</tt> (and <tt>column</tt>/<tt>row</tt> types). <tt>resultsfooter</tt> could have an option to be the last row or column of the table and include parameters for totals of a specific header (# articles in table, etc), a number field (like a "sum" function), etc. <tt>cellseparators</tt> could be used instead of <tt>listseparators</tt> (or at least as an alias) and. of course, support for specifying normal/regular non-suffixed template fields. Essentially, DPL needs more table-specific support to move it beyond just lists, per se. -[[User:Eep²|Eep²]] 08:28, 29 July 2007 (CEST)
 
::I'm not a programmer, Gero...I just have ideas and what I want to do programmatically that I can already do (and have done for years) manually. Perhaps creating a "table" mode that deals with all table-related parameters like <tt>header</tt> (and <tt>column</tt>/<tt>row</tt> types). <tt>resultsfooter</tt> could have an option to be the last row or column of the table and include parameters for totals of a specific header (# articles in table, etc), a number field (like a "sum" function), etc. <tt>cellseparators</tt> could be used instead of <tt>listseparators</tt> (or at least as an alias) and. of course, support for specifying normal/regular non-suffixed template fields. Essentially, DPL needs more table-specific support to move it beyond just lists, per se. -[[User:Eep²|Eep²]] 08:28, 29 July 2007 (CEST)
  
 +
:::Still need this too... -[[User:Eep²|Eep²]] 05:40, 11 September 2007 (CEST)
  
 
==Template field output==
 
==Template field output==

Revision as of 04:40, 11 September 2007

Please add requests for new features at the bottom 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.


Include other wiki pages

I want to include parts of Wikipedia articles on my wiki. Can DPL be expanded to do this? -Eep² 10:22, 20 August 2007 (CEST)

I don´t think so. Every wiki has its own categories, templates, images,.... So just transcluding the raw text (if it is available via &action=view) would not make much sense. And transclusion of rendered html text is not possible nor desirable either. Gero 14:28, 20 August 2007 (CEST)
And yet many websites (like http://encyclopedia.thefreedictionary.com/) do it all the time without any apparent problems (and there's even a WordPress plugin)... All I really want to pull in is the first paragraph; I don't need templates, categories, or even images. Links can obviously be pulled in easily enough that go to the correct place (Wikipedia or external links). See http://www.killertux.com/pages/Wikipedia_Simple_API.php?q=node/44 too for a "screen scraper" with PHP code you may be able to implement in DPL. -Eep² 15:19, 20 August 2007 (CEST)
Using the killertux API you can yourself include a whole wikipedia article into your wiki (as html or text). I can´t see what DPL should do in that context. DPL cannot and will not parse such scraped contents. You would have to build a completely separate and different mediawiki extension for that purpose. Gero 20:17, 22 August 2007 (CEST)


Most active page?

ordermethod=activity

Most number of edits or biggest diffs in the last t units of time???

--Dmb 18:11, 10 August 2007 (CEST)

The sheer number of edits is not very meaningful; and as soon as 'significance of change' comes into play, I see no way to implement such a feature without having to calling diff3 on every document. And that is definitely too resource consuming. Gero 14:55, 15 August 2007 (CEST)

Add 'contributors'?

addcontributors = TRUE contribthresh = x Kb

Instead of listing one page author or the last editor, addcontributor would add the users who had made significant diffs to the article, where significant is determined by contribthresh. The multiple names are listed separated by commas.

Woop!

--Dmb 18:11, 10 August 2007 (CEST)

That´s a pretty good idea. Maybe I will add that somewhen. Gero 23:56, 10 August 2007 (CEST)

I also thought of another idea... List users by total contrib size. Its a bit 'lets see who has the biggest penis' - but could be useful to see who has contributed most to a certain page or category. --Dmb 08:21, 14 August 2007 (CEST)

After some investigation I feel that it would be very slow and resource consuming to build that feature. If somebody can come up with a SQL statement which delivers the basic data we want to show: fine (I don´t know how to do it with pure SQL). Otherwise one would have to call diff3 for each document. That´s a show stopper. Gero 14:52, 15 August 2007 (CEST)



Table row/column header switch

Can the table headers be used as the beginning of rows instead of at the top of columns? I would like to duplicate my game comparison table and need this functionality. -Eep² 05:43, 29 July 2007 (CEST)

Please give more details: How should the new switch be named, which values be allowed? In which modes should it have an effect and how should the result be affected?
For information: There will be no changes to the DPL sources within the next three weeks. Gero 08:13, 29 July 2007 (CEST)
I'm not a programmer, Gero...I just have ideas and what I want to do programmatically that I can already do (and have done for years) manually. Perhaps creating a "table" mode that deals with all table-related parameters like header (and column/row types). resultsfooter could have an option to be the last row or column of the table and include parameters for totals of a specific header (# articles in table, etc), a number field (like a "sum" function), etc. cellseparators could be used instead of listseparators (or at least as an alias) and. of course, support for specifying normal/regular non-suffixed template fields. Essentially, DPL needs more table-specific support to move it beyond just lists, per se. -Eep² 08:28, 29 July 2007 (CEST)
Still need this too... -Eep² 05:40, 11 September 2007 (CEST)

Template field output

Is it possible to output the unescaped wikimarkup (so it actually works as on pages that use the template) in DPL output? I want to create a DPL table that has same links as articles do that use the template in them which is also called in the DPL table. -Eep² 06:56, 26 July 2007 (CEST)


User-friendlines

DPL talk:Manual - DPL Special Page with Parameters#User-friendliness -Eep² 11:42, 25 July 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…


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...

  1. http://meta.wikimedia.org/wiki/User:Mafs/RSS
  2. http://meta.wikimedia.org/wiki/RSS_into_Wiki
  3. 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)

nudge

Rss rss rss rss rss rss!!!


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 ...

Putting delimiters between results

Will this solve a related formatting problem - putting delimiters only between results? Ideally I'd like to have a single result returned inline, but multiple results in an ordered list. It could be I misunderstood the documentation, but there doesn't seem to be a way to avoid a leading bullet or whatever in a list. Frank 14:35, 20 August 2007 (EDT)
There is a mode called 'inline' which does what you want. You can define the 'inline' tag contents. Gero 07:50, 10 September 2007 (CEST)
Nig1  my separator  Nig2  my separator  Nig3  my separator  Nig4  my separator  Category:CountryA  my separator  Category:CountryB

Hook based data exchange between extensions

Would it be possible to add a 'hook' (i.e. wfRunHooks) to DPL? Once a 'query' is finished executing, the result could be signaled to other interested extensions. A 'context id' would be required as potentially many queries could co-exist on the same page. I would suggest adding a parameter such as 'context=' OR just a linear incremental counter.

A 'no output' option would be great also - this way, if the query is really meant to be consumed by another extension, the user isn't distracted by the result from DPL directly. mw:user:jldupont

Reply

I do not have experience with creating hooks. There is a point in the code where the sql result set is ready. But be warned: The columns contained in the result set may vary depending on the options used. Generally speaking, DPL is a beast that has reached its saturation level of complexity ;-). I would more be in favour of a way where DPL produces some kind of csv output which is then fed into another extension. With mode=userformat this is fairly easy because you have complete control over the output. You can create csv or whatever format suits your own extension. This need not be wikitext nor need it be html or plain text - any kind of grammar is possible. For example you can use the result of one DPL statement as a parameter for another one, i.e. you can nest DPL calls. There is a good example for this: Wgraph:Example 4. Here the inner DPL query produces a pipe-separated list for the outer one.

So, the 'no output' you are looking for is already there. It´s called mode=userformat -- and it will take you some time to understand its power. Being the author I am still myself learning what you can do with DPL ;-)

The problem of multiple contexts is also solved by extension nesting. Maybe you do a little exeprimenting and then come up with another comment?

Gero 21:05, 24 July 2007 (CEST)

DPL API

I'd like to see more of an API structure to the code. The manual lists all the parameters and groups them by functionality, but no such break-up exists in the code (at least not that I could tell). At minimum, I'd like there be one function that processes the search criteria to get the results or groups of results in the form of an array of Title objects (or an array of arrays of title objects), and another function to display the results in a specified or default format.

I'd like to be able to build my own extension that uses the DPL2 extension as an API without having to hack the DPL2 code. —Sledged (talk) 01:03, 10 September 2007 (CEST)

Reply

Why don´t you just go ahead with DPL as it is? You can put any call of a parser function into the output loop of DPL. And you can use DPL in a way that it does not produce any single byte of output on its own. You can easily create title objects within your code from the first parameter which is passed tomy working template. You might say that this is less efficient than an integration on php level but before trying to optimise you could build your extension right now without any change to DPL and without any code interference. What kind of application do you have in mind, by the way?. For example:

{{#dpl:
  |resultsheader=²{my envelope template¦%PAGES%}²
  |category=some category
  |namespace=some namespace
  |... etc
  |format=,²{my working template¦%PAGE%¦%TITLE%}²
}}

--Gero 07:28, 10 September 2007 (CEST)


redirects include pages that link to redirects

See DPL:Discussion#Redirects to include pages that link to them? -Eep² 05:07, 13 August 2007 (CEST)


linksto and other parameter case-insensitivity option

I need this without having to manually specify lower-/upper-case versions of every page... -Eep² 13:29, 2 September 2007 (CEST)

Mediawiki is case-sensitive by nature. So I can´t see what this should be good for ... Abc is the same as abc but is different from aBc and abC. DPL works on internal page_id numbers and these only exist for existing articles. Gero 14:31, 2 September 2007 (CEST)
Why must you fight me at every point in getting new features in DPL to make it easier to use, Gero? Geez. "Abc" is not the same as "abc" if $wgCapitalLinks = false; is set in localsettings.php, as I have it set in my wiki. I use DPL to list redirects but it requires a lot of variations on the page and support for multiple manually-entered parameters:
	 
|linksto={{FULLPAGENAME}}{{!}}{{FULLPAGENAME}}s{{!}}{{FULLPAGENAME}}es{{!}}{{FULLPAGENAME}}ies{{!}}{{FULLPAGENAME}}ing{{!}}{{FULLPAGENAME}}ed{{#if:{{{2}}}|{{!}}{{{2}}}{{!}}{{{2}}}s|}}	
This query doesn't have any problem if any of these pagename variations don't exist so why would linksto have a problem with pagename case variations either??
Is this like how you couldn't see what "on"/"off" and "1"/"0" for boolean operators is good for? Or why someone would want to create table columns vs. rows (as I want for each game in my comparison table)? It's like the redirect issue you have been resisting and how MediaWiki devs resist adding suffix index (Special:Prefixindex in reverse) despite DPL being able to do it easily enough using a simple wildcard titlematch query (see http://www.tnlc.com/wiki/index.php?title=fire for an example). Enhancements like these make MediaWiki (and DPL) easier (and less frustrating) to use... -Eep² 15:38, 2 September 2007 (CEST)
I really need this functionality, since trying to create case variations for all of the above redirect variations (PLUS creating the actual redirects!) is a tad big annoying... -Eep² 05:40, 11 September 2007 (CEST)