DPL:Requests for new features Archive

From FollowTheScore
Revision as of 14:53, 20 July 2007 by Gero (talk | contribs) (New page: . . . The following requests are C L O S E D . . == Add option to allow caching == === Request === I'd like to use DPL to build a lot of my page content without incurrin...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


.
.
.         The following requests are   C L O S E D
.
.


Contents

Add option to allow caching

Request

I'd like to use DPL to build a lot of my page content without incurring as much of a performance hit with regards to caching. Since my generated content will rarely need to be updated (compared to many many views), it would be really nice if I could somehow keep page caching on and rely on action=purge to update the lists when needed.

My request/suggestion is to add something like an "allowCachedResults=true" option that simply causes DPL to skip any calls to disableCache for that particular tag evaluation.

Question

There is only one call to parser->disableCache() and it is easy to switch it off via some parameter setting. But how can I test that it works? Which settings do you use in your LocalSettings.php? When I manually deactivated that call I could not see a faster delivery of normal pages, so I guess currently there is no caching in the dpldemo repository at all. What would one have to do to ENABLE caching? Gero 17:11, 30 April 2007 (CEST)

This site seemed to have caching on when I did some testing earlier. With this kind of change, you should be able to test by getting it to render outdated results versus up-to-date results. Have a page that uses DPL to list all articles that are in Category:Test, with "allowCachedResults=true". Then modify some other random page to add it to Category:Test, and view the first page again. If the cache is not disabled nor invalidated, you should see the outdated list without the additional page, and doing action=purge should give the up-to-date list. If it still appears that the cache is disabled, here are some things to check:
  • Go to Special:Preferences->Misc and make sure that "Disable page caching" is unchecked, or just log out of your user account while testing.
  • Make sure that your first page is not doing anything else that would naturally disable its caching (making other DPL calls without allowCachedResults=true, transcluding other pages with disabled caching).

Resolved

Now there is such an option and it works as explained above. Gero 20:06, 2 May 2007 (CEST)


Include for a template could let you choose a single parameter to extract from the template

Request

Re-injecting a template inside another template is great, but sometimes cumbersome if all you need is one parameter from the template. Couldn't there be just a simple way to extract ONE parameter from a template, without having to create a template a do so?

Reply

This is available with version 1.1.4. You can use "include={template}:name" or "include={template}:number" --Gero 13:59, 30 April 2007 (CEST)


suggestion: cleaner way to implement wfDynamicPageList4()

Request

The function wfDynamicPageList4() is preceded by this comment:

// enumerating a fixed list of 20 parameters looks awkward but there seems to be no other way
function wfDynamicPageList4(&$parser, $p1= ,$p2= ,$p3= ,$p4= ,$p5= ,$p6= ,$p7= ,$p8= ,$p9= ,$p10=,
                             $p11=,$p12=,$p13=,$p14=,$p15=,$p16=,$p17=,$p18=,$p19=,$p20=) {

In fact, there is a better way. :) http://us2.php.net/manual/en/function.func-get-args.php

Maybe this is all you need?

function wfDynamicPageList4(&$parser) 
{
	$params = array();
	$input=;
	
	$numargs = func_num_args();
	if ($numargs < 2) {
	  $input = "#dpl: no arguments specified";
	  return str_replace('§','<','§pre>§nowiki>'.$input.'§/nowiki>§/pre>');
	}
	
	// fetch all user-provided arguments (skipping $parser)
	$arg_list = func_get_args();
	for ($i = 1; $i < $numargs; $i++) {
	  $p1 = $arg_list[$i];
	  $input .= str_replace("\n",,$p1) ."\n";
	}
	// for debugging you may want to uncomment the following statement
	//return str_replace('§','<','§pre>§nowiki>'.$input.'§/nowiki>§/pre>');
	return DynamicPageList( $input, $params, $parser );
}      

Madkangas 03:01, 26 April 2007 (CEST)

Reply

Thank you very much! Help on the code is most welcome. Your suggestion will become part of the next release.

Gero 20:10, 26 April 2007 (CEST)


Statistics: Count articles in category or template inclusions

Request

Instead of listing the articles a simple counter would be helpful sometimes. Similiar to {{NUMBEROFARTICLES}}, but customisable. Example: "There are XX articles in Category:Example". This might be nice for statistics. I don't know if that's not already possible somehow. --Matthias 15:54, 21 April 2007 (CEST)

Reply

I think you can do that already: See Test numberOfArticles. --Gero 19:21, 21 April 2007 (CEST)

Including sections by number

Request

It would be useful if the includepage option could take a numbered section instead of a labeled section. That is, I might have a page where I don't know the name of the sections (and they aren't labeled) but I want to get a particular section (probably most commonly either the first or the last section).

Reply

Does it really make sense to show the 3rd paragraph of an article without even knowing the name of the headline? How should we count? Only level-2-headings? Or would we have to use TOC numbering like "3.4.7"? I doubt such a featrue would make a lot of sense as it would be very unstable in case somebody inserted a chapter somewhere in the article. Note that for example something like

 <dpl>
  category=xyz
  include=*
  includemaxlength=300
  mode=userformat
  listseparators=,\n=[[%PAGE%]]=\n,,,
</dpl>

will give a list of articles together with the first 300 characters of each article.

--Gero 19:42, 21 April 2007 (CEST)
  • Here's a concrete example of the use for this feature. Suppose you have a discussion page or even easier consider this very page with requests. Suppose you wanted to return the newest feature request (so basically the section at the top). You might have a lot of pages like this one and you want to have a page that shows the newest requests (first section) from across many pages. How can you do that without knowing what the name of section is (you can't predict what people will want to request)? You could have a label but then anytime someone added something, the label would have to be moved manually. In terms of specifying a section and levels, I would envision the easiest would be to use what MediaWiki already does. It appears to collapse all section levels and just count from the top. For example, if you hit the edit section link and look at the wpSection value, that's how the sections appear to be counted (also see the function Parser::getSection()). Returning the first n characters from a page might work in some cases but doesn't necessarily directly solve the example problem above. For example, even if the newest request was directly at the top of the page, if the newest request is < 300 characters, you only want to return that section rather than the first 300 characters of the page. So in terms of syntax, I'd think something like includepage=%1,%2 to include the first 2 sections of a page would be the simplest and most straightforward.
I am still not fully convinced - but you should have your chance ;-), Version 1.1.2 provides that feature, see the manual and Test include sections by number. Now it is up to you to come up with a brilliant website ... --Gero 21:57, 23 April 2007 (CEST)


Subcategories

Request

Not sure if this is possible with DPL or not. On my wiki, I've used DPL to create lists on city pages: http://mographwiki.net/Category:Melbourne (You can see it lists "Companies" and "Freelancers"). I'd like to do the same thing for countries listing all the Companies and Freelancers in that country. For this to work, I'd need a list that requires the pages to be in a certain category (like Companies) and also be in a category which is a subcategory of the country in question (for example, Melbourne is a subcategory of Australia). Any ideas? Thanks!--Weakmassive 00:46, 17 April 2007 (CEST)

Question

Could you - in principle - achieve your result by listing all the subcategories of Australia as an alternative besides Australia, i.e. "category=Australia|Sydney|Melbourne|Adelaide"? If the answer is yes one could maybe create a new option which explodes a category tree branch and replaces the name of the parent by the "parent plus all its children plus its (grand-)children etc.". --84.58.225.63 23:11, 17 April 2007 (CEST)

Ya, adding all the subcategories would achieve the same result - only lots more work. Your idea sounds like it would work, if someone could write it up. Thanks.--Weakmassive 23:53, 17 April 2007 (CEST)

Simple (preliminary) Solution

As a quick solution I added the "*" to category=; see the manual. The "*" currently covers only ONE level of hierarchy. More is hard to do ...
Please let us know if it works. --Gero 22:08, 18 April 2007 (CEST)

Awesome, thanks for adding that. I initially had problems with using "magic words" but figured out that you need to use the parser function syntax. All is well! Thanks again.--Weakmassive 00:28, 19 April 2007 (CEST)


Allow caching when using the title parameter

Request

Is it feasible to avoid invoking disableCache whenever the title parameter is used? (and rely on the cache being invalidated when the transcluded page is edited) --24.6.249.241 21:45, 14 April 2007 (CEST)

Reply

An interesting suggestion. I uploaded release 1.1.0 which disables the cache only if 'title=' is NOT set. Could you please report your experience? I do not understand enough about mediawiki caching to make a thorough test.

--Gero 06:52, 16 April 2007 (CEST)

I am no expert myself, but it seems correct to me after reviewing mediawiki caching code. Basic testing also works as expected so far. --64.186.172.227 22:58, 16 April 2007 (CEST)


Returning non-existing pages

Request

I would like an option to return pages that don't necessarily exist. For example, via linksfrom=Mypage. If Mypage has a wikilink to a non-existing page, the pagelinks table contains that link information but DPL does not return it because it does a join with the page table.

Response

Now we have a new parameter called "openreferences". If set to "yes" a "linksfrom" will also show open references. Due to the missing target page we do not perform a join; as a consequence, however, there are several restrictions on which other parameters can be used together with this new option. See Test linksfrom.

Gero 18:53, 11 April 2007 (CEST)

General inversion

Request

Is there a reason there isn't a notlinksfrom option (there's a notlinksto and I would assume it'd be basically the same)? More generally, why isn't there a 'not' version for all of the selectors? The main other one I don't see is nottitle (I can certainly imagine cases where I want to exclude a specific page).

Reply

Of course the concept of negation is general.

  1. The 'notlinksfrom' option is indeed missing. It will be supplied in one of the next releases (1.0.8).
  2. The 'title' option is different. We already have 'nottitlematch' and 'nottitleregexp' which allow to exclude articles based on simple name matching or even based on regular expressions. The 'title' option is a very special thing which allows DPL to be used as a (more flexible) substitute for another mediawiki extension named LabeledSectionTransclusion. See the description in the manual.
Gero 06:49, 9 April 2007 (CEST)

Extend the uses parameter to article headings and sections (like include)

Request

It would be nice to be able to extend the "uses" criteria for page selection to whether or not an article contains a specific heading or section (lst). Another way would be to have a parameter that would be a strict about "includepage": if any of the required inclusions are missing, do not select the page. --Ycombarnous 12:03, 30 March 2007 (CEST)

Answer

There is an experimental new feature which allows to define regular expressions which must match included contents (parameter includematch). Please test and report your experience. Which behaviour would you expect if a page contained multiple chapters with identical name and only some of them match the condition? What happens if a chapter does not appear at all in the included page? Currently a regexp is applied to the OUTPUT of the DPL template (if you use template based inclusion). Would it be better to match the input (i.e. the calling location in the source file)?

--Gero 23:02, 31 March 2007 (CEST)

Template variable value filter

I think this one is hard to code, but here is what I would need:

On the interface list I would like a filter "Quellsystem=SAP", all other lines are not of interest.

Today I am using categories, which works fine, but this would be more flexible. --GunterS 15:47, 30 March 2007 (CEST)

Answer

There is an experimental new feature which allows to define regular expressions which must match included contents (parameter includematch). Please test and report your experience. Which behaviour would you expect if a page contained multiple chapters with identical name and only some of them match the condition?

I applied a "SAP" pattern to your test example. Does it now do what you had in mind?

--Gero 23:02, 31 March 2007 (CEST)

Thanks for your fast work. It is not exactly what I was hoping for, as the string only needs to appear in any of the output fields, not the exact field Quellsystem.
I can make an easy workaround by defining a new includepage, which adds an "_" (or any other character) before the value Quellsystem and than search vor "_SAP", which will find all relevant entries. So I say: good enough!

--GunterS 20:47, 2 April 2007 (CEST)

Reply

I changed the matching procedure to comply with your original reuqest as this is much more elegant. Now templates are checked against the code which invokes them. So you can write

includematch=Quellsystem=SAP

But be careful: You normally will have to write something like

includematch=Quellsystem\s*=\s*SAP/s

which means that you allow whitespace around the '=' and that you extend your matching beyond newline charcters.

Gero 13:16, 9 April 2007 (CEST)

Allow selections based on users who created or modified a page

It would be nice to restrict selections based on the authors of pages.

Answer

With version 1.0.5 we introduce a powerful set of such parameters.

--Gero 06:27, 31 March 2007 (CEST)


Calendar application based on DPL / parserfunctions / inputbox extension

Finally got it done!! You can test the application at Test calendar. There is a basic documentation on how to get it to work on any wiki.

Also added the page to the "test" category. --Ycombarnous 22:54, 28 March 2007 (CEST)

Update: I simplified the calendar so that twice less DPL calls are necessary. So it requires at most 31 DPL calls per month calendar (these are "light" calls). --Ycombarnous 14:09, 4 April 2007 (CEST)

Documentation for using DplLst as standalone parser ?

Request

I would be interested to use your implementation of lst, in order to benefit from template parameter parsing in particular. If possible, could you make a small doc / examples on how to do an lst on a section or template ?

--Ycombarnous 13:50, 11 March 2007 (CET)

Answer

Feel free to reuse the code. I added some remarks in the code but do not have time for thorough documentation. You only have to add the tag definition (I wouldn´t use "lst" to avoid conflicts with an installed version of LabeledSectionTransclusion). I deleted these definitions to avoid such interference (you could make a diff with Steve´s source code ...).

An alternative is to use DPL as a very thin interface to the inclusion functionality. I could add a parameter for the article name which would do an exact comparison instead of a SQL LIKE match (this is more efficient). This could also implicitly switch to mode=userformat with all separators being empty. The result would be a fairly slim call, I think.

What exactly do you want to achieve?

--Gero 19:15, 12 March 2007 (CET)

Question(2)

Well, I would like to replace all the sections I have in my page by templates (much more flexible), and then use something like:

{{#lstt: article name|template_name|template_out}}

So basically, this is in DPL, but having it available for a single article with a compact call format would be great. I have to admit that template parameter re-injection is just a great thought!

Proposal

We could have a parameter named "title" which accesses an article directly (quite efficient compared to SQL LIKE) and which implicitly sets "mode=userformat". And we could use "include" as an alias for "includepage" (just to make the notation shorter). You could then write:

{{#dpl:title=MyPage|include={template}suffix}}
{{#dpl:title=MyPage|include=#My Chapter}}

The advantage of this approach is that you could still use full dpl functionality, e.g. "multisecseparators" in case the same template is called more than once. Regarding the naming concept for the "alternate templates" I think the current mechanism of adding a suffix is quite natural and should stay as it is.

--Gero 10:03, 13 March 2007 (CET)

I agree on all line, that would be perfect. It would provide a replacement/enhancement to lst without conflict. --Ycombarnous 13:52, 13 March 2007 (CET)

Solution

O.K., the feature is available with version 1.0.1 as agreed. See Test title. Happy testing! If you find it useful and if it works stable could you please add a remark to the mediawiki.org page of the "LabeledSectionTransclusion" extension?

--Gero 14:50, 14 March 2007 (CET)

DPL could have a parameter to choose the maximum date of revision of pages to include

Request

If we want a dynamic page list such as : "new articles on Berlin up to November 2005", it would be nice to have DPL search the latest revision of articles before date YYYY-MM-DD.

This is especially useful for people storing specs and interested into revisions of some articles at some point in time (like your source code for DPL stored on this site).

--Ycombarnous 10:23, 9 March 2007 (CET)

Answer

DPL 1.0.0 comes with four different possibilities for revision-related selection of pages. One of them does exactly what you proposed.

--Gero 10:42, 11 March 2007 (CET)

Fabulous! Thanks.

--Ycombarnous 13:23, 11 March 2007 (CET)

Request

Would it be possible to include date ranges? Using the above example, "New articles on Berlin in 2005". The problem that I'm encountering currently with combining allrevisionsbefore and firstrevisionsince is that it appears that the firstrevisionsince is not being considered. Example ie: {{#dpl: category=random|firstrevisionsince = 2007|allrevisionsbefore = 2008}} returns everything in 'random', not just things in 'random' for the year 2007.

--Ratio 12:14, 12 June 2007 (CEST)

Reply

I changed the code to allow simultaneous conditions to be applied to revisions. Now you should be able to get the desired result. How do you think about this? Gero 08:10, 22 June 2007 (CEST)

Extension:DynamicPageList (DPL), version 3.2.1: Warning: No results.

Linksto parameter could have "AND/OR combinations" functionality as categories do

Request

I am looking for articles that belong to 2 categories, and link to "link 1 or link2 or link3". I would like the order method to be linksto.

Answer (1)

Yes, a good idea, but this will take some time. One should be able to use logical expression with AND/OR/NOT/GROUPING for

  • category
  • linksto
  • uses
  • matches

The "not..." variants of these parameters could then become deprecated. Is anybody willing to help with implementing that functionality? -- Gero 10:53, 1 March 2007 (CET)

Answer (2)

For the moment I added "OR" grouping based on pipe separation for linksto, notlinksto, matches, notmatches, uses, notuses. Note that you cannot have more than one line for each of these parameters, i.e. there is no AND so far. -- Gero 09:51, 4 March 2007 (CET)

Allow other symbol for union of categories

Request

It would be convenient to allow e.g. "\" for "|", so that in the case of using the parser function version, the "|" does not have to be written as "{{!}}". The "\" seems better than "/", which may occasionally occur in a category name.--Patrick 16:53, 15 February 2007 (UTC)

Response

I will consider to use a general alias symbol for the pipe symbol which looks very similar : ¦ --Gero 09:28, 16 February 2007 (CET)

For readibility of wikitext that is better than {{!}}, but on many keyboards it is not available. There is often a key labeled like that, but giving "|".--Patrick 09:52, 16 February 2007 (CET)
I implemented "¦ aka |" in version 0.9.3 (the current version on this website) as an alternative for {{!}} and although I can see the problem of confusing "¦" with a standard "|" , I think it could be quite useful, even for wikipedia in general..
What do you think? --Gero 11:41, 16 February 2007 (CET)
Thanks. On my own installation I also added
// use the \ as a general alias for |
$input = str_replace('\\','|',$input); 
for easy typing. A backslash does not seem to conflict with anything, as long as category names do not contain a backslash, which does not seem wise anyway.--Patrick 09:54, 17 February 2007 (CET)
Did you check if \n still works as an alias for a newline character? If not there would still be the paragraph symbol ..
--Gero 12:20, 17 February 2007 (CET)
You are right, that does not work. Perhaps #or is a good extra possibility instead, with the code:
// use #or as a general alias for |
$input = str_replace('#or','|',$input); 
Patrick 15:00, 17 February 2007 (CET)
We could also look for mathematical symbols for intersection / union etc. and provide a more powerful syntax in general. But the problem with the pipe character must still be solved in a general way as it occurs also at other places, e.g. in listseparators= when you want to use wiki syntax to create a table layout in your DPL result.
--Gero 15:08, 17 February 2007 (CET)

Status

resolved.

date formatting

Request

addeditdate et al. would be more versatile if they accepted not just "true", but actual date formating as options. e.g.

addeditdate="("F d")"

would give "(October 23)", per the relatively standard date formatting functions, ParserFunctions and php's date.

Status

resolved; there is a new feature called "userdateformat" which gives you complete control over date formatting. It works as suggested. -- Gero 16:01, 26 February 2007 (CET)

search & replace for article titles

Request

article titles could be changed in a systematic way (not the link target but the link label9

Status

resolved with 1.0.0, see "replaceintitle" parameter --Gero 18:49, 12 March 2007 (CET)

repeated display if template is used multiple times in a page

Request

When you use "includepage={MyTemplate} dpl" DPL only evaluates the first occurance of that template in the article.

We use repeated lists of the same template within one page. It would be nice if in this case the output table could repeat the article name and list the corresponding entries of the templates.

Answer (1)

This is a good suggestion. But there arise some questions: What should happen if you specify two or more expressions in the "includepage=" parameter? Producing a second result line would be confusing in this situation I think (and is general not the best approach as we have ordinal numbering for the result lines according to the number of articles found). Maybe it would be better just to paste all occurencies of your template together. In your template you could care for proper optical separation by putting a horizontal bar at the end... (This bar would also appear if there happens to be only one occurence of the template, but maybe you could add a variable in your template call to the FIRST occurence of the template; this variable could be ignored in your noirmal template an could be used to decide whether you have to output a separation line or not in the template which you use in the DPL report).

I am willing to find a good solution and suggest that you define an example on this website and describe the desired output. --(Gero) 217.111.20.10 17:29, 23 February 2007 (CET)

Answer (2)

Version 0.9.6 now has the ability to cope with multiple template calls and multiple identical chapter headings. A new parameter ("multisecseparators") can be used to define a separator which will be used for multiple identical sections. An example is available. -- Gero 16:23, 26 February 2007 (CET)

Thank you so much. I prepared another example. As you can see, it would be helpful on sorted tables if the [[%PAGE%]] parameter could be used as well. --GunterS 19:54, 6 March 2007 (CET)

It was only two lines of code that had to be changed. See patch 2 of DPL 0.9.9. Now your example looks much better... b.t.w: I always thought of software development repositories as a possible application field for DPL --Gero 20:35, 6 March 2007 (CET)

Answer (3)

In version 1.0.0 of DPL there is an additional possibility ("dominantsection") which does what you originally may have expected. It is not easy to understand but can be very useful sometimes, especially when creating sortable tables ... --Gero 10:42, 11 March 2007 (CET)

Make the Namespace optional

Request

Thanks for updating DPL

Could you create a switch to disable the display of the namespace in %PAGE% as my category cloud looks a bit odd with category:item1 . category:item2 . category:item3 ......

Thanks

Response

I introduced with 0.9.6 a new variable called %TITLE% which contains the title of the page but not the namespace. So you can write [[%PAGE%|%TITLE]]. -- Gero 16:18, 26 February 2007 (CET)


Global Background-color

Request

When I use the column or row parameters, the program will return tables by the number of column/row I set. May I set the global background-color to hide the table margin? Thank you very much.

Example

{|width="100%" style="vertical-align:top;background-color:#f58ffa"
! <p style="margin:0; background-color:#cef2e0; font-size:120%; font-weight:bold;border:1px solid #a3bfb1;text-align:left;color:#000;padding:0.2em 0.4em;">Random Personal Pages</p>
|-
|style="color:#000"|
<dpl>
  namespace=
  ordermethod=size
  randomcount=6
  mode=userformat
  listseparators={|style="background-color:#f5fffa;" cellpadding=2 cellspacing=10, \n|-\n|width=30%|\n* [[%PAGE%]],, \n|}
  columns=3
</dpl>
|-
|}

Random Pages

Example (correct)

The code for constructing columns and rows can now be influenced by the user via "rowcolumnformat="; with this new parameter you get control over cellpadding, background-color etc.;

with rowcolformat=style="background-color:#f58ffa;" you get the desired result. Note that you need to download patch 1 of DPL 0.9.9.

Random Pages


btw: could you please add your site to the DPL:Websites using DPL? --Gero 17:35, 5 March 2007 (CET)

reply Thank you for your big big help. My site using the great DPL is in a LAN and never be linked from outside. Should I add a new item without link to the DPL:Websites using DPL? --Jessie

It would be nice if you gave us an example here, e.g. like GunterS has done; see Interface_list. --Gero 07:08, 8 March 2007 (CET)

Ancestry Function

DPL does a great job of listing all of the children of a category - all of the elements that belong to that category. It would be nice, however, to be able to determine the "parents", "grandparents", "greatgrandparents", etc of an element - the categories that the element belongs to.

I use categories, subcategories, sub-subcategories to help my users drill down into the content. A "reverse DPL" would let me put crumbs on each page to help the users find their way back out. Even if the function could only find one level of parents, it could be nested to find the next level. For instance, if

{{#dpl:element=current page|mode=reverse}}

gave the parent category of the current element, then

{{#dpl:element= {{#dpl:element=current page|mode=reverse}} |mode=reverse}}

would give the grandparent category of the current element, and so on.

Furboy 04:17, 15 March 2007 (CET)

Answer

DPL has the possibility to show all categories of a page, see the addcategories parameter. To demonstrate this feature I created a template called "Way up" which shows the category/categories of a page passed to the template. For "Fictitious country" a call will return Place.

So, if you pass the category of your page to this template you will get the ancestor. But you can do even better. If you put a call to that template into another template which assigns the "real" category to your page (called "is a", maybe), notation becomes very short: {{is a|Country}} would be sufficient to assign an article to the given category ("Country") and output a link to its ancestor category. Note that it is not possible to call dpl recursively using its output as an argument for another call. There are many technical reasons for that. So you have to live with one level of grandparents.

--Gero 20:40, 17 March 2007 (CET)

Wildcard Categories

It would be nice to be able to use wildcard characters in the category parameter. So, something like,

{{#dpl:category = Ethiopia*}}

would produce results for a category named Ethiopia, as well as for categories named Ethiopian, Ethiopians, etc.

Similarly, something like,

{{#dpl:category = (800) ###-####}}

would produce results for categories like (800) 555-1212, (800) 555-1234, and so on.

Furboy 04:40, 15 March 2007 (CET)

Reply

I think it is not too complicated to add something like "categorymatch=" and "notcategorymatch=" for traditional wildcard matching (SQL LIKE). For users with MySQL 5.x one could offer "categoryregexp=" and "notcategoryregexp=" in addition, which would allow to match numeric digits like in your (0800) example.

Gero 14:39, 15 March 2007 (CET)

Well, it´s already there. See Test regexp. Gero 15:32, 15 March 2007 (CET)

Labeled Section Transclusion Syntax

I understand that you adopted code for labeled section transclusion from the Labeled Section Transclusion extension, and that DPL uses the same LST syntax. Is it possible to revise the hooks in DPL to accept the same anchoring syntax that MediaWiki uses? LST and DPL currently look for hooks with syntax like:

<section begin=chapter1 />this is a chapter<section end=chapter1 />

For linking, MediaWiki uses either of the following:

<a name="Section_linking" id="Section_linking"></a>
<span id="anchor_name"></span>

Using the same conventions as MediaWiki is better for clarity (I don't have to keep track of what my anchor is for and whether I'm using the right syntax) and is better for economy (I don't have to include both MediaWiki anchors AND DPL anchors in a section that I want to both link to and transclude).

Furboy 06:38, 15 March 2007 (CET)

With the latest modifications DPL can more or less be used as a full substitution for LabeledSectionTransclusion, see #Documentation for using DplLst as standalone parser ? --Gero 07:15, 31 March 2007 (CEST)

Question

DPL parses the WIKI text of articles which are transcluded, not their generated HTML output. Are you talking about users who write something like

<a name="Section_linking" id="Section_linking"></a>
<span id="anchor_name"></span>

into their documents?

--Gero 13:58, 15 March 2007 (CET)

islinkedto or linksfrom

I suggest a method islinkedto or linksfrom, ie islinkedto=foo only returns pages that foo links to. If Foo is a protected page, such as "Published" or "Approved" material, the resulting DPL will ensure some kind of quality control. I would really like it for my plan to run a collaborative podcast. I can't think of a better way to (a) provide some quality control and (b) provide some topic control, than to use DPLs. Thanks (Wikimedia user:pfctdayelise) 59.167.184.59 16:04, 28 March 2007 (CEST)

Perhaps a more intuitive name would be whatlinkshere . 59.167.184.59 16:06, 28 March 2007 (CEST)

I didn´t believe that this could be a useful feature. But, well, there it is (Test linksfrom). Try Version 1.04 and let us know whether it works. Is your site publicly available? --Gero 21:19, 28 March 2007 (CEST)


Dumb request ... ordered list 'offset' parameter?

Question

I am integrating DPL with the inputbox extension on my site to give the illusion of allowing the user to 'fill in' the title of the latest page... http://funktopia.net/index.php/Template:FilmUpdates I would like the DPL to start the ordered list at element number 2 rather than 1 ... It it possible to have an 'oloffset' parameter? --141.14.26.126 13:20, 29 April 2007 (CEST)

Answer

There is a parameter called 'offset'. Use 'offset=1' and your list will start with the second entry. Gero 07:50, 30 April 2007 (CEST)

Hide the default article list on a category page

Question

I am using DPL to create a list of articles in each category, and pull the description of each page from the template variables in each article. This is working perfectly but now I have 2 versions of the same lists, and it looks messy. A method (noCategoryList = true?) to hide the default list would be really handy.

Answer

Did you use 'mode=userformat' ? This is the general switch which switches off all default output... Gero 15:27, 8 July 2007 (CEST)