Extension talk:DynamicPageList (third-party)
Add topicSee also Wikimedia's issue tracking system for some bugs and feature requests for this extension.
Existing entries with feature requests on this page have been moved. --Algorithmix 08:45, 16 February 2007 (UTC)
2007
[edit]Recent Changes
[edit]For putting recent changes in a given namespace or category on a wiki page, there is also Extension:News -- Duesentrieb ⇌ 13:00, 17 February 2007 (UTC)
MediaWiki Version
[edit]This page says that DPL requires v. 1.7+ of MW, but the DPL wiki says 1.8+. Would be worth changing to whichever one is correct! I tried to install with 1.7 and it didn't work, which was disappointing. --16 November 2007
Conflict with RSSReader Extension
[edit]I've noted a conflict between the RSSReader Extension and DynamicPageList Extension when both are run on the same page. See Comment on RSS_Reader Extension for details. Any idea why this might be?
--C4duser 15:26, 27 November 2007 (UTC)
2008
[edit]Labeled Transclusion Sections with DPL 1.6.9
[edit]We just installed DPL 1.6.9 and noticed that our section transclusions are no longer working.
For example, we have
<dpl>
title=Article1
include=summary
</dpl>
And it used to work with the previous DPL version which displayed all text in the summary section but with DPL 1.6.9 nothing is being picked up. Any ideas? -alhui
99.249.236.178 18:01, 11 April 2008 (UTC)
- Add the following after the line with inclusion of the extension in the file LocalSettings.php
$wgParserConf['class'] = 'Parser_OldPP';
- This will force the mw-core to use the old parser. Jeblad 15:13, 13 April 2008 (UTC)
- Having same problem and the OldPP hack doesn't seem to solve it. (MW 1.12; DPL 1.6.9; the labeled section extension has been deactivated, and the dpl2include seems to work because the "section" tag is listed in my MW spectial:version page). A page called Test1 with the text
The book is <section begin=title />Cien anos de soledad<section end=title/>
is never transcluded in a page Test2 with the code{{#dpl:debug=1|title=Test1|include=title}}
Nothing is output. The older version 08:32, 17 January 2008 works perfectly though. --Fxparlant 09:55, 14 July 2008 (UTC)
- Having same problem and the OldPP hack doesn't seem to solve it. (MW 1.12; DPL 1.6.9; the labeled section extension has been deactivated, and the dpl2include seems to work because the "section" tag is listed in my MW spectial:version page). A page called Test1 with the text
- Try DPL 1.7.4. It runs on MW 1.12 and 1.13 as you can see on the dpldemo website. If you still have a problem, please demonstarte the effect on that website and we will have a look at it. 84.58.229.59 09:51, 27 August 2008 (UTC)
Problem with mediawiki 1.12
[edit]It seems that message file cause error on mediawiki 1.12 (see this thread). Could author of this extension make the update for us ? -- phkoech 26 april 2008
- The dpldemo website is now running on MW 1.13. All problems should be solved. 84.58.229.59 09:48, 27 August 2008 (UTC)
labeled section only
[edit]How to list only the labeled sections, without the pages not containing the section:
{{#dpl:debug=1|category=Book|include=title}}
will list the pages of category Book, even if they do not have
<section begin=title />
. The includematch cannot be used, because the include doesn't call the whole section, but only the content of the section tags. Any idea ? --Fxparlant 11:06, 14 July 2008 (UTC)
Catch a template parameter
[edit]I am looking for a way to use DPL to catch, not the title of a page, but the parameter of a template:
if a page calls the template {{Temp|param1|param2|param3}}, how to catch the param3 in another page, with a query on the first parameter and the second ?
--Fxparlant 13:08, 7 August 2008 (UTC)
- You can use phantom templates for that purpose. DPL will call the phantom template instead of the original one and pass all parameters to the phantom template in the same way as they were passed to the original template. And within the phantom template you can do whatever you like - which means that you can simply output the third parameter.
- See the DPL manual for details. 84.58.229.59 09:47, 27 August 2008 (UTC)
New pages
[edit]Is there a way to get this to only return new pages (the pages in Special:Newpages)? Thanks 193.36.230.96 12:13, 17 August 2008 (UTC)
- Yes
- "ordermethod=firstedit" was the parameter I needed --18 August 2008
- if you do not have too many updates such as daily or weekly news for which the Extension:News might be worth a try you can find an example and explanations on the steps necessary to update the main page almost automatically using DPL and Extension:Inputbox on the page User_talk:Ob.helm.--Ob.helm 16:51, 11 December 2008 (UTC)
Mediawiki Version 1.6.9
[edit]Hi,
Is there a way to get DPL running on a Mediawiki 1.6.9 ? If not, why exactly ?
Best regards --193.57.156.241 11:26, 4 September 2008 (UTC)
download from subversion
[edit]Can the download used the inclued mediawiki subversion system ? Crochet.david 19:00, 14 September 2008 (UTC)
Currently the latest version is on the dpldemo page. But this will change in the near future. Mediawiki SVN repository will become the official source for distribution. Algorithmix 09:22, 21 May 2009 (UTC)
Tweak to make DPL backward compatible with DynamicPageList2 <suppresserrors> parameter
[edit]I'm one of the admins at ChoralWiki (www.cpdl.org), a free Public Domain scores library, and we use DynamicPageList2 a lot in it with parameter <suppresserrors> set to 'true'. We were doing an upgrade test to the newest version of DynamicPageList and after the upgrade all our DPL queries started showing this warning:
%DPL-1.7.4-WARNING: Unknown parameter '$0' is ignored. Help: available parameters: suppresserrors.
After a quick research we realized that parameter <suppresserrors> is no longer supported by the new DPL versions. It would be a pain to edit all pages where it appears, so we decided to tweak the DPL code to recognize it and behave as expected. We made the changes below, tested it and it worked fine. So we decided to post it here in case someone else faces the same problem. All one needs to do is to add the following lines in red to file DinamicPageList2.php:
line 682:
/**
* noresultsheader / footer is some wiki text which will be output (instead of a warning message)
* if the result set is empty; setting 'noresultsheader' to something like ' ' will suppress
* the warning about empty result set.
*/
'suppresserrors' => array('default' => 'false', 'true', 'no', 'yes', '0', '1', 'off', 'on'),
'noresultsheader' => array('default' => ''),
'noresultsfooter' => array('default' => ''),
line 1157:
$bSuppressErrors = self::argBoolean(self::$options['suppresserrors']['default']);
$sResultsHeader = self::$options['resultsheader']['default'];
$sResultsFooter = self::$options['resultsfooter']['default'];
line 2095:
case 'noresultsheader':
$sNoResultsHeader = $sArg;
break;
case 'suppresserrors':
if( in_array($sArg, self::$options['suppresserrors'])) {
$bSuppressErrors = self::argBoolean($sArg);
if( $bSuppressErrors )
$sNoResultsHeader = ' ';
}
else
$output .= $logger->msgWrongParam('suppresserrors', $sArg);
break;
case 'noresultsfooter':
$sNoResultsFooter = $sArg;
break;
After the change, if <suppresserrors=true> is used in the query and 0 pages are returned, it won't show any warning message; if <noresultsheader='text'> is also used, it will show the 'text' supplied. Capmo 13:40, 18 September 2008 (UTC)
- Since release 1.7.5
suppresserrors
is part of the official DPL distribution. Algorithmix 09:20, 21 May 2009 (UTC)
Licence
[edit]http://semeb.com/dpldemo/index.php?title=Main_Page says that "All extensions are under GPL license". So this page could be updated regarding the license.
- Yes, has been done. Algorithmix 09:23, 21 May 2009 (UTC)
2009
[edit]Index (List of index-terms) for a book
[edit]I am experienced in editing wikipedia-articles. Now I want to use mediawiki on my server to write a book (around 1.000 articles). I want to mark index-terms in articles and have one page with a sorted index. The book will exist of 1.000 articles. So it is no problem to generate the article dynamicaly when I will open the index. Is DPL the right extension to do the job?
How to mark the index-terms in articles? Which <dpl></dpl> -code do I need?
Or is there a better solution than DPL? Regards, jan--89.52.155.34 23:55, 13 January 2009 (UTC)
I made a beginning:
I have a template template:Index and call it in articles with with
{{Index|keyword}}
For the output of the whole Index I have an article with:
<dpl> uses=Vorlage:Index include={Index}:1 table=,articletitle,keyword </dpl>
It works!
How can I get an output in an alphabeticle order like this?
keyword-1 ..... articletitle 1 ..... articletitle 2 ..... articletitle 3 ..... articletitle ... keyword-2 ..... articletitle 4 ..... articletitle 5 ..... articletitle 6 ..... articletitle 7 ..... articletitle ... keyword-3 ...... ...
Regards, Jan--89.52.190.71 10:32, 14 January 2009 (UTC)
- For me the answer is no longer important. I now use Semantic Mediawiki - takes longer to understand but is the future.
- I don't delete the question - maybe someone else is interessted in the answer.
- Regards, Jan
- Hello Jan, creating a permuted index is a challenge because DPL normally walks sequentially through all articles which match the selection criteria and collects the desired information (in your case template invocations). In your case one would have to store the collected data (using the arrays extension ), re-arrange the order and then produce the output in a final step. With less than 10 lines of code all this is possible:
- I know SMW and think it is powerful for expert users. The idea of DPL is to use MW as it is without introducing new syntax for those users who write articles.
- Is your book publicly avaialable? If yes, please give a link. Algorithmix 09:32, 21 May 2009 (UTC)
Problems
[edit]Hi. I have a problem with labeled section transclusion, the section tags show up along with the transcluded text. This problem only showed up recently; the page was doing fine four months ago when I left it. When I came back a few days ago, no changes have been made to the articles but the DPL pages have broken formatting. It is a Wikia page and I asked the Wikia staff about it too, but they haven't recognized something from their end being the source of the problem either. So here's the problem. Instead of this:
http://img.photobucket.com/albums/v59/daarklord/ForumGraphics/DplWtf01.gif
I get this instead:
http://img.photobucket.com/albums/v59/daarklord/ForumGraphics/DplWtf00.gif
My wiki can be found here. The formatting error can be seen here.
Please help. Thank you.
-Daarklord 03:50, 16 April 2009 (UTC)
I installed the extension on a private wiki according to the notes on the page (#include("$IP/extensions/intersection/DynamicPageList.php");), but it doesn't work. When I disable (commtenting out) the extension in the localsettings.php, I can see the page. If I enable the extension I only get a white page displayed on pages with Error: You need to include at least one category, or specify a namespace!, all other pages can be edited and shown. (Setup: Mediawiki 1.13.2, Php 5.1.2 (apache2handler), MySql 5.0.26 und folgende Extensions ExpandTemplates (Version 2008-01-09) BugzillaReports (Version 0.9.8) Cite DynamicPageList Inputbox LabeledSectionTransclusion ParserFunctions (Version 1.1.1) SimpleSecurity (Version 4.2.14, 2008-09-12) SyntaxHighlight (Version r37495) AWC`s MediaWiki Forum )
Thanks for helping -- Joergens.mi 07:33, 2 February 2009 (UTC)
- Can you please download the latest version and test again? There was a major problem in the logic of DPL which dealt with the inclusion of "labelled sections" ... Algorithmix 09:34, 21 May 2009 (UTC)
Documentation?
[edit]This article would be more helpful if it actually explained how to use this extension, rather than simply listing what it's capable of.
- The article gives a link to the manual. I bet that the manual contains more information than you ever will want to read about DPL ;-)
- Algorithmix 09:37, 21 May 2009 (UTC)
License for DPL
[edit]The wiki page for DPL says 'no license specified' the source code of the program has one file without any license, another with GPLv2+ and another that just says GPL. Could this please be made consistent? I would like to package DPL for Fedora.
- --stahnma at fedoraproject dot org
- It has always been GPL. Now it is mentioned in the info box. Algorithmix 09:16, 21 May 2009 (UTC)
Undefinde Variable
[edit]Wiki: 1.13.5
PHP: 5.0.5
Apache: 2.0.54
I have installed MediaWiki version 1.13.5 and included the extension dpl. Now I got on my main page this notice notes:
Notice: Undefined variable: result in D:\xampp\htdocs\Lukas\wiki113\includes\Title.php on line 1161
It's a liitle bit strange, because the extension works, but the notes are little bit annoying. What can I do now, has got someone an idea?
Greatz Lukas
171.24.253.44 08:42, 2 April 2009 (UTC):--
- This should not happen! Are you sure that the error comes from DPL? I have never heard anyone reporting something like that. I suggest the following: Make a clean new test installation of Mediawiki, use DPL as the ONLY extension and then try to reproduce the error. If it still shows up, write a bug report and I will look after it.
- BTW: Sometimes new MW versions introduce new errors. The dpldemo wiki runs on 1.13.0 Algorithmix 09:44, 21 May 2009 (UTC)
Section inclusion does not work
[edit]I noticed that section inclusion does nothing. In my wiki, as well as on the DPL demo wiki. See the section inclusion test page: it does not output the contents of the sections. It this broken? Using latest MediaWiki and latest DPL. My test page: http://www.jacmoe.dk/wiki/index.php?title=Conditional
Stavrosdr 23:05, 24 April 2009 (UTC) I have exact same problem MediaWiki (Version1.12.0) DynamicPageList2 (Version 1.7.4) ParserFunctions (Version 1.1.1) LabeledSectionTransclusion (Version ?)
I also have this problem with LabeledSectionTransclusion Stavrosdr 00:19, 25 April 2009 (UTC) I am using PHP 5.2.6-2ubuntu4.2 (apache2Handler) MySQL 5.0.67-0ubuntu6
- Sorry, yes, there was a major bug in DPL which concerned the inclusion of labeled sections. It should be resolved with the latest version now. Please download and test. Algorithmix 09:46, 21 May 2009 (UTC)
Warning message
[edit]How can I remove the %DPL-1.7.6- in front of a warning message? The problem is this added in front of the MediaWiki message and I can't find it in the core code. When there are no results I want it to display nothing. --Subfader 12:02, 28 April 2009 (UTC)
- Found it: return '%DPL-' . ExtDynamicPageList2::VERSION . '-' . --Subfader 12:49, 28 April 2009 (UTC)
- Yes, you can remove the prefix in the php source code. It is hard-coded there.
- You could use
suppresserrors=true
to suppress the error message complaininig about an empty result set. Algorithmix 09:48, 21 May 2009 (UTC)- Yep, I found out about
suppresserrors=true
later which is the better solution, nontheless I think the%DPL-
in fron of the messages are useless. Maybe remind the user that a DPL code is there. --Subfader 11:08, 21 May 2009 (UTC)
- Yep, I found out about
A Bug?
[edit]I use DPL together with MediaWiki 1.14.0, SMW 1.4.2, DPL 1.7.9 If I follow a link, that is done by the Call-Extension, the CSS-File of SMW is not included. What can I do? The main problem: The field “smwsortkey” is not more hidden, because the style for it is not included. Christian Weiss 14:44, 27 May 2009 (GMT+2)
- Please give more details. I assume that the problem has nothing to do with DPL; this means that it also occurs if you use the Extension:Call from the browser's URL-line or within a normal document like this [[Special:Call/:Mypage,a=b]]. I don´t understand your remark about a "style". Are you talking about css? Can you reproduce the error on the dpldemo website? It has DPL 1.7.9 and SMW 1.0 installed. Algorithmix 16:11, 27 May 2009 (UTC)
- The name of the extension is changed and this will create a lot of confusion about which extension infact has the bug. Jeblad 04:03, 31 May 2009 (UTC)
- It's like you said: I call a Template by the Call-Extension, the DPL-Calendar ":Current events" for example. If it's included the normal Way in a Page, in the HTML-Source the "SMW_custom.css" and the "SMW_sorttable.js" are included. If the Template ist called by the "Call"-Extension those files are not included in the HTML-Source. A workaround ist to include those files in the Common.css and Common.js for Skins, so it is included everytime. For the SMW_sortable.js I get then 2x sortbuttons :-) I think, the Call-Extension ist part of your Pakage, so I write my Problem to you. Christian Weiss 10:06, 06 Jun 2009 (GMT+2)
LoF
[edit]I sthe LoF ment to be set as global in LocalSettings? I'd prefer it as option per DPL call. So I want to use a complex DPL call I would set LoF = 3 or sth inside the call. But if I want to run a very simple call I would set LoF = 0 to save some ressources. --Subfader 15:15, 17 June 2009 (UTC)
- Currently the Level of Functionality is a configurable option which is global for the whole use of DPL in a wiki. It is meant to be a "protection belt" against abuse. I try to anticipate the aguments of those people who must be convinced to run DPL on a website lime WIKIPEDIA. Any suggestion which opens this path is welcome. I guess there will be some user rights administration component in the end - although I do not like this idea very much. --84.58.224.247 21:43, 1 July 2009 (UTC) (Algorithmix)
- kk, thanks for the explaination. I thought it's mainly to make it faster. --Subfader 05:52, 2 July 2009 (UTC)
DPL Doesn't Work after MW Upgrade from 1.13 to 1.15.1
[edit]Hi, I have a private wiki we use as a content Management system at work. I updated the wiki from MW.1.13 to MW.1.15.1, and suddenly DPL doesn't work. For example, I have a page for each of our main applications, with a supbage called 'Troubleshooting'. Below that are more subpages, one for each troubleshooting document. The '/Troubleshooting' subpage consists entirely of DPL to list the child subpages for a user to browse and jump to.
For example (changing the page names to protect proprietary information):
We have a set of pages like so:
* Main:Zazaza * Main:Zazaza/Troubleshooting * Main:Zazaza/Troubleshooting/Error 51 - File not Found * Main:Zazaza/Troubleshooting/Can't Save Configurations * Main:Zazaza/Troubleshooting/App Crashes if User Chews Bubble Gum
The top page, Main:Zazaza, describes the application and has a link to Main:Zazaza/Troubleshooting.
Main:Zazaza/Troubleshooting consists entirely of DPL code that will list the three 'troubleshooting' child subpages with links. This page's DPL Code is as follows:
<DPL> <br /> titlematch=Zazaza/Troubleshooting/% notnamespace=Image notnamespace=Image_talk notnamespace=Template notnamespace=Template_talk replaceintitle=/.......Troubleshooting./,
Previously, the DPL worked, and a user browsing to the Zazaza/Troubleshooting page would see a list of clickable links:
Error 51 - File not Found Can't Save Configurations App Crashes if User Chews Bubble Gum
Now, since the 1.15.1 upgrade, all that shows up is the following:
Extension:DynamicPageList (DPL), version 1.8.6 : <dpl_log_1>
Before you ask, no, there is no log being generated or updated anywhere within my wiki home that provides me with a clue as to why DPL isn't working.
I confess to being confused because when I originally downloaded DPL in May or June 2008, this was during the time frame that "old DPL" was known as "Intersection" and 'this' DPL was just known as "DPL", and at the time there wasn't even a reference to the forked versions on the extension page. (I only came to learn all of this with my research this past week.) However, I have verified that I am using semeb.com's Dynamic Page List (was using v.1.6.9, now using v.1.8.6.) I downloaded v.1.8.6 earlier in the week from http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/DynamicPageList/, and I just re-obtained the files from the ZIP archive available at http://semeb.com/dpldemo/images/f/fe/Semeb_extensions.zip and redeployed them to be certain. The behavior is still the same as above.
Any help would be appreciated. --ApostleGreen 23:12, 16 July 2009 (UTC)
- DPL doesnt' work with MW 1.15.0 or MW 1.15.1 and DPL 1.8.6
- DPL doesn't display anything, but I've to follow up the last Message from ApostleGreen.
- The only output is:
Extension:DynamicPageList (DPL), version 1.8.6 : <dpl_log_16>
- Please, this is a great extension, could anyone help us?!
- Many thanks in advance!!! Timotheus.elias 07:43, 17 July 2009 (UTC)
- Are you sure about all this? It worked fine for me in MW 1.14 and now in 1.16 alpha (I skipped 1.15). So you could still upgrdae to 1.16 alpha but actually I think something else is wrong on your wiki. --Subfader 10:57, 17 July 2009 (UTC)
- Hi Subfader, I tried 1.16 alpha, but it has a conflict with an other extension, so I must use 1.15.1 for now.
- The example DPL Code I used in my page:
<DPL> |titlematch=Basis:Mike3 |include = * </DPL>
- This are my used extensions:
- GroupPermissions Manager
- PdfExport
- PdfBook
- SimpleSecurity
- wiki2xml extension
- FCKeditor
- Lockdown
- Thank you!!!
- Timotheus.elias 12:49, 17 July 2009 (UTC)
- This are my used extensions:
Well, your example code is wrong. It's either
<DPL> titlematch=Basis:Mike3 include = * </DPL>
or
{{#dpl: |titlematch=Basis:Mike3 |include = * }}
Which is the other conflicted extension? --Subfader 13:28, 17 July 2009 (UTC)
- I have the same problem. After upgrade from 1.13.3 to 1.15.1 the extension stop working. I've update extension to 1.8.6, but it doesn't help. --Dnikitin 19:11, 17 July 2009 (UTC)
- It seems I fix my problem. Originally my code was
- I have the same problem. After upgrade from 1.13.3 to 1.15.1 the extension stop working. I've update extension to 1.8.6, but it doesn't help. --Dnikitin 19:11, 17 July 2009 (UTC)
<dpl> count=50 namespace=Image ... </dpl>
- After I replace Image with File the extension starts working again. --Dnikitin 22:22, 17 July 2009 (UTC)
- Yep the Image namespace was renamed to File in MW 1.14. It needs to be replaced in all DPL calls. Still it works with old [[Image:...]] tags. --Subfader 23:11, 17 July 2009 (UTC)
- After I replace Image with File the extension starts working again. --Dnikitin 22:22, 17 July 2009 (UTC)
- Thank you very much vor your quick answer. Now, after I installed your extension correctly :), I'm able to include other pages that are not protected
- by the extension Lockdown. Pages in the namespace I've locked with Lockdown extension are not includeable and there will be come following message:
Extension:DynamicPageList (DPL), version 1.8.6 : WARNING: No results.
- When I call the following
{{#dpl: |titlematch=% }}
- I'll get all Article's there are not in the extra namespace "basis" and "public". Why is this so?
- Although I don't enable Lockdown extension, there'll be the same result!
- Many thanks! Timotheus.elias 13:41, 20 July 2009 (UTC)
- The problem was fixed, the Wiki Parameter $wgNonincludableNamespaces was set and therefore this wasn't included. Thanks a lot for your great extension!!! Timotheus.elias 14:06, 20 July 2009 (UTC)
Parsing Pipes
[edit]I have run into a little bit of a quandary which I am trying to solve. I am trying to create a template with a set of parameters that are passed from a dynamically created list from DPL. However, when using the pipe character in the formatting for DPL like this:
{{Hot_issues |<DPL>category=Application category=Hot_issues format=,|,[[%TITLE%]], notnamespace=Category noresultsheader=Nothing found...</DPL>}}
...the pipe character is not parsed by the templating system, I think because of the order in which things are processed... The result is all the articles listed like this: "|Article1|Article2", and so on, instead of passing each one as a template parameter. I have been trying, but I can't think of a way around this. Does anybody have any thoughts on this? --Bsmithme 21:12, 18 July 2009 (UTC)
- I have tried using subst:Hot_issues but that had no effect. I've also tried creating a template with "|", but that didn't work either. I think I am approaching it wrong...--Bsmithme 21:15, 18 July 2009 (UTC)
- Try ¦ --Subfader 21:16, 18 July 2009 (UTC)
- No luck there. I think ¦ is only used when you are using #dpl and need a pipe in the dpl parameters, but I'm not sure (versus <DPL> where you can use pipes with impunity). --Bsmithme 21:29, 18 July 2009 (UTC)
- Dunno your template but shouldn't it be {{Hot_issues<DPL> without | cos that will be return in front of the first result already. Try
- No luck there. I think ¦ is only used when you are using #dpl and need a pipe in the dpl parameters, but I'm not sure (versus <DPL> where you can use pipes with impunity). --Bsmithme 21:29, 18 July 2009 (UTC)
- Try ¦ --Subfader 21:16, 18 July 2009 (UTC)
{{#dpl: |notnamespace=Category |category=Application |category=Hot_issues |format=²{Hot_issues,\n¦[[%PAGE%]],,}² }}
- Finds only pages in cats Application AND Hot_issues. Also [[%TITLE%]] doesn't make much sense to me when should find pages from all namespaces except subcats. If it doesn't help post your template here as I can't image what you try to do there by sending an unknown ammount of parameters (each page link) to the template. --Subfader 22:15, 18 July 2009 (UTC)
- Think the best way to illustrate what I'm trying to do is this:
- Finds only pages in cats Application AND Hot_issues. Also [[%TITLE%]] doesn't make much sense to me when should find pages from all namespaces except subcats. If it doesn't help post your template here as I can't image what you try to do there by sending an unknown ammount of parameters (each page link) to the template. --Subfader 22:15, 18 July 2009 (UTC)
{{Hot issues | DPL result 1 | DPL result 2 | and so on }}
So that the page calling the hot issue template is automatically populated based on the results of the DPL query. I'm starting to think it might not be possible to do it this way. --Bsmithme 23:45, 18 July 2009 (UTC)
- Oh, but you are on to something with your suggestion and I think I can get it to work with some more fidgeting. --Bsmithme 23:52, 18 July 2009 (UTC)
- Aha! I got it with this:
{{#dpl: |notnamespace=Category |category=Application |category=Hot_issues |format=²{Hot_issues,¦%PAGE%,,}² }}
Thank you so much for your assistance, Subfader. --Bsmithme 23:56, 18 July 2009 (UTC)
RESOLVED: Fatal error
[edit]After upgrading my wiki to MW 1.15 I got the error message:
Fatal error: Unsupported operand types in /home/schlott/public_html/wiki/includes/parser/LinkHolderArray.php on line 33
and the extension stoped working.
The solution was inside the DynamicPageList/DPL.php with the following statement in Line 36:
// cloning the parser in the following statement leads in some cases to a php error in MW 1.15 // You must apply the following patch to avoid this: // add in LinkHoldersArray.php at the beginning of function 'merge' the following code lines: // if (!isset($this->interwikis)) { // $this->internals = array(); // $this->interwikis = array(); // $this->size = 0; // $this->parent = $other->parent; // }
After adding the mentioned code lines to LinkHoldersArray.php the extension works just fine. -- Flaming Moe
- Does this still happen in later versions of MediaWiki? I'm experiencing the same issue with version 1.17, should I try this solution? - 186.218.184.219 18:53, 17 June 2012 (UTC)
Comment on differing versions by Algorithmix
[edit]- Note that the version running on Wikimedia sites was at some point in time renamed to Extension:Intersection to avoid confusion with the extension described here. But the documentation still was talking of "DynamicPageList" and the SVN path was not renamed.
- Recently 'Intersection' claimed back its ancient name and that is why you now find the documentation of 'Intersection' under 'Extension:DynamicPageList'.
- On the other hand the DPL extension described here was still named 'DynamicPageList' and new functions were added. At some point in time downward compatibility with the version running on Wikimedia sites was lost. The extension was renamed to 'DynamicPageList2' but the documentation was still talking of "DynamicPageList".
- Then another bunch of functionality was added and downward compatibility (with DPL2) was lost. The name of this version was changed back to DPL (which was thought to be 'free').
All this has created much confusion. Read below for a suggestion on how to re-unite the different variants.
This extension Dynamic Page List (DPL) has the same roots as Extension:Intersection. Until recently DPL was almost - but not exactly - downwards compatible with Intersection. A lot of confusion comes from the fact that Intersection uses the tag <DynamicPageList> whereas Dynamic Page List (DPL) uses the tag <DPL>.
DPL offers functionality that goes far beyond Intersection. Some of this functionality might be useful also on Wikimedia sites. But the problem is that inexperienced users or people with 'not-so-good-intentions' might write DPL statements which create significant database load.
A good solution - which also puts an end to all naming ambiguities of DynamicPageList, DPL, DPL2 and Intersection looks like this:
- There should be only ONE extension.
- It should be called DynamicPageList (short name DPL).
- It should listen to the tags DynamicPageList and DPL for compatibility reasons.
- Its sources should be in the mediawiki SVN
- It should be strictly downward compatible with Intersection.
- It should offer a configuration switch (let us call it LevelOfFunctionality = LoF) which lets the administrator of a wiki decide, how much functionality will be offered to the users:
- LoF = 0 is exactly identical with Intersection as of today.
- LoF = 1 offers additional features which do not affect performance (mainly related to output formatting)
- LoF = 2 offers additional features which are on the same conceptual level as Intersection like selection of pages by use of templates or by pagelinks. As the underlying table structures in the mediawiki database design are very similar to categories the performance cost of theses features are comparable in magnitude with Intersection's current features
- LoF = 3 offers additional features which are more cost-intensive, like e.g. content transclusion from pages that occur in the DPL result; we think that a dedicated DPL cache could allow to offer these features also on high traffic sites - but this still has to be proved
- LoF = 4 offers a last group of features which are a somewhat exotic and could create trouble if used by ignorant people (batch updates and batch deletions based on DPL query results)
--Algorithmix 17:18, 1 June 2009 (UTC)
DPL 1.8.0 made a huge step into that direction.
After some bugfixes we now have DPL 1.8.4 as a stable release which can serve as a base for re-unification of all DPL variants..
Please help testing! --Algorithmix 21:10, 15 June 2009 (UTC)
- Moved from the main page. GreenReaper 20:02, 22 August 2009 (UTC)
- My own thoughts on this: it's a good idea, but performance is a huge consideration. I suggest investigating ways to avoid loading DPL code unless it is required, particularly $wgAutoloadClasses. Right now APC shows that it is touching all the code on every page access, and that's a significant cost when you have a large number of pages being accessed. GreenReaper 21:51, 22 August 2009 (UTC)
- The latest version of DPL only loads a small portion of its php code on the initial require_once(). ONLY if there is a DPL call within a page the rest of the php code will be loaded. Which version did you test? Algorithmix 05:53, 23 August 2009 (UTC)
- Ah, indeed it does - thank you! I was using 1.8.6 and it seems you made that change in 1.8.7 - I updated to 1.8.8 and now only DPLSetup.php is showing up on each load. That is a big improvement in code loaded - from 1.1Mb to 150kb. :-) GreenReaper 19:55, 23 August 2009 (UTC)
Trying to List Pages...
[edit]Trying to List Pages within a Namespace in Category Mode, Alphabatized on a non category page. Sounds ridiculous however this is the syntax that i am using:
<dpl> namespace=Article shownamespace=false mode=category ordermethod=category,title </dpl>
What i am trying to do is show all pages in the article namespace on a page in category mode alphabetized by the page title rather then the namespace. Currently all pages are organized under "A" because the pages are named Article:Page Name. I want to eliminate or mask the Article so that they are organized by Page Name.
Kevindank AT Gmail.com
- Hmh, you aren't very clear.
- 1) is there really a custom namespace called "Article"? Cos otherwise you mean Main: "namespace="
- But I guess I know what you mean. Like in this example you don't want U headings but 0-Z... I dunno a solution :/ --Subfader 21:17, 21 October 2009 (UTC)
Workaround
[edit]If you apply a very small patch you can use
ordermethod=titlewithoutnamespace
to get the desired result:
find (near line 1860 in DPLMain.php in the latest version)
case 'titlewithoutnamespace':
and add the following line immediately after that line:
$sSqlSortkey = ", $sPageTable.page_title ".$sOrderCollation." as sortkey";
I will add this code line to the next release.
In fact, the patch will make the new behaviour the default (which is o.k., I think). Use ordermethod=title
to switch to the old behaviour.
84.59.226.244 07:01, 22 October 2009 (UTC)
This worked perfectly Thank You.
DISPLAYTITLE and DYNAMIC PAGE LIST
[edit]is it possible to tie this to DISPLAYTITLE to sort pages by their DisplayTitle?
installation instruction problems
[edit]Thanks for this powerful extension. In order to help others to use it, I want to report two problems I just had in following the installation instructions in the article.
The instructions say:
add include("$IP/extensions/DynamicPageList/DynamicPageList.php"); to LocalSettings.php
However, the actual file downloaded for v1.14 was named DynamicPageList2.php. This modification worked:
include("$IP/extensions/DynamicPageList/DynamicPageList2.php");
The second problem is probably due to my lack of familiarity with PHP. The instructions appear to say to add a function call in LocalSettings after the include() statement above to control the richness level, like this:
ExtDynamicPageList::setFunctionalRichness(3);
However, this caused a fatal error, so I commented it out. Should the call be like this?
DynamicPageList2::setFunctionalRichness(3);
--AJim 21:20, 30 October 2009 (UTC)
DPL extension inserts a blank line headline
[edit]Problem: DPL extension inserts a blank line in the article title (see picture). Other articles that do not use DPL, displayed without distortion.
I use the original Monobook skin and the following versions of components:
- MediaWiki - 1.15.0
- PHP - 5.2.8 (appache)
- MySQL - 5.1.30-community-log
Can you tell me how to solve the problem, please. Thanks!
Kabanoff 13:57, 5 November 2009 (UTC)
- Never had this problem. But since it's also on the DPL website I guess it's not so easy to fix? --Subfader 14:35, 5 November 2009 (UTC)
- Perhaps. The problem on this wiki appears when the user is not logged in the system. In my wiki blank line appears wherever there is DPL. Discussion of this issue is on DPL issue page --Kabanoff 08:53, 6 November 2009 (UTC)
- The simplest way to go is to edit the main.css of your own skin. In Monobook, search p-cactions, you will see "top: 1.3em;" (or similar). Change it to "top: 2.3em". It may work. --Dullmau 20:26, 10 June 2010 (UTC)b
Having DPL Maintain #section Links
[edit]If the pages I'm building my DPL from have links like [[#section|A Section]]
, is it possible to to have DPL maintain the url of the page with that specific section, rather than have it change it to the page that has the DPL on it? — Cosmotron 18:56, 8 November 2009 (UTC)
Template:DPL_Extension creation as potential redirect loop
[edit]There is a DPLSetup.php routine, commonSetup(), which attempts to create an {{Extension DPL}} template using the userid of the first user to visit the wiki after the extension is installed:
private static function commonSetup() {
if (!isset(self::$createdLinks)) {
self::$createdLinks=array(
'resetLinks'=> false, 'resetTemplates' => false,
'resetCategories' => false, 'resetImages' => false, 'resetdone' => false , 'elimdone' => false );
}
// make sure page "Template:Extension DPL" exists
$title = Title::newFromText('Template:Extension DPL');
global $wgUser;
if (!$title->exists() && $wgUser->isAllowed('edit')) {
$article = new Article($title);
$article->doEdit( "<noinclude>This page was automatically created. It serves as an anchor page for ".
"all '''[[Special:WhatLinksHere/Template:Extension_DPL|invocations]]''' ".
"of [http://mediawiki.org/wiki/Extension:DynamicPageList Extension:DynamicPageList (DPL)].</noinclude>",
$title, EDIT_NEW | EDIT_FORCE_BOT );
die(header('Location: '.Title::newFromText('Template:Extension DPL')->getFullURL()));
}
}
Two issues with this:
- (minor) The external link Extension:DynamicPageList (DPL) points to a disambiguation page here instead of to the actual extension info.
- (not so minor) If creation of the template fails, the user is redirected to Template:Extension DPL regardless, and the failed attempt to create the template is repeated until the browser detects this as a redirect loop and shuts down.
I've noticed that new installs, if started with just a blank set of database tables and a LocalSettings file (without running the MediaWiki installer again for the new wiki), are prone to go into an endless HTML redirect loop because of this code. Attempts to run maintenance/update.php from the command line may also abruptly end with errors if the extension is trying to create this page during the "update.php" run and the database is not yet updated to the latest MW format (and therefore not ready for the template creation attempt).
There needs to be some error handling; if the creation of the placeholder template fails, don't just keep trying forever - at least not if this is going to return errors or redirect loops. --Carlb 14:12, 9 November 2009 (UTC)
Dynamic Pagelist vs. Semantic Mediawiki
[edit]I have started a Comparison of Dynamic Pagelist x Semantic Mediawiki. Please help to give valuable information for a good choice. --Jannis 19:19, 22 December 2009 (UTC)
2010
[edit][SOLVED] White page after including Semantic Media Wiki Extension in LocalSettings.php
[edit]Hello,
I installed the Semantic Media Wiki extension on a Media Wiki 1.16.0
According to the install notes on the page I appended the following two lines to the LocalSettings.php:
include_once("$IP/extensions/SemanticMediaWiki/SemanticMediaWiki.php");
enableSemantics('filerepos.de');
After that I get a blank page on every URL of the Wiki.
Set error_reporting to E_ALL (in LocalSettings.php, SMW-Config-Files) but also got a blank page.
Also tried the hint from the Semantic Wiki Site with no success:
ini_set( 'memory_limit', '100M' );
When I comment the both lines out everything works again.
(Setup: Mediawiki 1.16.0, PHP Version 5.2.6, MySql 5.0.45, Semantic Media Wiki Extension 1.5.3 stable)
Would apreciate any hint.
- This page is only for support for the DynamicPageList extension. You're more likely to get a response if you ask the SMW people. With that said, Did you add the:
error_reporting(E_ALL); ini_set("display_errors", 1);
as the very first lines of LocalSettings.php (directly below the opening <?php )? If that still doesn't work, try setting error reporting to E_ALL directly in your php.ini file. You can also try checking your webserver's error log as well (doesn't usually have php errors in it, but if its some sort of config problem with your webserver it might have relevant information). Bawolff 22:31, 26 November 2010 (UTC)
Thanks for the reply...think ini_set got the errorReporting working.
Now there is some output I can work with:
http://www.mediawiki.org/w/index.php?title=Extension_talk:DynamicPageList_(third-party)&action=edit§ion=38
Call to undefined function enableSemantics() in /srv/www/vhosts/filerepos.de/httpdocs/websites/semwiki/LocalSettings.php on line 138
[SOLVED] I accidently downloaded the wiki and the extension with different user...so the wiki wasnt allowed to access the extension. Changed extension files owner to the same owner as the wiki and so everything works now. Thanks for the error reporting hint which allowed me to find my mistake
Undefined index and .default
[edit]I try to make the DPL-Extension read out a category and get the parameters of a template in the articles of this category. They are meant to be used in another template. I saw another wiki which did it the same way as I did, but I get a strange Error while using the preview on this:
<DPL> category = Some Category mode = userformat includepage = {Template in articles} Kr allowcachedresults = true </DPL>
"Notice: Undefined index: tip ... EditPage.php". The line is this: "$tip = $tool['tip'],". This is strange but probably not that important. The real problem I got ist, that the extension always adds an ".default" at the end of the template. So I get a long list which just says "Template:Template in articles Kr.defaultTemplate:Template in articles Kr.default...".I don't really get the origin of the problem and couldn't find an answer anywhere. I didn't change anything in the basic code of mediawiki, except for some extra buttons i added in EditPage.php. There are also no extensions, that could affect the DPL extension.--Eski123 12:14, 2 January 2010 (UTC)
- My five cents on this: according to doc, the DPL engine calls a template with the additional sufix ".default" when a page listed in the result does not use the specified template. Pierrem100 14:49, 26 October 2010 (UTC)
Problems with missing subheads
[edit]DPL is apparently crashing when used with a subhead that doesn't exist on one of the pages included by Category.
I have the following DPL code on a page called "Current projects":
=Projects in process= {{#dpl: |ordermethod=lastedit |order=descending |category=Projects |include = #Project steward, #Need |includetrim=true |table=class="sortable", Project, Steward, Need }} =Completed projects= {{#dpl: |ordermethod=lastedit |order=descending |category=Projects, completed |include = #Project steward, #Final accounting |includetrim=true |table=class="sortable", Project, Steward, Final Accounting }}
The first DPL call works if I temporarily clip out the second DPL cal, but including the second DPL call displays:
- Fatal error: Call to a member function getPrefixedDBkey() on a non-object in /Library/WebServer/EcoReality/wiki/includes/parser/Preprocessor_DOM.php on line 994
I then looked over the pages in the Category "Projects, completed" and discovered several of them did not have a subhead called "Final accounting." These are old pages, and this worked once upon a time!
For now, I've removed "Final accounting" from the second DPL call, but it seems it should behave better than this in such a case, no? Have I messed up something to cause it to misbehave this way?
See it fixed at: http://www.ecoreality.org/wiki/Current_projects .
- If you haven't found it, this appears to be a problem with the DOM parser that has a patch on bugzilla. (I forgot to sign AND log in, awesome) --WeaverThree 20:03, 23 March 2010 (UTC)
Spaces and underscores
[edit]It seems that the "titleregexp" parameter doesn't interpret spaces and underscores the same way. In fact, since page names can't have spaces in them, any time there is a space it just flat out fails. This would ordinarily not be such a big deal, so, okay, you learn not to use spaces, however i have a template for detecting direct subpages of a page (but not sub-subpages). the regexp is DynamicPageList (third-party)/[^/]*$ however, if used on a page with a space in the name, DynamicPageList (third-party) returns a space there where dpl requires an underscore. It seems to me that spaces and underscores should be totally interchangable in dpl, as they are in the rest of MW. DeFender1031 11:22, 29 January 2010 (UTC)
MediaWiki SVN code incompatible?
[edit]The code in the mediawiki SVN does not work as per the instructions on the page. I wonder if we should remove this code to avoid confusion? JonathanWilliford 20:44, 6 February 2010 (UTC)
- I found out that some MediaWiki users are trying to copy some of the functionality available from the zip file into the MediaWiki repository, while making sure that the code meets MediaWiki's coding standards. I created a section on the main page to comment on some of the differences in the code that is pertinent to users of the extension. --JonathanWilliford 22:24, 6 February 2010 (UTC)
DPL breaks references in Cite?
[edit]I'm having a weird problem with DPL and the Cite extension (Extension:Cite). A <ref>asdf</ref> reference won't show up in the <references/> section if any DPL query is run in between. Dug into the code a bit and it seems like DPL clones the parser and does a clearState(), maybe that clears the active cite object as well for some reason? Anyone else have this problem? Is there a workaround? I'm running MediaWiki 1.15.1, DPL 1.8.9 with PHP 5.2.6. --Shadowie 15:02, 27 February 2010 (UTC)
- Found an active bug about this now as well. --Shadowie 15:07, 27 February 2010 (UTC)
- This is still a problem. 24.167.100.32 23:03, 15 November 2012 (UTC)
- This is happened to me on a wiki running 1.19 a few months ago, but I bookmarked it for later and ended up abandoning the DPL scheme for unrelated reasons before looking for a resolution. Now I'm using DPL heavily on a corporate wiki and I need both of these functionalities intact.
- It doesn't matter where the DPL function comes from, even transcluded from a subpage, it clears the {{Reflist }}. References that appear after (or inside of) the DPL function are loaded normally, but the only way to make the references from before the first DPL function appear seems to be to place a {{Reflist }} above the DPL function on the page, which is a problem for so many reasons. Does anyone know of a workaround?
- I'm running Mediawiki 1.20, DPL 2.01, PHP 5.3.19, and MySQL 5.1.30. Cheers. Michael Chidester (talk) 16:38, 30 January 2013 (UTC)
Great and easy: Searchable Tables
[edit]I use the TableTools (Firefox-Extension) to search the tables generated with DynamicPageList (Mediawiki-Extension); see here [1]
With the Firefox-Extension installed you can right-click into a table and choose
- show Filter (german: Filter anzeigen)
- show Searchfilter (german: Suchfilter anzeigen)
With the first you get lists where you can choose an item in the table-heading and get all the rows matching this item.
With the second you get searchfields in the heading to use for a wildcard-search.
Both functions are very (!) usefull for the DynamicPageList-tables. But it is not userfriendly for less sophisticated users to right-click to get the function. I would like to put such functionality with an easy dpl-command into the heading, similar to the magicword "wikitable" or "sortable": "searchable". Now I wonder if it would be possible to integrate such a great feature directly into DynamicPageList??
I hope that others are also interested in such a feature.
Jan, --87.186.27.10 20:58, 1 March 2010 (UTC)
Bug found in Mix/Max revisions
[edit]Lines 2376 - 2381 of DPLMain.php should be modified as follows to use the abstract table names:
if ($iMinRevisions != NULL) { $sSqlWhere .= " and ((select count(rev_aux2.rev_page) from $sRevisionTable as rev_aux2 where rev_aux2.rev_page=$sPageTable.page_id) >= $iMinRevisions)"; } if ($iMaxRevisions != NULL) { $sSqlWhere .= " and ((select count(rev_aux3.rev_page) from $sRevisionTable as rev_aux3 where rev_aux3.rev_page=$sPageTable.page_id) <= $iMaxRevisions)"; }
86.54.80.245 15:17, 19 March 2010 (UTC)
Setting parameter without using template?
[edit]Hi, it seems that all parameters are set in a template. In my wiki, there is a pretty standardized section and i would like to implement DPL on it. It's not a template but just a list of 1....2....3...list. Is there any markup tag that i can tell DPL that item01 = 1.. ; item02 = 2... ; item03 = 3.... ?
The current method is like this. It's actually good but in a FCKeditor-based Wiki, it may be too difficult to ask laymen to learn it.
{{
Country
|capital=Bamitogoo
|name=Republic of Nigunda
|dial=237
}}
--Dullmau 12:57, 19 June 2010 (UTC)
I downloaded the daily build of MW 1.17 alpha (12:13, 20 June 2010 - revision: r68310) core code and extensions and this seems to be broken. Symptoms are the same as reported in bug 22675 four months ago, the output appears on-screen as an HTML source code dump (<a href="...) instead of as hyperlinks in their clickable form. The Wikimedia (intersection) version of the extension still works normally with no other change to configuration. --Carlb 23:03, 20 June 2010 (UTC)
- This applies to MW 1.16 beta3 as well. Thorncrag 02:47, 29 June 2010 (UTC)
- The same problem with MW 1.16 beta1 EduRam 09:41, 1 July 2010 (UTC)
- Oops. I just downloaded r68608 and it works with 1.16 beta3. I imagine it will with 1.17 as well. Should have done that before. :) Thorncrag 01:36, 30 June 2010 (UTC)
- Er, now it appears I was somewhat incorrect. It appears as though some DPL statements are functioning and some are not, in r68608. Continuing to investigate. Thorncrag 22:31, 30 June 2010 (UTC)
- Actually,this issue fixed in r68812 completely.You can download the new DPLMain.php to solve this problem.--Xlsoul 07:43, 21 July 2010 (UTC)
- Er, now it appears I was somewhat incorrect. It appears as though some DPL statements are functioning and some are not, in r68608. Continuing to investigate. Thorncrag 22:31, 30 June 2010 (UTC)
- Oops. I just downloaded r68608 and it works with 1.16 beta3. I imagine it will with 1.17 as well. Should have done that before. :) Thorncrag 01:36, 30 June 2010 (UTC)
imagecontainer
[edit]Hi, I'm using DPL and imagecontainer, but I'm not sure what the problem is.
<DPL> imagecontainer=Constructed items (1-24) </DPL>
Shouldn't this give a list of all of the images used on the page? It's blank. 24.41.43.85 21:37, 1 July 2010 (UTC)
- imagecontainer might be disabled - it needs the functionalrichness parameter to be at least 2. (if that is the case, I have no idea if there would be an error of some sort. this is just a guess, I don't know much about DPL2). Also check your version. imagecontainer was added in 1.7.4, some sites use older versions (wikia for example uses 1.6.4) Bawolff 23:06, 1 July 2010 (UTC)
- Well, that would probably be the problem (the version; I'm using wikia). Is there any other way to make a list of all the images on the page? 24.41.43.85 00:51, 2 July 2010 (UTC)
- You can use the api - http://runescape.wikia.com/api.php?titles=Constructed_items_(1-24)&action=query&prop=images&imlimit=max (if you need pretty output you can use either javascript or xslt) Bawolff 07:44, 2 July 2010 (UTC)
- Thank you very much. I ended up using a mix of DPL and AWB to figure it out :). 24.41.43.85 06:16, 9 July 2010 (UTC)
- You can use the api - http://runescape.wikia.com/api.php?titles=Constructed_items_(1-24)&action=query&prop=images&imlimit=max (if you need pretty output you can use either javascript or xslt) Bawolff 07:44, 2 July 2010 (UTC)
- Well, that would probably be the problem (the version; I'm using wikia). Is there any other way to make a list of all the images on the page? 24.41.43.85 00:51, 2 July 2010 (UTC)
PHP error since moving host
[edit]Hello,
Anyone got an answer for this PHP error, which has been appearing ever since I switched to a new web host? DPLs have stopped appearing on the pages, seems this error is to blame.
Parameter 3 to ExtDynamicPageList::dplTag() expected to be a reference, value given in /[snip]/includes/parser/Parser.php on line 3243
I've tried upgrading DPL, no luck. Is it a permissions problem perhaps? 87.194.148.160 17:14, 6 July 2010 (UTC)
- You have to change the signature of the method dplTag() in line 865
- public static function dplTag( $input, $params, $parser )
- 190.107.36.184 15:30, 30 July 2010 (UTC)
- Thank you, it works (I've had this problem since I'd upgraded to PHP 5.3.x. ;)
I've noticed some weird issues with PHP 5.3. The above patch resolves some but not all. The <DPL> tag is now working but {{#dpl}} is still broken, at least on my Ubuntu localhost with PHP 5.3. On the server, with RHEL and PHP 5.3 (same minor version) neither dpl thing is working. I've looked a bit into the differences between PHP 5.2 and 5.3, mostly the by-reference parameter stuff but so far I haven't fixed this yet. Guaka (talk) 14:12, 21 February 2012 (UTC)
- I did some Automated PHP 5.3 compatibility testing (based on PHP_CodeSniffer) and (unfortunately) only got some warnings about split() (which should become preg_split()). Guaka (talk) 15:12, 21 February 2012 (UTC)
Image inside a template
[edit]Is there by chance a way to make a list of all of the images that are used in a template? For instance, on this page, I'd like to have it add File:New Rune Scimitar.png . It's a parameter on the template, not part of the template itself. Is there a way to do so? 24.41.43.85 06:19, 9 July 2010 (UTC)
- Anyone? 24.41.43.85 22:10, 10 July 2010 (UTC)
Parser function after a backup
[edit]I seem to have a strange issue after restoring a backup of my wiki on another computer. Both computers are using DPL version 1.8.9. I have a bunch of pages that use the parser function variant ({{#dpl: ...}} through some templates. For some reason, they display incorrectly on the new computer. Basically they just show the function then all of the parameters in what looks like a PRE tag.
The parser tag works fine. I can take the same queries and change them to the tag variant on a test page and they work great. The trouble is I need these to work in templates, so the function is needed. Anybody have any ideas what would cause this? - Glycerine102 14:50, 19 July 2010 (UTC)
- No idea whats causing your original issue, but you can also try {{#tag:DPL - see Help:Magic_words#Miscellaneous. Bawolff 01:42, 20 July 2010 (UTC)
- I highly suspect this to be an issue with PHP 5.2 vs 5.3... Guaka (talk) 15:37, 21 February 2012 (UTC)
Parser versus Hook change?
[edit]Does anyone know what might have changed in the code to cause the following statement to no longer include the category here, as seen below:
{{#dpl:category={{PAGENAME}}|category=Application Error|notcategory=Subtopic-topic|replaceintitle=/{{BASEPAGENAME}}\//,|format=,\n*,[[{{BASEPAGENAME}}/%TITLE%{{pipe}}%TITLE%]],|notnamespace=Category|noresultsheader=There are no symptom entries for this application.[[Category:Articles with no symptom entries]]}}
The odd thing is that it is actually working for one of my templates. I resolved the issue by converting to the <DPL> hook instead. Still, it seems strange that this suddenly stopped working. Thorncrag 20:31, 18 August 2010 (UTC)
- And I have just discovered that my workaround will not suffice because using the hook causes replaceintitle to not function the same as when using the parser call instead. Thorncrag 21:18, 18 August 2010 (UTC)
- Note, as said in the thread above this one, you can also use {{#tag:DPL to access the <DPL> tag as a parser function which should have the exact same behaviour as <DPL> (compared to {{#dpl: which has slightly different behaviour compared to <DPL>). Bawolff 17:41, 19 August 2010 (UTC)
Even with this tag format, the noresultsheader is not honored, for some unknown reason. Thorncrag 19:45, 19 August 2010 (UTC)Due to being dyslexic I misread the suggestion... This actually might work, I shall troubleshoot further. 23:31, 7 October 2010 (UTC)
- Note, as said in the thread above this one, you can also use {{#tag:DPL to access the <DPL> tag as a parser function which should have the exact same behaviour as <DPL> (compared to {{#dpl: which has slightly different behaviour compared to <DPL>). Bawolff 17:41, 19 August 2010 (UTC)
- This might also be a PHP 5.2 vs 5.3 problem... Guaka (talk) 15:45, 21 February 2012 (UTC)
Is this extension provoking an early call to ParserClearState?
[edit]On Extension talk:VariablesExtension#Big Job Queue/Import bug solved in 1.3 a bug in combination with Extension:VariablesExtension was reported. It seems like DynamicPageList triggers an early call of the hook ParserClearState which could cause trouble with several extension. Do you have any idea how this happens and what would be the best solution to solve this problem between the extensions? --Danwe 04:35, 31 August 2010 (UTC)
70760 and mw 1.16+
[edit]i know it's not the most secure thing in the world, but do they still play nice together? redekopmark 18:38, 13 September 2010 (UTC)
- I'm not sure what the number of 70760 is, however as far as i know they still play nicely together as long as the version of DPL is post rev:68812. However with that said, the categorylinks table changed quite a bit in 1.17 (aka current svn head). Some features might break in subtle (or perhaps not so subtle ways) because of that. It will certainly be less efficient for plain ole' category listings (but then again this is a very inefficient extension, so if you care about efficiently, I doubt you'd use it). Short answer: In my testing it still works, but no guarantees (+ the XSS issue). Bawolff 22:10, 13 September 2010 (UTC)
- okay, thanks, the 70760 is the revision that i got when i downloaded the trunk version earlier today and i'm only planning on using it with 1.16 until 1.17 hits stable, again, thanks redekopmark 04:29, 14 September 2010 (UTC)
DPL & Nested Templates?
[edit]I may be missing something so I am posting the question here. Can DPL query variables passed to a nested template? Meaning, ...
- You have a page named Resource1 which uses a template called ResourceType1 which is a member of the Asset Category.
- Within template ResourceType1 you pass variables to and call the template called AssetInfo.
- You then construct a DPL query which based on the Asset category queries all pages member of Asset and lists the variables found on the nested AssetInfo template
The rational for such a construct would be to list AsseInfo common to all resources which may use different ResourceType templates (type1, type2, etc) but are all members of Asset. Since the include/includepage line in DPL table output must be consistent, querying the nested common template seems the best approach but does not work. please advise?, thanks ahead of time for replies 208.79.244.111 23:23, 4 October 2010 (UTC)
Replace in title breaks with titles that contain parentheses
[edit]I've just discovered that an article title which contains parentheses causes the replaceintitle statement to break in that it will no longer perform any longer. In context, I have a replaceintitle which is supposed to remove the BASEPAGENAME from the title or an article that is a subpage, so that when I output title I can output only the name of the subpage instead of the entire trail. I still need to do further troubleshooting to see if it is actually BASEPAGENAME or %TITLE% which is breaking. Nevertheless, it's clearly an issue with the extension. 22:41, 7 October 2010 (UTC)
- Note, per issue I reported above, I changed to #tag:DPL .... which is what bawolff had suggested. Unfortunately I misread it a long time ago... Anyhow that seems to have sufficiently worked around this issue. 23:30, 7 October 2010 (UTC)
- Well, changing to tag:DPL is till not yielding the results I need. It seems that several of the DPL options are not honored when changing to it. So I'm back to parentheses breaking again. 01:12, 8 October 2010 (UTC)
- {{#tag:DPL Should take the exact same syntax as <DPL>. If there's something that works for <DPL> but not {{#tag:DPL, that's probably a bug in mediawiki (core) not the extension, since converting {{#tag:DPL to <DPL> is part of the parser. (With that said, I'm not sure how it'd help you with your issue, since the two should be exactly the same with exception of parsing the args before passing to DPL.). Bawolff 22:19, 26 October 2010 (UTC)
- Well, changing to tag:DPL is till not yielding the results I need. It seems that several of the DPL options are not honored when changing to it. So I'm back to parentheses breaking again. 01:12, 8 October 2010 (UTC)
Use with TreeAndMenu Extension ?
[edit]Hi,
I only need this:
{{#dpl:category=Foo|format=,**,%PAGE%\n,}}
..To dynamically add all pages to a tree that is created by the Extension TreeAndMenu. I´ve tested it and it works great. Though I´m planning an opened wiki I´m a bit scared about the red box on this extensions main page telling me that it has a major security risk.
Is it possible to enable this extension only for a specific (admin) page or to eliminate the security risk by adding some contraints?
Thanks in advance! 87.78.238.27 18:47, 4 December 2010 (UTC)
- The security risk will be eliminated in the next version. If you protect the the page with the DPL statement against changes, however, there should be no risk, even with the current version. 84.59.134.95 17:27, 10 December 2010 (UTC)
- Hmm? Someone could just write a new DPL on an unprotected page. You'd also need to make it so DPL's only ran on protected pages. (I think there might even be an option for that. can't remember). Bawolff 19:09, 10 December 2010 (UTC)
Hi, thaks Bawolff, I´ll take a look at the settings soon. If you remeber please post it here.
87.78.237.140 09:33, 11 December 2010 (UTC)
ExtDynamicPageList::$options['RunFromProtectedPagesOnly'] = "NO DPL FOR YOU!";
See http://semeb.com/dpldemo/index.php?title=DPL:Manual_-_Source_and_Installation#DPL_Security (Note I haven't looked at the code implementing that, so I can't vouch for its security in any way or form, but the manual claims that it will work). Bawolff 17:09, 11 December 2010 (UTC)
Hi, thanks a lot! Have a nice christmas time! 87.78.48.253
Hi again. Sadly that was not the solution. If the option to allow DPL only on protected pages is enabled this also affects the NavTree (Extension: TreeANDMenu) that needs DPL to work propperly. What I need is DPL to only work in the sidebar :-). But I don´t know if that is easily possible?
Thanks!
195.14.207.110 19:30, 19 December 2010 (UTC)
2011
[edit]Tree and Menu and DPL - Advanced use
[edit]I'm currently using Tree and Menu and DPL to generate lists as shown in the Example. Works fine.
{{#tree:id=ToolsMenuTree|openlevels=0|root=Tools, Tips and best practice| * Overview (Introduction Page) {{#dpl:category=Tools and Tricks|format=,**,%PAGE%\n,}} }}
The problem is that our wiki will have a lot of pages and subpages, making the list expand really fast with similar named entries such as:
Outlook Outlook/Installation Outlook/Usage
With the example structure above, is there a way to automatically create subfolders for all subpages using DPL syntax? Should be looking something like that
**Outlook ***Installation ***Usage
Any hints would be greatly appreciated. (Mike) dpl nested
- For subcategories you could use nested queries. Not sure how to implent that for subpages. You may need titleparts and titlematch.
- I once wrote a subpages script but it had some bug in the order iirc. --Subfader 19:20, 21 January 2011 (UTC)
Error on line 442
[edit]Hello, how can I solve this error?
Deprecated: Function split() is deprecated in /home/tibiawi/public_html/extensions/DynamicPageList/DynamicPageList2Include.php on line 442
- Replace the
split()
call withpreg_split()
, that should be equivalent. :) Make sure the line is passing the arguments as it should, though, the function headers are subtly different. -pinkgothic 14:36, 28 January 2011 (UTC)
DPL transclusion and performance tip
[edit]Better write of the (meanwhile deleted) ramble below is at User:Pinkgothic/DPL, which is very layman oriented, so probably going to bore most people out of their minds, but I like having something I can link anyone to. :) -pinkgothic 15:49, 28 January 2011 (UTC)
- Deleted the ramble, better read the extended version ;-) --Nakohdo 17:56, 8 February 2011 (UTC)
Semeb.com Troubles?
[edit]The whole /dpldemo/ folder seems to have disappeared from semeb.com. Is there somewhere else we can go to get to the manual? –DamnedScholar 20:51, 4 February 2011 (UTC)
- Seems to be back: http://semeb.com/dpldemo/ --Nakohdo 17:48, 8 February 2011 (UTC)
- So it is. –DamnedScholar 03:48, 14 February 2011 (UTC)
Issue with replaceintitle
[edit]I'm having an issue with replaceintitle when attemtping to do a replacement on a title which includes an apostrophy.
Here is my dpl call:
{{#dpl: |shownamespace=false |suppresserrors=true |titlematch={{PAGENAME}}/% |replaceintitle=/{{PAGENAME}}\// |format=,\n* [[%PAGE%|%TITLE%]],, }}
The above works perfectly on, for example, "John Smith", but "John O'Shea" fails to return any results. I've tried a number of ways to escape the apostrophy with no success, so any help would be greatly appreciated.
-AerosAtar 20:04, 19 February 2011 (UTC)
- Extension:StringFunctions#.23replace:, Extension:MultiReplace --Subfader 00:29, 20 February 2011 (UTC)
- I've tried using a #replace call from ParserFunctions (running 1.16.2), but it fails under the same circumstances. It is possible I wasn't writing the regexp correctly though. What would you suggest I try within the #replace call?
- -AerosAtar 22:37, 21 February 2011 (UTC)
- Its because the ' in {{PAGENAME}} is outputted as a ' to avoid making italic/bolding. You need to somehow use the replace parser function to replace the ' with a ' (And hope replace doesn't similarly replace ' character). Bawolff 03:58, 26 February 2011 (UTC)
- Using
{{#replace:{{PAGENAME}}|'|'}}
or{{#replace:{{PAGENAME}}|'|%27}}
doesn't seem to make any difference. Could there be something else causing this? It does only seem to be the one page with a ' in the title that is having a problem, which is why I have made the assumption that is the problem. -AerosAtar 16:37, 27 February 2011 (UTC)- Probably something to do with at what stage the ' is getting converted to a '. Perhaps using the tag version (aka <dpl> instead of {{#dpl:...) might work better since tpyically tag extensions have the content passed unmangled to the extension hook. (thats a bit of a long shot though). Bawolff
- On a related note, this issue isn't limited to DPL, see bugzilla:16474. Bawolff 00:50, 1 March 2011 (UTC)
- Probably something to do with at what stage the ' is getting converted to a '. Perhaps using the tag version (aka <dpl> instead of {{#dpl:...) might work better since tpyically tag extensions have the content passed unmangled to the extension hook. (thats a bit of a long shot though). Bawolff
- Using
- Its because the ' in {{PAGENAME}} is outputted as a ' to avoid making italic/bolding. You need to somehow use the replace parser function to replace the ' with a ' (And hope replace doesn't similarly replace ' character). Bawolff 03:58, 26 February 2011 (UTC)
Unfortunately, for some reason that I have been unable to fathom, the <DPL> tag doesn't work on my wiki. Or on my 1.16 test wiki. So something has changed between 1.15 and 1.16 which has broken that (but my PHP knowledge is far too limited to even attempt to figure out what). Even Using {{#tag:DPL doesn't work... Oh well, guess I'll have to live with it for the moment. --AerosAtar 20:26, 3 March 2011 (UTC)
Breaks when using ordermethod pagesel
[edit]I've run into an interesting problem. When attempting to generate a list using "linksfrom" and setting ordermethod to "pagesel", the parser breaks with the following error:
SELECT DISTINCT `page`.page_namespace as page_namespace,`page`.page_title as page_title,`page`.page_id as page_id, pagesrc.page_title as sel_title, pagesrc.page_namespace as sel_ns, CONCAT(pl.pl_namespace,pl.pl_title) AS sortkey FROM `pagelinks` as plf, `page`as pagesrc, `page` WHERE 1=1 AND `page`.page_is_redirect=0 AND `page`.page_namespace = plf.pl_namespace AND `page`.page_title = plf.pl_title AND pagesrc.page_id=plf.pl_from AND ((plf.pl_from=0)) ORDER BY sortkey ASC LIMIT 0, 500 Error message is: Unknown column 'pl.pl_namespace' in 'field list' (localhost)
What's interesting is that this error does NOT occur if I change "linksfrom" to "linksto". What's also interesting is that on a cursory check of DPLMain.php for malformed code and found that the column pl.pl_namespace isn't even referenced in the "linksfrom" section, but is referenced in the "linksto" section, but I may not be looking at it right.
20:50, 22 February 2011 (UTC)
- I forgot to post that I believe I found the issue causing this. On line 2088 of DPLMain.php the pagesel function is referencing the pagelink when it should be referencing pagefrom:
$sSqlSortkey = ", CONCAT(pl.pl_namespace,pl.pl_title) " . $sOrderCollation . " AS sortkey";
I changed pl.pl_namespace,pl.pl_title to plf.pl_namespace,plf.pl_title - and this seems to have resolved the issue. 22:13, 16 March 2011 (UTC)
Show images of a category including links to pages using these images!
[edit]Hi all,
I have a difficult question. I would like to create a gallery like that:
{{#dpl:
|category=Oneofmycats |namespace=Image |format=«gallery»,%PAGE%¦%NR%. %TITLE%\n,,«/gallery»
}}
That works great. But now I would like to have the name of the page (all of my images are at least only used on one page!) which makes use of the image as image text (not TITLE). In addition to that the name of the page should be a linkt to the page! So it would be possible to show all Images of a certain category including linkt to each page using this image (there is only one page!).
Found this code here:
{{#dpl:
|imageused=myimage.jpg |format=,%PAGE%\n,,
}}
But I don´t know how to merge this two operations to one big thing!
Hope you understand what I mean :-).
Thanks in advance.
DPL for category page – order by second name?
[edit]I'm using DPL for a personalized category page because I didn't like the MediaWiki-own view. Everything works fine but there is one point I despair of. For the category of persons I want the list to be ordered by second name. In the standard category view this issue is solved by a tag on every page that tells MediaWiki how to order, e.g. on the page "Angie Gielach" [[Kategorie:Personen|Gielach]] to have it listed under "G" instead of "A".
In DPL I use the following code to display the pages of my category "Personen" alphabetically:
===A=== <DPL> category = Personen format = ,\n* [[%PAGE%|%TITLE%]],, title<=B </DPL>
Has anyone a solution for this? --188.110.236.197 20:57, 2 May 2011 (UTC)
- ordermethod=category,sortkey - IIRC it does't work well. --Subfader 21:25, 2 May 2011 (UTC)
Compatibility with the Collection extension
[edit]This extension is great but when you try to export to a pdf with the book/collection extension nothing gets printed. Is there a way to solve this?--Tsouchon 13:50, 6 May 2011 (UTC)
- This is an issue with several extensions. See bugzilla:21653 for example. Bawolff 20:05, 24 May 2011 (UTC)
Selecting Articles based on template parameter value
[edit]--Riveraea 20:10, 23 May 2011 (UTC) Hi, I am new to DPL. I have articles with a template named ProjectInfo, that contains parameters named ProjectName, ProjectOwner, ProjectDate. I want to use DPL to create a list of projects that are recent (ProjectDate less than 3 years old).
I am testing this code:
<dpl> category=PendingProjects include={ProjectInfo}:ProjectName:ProjectOwner:ProjectDate includematch = (Here I want ProjectDate > 3 years) table=,,ProjectName:ProjectOwner:ProjectDate resultsheader=Number of data = %PAGES%\n noresultsheader= no matching projects were found.\n </dpl>
Thanks for any help!
- You have to use a subquery which will result in all pages with the temnplate being returned but hiding those which do no match your age criteria (for which you'll need Extension:ParserFunctions for the check). A very dirty solution tho. --Subfader 19:04, 24 May 2011 (UTC)
--Riveraea 19:36, 24 May 2011 (UTC) The logic I may use to evaluate the date is :
{{#ifexpr:{{#time:U}} > {{#time:U| {{{ProjectDate}}} + 3 year}}|Older than 3 years|Less than 3 years}}
Do you mean that all the records may be selected, then format the output to hide not wanted records? Please provide an example of the format expression. Thanks!
Intercept a list of articles by alphabetic character
[edit]I have a list of articles on people, sort by last name (via sortkey). To make it easier for users to find a name in the list I want to intersect the list with subheadings showing the alphabetical character:
A
[edit]- Otto Ader
- Anton Albers
B
[edit]- Chris Bill
...
Any ideas? --188.98.11.250 20:42, 1 June 2011 (UTC)
- It works this way
{{#dpl: |category=... |ordermethod=sortkey }}
- Should also work with
mode=category
{{#dpl: |category=... |mode=category |ordermethod=sortkey }}
- but I get a blank page on that (old DPL version here). http://semeb.com/dpldemo/index.php?title=Mode#mode --Subfader 18:26, 5 June 2011 (UTC)
Thanks for your answer. I now use this:
<DPL> category=Personen mode=category ordermethod=sortkey </DPL>
Together with the setting ExtDynamicPageList::$categoryStyleListCutoff = 400;
it outputs a list separeted by the alphabetical character but without columns. Now there is one new problem appearing: Somehow the parser doesn't change the html-tags produced by the DPL-plugin into wiki-links. Thats what I get:
A
[edit]- <html><a href="/index.php/Otto_Abetz" title="Otto Abetz">Otto Abetz</a></html>
- <html><a href="/index.php/Alma_de_l%27_Aigle" title="Alma de l' Aigle">Alma de l' Aigle</a></html>
- <html><a href="/index.php/Helmut_Amanshauser" title="Helmut Amanshauser">Helmut Amanshauser</a></html>
Of course everything works well if I set $wgRawHtml = true;
in localsettings.php, but shouldn't it work without this?
--188.98.11.250 19:53, 5 June 2011 (UTC)
- No idea, never happened to me. But yes, it should work without
$wgRawHtml = true;
. For proper support you may want to start an "issue" on http://semeb.com/dpldemo/index.php?title=Extension_DPL --Subfader 19:03, 6 June 2011 (UTC)
Problems with VariableExtension
[edit]I'm having problems with using the VariableExtension together with DPL, here is an example:
{{#vardefine:pagetitle|Main Page}} ==First== {{#dpl:titlematch={{#var:pagetitle}}}} ==Second== {{#dpl:titlematch={{#var:pagetitle}}}}
I'm using Mediawiki v1.17, Extension:VariableExtension v1.3, and DPL v1.8.9 (the MW1.17 build, DynamicPageList-MW1.17-r76531.tar.gz).
The output from the first call is not the same as the output from the second call. Shouldn't it be identical? The first call returns "Main Page" and "Talk:Main Page" as expected, but the second call instead gives this strange error message:
- Extension:DynamicPageList (DPL), version 1.8.9 : ERROR: No selection criteria found! You must use at least one of the following parameters: category, namespace, titlematch, linksto, uses, createdby, modifiedby, lastmodifiedby or their 'not' variants
Please help! Amerias 13:27, 11 July 2011 (UTC)
- I have reported this above already, but now I looked into it a little bit further. Seems like this is a problem ob DynamicPageList. This extension shouldn use
Parser::parse()
, the code Parser class documentation states that this function should NOT be called recursively! Since this function is called for page rendering, you shouldn't use it within this extension. Instead you should useParser::recursiveTagParse()
. File: DPLMain.php, line 3310,$parserOutput = $localParser->parse( $output, $parser->mTitle, $parser->mOptions );
--Danwe 00:18, 24 July 2011 (UTC)
- I've tried to use recursiveTagParse as you suggested, but it doesn't fix the problem unfortunately. So far, I can confirm on 1.17 that this problem breaks Cite, Variables and Semantic Internal Objects behaviors. Everything is fine once DPL is deactivated.
- sure you have changed it everywhere? Or there must be any other cause which is triggering the ParserClearState hook, thats the only event all variables getting flushed down the toilet... --Danwe 17:34, 30 July 2011 (UTC)
- I indeed changed it in multiple DPL files, but no success. As I saw on bugzilla, this bug is unfortunately here since 2009. --112.136.72.214 08:41, 31 July 2011 (UTC)
- It works in latest DPL, but latest DPL has different problems - "namespace" support doesn't work
- If you still run into similar problems, I suggest you use #dplvariable instead of the #variable parser function.
- The "namespace" support should still be working; the only thing that has changed is the fact that instead of "namespace = Article" you'll have to use "namespace = ". --Theaitetos (talk) 13:30, 22 March 2012 (UTC)
Can't get a simple List to generate something other than HTML tags around the list contents
[edit]I've followed the install as stated and generated a simple test list which yields results with html tags around the list contents. I've tried it with both the DPL tag and the DynamicPageList tag and they still both output html and not wiki links.
<DPL> category=Vampire count=5 </DPL> <DynamicPageList> category=Vampire count=5 </DynamicPageList> <DPL> namespace=Player_Page columns=3 ordermethod=title randomcount=5 count=5 offset=1 shownamespace=yes </DPL> yields <html><a href="/index.php?title=Category:Camarilla" title="Category:Camarilla">Category:Camarilla</a></html> <html><a href="/index.php?title=Category:Vampire_Character_Creation" title="Category:Vampire Character Creation">Category:Vampire Character Creation</a></html> <html><a href="/index.php?title=Category:Vampire_Commentaries" title="Category:Vampire Commentaries">Category:Vampire Commentaries</a></html> <html><a href="/index.php?title=Category:Vampire_Policies" title="Category:Vampire Policies">Category:Vampire Policies</a></html> <html><a href="/index.php?title=Category:Vampire_Systems" title="Category:Vampire Systems">Category:Vampire Systems</a></html> <html><a href="/index.php?title=Category:Camarilla" title="Category:Camarilla">Category:Camarilla</a></html> <html><a href="/index.php?title=Category:Vampire_Character_Creation" title="Category:Vampire Character Creation">Category:Vampire Character Creation</a></html> <html><a href="/index.php?title=Category:Vampire_Commentaries" title="Category:Vampire Commentaries">Category:Vampire Commentaries</a></html> <html><a href="/index.php?title=Category:Vampire_Systems" title="Category:Vampire Systems">Category:Vampire Systems</a></html> <html><a href="/index.php?title=Category:Vampire_Policies" title="Category:Vampire Policies">Category:Vampire Policies</a></html> <html><a href="/index.php?title=Player_Page:Article_Count_Test2" title="Player Page:Article Count Test2">Player Page:Article Count Test2</a></html> <html><a href="/index.php?title=Player_Page:Article_Count_Test3" title="Player Page:Article Count Test3">Player Page:Article Count Test3</a></html> <html><a href="/index.php?title=Player_Page:PC_Census" title="Player Page:PC Census">Player Page:PC Census</a></html> <html><a href="/index.php?title=Player_Page:Player_Pages" title="Player Page:Player Pages">Player Page:Player Pages</a></html> <html><a href="/index.php?title=Player_Page:Sandbox" title="Player Page:Sandbox">Player Page:Sandbox</a></html>
I'm running MW 1.16.2 with PHP 5.2.17 (cgi) and MySQL 5.0.91mm-log
Have I forgotten something? I put in the following on my localsettings.php and downloaded from the extension page the proper package for my version of MW.
include("$IP/extensions/DynamicPageList/DynamicPageList2.php");
I don't know where else to go for help. I've reviewed bugs and issue pages and really didn't see anything applicable. I even tried to install the Wikimedia version of this extension and that worked fine (although that version doesn't have all the function I want so I'd rather have this one.) Please help. --Thing 1 23:44, 30 August 2011 (UTC)
I am on a 1.16.2 install. I found that the trunk version worked and not the 1.16.x version. --Thing 1 04:39, 31 August 2011 (UTC)
- Try to set $wgRawHtml to true. --Theaitetos (talk) 13:33, 22 March 2012 (UTC)
Variables
[edit]Is there a conflict between this and Extension:Variables? In particular, it seemed that DPL was blanking variables, causing an error message like this, and it was resolved by having the DPL variable declared first before the total variable (like this). --Sigma 7 17:07, 27 September 2011 (UTC)
- You can also try to use the #dplvariable function when working with variables and DPL calls. --Theaitetos (talk) 13:34, 22 March 2012 (UTC)
Question about "includematch"
[edit]I use this great extensions in two of mine wikis. In the last times, i have some problems with includematch. My Wiki is about Final Fantasy XIV Online, for info ;)
NPCs are selling some Items, the item goes in the category:example sells from NPC. Now, some NPCs sells example-head, examplefeed, example-earring. If i create now the Article examlpe, i use this DPL:
{{#dpl: |category = {{SUBPAGENAME}} sells from NPC |namespace = |includepage = {Sellsrow}:Price, {NPC} dpl Zones |includematch = /\s*Item\s*{{=}}\s*{{fixapos|{{fixtick|{{fixparen|{{SUBPAGENAME}}}}}}}}/si |format =,,\n |table =class="SE-Heaventable sortable" style="width: 100%;",Name,Preis,Region |columns=1 |rowcolformat= style="background-color: transparent; width: 100%;" |tablerow = %%,%% |suppresserrors=true }}
Here i use the _Template:Sellsrow to get the Price and the Template:NPC dpl Zones to get all other datas. In the Template:Sellsrow, i define Item. Thats why my includematch say get where Item = {{SUBPAGENAME}}. So, my Articles shows me now in the Table all sellinginformations about:
- example
- example-head
- examplefeed
- example-earring
i try'd some other includematch variations like this:
{{#dpl: |category = {{#if: {{{Name|}}}|{{{Name|}}}|{{PAGENAME}}}} sells from NPC |namespace = |includepage = {Sellsrow}:Price, {NPC} dpl Zones |includematch = /\s*Item\s*{{=}}\s*{{#if: {{{Name|}}}|{{{Name|}}}|{{PAGENAME}}}}/si |format =,,\n |table =class="SE-Heaventable sortable" style="width: 100%;",Name,Preis,Region |columns=1 |rowcolformat= style="background-color: transparent; width: 100%;" |tablerow = %%,%% |suppresserrors=true }}
but at least, i have allways the Same problem. It shows me all what that NPC have, where example is in :\ The only what i want to see, is the Data for example >.< Someone knows how i can fix it? Yukii 12:52, 17 October 2011 (UTC)
- I'm not quite sure I understood everything you said, so in case you want to clarify, you can tell me in German. // Ich bin mir nicht ganz sicher, dass ich alles richtig verstanden habe, und falls nicht, dann kannst du es gerne auf Deutsch nochmals erklären.
- The problem is, as far as I can see, that you never included the line "Item=..." in your DPL call; you only called to include "Price=..." parameter in the {Sellsrow} template. The includematch function works only, if you include the respective parameter, so in order for it to work, you need to change
{Sellsrow}:Price
to{Sellsrow}:Item:Price
. --Theaitetos (talk) 13:43, 22 March 2012 (UTC)
Warning about $maxResultCount
[edit]Just as a heads-up, $maxResultCount
is not a limit on DPL's results, but a limit on the amount of rows pulled from the database. That is not the same thing. For example, the DPL query...
<DPL> includematch=/\|\stemplate-attribute\s=\svalue/s titlematch=Foo% category=Foos </DPL>
...will first pull all pages beginning with "Foo
" in the category "Foos
" from the database, and only then check for the includematch
pattern. In other words, if $maxResultCount
is 500 and you have 800 Foo%
pages in the Foos
category, even if just ten of those match your includematch
pattern, you will probably not get all ten.
Our solution was to remove the limit entirely ($allowUnlimitedResults = true
), because our wiki is private and we have a strong control over authorship.
Your mileage may, of course, vary. -pinkgothic 13:32, 30 November 2011 (UTC)
Does not work with mediawiki 1.18
[edit]On upgrade from mediawiki 1.65 to 1.18, DPL stopped working. I downloaded the latest version from Semeb website. But still does not work. The error is:
- Fatal error: Call to a member function addMessages() on a non-object in xxxxxx/extensions/DynamicPageList/DPLSetup.php on line 1163
Help! Jonathan3 00:49, 11 December 2011 (UTC)
Try this... find the error line and it should be this piece of code or something similar:
foreach( DPL2_i18n::getMessages() as $sLang => $aMsgs ) { $wgMessageCache->addMessages( $aMsgs, $sLang ); }
In MW 1.18 $wgMessageCache is deprecated so just comment out all those lines. It should work ok after that. --Paracelsus 22:50, 12 December 2011 (UTC)
- But that won't add the messages to the cache... --Subfader 08:04, 13 December 2011 (UTC)
- Better question is wtf is the extension doing messing around with the message cache by hand... Bawolff 19:21, 13 December 2011 (UTC)
- I commented out those lines. Now it gives me the following error: Fatal error: Call to private method Title::prefix() from context 'DPLMain' in xxxxx/extensions/DynamicPageList/DPLMain.php on line 2631. What next? :-) Jonathan3 22:34, 18 December 2011 (UTC)
- I also commented out the following lines:
if ($bShowNamespace) //Adapted from Title::getPrefixedText() $sTitleText = str_replace( '_', ' ', $title->prefix($sTitleText) );
- I'm not sure if everything works fine now, but at least the error message disappeared --82.57.155.239 21:34, 25 December 2011 (UTC)
*FIXED* Removing the lines above fixed it. I also found the following page which may be of interest (and which includes a replacement for the missing lines): Special:Code/MediaWiki/86335 Thanks everyone Jonathan3 23:15, 27 December 2011 (UTC)
- I only saw a replacement for the second set of lines you had comment out, is that correct? Also, does this them restore the adding messages to the cache? Thanks! Ncarty97 16:36, 26 January 2012 (UTC)
2012
[edit]Null edits (or dummy edits) required for updating DPL listing
[edit]The wiki I administer makes a huge use of DPLs for constructing lists of pages and controlling workflows--very well might I add.
One problem that I have perennially run into however is the need to execute a null edit in order for pages to properly show up in a DPL when the DPL is grabbing based on, for instance, page category. What I don't understand is that when accessing the page in question the category is correct, but the DPL listing the page will not include the page in its list until executing a null edit on the page. I'm fairly knowledgebale about this extension but I have not come up with a solution to this problem. I've even tried using updaterules to "touch" the page when the list is built, but that feature does not seem to be usable at this point.
Since the page shows the correct category, and the job queue is empty, I can't actually figure out why this is happening. The only thing that I can think of is that the DPL is stored in a cache; however, that should not be causing this since cached results are supposed to be disabled by default. I do have MediaWiki parser cache set to enabled as well as file cache, but disabling these seems to have no effect on the symptom. Any thoughts on this? 18:40, 12 January 2012 (UTC)
- I may have posted too soon; I completely disabled caching across the wiki and this seems to have resolved the problem altogether. This works for now, although from a scalability perspective I'm not sure. 19:20, 12 January 2012 (UTC)
- I think I posted too soon again. I think disabling cache only caused an update, but null edits are still required. I can't seem to find a way around this. 16:39, 1 February 2012 (UTC)
- Have you tried to purge the page with the DPL call? --Theaitetos (talk) 13:46, 22 March 2012 (UTC)
"skipthispage" - not bolded when created by DPL
[edit]Hi! I'm working through the book MediaWiki and Beyond. Great book, but I've run into something that doesn't seem to be working. In the book it says that if you use the 'skipthispage' variable and set it to false, not only will the page you are on show up in your list (in this case a navigation list), but since its pointing to itself, it will default to bolded text rather than a link. I don't seem to be able to get that behavior though. If I put a link to the page within itself, that will bold and present just as text, but not when it comes through the dpl command. Any ideas why? Thanks! Ncarty97 20:41, 1 February 2012 (UTC)
- Confirmed. Never worried about it tho. --Subfader 23:39, 1 February 2012 (UTC)
- It works fine for me. Could you give some more information (version MW and DPL?) and show me an example of the issue? You can do so on the DPL wiki if you want to. --Theaitetos (talk) 13:53, 22 March 2012 (UTC)
Redirects not showing DPL listing
[edit]Similar to above, the DPL listing is not showing up when you go to the page via redirect. So when you "null edit" it then works. Any clue on why this may be happening?
Here is the error message: Extension:DynamicPageList (DPL), version 1.8.9 : Warning: No results.
Thanks, CJL108 00:35, 15 February 2012 (UTC)
- Hello, could you clarify the issue a bit? I'm not sure what exactly you mean with redirects not showing up. Have you tried setting the redirects parameter to include? --Theaitetos (talk) 13:55, 22 March 2012 (UTC)
Security issues? / Version 2
[edit]What exactly needs to be fixed to resolve the security issues? Are they resolved in version 2? And what needs to happen before version 2 is released? Guaka (talk) 13:16, 16 February 2012 (UTC)
- Bit of useful info at User talk:Pinkgothic/DPL#Caching sidenote (this page is a good read altogether :) Guaka (talk) 13:53, 16 February 2012 (UTC)
DynamicPageList only works with global $wgRawHtml set to true.
[edit]Between MediaWiki version 1.15 and 1.16 the way the < html > tag is handled changed. As a result, the DynamicPageList extension's abuse of the global $wgRawHtml setting to temporarily enable raw HTML content is broken. The normal way (to my knowledge) for an extension developer to embed raw HTML is to create one or more markers and then to post process the content and replace the markers with HTML after MediaWiki has done all of it's HTML stripping.
216.58.45.229 22:53, 4 March 2012 (UTC)
- That is correct. To anyone interested See the docs for the StripState class (which extensions can use to insert strip items that will be automatically unstripped by mediawiki at the apropriate time). Bawolff (talk) 19:05, 13 June 2012 (UTC)
multiple notitlematch using {#dpl}
[edit]I have my query running fine if I used <DPL> to exclude multiple pages, but I need to run it using {{#dpl}}. How do I exclude multiple pages here when the | delineates query parameters?
nottitlematch=A|B|C -> fails, "expecting =" error nottitlematch=A\|B\|C fails, "expecting =" error nottitlematch=A,B,C fails nottitlematch=A;B;C fails nottitlematch=A nottitlematch=B nottitlematch=C only excludes the last one
- As usual, when you use a parser function, you will have to use
{{!}}
, when you want to denote a "|" without making a statement about a new parameter (see here): nottitlematch = A{{!}}B{{!}}C
- Ofc you need to define the Template:! as usual.
- --Theaitetos (talk) 21:23, 9 April 2012 (UTC)
- Thx for the prompt response, works perfectly.
WantedPages, Templates, Files, and Categories
[edit]Hi. I was wondering if it is possible to use DPL to create the list of Wanted Pages, Templates, Files, and Categories. My wiki uses this already for anything that isn't uncategorized, so we can categorize it immediately. I would like to do the same for Wanted Pages, Templates, Files, and Categories. Is this possible, and how would I do that? 173.66.197.202 17:18, 11 June 2012 (UTC)
- You have special pages that list wanted pages, templates and files already. Why exactly do you need DPL to create those lists as well? Aside from that, no, I don't think that is possible. --Theaitetos (talk) 18:08, 12 June 2012 (UTC)
- To keep it up-to-date and so it can be fixed faster than those pages can update. 173.66.197.202 16:31, 13 June 2012 (UTC)
- If you're using DPL, performance obviously isn't a concern, so don't use $wgMiserMode, and those pages will be updated instantly. Bawolff (talk) 19:01, 13 June 2012 (UTC)
- To keep it up-to-date and so it can be fixed faster than those pages can update. 173.66.197.202 16:31, 13 June 2012 (UTC)
Allowcachedresults WARNING
[edit]It does not display!
I set:
$wgFileCacheDirectory = "$IP/cache"; $wgShowIPinHeader = false; $wgUseFileCache = true;
And I set the Template:DPL Cache Warning, but the message won't display. Any ideas? - 186.218.184.219 19:50, 18 June 2012 (UTC)
- The allowcachedresults refers to the parser cache, which is different from the File cache (and as such, settings related to the file cache really don't have that much bearing on how allowcachedresults should work [afaik]. Of course, disabling parser cache would also disable file cache so they're mildly related, but I would concentrate first on verifying that parser caching is working [ which it does appear to be based on the
<!-- Saved in parser cache with key guildwar_wiki:pcache:idhash:2870-0!*!0!!pt-br!2!edit=0 and timestamp 20120619120119 -->
from the link). Bawolff (talk) 12:10, 19 June 2012 (UTC)
- The allowcachedresults refers to the parser cache, which is different from the File cache (and as such, settings related to the file cache really don't have that much bearing on how allowcachedresults should work [afaik]. Of course, disabling parser cache would also disable file cache so they're mildly related, but I would concentrate first on verifying that parser caching is working [ which it does appear to be based on the
- Please... someone help me, I don't know what else I can do, another thing that happens is that the following template call makes pages show AS templates (when previewing):
{{#dpl: |category=*Skills do elementalist¦Skills downed¦Skills de Lava Axe¦Skills de Magnetic Shield¦Skills de Fiery Greatsword¦Skills de Bow of Frost¦Skills de Lightning Hammer |uses=Predefinição:Skill infobox |include={Skill infobox}:%PAGE%,{Skill infobox}:description,{Skill infobox}:%PAGE%,{Skill infobox}:recharge |secseparators = ²{#vardefine:,¦,,}²,²{#vardefine:Recharge-,¦,,}² |format=,,, |allowcachedresults=yes+warn }}
The template is called in this page. - 186.218.184.219 21:51, 18 June 2012 (UTC)
- I'm not sure if I got what I'm supposed to do, also, the resultsheader = %PAGES% isn't working. 186.218.184.251 07:06, 9 August 2012 (UTC)
Where can I download DPL2?
[edit]First, I don't know git very well but it seems that all of the links to download DynamicPageList2 are broken. Can anyone point me to a version of DPL2 that works with MediaWiki 1.19? Thanks.
- http://semeb.com/dpldemo/index.php?title=DPL --Subfader (talk) 22:13, 29 June 2012 (UTC)
- I doubt this extension has been migrated to git since no one has been maintaining it for years. The svn links should still work. Bawolff (talk) 01:32, 3 July 2012 (UTC)
Attempting to use DPL to create a table "on-the-fly" on any given article page by pulling from a list on a page; Getting error message: %DPL-1.7.6-WARNING: No results!
[edit]- Hi, so my goal in this scenario is to create a table on-the-fly using DPL and put that table on any given article page (I've opted to do a template call to facilitate this) -- and so part of the problem has been to figure out which of the DPL commands are best suited to accomplish this. I started with table and tablerow and initially got the results I was looking for on simpler test examples. But now I'm getting this error %DPL-1.7.6-WARNING: No results! and I can't find my bug! So yesterday I started looking at the secseparators and multisecseparators commands, but the syntax is killing me and they're just a bit too tricky for me right now (I just started learning/implementing DPL). In the DPL Manual it even suggests sticking with "table" and "tablerow", and that's what I'd like to do.
- I'd be grateful for some help figuring out where I took a wrong turn.
- One thing I saw yesterday was that I had misnamed the first parameter - i.e., Drug Code instead of Pfizer Drug Code. So I corrected that. It still didn't work. So I created a new Template:Drug Info 5 and Template:Drug Info5.dpl - suspecting that maybe there was something I wasn't aware of in the functioning of a phantom template where even if I fixed the parameter name in the dpl template, the phantom template might not pass the parameters through properly (?).
- Further down I list an example that did work. That's the one I built upon to try to get this one to work.
- Many thanks for your reply and insight. Cheers, Jeff Western cell: 323.449.7944
NON-WORKING VERSION:
Full error message is:
%DPL-1.7.6-WARNING: No results! {|class="wikitable collapsible collapsed sortable" !Pfizer Drug Code !Drug Brand Name !Compound Name !Drug Class !Project Code |}
Here's the DPL and template call which goes on any given article (page):
{{#dpl: |linksto=:EQDD Pfizer Compounds (to assoc drugs to Ulcerative Colitis) |include = {Drug Info 5}.dpl |table = class="wikitable collapsible collapsed sortable",-,Pfizer Drug Code,Drug Brand Name,Compound Name,Drug Class,Project Code |tablerow = %%,%%,%%,%%,%%, }}
Here's Template:Drug Info 5.dpl:
{{{Pfizer Drug Code|}}} | {{{Drug Brand Name|}}} | {{{Compound Name|}}} | {{{Drug Class|}}} | {{{Project Code|}}}
And then there's the phantom Template:Drug Info 5 which just serves to pass the above 5 parameters.
The article:EQDD PFizer Compounds (to assoc drugs to Ulcertative Colitis) -- has a small listing of just a few drugs for me to test out the DPL, for example:
{{Drug Info 5|Pfizer Drug Code=PF-00547659|Drug Brand Name=drug brand name|Compound Name=compound name (for Ulcerative Colitis, Crohn's Disease)|Drug Class=null|Project Code=A728}}
WORKING VERSION which did create a table on-the-fly successfully:
{{#dpl: |linksto=:EQDD for UK-092480 <-- but strangely, when I replaced UK-092480 with PF-00346519 (which is what it should be) it craps out |include = {Drug Info 3}.dpl |table = class="wikitable collapsible collapsed sortable",-,Drug Code,Drug Brand Name,Compound Name,Drug Class,Project Code,Description,Disease |tablerow = %%,%%,%%,%%,%%,%%,%%, }}
Previously I also tried to put the Drug Info parameters for each drug beneath a Drug Code section heading. Then, using #1sth:, I was able to get the Drug Info parameters -- but I couldn't figure out how to parse out the individual drug parameters in order to then output them in tabular format and build that table on-the-fly. Here's what I'm talking about:
- Inserting the <onlyinclude> transclusion section tag into the data source (page):
=PF-00547659= <onlyinclude>{{#ifeq:{{{transcludesection|Pfizer Drug Code}}}|Pfizer Drug Code|PF-00547659}}</onlyinclude><br> drug brand name <br> compound name (for Ulcerative Colitis, Crohn's Disease)<br> null<br> A728<br>
Getting the "UK-092480" Drug Info parameters from the data source using template code only, {{#lsth:(page)|(parameter)}}:
{{#lsth:EQDD for UK-092480|Drug Code}} {{#lsth:EQDD for UK-092480|Drug Brand Name}} {{#lsth:EQDD for UK-092480|Compound Name}} {{#lsth:EQDD for UK-092480|Drug Class}} {{#lsth:EQDD for UK-092480|Project Code}} {{#lsth:EQDD for UK-092480|Drug Description}} {{#lsth:EQDD for UK-092480|Disease}}
- Hi, could you give me a link to your wiki and the respective pages, so I can take a look at it? --Theaitetos (talk) 23:24, 4 July 2012 (UTC)
- 7/5/12:
- Hello, I wish I could give you a link to the wiki, but it's an internal wiki to the company and a network credentials are required in order to even view the wiki. Good news is that the solution to this first part of my problem is to use
titlematch=
in the DPL, notlinksto=
. I admit, I really didn't quite understand how the linksto command works, but titlematch definitely worked.
{{#dpl: | titlematch=EQDD_Pfizer_Compounds_(to_assoc_drugs_to_Ulcerative_Colitis) | include = {Drug Info 5}.dpl | table = class="wikitable collapsible collapsed sortable",-,Pfizer Drug Code,Drug Brand Name,Compound Name,Drug Class,Project Code | tablerow = %%,%%,%%,%%,%%, }}
- I'm currently trying to figure out how to use the output of this table to enable the end-user to pick a drug (a row of Drug Info data) and copy that row and only that row to a new table in another section of the same page. I was going to upload an image here so you could see what the table looks like, and where I'm trying to get to... but I don't see an
Upload
link here. - I appreciate your having looked at my questions, in any case. Thank you!
- You could upload files via Special:Upload, but I recommend uploading to an image hoster like http://tinypic.com or something similar.
- I am still a bit unsure what you mean with copying that code to the same page. Are you trying to create a table, or code for a table that can be copied and pasted?
- The tablerow in the latest statement shouldn't do anything as the entire output of a phantom template should not be changed by tablerow.
- The linksto statement is selecting pages basically the same way as the "what links here"-tool.
- The way you use the titlematch statement should only give you one page, the very one you put into the statement. If you want to select several pages with titematch, you will have to use "_" as a one letter wildcard or "%" as a wildcard for any amount of letters; for example "titlematch=c_t" would give you "cat", "cut", et.al. yet "c%t" could even give you "cannot", "carrot", ...
- --Theaitetos (talk) 20:34, 5 July 2012 (UTC)
- I'm currently trying to figure out how to use the output of this table to enable the end-user to pick a drug (a row of Drug Info data) and copy that row and only that row to a new table in another section of the same page. I was going to upload an image here so you could see what the table looks like, and where I'm trying to get to... but I don't see an
- I am trying to create a table which will contain only the drugs (Drug Info in each row) that the user has selected from a master list (a table of ALL drugs). I'm really perplexed how to do this!
- I don't think you need a phantom template at this point. In order to create such a table, just try the following code:
{{#dpl: |uses = Template:Drug Info 5 |include = {Drug Info 5}:Pfizer Drug Code:Drug Brand Name:Compound Name:Drug Class:Project Code |table = class="wikitable collapsible collapsed sortable",-,Pfizer Drug Code,Drug Brand Name,Compound Name,Drug Class,Project Code }}
- Theaitetos, I much appreciate your looking at this and answering with this code. I just tried it and it works. I got my code with the phantom template to work as well, but yours is a bit cleaner of course. I do get some multiple hits on a couple of the drugs, not sure why, but I suspect it might be my error somewhere (maybe too many category tags?!); I also got multiple hits with my code.
- (7/12/12)On another note, the last piece of the puzzle for this first User Story that I'm trying to solve right now is this... Once the user is on a Disease page, how do I "automate" (from the user's pov) the selection of drug(s) that they wish to associate with the disease? (...which then leads to the creation of the on-the-fly-dpl-table, which is pretty much working now -- thanks again!) So, I've checked with the internal IT dept here, and Javascript drop-menus are out of the question -- too bad, seems that's the nicest way to implement this. Raw HTML is not allowed currently on the company's internal wiki (and discouraged in general), and Javascript is only allowed by changing Common.js – which is a javascript which is triggered on every page load on the wiki. So they're telling me it's very inefficient to include Javascript on their internal wiki. Okay, so the approach I just hit on yesterday (brainstorming in my head while smoking a cigar!) is to do the following:
- Created a template: {{DPL for EQDD Diseases List with include redirects}}
- This template has DPL: {{#dpl: |category=EQDD Diseases List |mode=none |redirects=include |format=,\n* EQDD for [[%PAGE%|%TITLE%]],, }}
- Then I do the template call on any Disease page where I need it and it works, producing:
- EQDD for Age Related Macular Degeneration
- EQDD for Allergy and Respiratory
- EQDD for Asthma
- EQDD for Bunionectomy
- EQDD for Chronic Abacterial Prostatitis
- EQDD for Crohn's Disease
- EQDD for Crohn’s Disease
- EQDD for Dental Pain
- EQDD for Discoid Lupus
- EQDD for Endometriosis
- EQDD for Inflammation
- EQDD for Lupus
- EQDD for Lupus Nephritis
- EQDD for Male Erectile Dysfunction (MED)
- EQDD for Ophthalmology
- EQDD for Pain
- EQDD for Primary Dysmenorrhea
- EQDD for Systemic Lupus Erythamatosus (SLE)
- EQDD for Ulcerative Colitis
- EQDD for Women's Health and Urology
- But here's is where I run into a stumbling block... I've discovered that when I try to run the subst: command on dpl, I just can't get it to substitute the straight text for me, e.g., {{subst:{{DPL for EQDD Diseases List with include redirects}} }}. What it does is always gives me the dpl in the substitution. What I need I think! is the straight text so that I can manipulate it. Because clearly, one cannot manipulate the output from a template call, or DPL, as it is just for viewing, right. So unless there is a way, using DPL commands, to further manipulate the data (on-the-fly by the DPL) such that a user can somehow select one of the diseases (list above) -- then I don't see any other way to do this. I suppose they could just highlight the text in the page name (from the list above), copy it, and paste it into a link on that Drug page, e.g., [[EQDD for Ulcerative Colitis]]
- You see, what I'm trying to do is a work-around to not having a drop-down menu option for folks to be able to select from a list of already existing Disease pages. This way, they cannot possibly enter the name of the Disease page incorrectly. So what I'm trying to do is figure out a way to take a Disease page name (exactly as you see them listed above) and turn that page name into a [[link]] on the drug page -- thus the association between the drug and the disease. Then I use the linksto= command, and I get a listing of just the drugs that have been selected and associated with a disease, displayed by the on-the-fly-dpl-table on the Disease page. Again, any suggestions would be greatly appreciated. Thank you.
- As far as javascript is concerned: There should be some javascripts coded into the core Mediawiki css anyway, so you could try to use that stuff to do some drop-down menus. For example, try to see if the following table works in your wiki:
- Thank you for this great suggestion! This would be a terrific solution but unfortunately it doesn't run on the company's internal wiki. I'm thinking they don't have any Javascript enabled..? When I put this table into the internal wiki, it builds a table just fine, but it's not interactive (won't expand, collapse) like it does here.
Headline 1 Headline 2 Headline 3 Cell 1-1 Cell 1-2 Cell 1-3 Cell 2-1 Cell 2-2 Cell 2-3 Cell 3-1 Cell 3-2 Cell 3-3
- As for the substitution: You have to substitute a dpl-call by adding the "subst:" into the dpl-call, i.e.:
{{subst:#dpl:
- That's AWESOME! Thank you -- just tried it and it works great! You see, what I'm after is implementing a User Story where the goal is associate a drug with a disease and in order to do this, I must ensure the end-user cannot enter a link incorrectly... ergo my interest in drop-down menus! Shame they won't work on this company's wiki. Anyway, so my work-around is to grab all the disease pages (they're tagged by Category of course) and then wrap
[[..]]
square brackets around the disease page name (article name) and then instruct the end-user to copy that text exactly (with the brackets) and paste it into the Drug page. So that creates the link, whichlinksto=
then uses to pull up only those Drug pages that have been associated with a particular Disease page. Of course down the road, it would be nicer to have that[[link]]
get inserted in a more automated fashion -- to avoid any possibility of the user making a mistake.
- That's AWESOME! Thank you -- just tried it and it works great! You see, what I'm after is implementing a User Story where the goal is associate a drug with a disease and in order to do this, I must ensure the end-user cannot enter a link incorrectly... ergo my interest in drop-down menus! Shame they won't work on this company's wiki. Anyway, so my work-around is to grab all the disease pages (they're tagged by Category of course) and then wrap
- It's hard to imagine what output you specifically desire without looking at it. Could you put one example down here, so I can see it? I.e. the direct output you desire, no dpl anything, just how you want it to look like and I'll see if I can find the proper code to produce said output.
- Yes, I can appreciate that. That's why I wear multiple hats on this job - Business Analyst, to understand their needs and document requirements - Developer, to implement the User Stories - and PM to hopefully make all this happen in time. So next week I'm going to set about updating my User Story diagrams and I'll start with this user story, and I'll list it here for you to see. Again, many many thanks for your great suggestions. It's been a hard week -- what with going down blind alleys with subst: -- and your hint will I think get me there!
- About having multiple results: You can disable multiple results by adding the parameter
distinct = strict
to your dpl call.
- As for the substitution: You have to substitute a dpl-call by adding the "subst:" into the dpl-call, i.e.:
- --Theaitetos (talk) 23:51, 12 July 2012 (UTC)
Are MediaWiki 1.19.1 and DPL incompatible?
[edit]I tried to use DynamicPageList 1.8.9 with MediaWiki 1.19.1 with no success. I have used for a long time DPL with MediaWiki 1.16.5. Does someone use DPL with MediaWiki 1.19.1 without any problems?
- Yes, there are Wikis that are running DPL with Mediawiki 1.19, e.g. this wiki. Have you set $wgRawHtml to true? --Theaitetos (talk) 20:09, 6 August 2012 (UTC)
- Many thanks for your reply Theaitetos. Yes, I have set $wgRawHtml to true. I went to the http://www.wiki-aventurica.de/wiki/Spezial:Version page and I saw that there is the Version 2.0 of DynamicPageList installled on this wiki. However as far as I know the last version of DPL is 1.8.9. Is this a special version? Anyway, I will try to use DPL tomorrow with MediaWiki 1.19.0.
- I tried to install DPL 1.8.9 with MediaWiki 1.19.0 again with no success. I have added
$wgRawHtml = true; include("$IP/extensions/DynamicPageList/DynamicPageList2.php");
in the LocalSettings.php file. When I try a simple query e.g.
<dpl> category=Page </dpl>
I get the result "?UNIQ49ade83c2b3c89b7-dpl-00000001-QINU?". Any help is greatly appreciated!
- Check the zip file in Download for DPL2. --Theaitetos (talk) 19:35, 9 August 2012 (UTC)
- Just for reference, the error "?UNIQ49ade83c2b3c89b7-dpl-00000001-QINU?" is caused by extensions recursively calling the parser (That doesn't help you much as a user, but in case you were wondering where the error was coming from). Bawolff (talk) 20:04, 9 August 2012 (UTC)
- Also, the zip file contains version 1.8.9 not 2.0. I'm also quite interested in version 2.0 because lots of people use this extension, and version 2.0 is claims to fix the various security issues. Alas the author's websites says the code is unreleased pending testing (but has said that for over a year). Bawolff (talk) 20:11, 9 August 2012 (UTC)
- Version 1.9 also seems to work with MW 1.19 and can be found here: https://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/DynamicPageList/
- --Filburt (talk) 09:05, 11 August 2012 (UTC)
- Thank you very much Filburt for your suggestion! Version 1.9 works with MediaWiki 1.19 in my system (Moutain Lion, MAMP 1.9.6). Version 1.8.9 still does not work.
- Also, the zip file contains version 1.8.9 not 2.0. I'm also quite interested in version 2.0 because lots of people use this extension, and version 2.0 is claims to fix the various security issues. Alas the author's websites says the code is unreleased pending testing (but has said that for over a year). Bawolff (talk) 20:11, 9 August 2012 (UTC)
- Just for reference, the error "?UNIQ49ade83c2b3c89b7-dpl-00000001-QINU?" is caused by extensions recursively calling the parser (That doesn't help you much as a user, but in case you were wondering where the error was coming from). Bawolff (talk) 20:04, 9 August 2012 (UTC)
- Check the zip file in Download for DPL2. --Theaitetos (talk) 19:35, 9 August 2012 (UTC)
I will publish 2.0 soon, it will run on the latest MW version and avoid the security risks mentioned above. This will be my last and final action on DPL. I would be pleased if someone would like to keep the work up and put the new DPL into the official source code repository. (Gero, the author.) 77.0.39.249 22:21, 14 August 2012 (UTC)
- If you release the code, I'd be happy to put it in wikimedia's svn repo for you. (I'm not sure if there would be much point converting to git at this point though, since it appears its not going to really have an active maintainer). Bawolff (talk) 12:12, 15 August 2012 (UTC)
- Gero and me agreed on certain plans for the future: So I'll work myself into it and then actively maintain the extension. Bare with me, if it takes some time though, I am quite busy these days. --Theaitetos (talk) 14:30, 15 August 2012 (UTC)
- Cool! When you're ready you should probably ask for a gerrit account at Developer_access, and for DPL to be moved from svn->git at Git/Conversion/Extensions queue. (Of course moving to git is not a requirement, but 99% of all MediaWiki development seems to be moving to the git repo). Bawolff (talk) 14:44, 15 August 2012 (UTC)
- OK, I requested an account for now. Once everything is settled here, I ask for it to be moved to git. Any other advice you can offer me, as I haven't been involved in extension development so far? --Theaitetos (talk) 17:29, 15 August 2012 (UTC)
- Don't be afraid to ask questions. Also hang out in the #mediawiki irc channel on freenode, there's lots of friendly people there always willing to help (Not to mention one learns a lot just by eavesdropping on the conversations of others) [Of course I haven't been in #mediawiki in ages, so for all I know you could already be hanging out there). Bawolff (talk) 17:36, 15 August 2012 (UTC)
- As you surely have noticed DPL 2.0 has been released and can be downloaded. My agreement with Theaitetos says that I will assist him in finding bugs (if needed) whereas it is up to him to support users and add new features. Algorithmix (talk) 07:35, 20 August 2012 (UTC)
- BTW: There is also another "power user" of DPL (poke) whio is interested in maintaining DPL in future. Algorithmix (talk) 10:26, 20 August 2012 (UTC)
- Added to svn - rev:115677. The i18n people might not like some of the changes to the i18n files. I noticed there is an issue where links to pages in non-main namespace don't go to right namespace. Bawolff (talk) 18:37, 20 August 2012 (UTC)
- Don't be afraid to ask questions. Also hang out in the #mediawiki irc channel on freenode, there's lots of friendly people there always willing to help (Not to mention one learns a lot just by eavesdropping on the conversations of others) [Of course I haven't been in #mediawiki in ages, so for all I know you could already be hanging out there). Bawolff (talk) 17:36, 15 August 2012 (UTC)
- OK, I requested an account for now. Once everything is settled here, I ask for it to be moved to git. Any other advice you can offer me, as I haven't been involved in extension development so far? --Theaitetos (talk) 17:29, 15 August 2012 (UTC)
- Cool! When you're ready you should probably ask for a gerrit account at Developer_access, and for DPL to be moved from svn->git at Git/Conversion/Extensions queue. (Of course moving to git is not a requirement, but 99% of all MediaWiki development seems to be moving to the git repo). Bawolff (talk) 14:44, 15 August 2012 (UTC)
- Gero and me agreed on certain plans for the future: So I'll work myself into it and then actively maintain the extension. Bare with me, if it takes some time though, I am quite busy these days. --Theaitetos (talk) 14:30, 15 August 2012 (UTC)
php Strict Standards error, MediaWiki 1.19.1 installed on xampp 1.8.0
[edit]I recently installed MediaWiki 1.19.1 on xampp 1.8.0. Yesterday I added this extension and while the pages that call it do produce a list of pages very nicely, there is also an error:
Strict Standards: Only variables should be assigned by reference in D:\xampp\htdocs\mediawiki\extensions\DynamicPageList\DPLMain.php on line 2549
I am no php mediawiki or apache hotshot, but after searching it seemed likely that the issue was overzelaous error reporting by php.
In php.ini I changed
error_reporting = E_ALL | E_STRICT
to
error_reporting = E_ALL
and restarted apache. Then I completely rem'd that line. But the error message persists. Any suggestions?
MichaelS
- Depending on your caching settings, the error could have been cached from before you changed the error reporting levels. Try Purging the page where the error happens. Sometimes people also change error reporting in LocalSettings.php (usually for debugging purposes, and then forget). Bawolff (talk) 19:01, 2 September 2012 (UTC)
- Thanks for the response. I purged the page and it didn't help. I have not adjusted error settings in LocalSettings.php; I don't see anything there about errors in fact. What else could it be? MichaelS
- Try to remove the "&" in line 2549. Let us know here if this works. 93.82.93.104 05:01, 8 September 2012 (UTC)
- Hi, have the same problem, solution above mentioned works partially - the skin of wikimedia gets blown away by this - the top navigation bar is now floating on top as if the error message still would be show, only that it is now empty...
- If you have version 2.01 of DPL the offending line can simply be deleted. The variable $sk is nowhere used. I suppose that you are using an older version. Please download 2.01 from mediawiki.org or from semeb.com/dpldemo. Algorithmix (talk) 06:25, 12 September 2012 (UTC)
- I've just downloaded version 2.01 from semeb.com/dpldemo (download from mediawiki.org doesn't work at the moment) and tested it with MediaWiki 1.20.0. This problem with line 2549 of DPLMain.php is still present, so apparently the line was not deleted from version 2.01. The same problem also exists for line 284 of DPL.php, which also invokes the variable $sk. I commented out both lines, it seems OK now. Maybe both lines should be deleted from the downloadable version. --89.97.181.92 08:39, 15 November 2012 (UTC)
Using #titleparts to control the output of Subpages
[edit]First, great extension, glad to see it was updated! I need some help as I am having issues with subpage listing. If I use this:
<dpl> titlematch=Foo/% namespace= shownamespace=false nottitlematch=%/%/% format=,\n*[[%PAGE%|{{#titleparts: %TITLE%|1|1 }}]] {{footemplate|{{#titleparts:%TITLE% |1|2 }} }},, </dpl>
Using the above, #titleparts parses just fine, all I see is the name of the parent page, exclude Foo/foo1/foo2 subpages, so all I get are the child links of the parent page, not the whole list of subpages. The first #titleparts, shows the parent name, and the 2nd #titleparts calls a template to and passes the child's name as a parameter, which adds a marker to note the page. It works great. So what is the problem? I want to call this as a template and you can't use titlematch={{PAGENAME}}/% unless you call dpl with:
{{#dpl:titlematch={{PAGENAME}}/%|namespace={{NAMESPACE}}|shownamespace=false|nottitlematch=%/%/% |format=,\n*[[%PAGE%|{{#titleparts: %TITLE%|1|1 }}]] {{footemplate|{{#titleparts:%TITLE% |1|2 }} }},,}}
The list is made, but #titleparts is completely ignored in the parser call of dpl. Am I missing something? Any help appreciated because all I see is the full link to the subpage and the template call is completely ignored. Thanks Hutchy68 (talk) 12:17, 16 September 2012 (UTC)
- Here the correct code:
{{#dpl:|titlematch={{PAGENAME}}/%|namespace={{NAMESPACEE}}|shownamespace=false|nottitlematch=%/%/% |format=,\n*[[%PAGE%¦ ²{#titleparts: %TITLE%¦1¦1}² ]] ²{footemplate¦ ²{#titleparts:%TITLE%¦1¦2}² }² ,,}}
- When you use template calls in your dpl statement, you need to escape the templates with
²{
instead of{{
and}²
instead of}}
, otherwise dpl won't be able to pass variables to the included template. And you also have to escape|
by using¦
, otherwise the following text will be interpreted as dpl-parameter. Also, instead of{{NAMESPACE}}
use{{NAMESPACEE}}
since space characters need to be given as uunderline scores to work correctly. - Yet, I wouldn't recommend the above code, as it is a lot more efficient to use the
replaceintitle
function of dpl, which allows you to have the%TITLE%
-variable changed with a regular expression. Example, try this:
{{#dpl:|titlematch={{PAGENAME}}/%|namespace={{NAMESPACEE}}|replaceintitle=@(.*?)\/.*$@,\1|nottitlematch=%/%/% |format=,\n*[[%PAGE%¦%TITLE%]] ²{footemplate¦ ²{#titleparts:%TITLE%¦1¦2}² }² ,,}}
- Here, I eliminate everything in the
%TITLE%
-variable behind the first/
. The@ ... @
is just there to mark the beginning and end of the regex statement, you can also use other non-alphanumeric characters, but since@
is rarely ever used in any code at all (at least in the wikis I know), I go with@
as it stands out and can be more easily seen than slashes or something. --Theaitetos (talk) 13:38, 16 September 2012 (UTC)
- Thanks Theaitetos - You beat me the punch - I just sat down to write up the fix after playing with debug=5 earlier today and realized the parser function #titleparts was being processed before being returned with the format, thus I needed to use ²{ }² to parse it after the fact because it was parsing #titleparts before
%TITLE%
was being returned. This of course led to knowing I needed the broken pipe ¦ instead of | and I had it working with your first example.
- Thanks Theaitetos - You beat me the punch - I just sat down to write up the fix after playing with debug=5 earlier today and realized the parser function #titleparts was being processed before being returned with the format, thus I needed to use ²{ }² to parse it after the fact because it was parsing #titleparts before
- I didn't use the replaceintitle= because I am need two things to pass, the parent title and the child title which are completely different. Using replaceintitle is a great idea, but the it sets
%TITLE%
to the value of the parent title, which is the displayed link title and trying to call it a second time when I really need the child page name as a parameter it fails because%TITLE%
will now return as only the parent name.
- I didn't use the replaceintitle= because I am need two things to pass, the parent title and the child title which are completely different. Using replaceintitle is a great idea, but the it sets
- I will change the
{{NAMESPACE}}
to use{{NAMESPACEE}}
, I didn't think of anyone using it in a NAMESPACE like the _talk NAMESPACE. I don't think there are any NAMESPACEs on the wiki it is being used on with the break in NAMESPACE names, but it is a good idea to plan ahead. This is all Great stuff! Thanks again! -- Hutchy68 (talk) 20:37, 16 September 2012 (UTC)
- I will change the
After DPL pages have another category
[edit]I've installed DPL in a MW 1.19.2 and I used only simple codes, for example
<dpl> category=RedBooks_PHP count=5 ordermethod=lastedit qualitypages=only </dpl> <dpl> category=ABAB|CGIDEV2|CL|PHP|REXX|Ruby count=5 ordermethod=lastedit order=descending addauthor=true </dpl> [[Category:Pagine_e_categorie_di_servizio]]
I noted that:
- With these codes I list also some categories.
- Since a category is classified for example as "CL", then also the page with the code is classified as "CL".
How can I avoid these two issue?
Thanks in advance --WhiteTigerItaly 07:02, 10 October 2012 (UTC)
- You will have to use the reset parameter. That should do it, but if it doesn't, take a look at eliminate and fixcategory. --Theaitetos (talk) 01:31, 11 October 2012 (UTC)
Behavior with $wgNonincludableNamespaces
[edit]Hi,
thanks for the extension! Would it be possible to make it configurable whether the variable $wgNonincludableNamespaces is recognized? I have a use case where I need to set $wgNonincludableNamespaces for transclusion but need to allow DPL to show pages titles from all namespaces and prevent DPL inlcusion via function richness settings in DPLsetup.php. (MW1.19, DPL 2.1)
Thanks or support! --Filburt (talk) 12:37, 11 October 2012 (UTC)
Does the richness functionality in DPLsetup.php work?
[edit]Hi again,
I changed the $validParametersForRichnessLevel in DPLsetup.php - i.e. I moved the include - functionality from level 2 to 3 - but nothing changed. Do I have to make some more changes? (MW1.19, DPL 2.1)
Thanks a lot!
--Filburt (talk) 12:47, 11 October 2012 (UTC)
Sort by custom date field?
[edit]This extension has been a real leap forward for the intranet wiki I'm running even though I'm only using it for the simplest of purposes, i.e displaying a feed of links to newly added content within various categories or intersections. Right now the lists are sorted using addfirstcategorydate, which is fine up to a point. But since we're adding documents and data that are sometimes older than what's already there (we're effectively building an archive) the result is sometimes confusing for users. As far as I can see the other date-sorting options (lastedit etc.) would not help. So I'm wondering if there is a relatively simple way of creating a custom date field on the page to mark content with its date of provenance and then having DPL sort by that. The capabilities of this extension appear to be amazing, but I'm afraid the advanced stuff finds me quickly out of my depth. So I'd be much obliged for any pointers anyone might have, or even to know whether I'm barking up the wrong extension here. Themicksa (talk) 13:21, 7 November 2012 (UTC)
- DPL can retrieve information, that you put into templates, even if those templates don't show anything. For example, if you want to mark those pages with a date, by which the pages should be sorted, then just add somewhere on that page the template date (e.g.
{{timestamp|2012/11/07}}
), then create the pageTemplate:Timestamp
as empty page or something. Now the DPL call can retrieve that by the command
include = {timestamp}:1
- Depending on how your DPL call is structured you can then sort by this value; for example, if you use a table, just add the column "Date" to the table, where the retrieved timestamp shows up and then sort by this table column
tablesortcol = 5
, if "Date" is the fifth column. --Theaitetos (talk) 18:16, 7 November 2012 (UTC)
- Wow. Thanks for the quick reply. Even better I think I understand that solution and look forward to trying it out. Themicksa (talk) 20:42, 7 November 2012 (UTC)
- OK. Progress of a kind. The timestamp template solution works and although the content isn't normally within a table (and doesn't otherwise need to be) I have got close to what I need using the following code:
- Wow. Thanks for the quick reply. Even better I think I understand that solution and look forward to trying it out. Themicksa (talk) 20:42, 7 November 2012 (UTC)
{{#dpl: |category= Good News |category= UK Grants |category= International Grants |notcategory= Global |notnamespace= Category |include = {timestamp}:1 |table=class="prettytable" |tablesortcol = -2 }}
This gives me a list of page titles followed by the timestamp date that are sorted with latest at top--all great. I've used an existing table class and can create a more suitable one if needs be, but I'm wondering if there is a way of doing it without the table (i.e. is tablesortcol the only way of sorting the timestamps.
Also, I'd like to use different date format; is that governed by the format in the timestamp template or can it be set via the DPL? (I'm presuming that the ordermethod= option is redundant here.)
Finally i'd like to include a bullet at the front of the line. I tried playing around with the example in the Manual
|format = ,\n* [[%PAGE%|%TITLE%]],,
but it doesn't work when used along with the table= parameter and I'm not sure how or where to place {timestamp} in that. In short, can I also use format= to give me this: • Pagename dd/mm/yyy
Thanks again for your help Theaitetos and even more thanks if you can shed any more light in my dimness.
Themicksa (talk) 14:07, 8 November 2012 (UTC)
- Using the bulletpoint-syntax inside a table is already a little bit tricky in Mediawiki itself, as |* would just give you a line starting with a mere *. Although an additional newline would do the job, it isn't really necessary, as we can simply put the bulletpoint wherever we need it manually.
- As for "format": When you use the format= parameter, every other formatting is suppressed, so you have to write down everything you want as output using the given variables; i.e. you can't use table= along with it, but you can write down a table in the format= parameter:
|format = {¦ , \n¦- \n¦ • ¦¦ [[%PAGE%]] ¦¦ , , \n¦}
- and then you should be able to use
tablesortcol = 3
to get the job done, as the included content will simply appear at the position of the 2nd comma. If you want the Mediawiki bulletpoint, you would have to replace the•
with\n*
. Sorting output outside of tables is atm only possible with the DPL intrinsic parameters and none of them helps you in this case, so you will have to use a table. But since tables are highly customizable, that shouldn't be a big layout problem, just add the desired css-style right after the "{|" table beginning.
- and then you should be able to use
- The content of the template:timestamp is irrelevant to the output, but what you enter in the respective pages is what is important as that is the included content, so when you write down
{{timestamp|2012-11-09}}
on Olympics 2012 then• Olympics 2012 2012-11-09
is exactly what appears. And when you write{{timestamp|"2012-11-09"}}
then you get• Olympics 2012 "2012-11-09"
. DPL isn't doing anything with the transcluded content here, it just repeats what is written on the respective page. So you would have to change those pages in the way you want it to appear. -Theaitetos (talk) 16:41, 9 November 2012 (UTC)
- The content of the template:timestamp is irrelevant to the output, but what you enter in the respective pages is what is important as that is the included content, so when you write down
- Thanks once again for the help which I'm only just now finding the time to implement. Unfortunately, I'm now floundering. I can get the display I require by using the following:
include = {timestamp}:1 tablesortcol = -2 count = 10 format = {¦ , \n¦- \n¦ \n* [[%PAGE%]] {{Align|Right|,}}, \n¦}
- I got that through trial and error so I'm not sure I understand everything. This gives me a bullet followed by the pagename, followed by the timestamp date as entered on each page (aligned to the right). However, the items are not ordered by the date stamp. Is the tablesortcol ref wrong? Or perhaps the timestamp template is at fault:
Template is: —Post date: {{{1}}} ON the page is: {{Timestamp|2012/11/29}}
- btw The timestamp sort was working in my earlier attempt, but ideally I would like that to be sorted AND displayed in a different format, ie dd/mm/yyyy. Can that be handled within the DPL code or is it a function of the timestamp.
- I realise that I'm well out of my depth here, but I'd be so grateful for a hand in getting over this hump, so I can get back to churning out pages. thx and best. Themicksa (talk) 15:56, 29 November 2012 (UTC)
- Quick question: Can you link me to your wiki, so I can have a real look at it and possibly edit things to get it done? It's easier to explain then. Otherwise here's an idea:
- Create a new (sub-)template Template:Timestamp/dpl and enter the following code (requires string functions enabled):
<span style="display:none;">{{{1}}}</span> {{#sub:{{{1}}}|8|2}}-{{#sub:{{{1}}}|5|2}}-{{#sub:{{{1}}}|0|4}}
- You should then be able to just write
include = {timestamp}/dpl
and revert to the oldtable
-statement along withtablesortcol = 2
to have it sorted and displayed the way you want. Basically the "invisible span" makes sure that the timestamp is written there (for sorting) but invisible to the eye; while "sub" helps retrive the different parts of the 1st parameteter to make sure that it first displays day, then month, then year. --Theaitetos (talk) 18:34, 30 November 2012 (UTC)- I'm immensely grateful for all your help with this, but I have to conclude there is just too much here I don't understand and unfortunately, because this is behind our firewall, there's no way to give you a link to get in and take a look. I'd be happy to send or link you to copies of the relevant pages, but I think that might be making life a bit too complicated all round. Right now the following code or variations :
- You should then be able to just write
{{#dpl: |category= Good News¦Impact¦UK Grants¦International Grants |notcategory= Global |notnamespace= Category |include = {timestamp}:1 |table=class="table.ombox" |tablesortcol = -2 |count = 100 |format = , [[%PAGE%|%TITLE%]],, }}
- is giving me a functional list of the correct pages followed by and sorted by date. That's way better than when I started out, so I'll settle for that and save the formatting niceties for another day. Again, many thanks for your help. It really is much appreciated. Themicksa (talk) 11:45, 3 December 2012 (UTC)
Passing parameters from DPL to Semantic MediaWiki
[edit]I'm trying to created a template that will output a dynamic report by generating a list of pages with Dynamic Page List and then run queries on each page using Semantic Mediawiki, outputting the whole mess in a table. The structure of the template looks like this:
{| class="wikitable sortable collapsible collapsed" width="100%" |- valign="bottom" ! width="15%" | Compound ID ! width="15%" | Generic name ! width="15%" | Trade name ! width="15%" | Developer ! width="10%" | Phase of development ! width="30%" | Target {{#dpl: | category=compounds | linksto={{PAGENAME}}{{#dpl: linksto={{PAGENAME}} | redirects=only | mode=userformat | format=,{{!}},%TITLE%, | suppresserrors=true }} | ignorecase=true | distinct=strict | format=,{{!}}- valign="top"\n{{indication-based compound list/row|%TITLE%}}\n | noresultsheader={{!}}-\n{{!}} colspan="6" align="center" {{!}} ''No compounds have yet been studied for this indication.'' }} |} }}
The row formatting template, {{indication-based compound list/row}}
, consists of the following:
<includeonly>{{!}} {{#show: {{{1}}} | ?compound id }} {{!}}{{!}} {{#show: {{{1}}} | ?compound generic name }} {{!}}{{!}} {{#show: {{{1}}} | ?compound trade name }} {{!}}{{!}} {{#show: {{{1}}} | ?developer }} {{!}}{{!}} {{#ask: [[category:clinical studies]][[compound number::{{{1|}}}]] | ?study phase= | limit=1 | mainlabel=- | searchlabel= | sort=study phase | order=descending }} {{!}}{{!}} {{#show: {{{1|}}} | ?target }}</includeonly>
The {{#ask}}
query is the reason why this isn't just a straight-forward DPL table: because the current phase of clinical development of a specific compound for a specific indication is a dynamic piece of data that changes frequently, the only option seems to be using an {{#ask}}
query to find out the highest value for study phase among the clinical trials that meet the parameters. But this template will be surveying auto-generated pages and I don't have a way of auto-loading a list of indications for each compound (to apply semantic markup to), so instead it's generating based on lists of indication links that are themselves generated by a {{#dpl}}
function on each compound page.
I've walked through this step by step, and none of the following are the problem:
- The template code is sound, and generates the proper structure.
- The table row template is sound, and if I remove the
{{#dpl}}
function and replace it with the template and a compound page name as a parameter, e.g.{{indication-based compound list/row|infliximab}}
, it creates exactly the output I'm looking for. - The
{{#dpl}}
function produces the correct list of pages when using the default output format. - The
{{#dpl}}
function passes the list as sequential parameters properly when usingformat = ,{{[[Template:{{{1}}}|{{{1}}}]]}}
with a simply dummy template (just an unordered list).
However, when I put all the pieces together I just get empty table cells. The {{#show}}
and {{#ask}}
functions can't seem to accept the DPL input as parameters. Is there an additional argument or intermediate step I'm skipping that can sanitize the input and make the whole thing work? Or are DPL and SMW fundamentally incompatible in this way?
- DynamicPageList 2.01
- Semantic MediaWiki 1.8
- MediaWiki 1.20.2
- PHP 5.3.19 (apache2handler)
- MySQL 5.1.30
Thanks!
- I am not too familiar with the SMW extension, but this isn't the first time, that suggests incompatibility issues between the two extensions, i.e. each of them works fine on its own, but they fail when put together. Having them work together fine requires changing the very code of the two extensions, which at this moment is very unlikely to happen. Yet, I might have an idea as to how you can achieve what you want: You will need to install the Extension:Variables and instead of calling upon the template {{indication-based compound list/row|%TITLE%}} directly, you can use the primary DPL call to define variables, which you can then use to call the template after the DPL call itself. So place the dpl call above your table and change it as follows:
|format = , ²{#vardefine:%NR%¦%PAGE%}² ,, |resultsheader = ²{#vardefine:TOTAL¦%PAGES%}²
- This DPL call will produce no visible output, but now the variable {{#var:TOTAL}} gives you the total amount of pages that were found by the DPL call and the variables {{#var:1}}, {{#var:2}}, {{#var:3}}, ... will give you said pages. You should then be able to use the template {{indication-based compound list/row|{{#var:1}}}} and so forth to produce your table output without another DPL call (which might erase your variables). It's not the most straightforward way, but the only one that comes to my mind atm. Good luck! --Theaitetos (talk) 12:55, 23 February 2013 (UTC)
Tablerow parameter including too many columns
[edit]In my wiki (concerning beekeeping in the game Minecraft), I want to build on an overview page a list of all bees, which have a certain temperature tolerance. Each bee uses several templates on its page. The relevant ones here are Bee and Attributes. The Bee template gives me the information I want displayed via the tablerow parameter, the Attributes template gives me the parameter, on which includematch selects the bees.
Code I tried:
{{#dpl: |category = Bees |includematch = ,/temp-tol\s*=\s*\-2\s*\R/i |include = {Bee}:name, {Attributes}:temp-tol |table = class="wikitable",-,Down 2 |tablerow = [[File:Bee-%%.png|32px]] [[%% Bee]] }}
Result: Selection works, but the table has two columns. The first one has the picture and textual link to the article as I want, the second one (unwanted) gives me the content of the temp-tol variable. According to the DPL-Manual: "Skipping a column would suppress output for that column completely.", but I don't define a second column (neither in table, nor in tablerow), so I expected to get a single column table.
I can workaround this by using a surrogate template for Attributes, which only contains a , but is it possible without this? At what point lies my thinking error? --137.226.119.115 20:07, 22 February 2013 (UTC)
- I think the manual is out of date on this one. To make things easier for new users, the default has changed to always add colums, when there is more content included via the "include=" statement. In order to not have it, you need to manually suppress the visible output. I recommend changing the last line to:
|tablerow = [[File:Bee-%%.png|32px]] [[%% Bee]] <span style="display:none;">«nowiki»,«/nowiki»</span>
- If you want to, you could even put the temp-tol output invisible in front of the image and use it for sorting purposes. Tell me if it doesn't work out and I have another look at it. --Theaitetos (talk) 12:33, 23 February 2013 (UTC)
- Thank you very much, it worked perfectly. --137.226.119.115 23:33, 24 February 2013 (UTC)
Tablerow parameter - Use of default values possible?
[edit]First the code:
{{#dpl: |category = Bees |includematch = /prod-s\s*=/i, /(humid{{!}}temp)\s*=/i |include = {Bee}:name, {Attributes}:temp:humid |table = class="wikitable sortable",-,Bee,Temp,Humid |tablerow = [[File:Bee-%%.png|32px]] [[%% Bee]],%%,%% }}
The template parameters for the Attribute template (temp and humid) can sometimes be empty. Is it possible to display an alternative text for these cases in the tablerow parameter?
Code I tried:
|tablerow = [[File:Bee-%%.png|32px]] [[%% Bee]],{{#if: %% {{!}} %% {{!}} Normal}},{{#if: %% {{!}} %% {{!}} Normal}}
- Line of reasoning: IF %% is non-empty THEN display %% ELSE display 'Normal'.
- Result: Empty cells everywhere in column 2+3, independent of the usage of the temp or humid parameter.
- I've found the error myself. The code which works is:
|tablerow = [[File:Bee-%%.png|32px]] [[%% Bee]],²{#if: %% {{!}} %% {{!}} Normal}²,²{#if: %% {{!}} %% {{!}} Normal}²
89.245.192.136 13:27, 14 March 2013 (UTC)
- Exactly, you need to employ escape characters here. The other escape characters are:
escape character | corresponding wiki character |
---|---|
« | < |
» | > |
²{ | {{ |
}² | }} |
¶ | newline |
\n | newline |
¦ | | |
{{!}} | | |
{{!!}} | || |
- The templates {{!}} and {{!!}} can, obviously, only be used, if you define them first in your wiki. --Theaitetos (talk) 14:49, 15 March 2013 (UTC)
DPL ignores words with +1 or (R) in the Name
[edit]Hey Guys, Hey Theaitetos :)
i use the Version 2.01 and the following code down.
{{#dpl: |category=Kategorie:{{{Name|}}} Monster |notcategory=Kategorie:Berüchtigte Monster |notcategory=Kategorie:Auftragsmonster |notcategory=Kategorie:Eventmonster |namespace = |includepage = {Monsterzeile} dpl 4 |includematch = /\s*Ort\s*{{=}}\s*{{{Name|}}}/si |format =,,\n |tablesortcol= 1 |table =class="SE-Heaventable sortable" style="width: 100%;",Name,Pos,Level,Hinterlässt,Familie |tablerow =%%,%%,%% }}
If {{{Name|}}} is like XYZ +1 or ZYX (R) it dosen't works. I got only this message in German: Extension:DynamicPageList (DPL), version 2.01 : Warnung: Kein passender Eintrag gefunden! Any Idea how i can fix it? Yukii (talk) 18:34, 31 March 2013 (UTC)
- Hallo. Das Problem dürfte hier in der Zeile
|includematch = /\s*Ort\s*{{=}}\s*{{{Name|}}}/si
stecken, denn Zeichen wie(
,)
oder+
sind RegEx-Metazeichen. Wenn also ein solches Metazeichen in{{{Name|}}}
vorkommt, funktioniert es nicht. Du musst die Metazeichen also erst per\
entwerten, sodass sie als normale Zeichen aufgefasst werden. Das kannst du bspw. durch{{#replace:{{{Name|}}}|+|\+}}
für das+
erreichen. --Theaitetos (talk) 19:48, 31 March 2013 (UTC)
- Hallo Theaitetos, danke schon mal für deine Antwort. Das mit dem
{{#replace:{{{Name|}}}|+|\+}}
hat schon mal sehr gut funktioniert, danke. Das mit den Klammern krieg ich irgendwie noch nicht gebacken. Wenn ich das richtig sehe, kann ich mit Replace doch nur ein Zeichen ersetzen oder gibt es da vielleicht einen trick? Yukii (talk) 07:16, 1 April 2013 (UTC)
- Hallo Theaitetos, danke schon mal für deine Antwort. Das mit dem
- Hallo (und frohe Ostern). Einen Trick gibt es nicht, aber du kannst es einfach mehrfach anwenden:
{{#replace:{{#replace:{{#replace:{{{Name|}}}|+|\+}}|(|\(}}|)|\)}}
. - Übrigens, in den Zeilen für Kategorieangaben kann man das
Kategorie:
weglassen, also stattcategory=Kategorie:{{{Name|}}} Monster
odernotcategory=Kategorie:Berüchtigte Monster
einfachercategory={{{Name|}}} Monster
bzw.notcategory=Berüchtigte Monster
. - Eine weitere Kleinigkeit: Bei RegEx-Ausdrücken wie
includematch = /\s*Ort\s*{{=}}\s*{{{Name|}}}/si
sollte man das=
eigentlich ohne Vorlage verwenden können. Und zur Übersichtlichkeit verwende ich als Anfangs- und Endzeichen immer ein@
, da dass ja praktisch nie vorkommt in Parameterwerten, es würde also so aussehen:includematch = @\¦\s*Ort\s*=\s*@si
(das¦
ist das Ausweichzeichen für|
in DPL; man kann alternativ aber auch{{!}}
verwenden). - --Theaitetos (talk) 13:48, 1 April 2013 (UTC)
- Hallo (und frohe Ostern). Einen Trick gibt es nicht, aber du kannst es einfach mehrfach anwenden:
- Hallo und dir natürlich auch Frohe Ostern :). Also das "verschachteln" hab ich jetzt mal versucht, aber es bringt nicht den gewünschten Erfolg. Bekomme leider immer noch die Meldung Extension:DynamicPageList (DPL), version 2.01 : Warnung: Kein passender Eintrag gefunden! :\
- Das mit der "Kategorie:" weglassen ist mir schon bekannt. Die Vorlagen hatte ich noch zur Zeit des alten DPLs gemacht und da hatte ich ohne dieser angabe paar probleme gehabt, daher ist das noch Gewohnheit ;)
- Das werde ich mir mal ansehen. Klingt gar nicht mal so verkehrt,
- Yukii (talk) 18:18, 1 April 2013 (UTC)
- Ich verbessere mich, die verschachtelte Variante klappt nun. Das hat sich wohl mit ner anderen Vorlage irgendwie gekappelt. Ich danke dir Theaitetos für die hilfe :) Yukii (talk) 18:57, 1 April 2013 (UTC)
Renaming this extension on Special:Version to have (tp) in brackets
[edit]Kghbln has proposed over at gerrit:43868 to have the name of this extension on Special:version be changed to DynamicPageList (tp). Does anyone have any objections? Would DynamicPageList (third-party) be better? If no one has any objections in the next little while (say a week or so) I intend to merge the change. (I feel a little weird merging changes like this, since I am not a maintainer of this extension, but no one else is commenting/merging changes to this extension). Thanks Bawolff (talk) 01:23, 4 April 2013 (UTC)
- Thanks for the notification. Somehow the mail ended up in the spam folder of a secondary mail address. IIrc Algorithmix intended renaming it to "Dynamic Page List 2", though I guess that might be a bit confusing as well, which is why I prefer "third-party" to "tp". --Theaitetos (talk) 17:33, 4 April 2013 (UTC)
- I am perfectly fine with the suffix ("third party") or ("tp"). Algorithmix (talk) 06:43, 1 May 2013 (UTC)
2013
[edit]DPL (2.0.1) & Cite throw notice
[edit]The Usage of DPL and Cite throws the following notice on my Mediawiki 1.20.5: Notice: Undefined property: Cite::$mInCnt in /extensions/DynamicPageList/DPL.php on line 78
on http://en.wiki-products.org/
Any ideas, what to look for? Thanks in Advance, --Francishunger (talk) 13:01, 6 May 2013 (UTC)
- Could you provide me with an account to your wiki, so I can take a look? --Theaitetos (talk) 17:51, 6 May 2013 (UTC)
- please contact me at info at design-hunger dot com --Francishunger (talk) 11:57, 8 May 2013 (UTC)
I just checked and the Cite extension bundled with 1.19 makes use of $mInCnt. Versions bundled in 1.20 and later no longer contain the variable. For my personal fix, I just commented out line 78 and 89 of DPL.php. Fereal (talk) 11:36, 26 May 2013 (UTC)
- I just did an upgrade from MediaWiki 1.20.6 to 1.21.1 on www.mobadaten.info. With 1.20.x, particularly with 1.20.5 too, it worked fine. With 1.21.1 the above error message turned up. I just also commented out line 78 and 89 of DPL.php. --Wgkderdicke (talk) 08:08, 3 August 2013 (UTC)
Hi All Version 1.21 here similar errors + a bonus to do with skins? - commented out all lines unsure on impacts - default skin set to monobook -I'm running this locally on an XAMPP install as a test bed before implementation of extensions/templates on server.
Strict Standards: Only variables should be assigned by reference in F:\xampp\htdocs\wiki\extensions\DynamicPageList\DPLMain.php on line 2549 Notice: Undefined property: Cite::$mInCnt in F:\xampp\htdocs\wiki\extensions\DynamicPageList\DPL.php on line 78 (once commented out line 89 reported as well as above) Strict Standards: Only variables should be assigned by reference in F:\xampp\htdocs\wiki\extensions\DynamicPageList\DPL.php on line 284
Updating to 1.21
[edit]I was attempting to update my wiki to 1.21rc5 and got the following error when trying to run update.php:
A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script Query: SELECT page_id,page_len,page_is_redirect,page_latest,page_content_model FROM `page` WHERE page_namespace = '10' AND page_title = 'Extension_DPL' LIMIT 1 Function: LinkCache::addLinkObj Error: 1054 Unknown column 'page_content_model' in 'field list' (localhost)
I was able to get around the problem by disabling DPL, doing the update, and then re-enabling DPL. -- Prod (talk) 00:21, 18 May 2013 (UTC)
- Hello, try this: ALTER TABLE /*$wgDBprefix*/page ADD page_content_model varbinary(32) DEFAULT NULL; --Krusher (talk) 13:42, 19 June 2013 (UTC)
- Disabling DPL didn't work on my wiki (wonder why), while using phpMyAdmin to add a "page_content_model" field to the "page" table, varbinary(32) and no default, solved the problem. --82.57.144.202 09:58, 29 June 2013 (UTC)
trouble with includematch
[edit]Software | Version |
---|---|
MediaWiki | 1.20.2 |
PHP | 5.3.3-7+squeeze15 (apache2handler) |
MySQL | 5.1.66-0+squeeze1 |
DynamicPageList (Version 2.01) |
I need to read a special pattern like "Drops" from a Template its called "Row"
{{Row |Name = |Drops = Item1, Item2, Item3, Item4 |Pattern3 = |Pattern4 = }}
my DPL code looks like so:
{{#dpl: | category= Item1 drops from XY | includepage = {row} dpl 2 | namespace = | format =,,\n | table =class="SE-Heaventable sortable" border="1" style="width: 100%;",Name,Level,Ort,class="unsortable"{{!}}Besonderheiten,class="unsortable"{{!}}Hinweis,class="unsortable"{{! }}Typ | tablerow =%%,%% | suppresserrors=true }}
row dpl 2 looks like so:
{{{Level|}}} {{!}}{{#if: {{{Ort|}}}|[[{{{Ort|}}}]]|}} {{!}}{{#if: {{{Ort-Hinweis|}}}|<br><small>{{{Ort-Hinweis|}}}</small>|}} {{!}}{{#switch: {{{Stehlen|}}}|{{PAGENAME}}|{{{Name|??}}} =[[Datei:Stehlenicon.png|25px|Gegner wird Bestohlen]]|= }}{{#switch: {{{Ausrauben|}}}|{{PAGENAME}}|{{{Name|??}}} =[[Datei:Ausraubenicon.png|25px|Gegner wird Ausgeraubt]]|= }}{{#switch: {{{Fleddern|}}}|{{PAGENAME}}|{{{Name|??}}} =[[Datei:Fleddernicon.png|25px|Gegner wird Gefleddert]]|= }} {{!}}{{#switch: {{{Typ|}}}|NM|Notorisch|nm|Berüchtigtes Monster='''[[:Kategorie:Berüchtigte Monster|NM]]'''|Auftrag|Quest|Mission|AM|QM|MM ='''[[:Kategorie:Auftragsmonster|AM]]'''|Event|EM ='''[[:Kategorie:Eventmonster|EM]]'''|}} <noinclude>[[Kategorie:Vorlagen (DPL)|{{{PAGENAME}}}]][[Kategorie:Vorlagen (Geschützt)|{{{PAGENAME}}}]]</noinclude>
Now the DPL works in the Moment so, he Read and listen all "Rows" where the first Item is Item1 and all other Rows. Now i looked in the Manual
If the parameter is not the last one in your template call you might use includematch=/\{{!}}\s*myPattern\s*\|/s"
and i have to do a includmatch where he reads out the complete line "Drops". If "Item1" should be the third, or last entry he has to read it. But, i reads only the Rows, where Item1 is the FIRST entry by "Drops =" you can see down the new Code:
{{#dpl: |dplcache= 1-drops{{PAGENAME}}drops-1 | category= Item1 drops from XY | includepage = {row} dpl 2 | namespace = | format =,,\n | includematch = /\s*row\s*{{=}}\s*item1/si | table =class="SE-Heaventable sortable" border="1" style="width: 50%;",Name,Lvl,Ort,class="unsortable"{{!}}Hinweis,class="unsortable"{{! }}Typ | tablerow =%%,%% | suppresserrors=true }}
If i try it with the includmatch example from the Manual like this:
{{#dpl: |dplcache= 1Pop6456456345test02wer | category= Item1 drops from XY | includepage = {row} dpl 2 | namespace = | format =,,\n | includematch=/\{{!}}\s*item1\s*\|/s | table =class="SE-Heaventable sortable" border="1" style="width: 50%;",Name,Lvl,Ort,class="unsortable"{{!}}Hinweis,class="unsortable"{{! }}Typ | tablerow =%%,%% | suppresserrors=true }}
i got this following error:
Extension:DynamicPageList (DPL), version 2.01 : Warnung: Der unbekannte Parameter '/s [missing '=']' wird ignoriert. Hilfe: Verfügbare Parameter: addfirstcategorydate category count hiddencategories mode namespace notcategory order ordermethod qualitypages redirects showcurid shownamespace stablepages suppresserrors allowcachedresults execandexit columns debug distinct escapelinks format inlinetext listseparators notnamespace offset oneresultfooter oneresultheader ordercollation noresultsfooter noresultsheader randomcount randomseed replaceintitle resultsfooter resultsheader rowcolformat rows rowsize scroll title title< title> titlemaxlength userdateformat addauthor addcategories addcontribution addeditdate addexternallink addlasteditor addpagecounter addpagesize addpagetoucheddate adduser categoriesminmax createdby dominantsection dplcache dplcacheperiod eliminate fixcategory headingcount headingmode hitemattr hlistattr ignorecase imagecontainer imageused include includematch includematchparsed includemaxlength includenotmatch includenotmatchparsed includepage includesubpages includetrim itemattr lastmodifiedby linksfrom linksto linkstoexternal listattr minoredits modifiedby multisecseparators notcreatedby notlastmodifiedby notlinksfrom notlinksto notmodifiedby notuses reset secseparators skipthispage table tablerow tablesortcol titlematch usedby uses allrevisionsbefore allrevisionssince articlecategory categorymatch categoryregexp firstrevisionsince lastrevisionbefore maxrevisions minrevisions notcategorymatch notcategoryregexp nottitlematch nottitleregexp openreferences titleregexp deleterules goal updaterules .
So what do i wrong? Yukii (talk) 08:59, 28 June 2013 (UTC)
- The error results from using
|
, which you need to replace with¦
or{{!}}
:| includematch=/\{{!}}\s*item1\s*\|/s
- The includematch basically works like this: It takes the transcluded template wiki text and checks it against the regular expression that you provide it with. So if the transcluded page uses the template like this:
- The error results from using
{{Row |Name = Questigo |Drops = [[Sword]], [[Bow]], [[Axe]], [[Staff]] |Pattern3 = long |Pattern4 = tedious }}
- and you want to know whether "Axe" is among the "Drops=", then your regular expression would look like this:
| includematch = @\¦\s*Drops\s*=.*\[\[Axe\]\]@i
- Note regarding markup: I prefer
@
over/
, since it is so much better to see among all those\
; also, there is no need to escape=
in the statement and I also prefer escaping|
with¦
instead of{{!}}
, since it keeps the statement shorter and more readable. - Btw, if you don't use the template row dpl 2 elsewhere, it might be easier to perform the check on a matching string inside the template itself
{{#if: {{#pos: {{{Drops|}}} | [Axe] }} | template }}
, because it is much easier to just check a specific template parameter for a specific string, than writing an entire regular expression. If you do use the template also for other things (like Swords), just replace the[Axe]
with a variable{{#if: {{#pos: {{{Drops|}}} | [{{#dplvar:DROPS}}] }} | template }}
and define the variable before your respective dpl call, e.g.:
- Note regarding markup: I prefer
{{#dplvar:set|DROPS|Sword}} {{#dpl: | category = Item1 drops from XY | includepage = {row} dpl 2 | namespace = | format = ,,\n, | table = class="SE-Heaventable sortable" border="1" style="width: 100%;",Name,Level,Ort,class="unsortable"¦Besonderheiten,class="unsortable"¦Hinweis,class="unsortable"¦Typ | suppresserrors = true }}
DPL "future-safe"?
[edit]Hello,
your extension DPL is great! I would like to integrate it into our private wiki.
Is the use "future-safe"? What are your future plans? Will developing go further when new releases of mediawiki appear ... e.g. the next 10 years? Or would you recommend to use the extension Semantic Mediawiki instead?
Regards
Janis --87.186.50.77 07:44, 2 October 2013 (UTC)
- I don't know what happens in the next 10 years. I might be killed in a car accident or the financial crisis could rebound and crush the entire global economy to dust. And especially in information technology 10 years is a long time frame – not even Facebook might survive the next decade. Yet, I think the extension is "future-safe" and it will be developed further, especially to continue functioning properly on future releases of Mediawiki.
- As for the SMW extension: I don't think it's so much a question of what extension is more "future proof". SMW heavily relies on all data being supplied in semantic ways, while DPL can crunch raw syntax, text and templates. If your wiki contains a lot of text, I'd favor DPL, but if everything is about templates, then SMW is the way to go. It might also depend on your editors and users: SMW allows users to make their own calls by pushing buttons (although not quite as easy as it sounds), while DPL requires experienced editors writing the proper code on a page. So when you are certain, that all availables angles of looking and comparing things can or should be done on actual pages, then DPL is your buddy, but if you want users to always make their own calls and comparisons, go with SMW. --Theaitetos (talk) 19:11, 18 November 2013 (UTC)
Conflict between DPL (Third party) and Semantic Internal Objects
[edit]I am forced to use rather old versions in my company, so the issue might have been silently fixed already. Just to be sure i ask if the issue still is valid and what might be a remedy:
SIO: V0.6.6 & DynamicPageLink (Third-Party) V1.8.9 on a MW 1.17.5.
I dont know if this is an issue for the SIO extension or the DPL extension, so i will ask both.
If i assign some SIO on a page and have a DPL with inclusion of template-parameters later on:
{{#set_internal:Steckbrief/SOAService_Users |Steckbrief/SOAService-Username=EX-ample |Steckbrief/SOAService-Userversion=V03}} {{#dpl: title={{FULLPAGENAME}}|include={sometemplate}:a_parameter|skipthispage=no}}
everyting works fine.
If i happen to have that kind of DPL somewhere on the page prior to the SIO statement (e.g. in a template(!)) no properties are set.:
{{some template with a DPL like the one in the first example|param=someting}} {{#set_internal:Steckbrief/SOAService_Users |Steckbrief/SOAService-Username=EX-ample |Steckbrief/SOAService-Userversion=V03}}
Taking the DLP out of the template like below doesnt change anything. Still no properties are set.
{{#dpl: title={{FULLPAGENAME}}|include={sometemplate}:a_parameter|skipthispage=no}} {{#set_internal:Steckbrief/SOAService_Users |Steckbrief/SOAService-Username=EX-ample |Steckbrief/SOAService-Userversion=V03}}
If I happen to use tags for the DPL instead of a call it works again.
<dpl> title={{FULLPAGENAME}} include={sometemplate}:a_parameter skipthispage=no </dpl> {{#set_internal:Steckbrief/SOAService_Users |Steckbrief/SOAService-Username=EX-ample |Steckbrief/SOAService-Userversion=V03}}
Sadly there is no way to change all calls of DPL to DPL tags as both work slightly different (usability of magic words).
Took me several hours to find out that these two dont like each other and that its based upon sequence within the code.
Are there any hints, known fixes on this issue? --Ciannicay (talk) 11:48, 29 October 2013 (UTC)
- I narrowed the issue down to some statements like {{#dpl: title={{FULLPAGENAME}}|include={sometemplate}:a_parameter|skipthispage=no}}. I edited the first post accordingly. --Ciannicay (talk) 09:25, 31 October 2013 (UTC)
- I got the advice to simply refrain from using the above mentioned statements in this sequence. Sadly this is not feasible. The wiki I am using is a closed one in the company i work for. I cant inhibit my up to 10.000 collegues to use them. And i dont have any influence on updateing to newer versions either. But, what i came about is a rather old bugzilla entry on a matter that shows great parallels to the the matter at hand. Could you please (!) look into it? https://bugzilla.wikimedia.org/show_bug.cgi?id=21502. The last comment is the one i refer to. Astonishingly the said ticket is open since 2009 with a last comment (that suggests the bug is still unfixed!) from 2011. --Ciannicay (talk) 12:24, 18 November 2013 (UTC)
- I narrowed the issue down to some statements like {{#dpl: title={{FULLPAGENAME}}|include={sometemplate}:a_parameter|skipthispage=no}}. I edited the first post accordingly. --Ciannicay (talk) 09:25, 31 October 2013 (UTC)
Fatal error: Call to undefined function wfLoadExtensionMessages() with MW 1.21.1
[edit]Hi.
I have version 2.01 of DPL installed on a MW 1.21.1 instance. When I use:
{{#dpl: titlematch = {{PAGENAME}} | addpagecounter = true | mode=userformat |listseparators=,%COUNT%,, }}
I get the error:
Fatal error: Call to undefined function wfLoadExtensionMessages() in /var/www/wiki/extensions/DynamicPageList/DPLLogger.php on line 20
Obviously some some function has been depreciated again in MW. Any ideas on a fix?
Thanks! --Mitchelln (talk) 14:28, 25 November 2013 (UTC)
- Yes, and not replaced so you can just comment out the code or remove it. Find line 20 in DLPLogger.php and comment out the following:
if (!self::$loaded) { // wfLoadExtensionMessages ('DynamicPageList'); self::$loaded = true; }
- Brilliant. Thanks very much for that.
- --Mitchelln (talk) 17:41, 28 November 2013 (UTC)
Weird output when includematch excludes all results
[edit]I'm trying to figure out what is wrong with this bit of code:
{{#dpl: | uses=Template:ARR Infobox Item | category=Gathering Points Modifier | category=Ring | includepage ={ARR Infobox Item} statsdpl3 | includematch = /Required Level\s*=\s*\b([0-9]{{!}}10)\b/i |tablesortcol=3 | namespace = | format =,,\n | table = class="GEtable sortable" style="width: 95%;",-,class="unsortable"{{!}},Item,Level,Classes,class="unsortable"{{!}}Stats | tablerow = %% | suppresserrors=true | noresultsheader = None. }}
Without the includematch, this code shows 10 results. None of the 10 results match the includematch however, so I would expect:
None.
but it seems to gag on something and results in this instead:
None.None.{|class="GEtable sortable" style="width: 95%;" !class="unsortable"| !Item !Level !Classes !class="unsortable"|Stats |}
This only happens if there are results but includematch eliminates them all. If there are no uses or category matches, output will be as expected.
So what is happening here? --87.64.159.218 21:09, 16 December 2013 (UTC)
- There are several things that are a bit irritating in this code.
- First, the
includematch
parameter only eliminates entries from the result list that are already found, meaning that even if there are no results in the output, DPL will think there are and display the output differently as if there were no results in the first place. - Second, the
includematch
statement will try to match the string you've given to the output you generate with the phantom template, if you use such a template. That is why, generally, when you are using a phantom template, it is much easier to test your desired match inside the phantom template, e.g.{{#if: {{#pos: {{{Required Level|}}} | 10 }} | THEN | ELSE }}
. If you wanna test for a regular expression, you can use#dplreplace
, e.g.{{#if: {{#pos: {{#dplreplace:{{{Required Level|}}}|\b(\d{{!}}10)\b|@@@}} | @@@ }} | THEN | ELSE }}
- Also,
tablerow = %%
is unnecessary – it's only useful if you want to change something there. Theformat
statement is unnecessary as well in this call (generally you only need one statement,table
orformat
, but not both). --Theaitetos (talk) 22:17, 16 December 2013 (UTC)
order in rows instead of columns?
[edit]This seems like it should be simple. But lots of searching later, and I have no idea how to do it!
I want to list titles across, rather than down.
For example, I have a bunch of articles titled as such: "YYYY-MM topic" or "YYYY topic" or "MM topic".
I am successful in removing " topic" from the output, and selecting the proper articles, via:
<dpl> category=Database titleregexp=^[0-9].*expenses$ notnamespace=Events replaceintitle=/\ expenses/, order=descending columns=10 </dpl>
but the output looks like this (multiple columns clipped):
|
|
whereas what I want is this:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
I played around with "inline", but columns would not line up and the output looked crappy.
This seems like it might be a fairly popular thing to do. So how can I do it?
Thanks in advance for any advice offered!
- Sorry, but MediaWiki currently does not offer any possibility to switch columns and rows in a table, which is what you are actually requesting here. You can ask the MediaWiki developers to add such a feature and then it could be added into DPL, but it is not something that is specific to DPL. --Theaitetos (talk) 12:17, 3 October 2014 (UTC)
How to? Automatically adding alphabetized headers/headings
[edit]I would like to automatically add alphabetized headers. For example, I have a list with the following code:
<DPL> debug=0 namespace=Dictionary shownamespace=false ordermethod=title columns=3 rowcolformat=width=100% </DPL>
How would I get it to automatically add an "==A==
" for the "A's" in the list, a "==B==
" for the "B's" in the list, etc?
We don't have to keep the columns, if that messes with anything.
Thanks!
- This is not directly possible, though there is a workaround, that requires repetitive code. Since it's not possible to add headers automatically, you will basically have to build 26 times the same DPL call (1 for each letter in the alphabet) and drop the output entirely, if the result is empty. Example:
{{#dpl: | namespace = Dictionary | titlematch = A% | shownamespace=false | ordermethod=title | columns=3 | rowcolformat=width=100% | resultsheader= \n==A==\n | noresultsheader = }}{{#dpl: | namespace = Dictionary | titlematch = B% | shownamespace=false | ordermethod=title | columns=3 | rowcolformat=width=100% | resultsheader= \n==B==\n | noresultsheader = }} …
- Hope this helps. --Theaitetos (talk) 19:52, 16 October 2014 (UTC)
Incorrect formed link to the subcategory
[edit]Instead Category:Category_name link leads to Category_name. --84.51.117.152 18:00, 2 February 2014 (UTC)
2014
[edit]Simple 'USERNAME' not working
[edit]This works fine if I put the name in literally, but there's no match as it is:
<nowkiki><DPL>
count=50
namespace=Incidents
category=Incident
titlematch={{#USERNAME:}}
shownamespace=true
mode=ordered
</DPL></nowiki>
105.236.153.208 12:06, 17 February 2014 (UTC)
- This is to be expected, when you use DPL as tag extension, i.e. <DPL>…</DPL>. Just invoke DPL as a parser function, i.e. {{#dpl: … }} and it will work as intended, as the #USERNAME will get parsed before DPL is invoked. --Theaitetos (talk) 14:36, 27 September 2014 (UTC)
stablepages=only hides only never flagged pages
[edit]...but if there is a stable version and a not flagged version of a page DPL includes the newest (nonstable) page. --Netzelch (talk) 19:05, 20 February 2014 (UTC)
DPL Slow
[edit]Call the DPL at the end of the Localsettings.php
19:05, 20 February 2014 (UTC)
allowcachedresults: Control the max age
[edit]I'd like to be able to control how old a cache can max be, e.g. cacheage = 10
for 10 minutes.
Also, how does the cache work? Is it using memcached if enabled? --217.247.160.172 14:10, 22 February 2014 (UTC)
Category with ampersand not being found with DPL
[edit]We have a category with an "&" and when calling this category within DPL it is not found .
{{#dpl:category=Antigua & Barbuda|category=1982|ordermethod=sortkey|format=,***,%PAGE%\n,}}
I have tried "%26" rather than the ampersand and it then picks up all categories on the wiki.
{{#dpl:category=Antigua_%26_Barbuda|category=1984|ordermethod=sortkey|format=,***,%PAGE%\n,}}
I get no results with the & and I get all results with the %26. Anyone have an idea what I can put in ?
--Stampstudy (talk) 13:04, 28 February 2014 (UTC)
- Have you tried escaping the ampersand with
\x26
? --Theaitetos (talk) 12:21, 3 October 2014 (UTC)
- Have you tried escaping the ampersand with
Numerous Issues
[edit]My goal is very simple: to make a dynamic page that transcludes identically-titled chapter content across multiple pages, such as the example pages on religion across various country pages. It doesn't have to be especially pretty, but if no chapter exists in a page within the category, I don't want the page title link to appear. My chapter content is longer and written in paragraph style with pictures compared to the manual examples, but other than that this should've taken about fifteen minutes.
The only notable oddity is that my page titles include double-quote " and parenthetical () characters. Also, some of my chapter titles have spaces. That's the only weirdness.
All of the problems described below are consistent across 2.01 and 2.02/2.3.0, and exist in both parser function and parser extension variations. I have modified the functional richness up to 3 from the default, and the issues persist. Escapelinks seems to have no bearing on the output, either.
Below is an example of where I am now, and the reasons why follow:
category=Africa includematch=/Religion/ include=#Religion escapelinks=false mode=unordered order=ascending ordermethod=sortkey resultsheader=<ul><br></ul>
1. I am unable to get any variation of OR for categories working, such as if I had a Europe category. No pipe, no broken pipe, no bang. Only results from the first category are searched. My workaround is to call DPL a second time for the next category, which is inefficient and unattractive.
1a. If I call DPL twice, includematch no longer works on the second go-round, meaning I get page links showing up with no religion chapter within them.
The above is the primary issue, because I only need one or the other above to function as expected, but neither does.
2. The formatting is broken in non-table form. The unordered list misbehaves and the first page's title link and text were all together and justified instead of in unordered list. It only looked right if I had an error messajust an observation.ge above it, so I ended up adding the resultsheader with an additional ul above to fix it.
3. DPL sporadically fails to properly format the list and text properly for no obvious reason, in a manner similar to the above. That is, a page identical to every other page but for content will have its unordered list bullet, page title, and then content on the same line as the page title link. It is consistent per DPL page (i.e. it does not change per reload/re-save of the DPL page) but not consistent if, for instance, I change the order of the pages. Then the original page's transcluded text and the DPL page's unordered list will appear prop erly. Simply editing the text on the page with transcluded content changes nothing.
I can live with #3 if needed, though it is annoying to have such inconsistent behavior.
I have encountered other problems as part of this increasingly-difficult simple goal (I have tried using table output but cannot get any functionality like valign=top to work!), but if I could get any or all of those working I might be able to make headway elsewhere.
This is MediaWiki 1.20.2 (using the Modern skin), PHP 5.3.28 (cgi-fcgi), MySQL 5.5.32-31.0-log, with additional extensions Admin Links 0.1.7, DeleteHistory 0.6, Nuke 1.1.7, Renameuser, and Replace Text 0.9.5. Parser Hooks listed are DynamicPageList (third party) 2.02, MSUpload 9.2, Lockdown, MultiBoilerplate 1.8.0, and WikiEditor 0.3.1.
I did try disabling Lockdown just in case it was up to no good somehow, but to no avail.
(EDIT: Removed additional info to declutter)
Thanks in advance for your help. I'm a do-it-yourselfer which is why I've been at this for days, but with even the simplest functions not behaving as expected, I'm at a loss. 16:12, 13 May 2014 (UTC)
- Murphy's Law of seeking help . . . you find the answer yourself thereafter.
- Continued searching resulted in finding this discussion wherein the following regular expression includematch seems to do the trick:
includematch = /^\s*\n/
- I personally find this non-obvious . . . other folks used simple regexp lines that simply repeated the chapter title they wished to include, so I'm unclear on the logic. However, it seems to work for my needs, with caveats. For instance, it also seems that includematch sometimes needs to precede include, despite the fact that the manual shows examples with includematch after. The behavior is inconsistent, however, but easy enough to resolve in testing.
- Finally, with upgraded MediaWiki to 1.22.6 (hated to do it ... as predicted, a couple of other things broke) and with DPL 2.3.0, it seems that issue #3 above related to formatting has been partially resolved, or at least modified. As it stands now, the included chapters will be on the same line if the content does not have a line in between. That is to say . . .
====chapter==== content
- . . . now consistently results in the unordered list line looking like "chapter content", whereas . . .
====chapter==== content
- . . . will look as expected, with content occurring on a new line. Again, not really an issue now as it is easy enough to resolve (and is at least a consistent behavior, which had been a problem before). #2, however, still requires workaround. 13:50, 15 May 2014 (UTC)
Curse Fork
[edit]I have forked this extension and performed a massive code clean up on it. This fixes some various slow pieces of code, removes legacy pre-1.19 Mediawiki code, and provides a better base for fixing bugs. The fork will be maintained by Curse's Wiki Platform Team. The next planned iteration is to break down the massive 1,144 line switch statement into manageable code. DynamicPageList Alexia E. Smith (talk) 18:52, 24 June 2014 (UTC)
- I am sorry I didn't see this earlier. I have this page on my watch list, and the watch list in my feeds, but somehow it failed to mention any edits on this page for half a year. Anyway, I will take a close look at it soonish, do some tests and then try to merge it into master, if it does perform as expected. Since DPL is hosted on Wikimedia's Gerrit, do you want to submit your work via Git yourself, for proper attribution, or do you want me to submit it? And sorry again for the delay. --Theaitetos (talk) 14:51, 27 September 2014 (UTC)
- I am actually in the middle of working on a huge refactor of DPL. It may be a couple weeks before I am ready to push it back. Alexia E. Smith (talk) 16:33, 13 October 2014 (UTC)
- Really? That's great. Are you working with the latest master version from the Git repository? In case you have no developer access, you can request it, and then fork and push changes directly. --Theaitetos (talk) 16:40, 13 October 2014 (UTC)
- I have version 3.0 Alpha 4 up on Github to check out. https://github.com/Alexia/DynamicPageList/tree/3.0A4 If you have your own development wiki to test it on and preview it then give it a shot. Alexia E. Smith (talk) 15:45, 24 October 2014 (UTC)
- Nearly up to date with the latest revision. I will have to manually merge a few fixes back to around 2014-07-05. Alexia E. Smith (talk) 18:11, 13 October 2014 (UTC)
- Beta 1 is now ready to go and will be deployed out to Gamepedia this week. All the major issues are fixed and we are beginning live testing. The only major issue right now is the need for language clean up. Changes since Alpha 4: https://github.com/Alexia/DynamicPageList/compare/3.0A4...3.0B1 Alexia E. Smith (talk) 15:39, 4 November 2014 (UTC)
- Yup, I've seen a lot of work you've done on Github. I'll pull and test this weekend. Can you give me some pointers as to what exactly you've been focusing on with your work? --Theaitetos (talk) 21:19, 4 November 2014 (UTC)
- The entirety of DPLMain.php was ripped apart and put into separate classes.
- Class files were moved into the new classes folder, have the DPL prefix removed, and namespaces added.
- Parse class - What is left of DPLMain, handles parsing the raw user input for errors and output.
- ParametersData class - Contains all the configuration for parameters and associated options.
- Parameters - Parameter/Option handler and validation. Extends ParametersData class.
- Query class - Database access and presentation.
- Config class - Handles all the DPL configuration that was previously manually called against a static class that had nothing to do with configuration.
- Some basic clean up and bug fixes were done in Article, LST, Variables, ListMode, and DynamicPageList classes. These classes could use some love, but they are sane enough to leave alone.
- Data flow: Raw user input is handled inside the Parse class. Each proposed parameter=option pair is passed into the Parameters class where it does validation and returns validation status. The Parameters class extends the ParametersData class for additional information. Assuming no errors occur during validation a new Query object is initialized with the finished Parameters object where it can then be called to run the database queries. Alexia E. Smith (talk) 21:54, 4 November 2014 (UTC)
- O … M … G … You really weren't joking when you spoke of a complete overhaul. Testing things and reading the code will take a lot of time, and there I hoped I'd have a nice Christmas this year. xD I guess in that case it should be made available before testing is done as a fork on gerrit. Don't forget to add your name/pseudonym as an author in DPLSetup.php – provided there still is one. ^^ --Theaitetos (talk) 00:09, 5 November 2014 (UTC)
- DPLSetup.php was renamed DynamicPageList.hooks.php to follow the Mediawiki standard. The changelog was pulled out and put into CHANGELOG.md. The plan is about two weeks of live testing before marking it as a full release ready to distribute. The wiki managers that I work with are really good at breaking things so I am trusting them to find issues. :D Alexia E. Smith (talk) 00:18, 5 November 2014 (UTC)
- I just packaged 3.0 Beta 3 which fixes several critical bugs with parameters that use getPageNameList(). Alexia E. Smith (talk) 19:15, 4 December 2014 (UTC)
Count the number of linksto ?
[edit]Is it possible to count the number of linksto using DPL? I can see only BackLinksFunctions extension
- I'm not exactly sure what you mean. Do you want to know the number of pages, that link to a specific page, i.e. the number of pages on Special:WhatLinksHere/YOURPAGE? If so, just use this simple DPL statement and wrap the
{{#expr: … }}
around it:
- I'm not exactly sure what you mean. Do you want to know the number of pages, that link to a specific page, i.e. the number of pages on Special:WhatLinksHere/YOURPAGE? If so, just use this simple DPL statement and wrap the
{{#expr: {{#dpl: |linksto = YOURPAGE |include = |format = ,+1,, }} }}
- If you want to include, exclude or focus on redirects, add the
redirects = include/exclude/only
statement. --Theaitetos (talk) 14:44, 27 September 2014 (UTC)
- If you want to include, exclude or focus on redirects, add the
Show pages that link to redirects
[edit]The section http://semeb.com/dpldemo/index.php?title=DPL:Manual_-_DPL_parameters:_Criteria_for_page_selection#redirects says " Note: this parameter does not show pages that link to the redirect (as Special:Whatlinkshere/DPL:Discussion does); only redirect pages themselves." Well, okay but how to show them like "What links here" pages does?
- Make two DPL calls and nest them inside each other: The first call lists all redirects to your selected page, and the second call lists all pages that link to your page or one of the redirects:
{{#dpl: |linksto = YOURPAGE{{#dpl: |linksto = YOURPAGE |redirects = only |include = |format = ,¦%PAGE%,, }} |format = ,¶*[[%PAGE%]],, }}
- --Theaitetos (talk) 17:42, 30 September 2014 (UTC)
- Thanks a lot Gleki.arxokuna (talk) 09:55, 3 October 2014 (UTC)
Recent changes using DPL
[edit]Is it possible to get the list of M pages modified in the last N days sorted by the time of modification using DPL?Gleki.arxokuna (talk) 09:55, 3 October 2014 (UTC)
- Yes, it's possible, but you need a selection criteria for the page; use the following parameters (with M being 10 in this example):
ordermethod = lastedit order = descending addeditdate = true count = 10
- If you're working with revisions, you can use
allrevisionssince
as selection criteria. --Theaitetos (talk) 12:33, 3 October 2014 (UTC)
- If you're working with revisions, you can use
DPL using template's parameter
[edit]I'm trying to make a template on Wikia that uses DPL for creating gallery from images in a specific category (can't use another extension). I need to set the category by using template parameter but it does not work.
code of template (called Galerie):
{{#dpl: |category={{{category}}} |mode=userformat |format=<gallery>,%PAGE%\n,,</gallery> }}
code on page:
{{Galerie|category=nameofcategory}}
Is it possible to make it work? --78.45.40.104 21:25, 13 November 2014 (UTC)
- It should be possible, yes. Try it with these slight changes:
{{#dpl: |category={{{category}}} |format=«gallery»,%PAGE%\n,,«/gallery» }}
- If that doesn't work, please describe the exact problems more specifically, or link me to your wiki. --Theaitetos (talk) 21:57, 13 November 2014 (UTC)
- Thanks but it did not help. The problem is that the DPL does not work with the parameter. When i type the category directly (|category=nameofcategory), it is working properly.
- http://cs.starwars.wikia.com/wiki/%C5%A0ablona:Galerie - the template
- http://cs.starwars.wikia.com/wiki/%C5%A0ablona:P%C3%ADskovi%C5%A1t%C4%9B - page where the template is used
- --78.45.40.104 22:12, 13 November 2014 (UTC)
- I looked at it. Everything works fine. You misspelled the category parameter, but I can't find any other problems. Is it solved? --Theaitetos (talk) 23:31, 13 November 2014 (UTC)
- Yes, you're right. I guess I didn't see it before because it was cached. Thanks for your help. :) --78.45.40.104 07:14, 14 November 2014 (UTC)
ignorecase doesn't work with titlematch
[edit]Using titlematch and ignorecase returns 0 results: http://semeb.com/dpldemo/index.php?title=User:Subfader/ignorecase_titlematch --Subfader (talk) 15:12, 16 November 2014 (UTC)
- This bug is fixed in the latest version. If the problem affects your wiki, please try to update your DPL version and check if it persists or is resolved. --Theaitetos (talk) 23:40, 16 November 2014 (UTC)
- 2.3.0? I tested it on that using MW 1.22.12. Anyway, fixed with the linked LOWER() --Subfader (talk) 21:56, 25 November 2014 (UTC)
Will "createdby" be fast again one day?
[edit]I updated from MW 1.16 to MW 1.22 and now found that createdby is super slow and even has a warning in the docs.
I haven't looked into the code or changes to the main MW tables structures. Are there chances that createdby will be fast again one day? --Subfader (talk) 21:55, 25 November 2014 (UTC)
- Yes, there are some improvements and overhauls for the user-queries in the pipeline. --Theaitetos (talk) 16:11, 3 January 2015 (UTC)
Show last Added/eidted pages shortstory!
[edit]Hallo, I've created this to (Show me last added/edited pages with shortstory of 500 letters)
<dpl> ordermethod=lastedit order= ascending namespace= count=3 format =,\n*[[%PAGE%|'''%TITLE%''']],, include=%0[500 Read More...] allowcachedresults=true </dpl>
But is showing just from 2 categories with images from the page, not just the texts! Is possible to force it to use from alle categories?
Best
protected pages filter?
[edit]Hi, I'm using DPL on a wiki and am wondering if it is possible for DPL to be able to only show me pages that have been sysop-locked (aka fully protected) by a specific user? Thanks! --81.131.83.91 20:54, 1 January 2015 (UTC)
- No, that's not possible. I think it should be visible in the wiki logbook anyway. --Theaitetos (talk) 16:09, 3 January 2015 (UTC)
Sorting vs Accent Marks
[edit]Is there a way to make DPL ignore accent marks when sorting? For instance, my query returns these articles:
- Aeromodelismo
- Alfarería
...
- Trenzado
- Trenzado - Avanzado
- Álbum de Recortes
- Álbum de Recortes - Avanzado
Is there a way to get the articles that start with Á listed with the A's instead of at the end? --Jomegat (talk) 23:04, 12 January 2015 (UTC)
- I figured it out. I added a sorting argument to the template that pops the page into the category. --Jomegat (talk) 02:46, 15 January 2015 (UTC)
2015
[edit]Don't store dplcache in images directory
[edit]Storing the dplcache directory inside the images folder seems very hacky and could cause problems (in my case this folder is 400 MB and was backed up every night while I actually exclude all temp folders in my routine).
Better check if Manual:$wgCacheDirectory is set and add the dplcache folder there. --Subfader (talk) 18:19, 18 January 2015 (UTC)
Add mime type filter
[edit]Matching image files and nottitlematch: I have a complicated DPL query where I select namespace=File
and nottitlematch=%.mp3¦%.ogg
. Now I want to use further nottitlematch depening on various conditions.
I would be much easier if you added a mimetype filter :)
I just saw I requested that 2009 already. http://semeb.com/dpldemo/index.php?title=DPL:FAQ#Selection_by_MIME_types.3F --Subfader (talk) 00:14, 20 January 2015 (UTC)
One additional column
[edit]Hi all,
I'm using the extension for a few days now and I'm very happy with it.
But there is one thing I don't understand. I'm using the columns parameter like this:
{{#dpl:
| category = MediaWiki Extension
| columns = 2
}}
With this template I get a table like this:
<table>
<tr>
<td>
items of column 1
</td>
<td valign="top">
items of column 2
</td>
<td valign="top">
empty column
</td>
</tr>
</table>
Why is there a additional empty column at the end of the table?
Regards,
Ray
- I'm not sure, there shouldn't be any such problem. Can you link me to the specific dpl call on your wiki? --Theaitetos (talk) 16:47, 14 November 2015 (UTC)
category and its subcategories
[edit]It would be useful to have an option to list the pages in a category and its subcategories.
category=Foo addSubcategories=true namespace=
This would list all articles in Category:Foo and its subcategories. --Subfader (talk) 11:43, 14 June 2015 (UTC)
- Just use
category = *Foo
and it includes the subcategory. Add more*
for more. --Theaitetos (talk) 16:32, 14 November 2015 (UTC)
- Just use
Incompatibility with Extension:HitCounters
[edit]FYI 217.187.141.194 19:36, 18 June 2015 (UTC)
- The new release of Extension:DynamicPageList3(fork of DPL 2) supports the HitCounters extension now and resolves this issue. Alexia E. Smith (talk) 20:14, 29 July 2015 (UTC)
- Thanks! I'll give this a try next time I update my wikis.--89.0.82.19 09:31, 11 August 2015 (UTC)
selections based on multiple namespaces
[edit]Is it possible to list selections based on multiple namespaces at the same time ?
For example, how can we apply an OR operator to fetch namespaces=title together with namespace=file ?
Maybe something like the follow ?
<Dyn----PageList> category = ordermethod = categorysortkey order= ascending namespace = title OR file </Dyn----PageList>
Thanks a lot in advance for any useful tip
Calling Multiple Templates with same parameters
[edit]Hello,
I'm trying to create a workaround while we transition some templates, so that a few of our DPL lists will still display data from affected pages.
Basically, what I'm working with is as follows:
{{#dpl: debug=1
|category=3.5e
|category=User
|category=Deity
|category=Hero
|notcategory=Abandoned
|notcategory=Candidates for Deletion
|notcategory=Formatting Issues
|notcategory=Needs Balance
|notcategory=Stub
|notcategory=Wording Issues
|notcategory=Pantheon
|notcategory=Salient Ability
|notcategory=NPC
|notcategory=Uncategorized
|include={Deity}:align:port:favweap,{3.5e Deity}:align:port:favweap
|format=,¦- class="²{Odd-Even¦²{var:odd}²}²"\n¦ [[%PAGE%¦²{#replace:%PAGE%¦(3.5e Deity)¦}²]],\n,
|tablerow=¦¦%%,%%\n
}}|}
What I'm trying to achieve is related to the |Include Parameter. I need to be able to pull both templates, "Deity" and "3.5e Deity", and have their contents placed into the table in the same cells. They include the same parameters, and when using only one template, the table works flawlessly. The above example, however, pulls both templates information, but places the latter's in different cells stretching off the end of the established table.
Is there a way to use both templates? Jwguy (talk) 15:41, 30 July 2015 (UTC)
- Yes, but you need to use a few tricks. Change your call to:
|include={Deity}:align,{3.5e Deity}:align,{Deity}:port,{3.5e Deity}:port,{Deity}:favweap,{3.5e Deity}:favweap
and then you have to use thetablerow
statement to alter the way the table line is built:|tablerow=%%<span style="display:none;">«nowiki»,«/nowiki»</span>%%,%%<span style="display:none;">«nowiki»,«/nowiki»</span>%%,%%<span style="display:none;">«nowiki»,«/nowiki»</span>%%
and it should work as intended; the "," in between escaped nowiki tags is interpreted by DPL as separator, so the "%%" will pull in the content of the next item, yet the "span" tags make the "," invisible. --Theaitetos (talk) 16:46, 14 November 2015 (UTC)
- Yes, but you need to use a few tricks. Change your call to:
Strict Standards: Only variables should be assigned by reference in /extensions/DynamicPageList/DPLMain.php on line 51
[edit]To remove this error I changed
$dbr =& wfGetDB( DB_SLAVE );
to
$dbr = wfGetDB( DB_SLAVE );
Will there be any knock-on negative effects from doing this?
(MW1.25 and REL1_25 - the error wasn't there for the 1.24 versions)
Thanks Jonathan3 (talk) 21:56, 3 August 2015 (UTC)
- There were some changes in the way php should be written, but in this case I don't think it should result in any unexpected error – but again, errors are always unexpected … --Theaitetos (talk) 16:48, 14 November 2015 (UTC)
DynamicPageList 2.3.0 warning: no result
[edit]I have installed last revision into my mw1.25 and i try to create a tree with page from category foo, but if i click into a page of this category i read that warning. My dpl is
{{#tree: *[[Pagina principale]] *[[:Category:Foo]] {{#dpl:category=Foo|format=,**,[[%PAGE%]]\n,}} }}
Any suggestion?
--Davidemaglio (talk) 10:09, 25 November 2015 (UTC)
DPL Sort: Change display name based on a category?
[edit]I'm doing some DPL sorting on a wiki. I would like to find out if you can have a secondary sort category, and if pages match that category, display them per normal (which for me is just the pagen ame) and then add a character after the page name (IE: Rules** if the Rules page has the category IMPORTANT). Any assistance would be appreciated.
2016
[edit]PageCounter (1.26)
[edit]i got the Error:
The DPL extension (version 2.3.0) produced a SQL statement which lead to a Database error.
The reason may be an internal error of DPL or an error which you made,
especially when using DPL options like titleregexp.
Query text is:
...
Error message is:
Unknown column 'mw_page.page_counter' in 'field list' (localhost)
as i know from another extension-error, the table mw_page_counter was removed in 1.26. i commented out the the follow lines in DPLMain.php:
line 2482: $sSqlPage_counter = ", $sPageTable.page_counter AS page_counter";
line 2770: case 'counter':
line 2771: $sSqlWhere .= 'page_counter';
line 2772: break;
for now everything works fine for me. --Dknapke (talk) 07:45, 8 February 2016 (UTC)
Table formatting problems when only 1 result returned
[edit]I've come across a problem I can't seem to fix. I'm trying to use a dpl call for a game wiki to generate a list of shops that sell an item on each item's page, along with location, price, etc. What' I've done works fine so far when multiple shops are returned, but if only 1 shop sells the item I run into table formatting difficulties. The coding I am using is shown below:
{{#dpl: |categorymatch = %shops |linksto = {{PAGENAME}} |allowcachedresults = true |ignorecase = true |include = {Infobox shop}:location:[[%PAGE%]], {StoreLine}:sell |includematch = , /name\s*=\s*{{#if: {{{name|}}}|{{{name|}}}|{{PAGENAME}}}}/si |table = class="wikitable sortable",-, Location, Shop, Cost |tablerow = %%, %%, \n{{!}}align=right{{!}}%% copper²{#ifeq:%%{{!}}1{{!}}<span style="color:transparent">s</span>{{!}}s}² |tablesortcol = 1 |noresultsheader = ''No shops are known to currently load this item.'' }}
I match articles that are in one of the multiple "* shops" categories which link to the pagename of the item loading this. Each shop page has an infobox giving its world location, and since the shop's contents are in a table made of multiple "StoreLine" templates (which have "name" and "sell" (cost) fields), I used an includematch to only return results from StoreLine templates that have the item name (it was returning info from every item in a matching store without this). I want the shop's location to be the first column instead of the shop's article name, so the |table= is set accordingly. The tablerow line accounts for the three columns Location, Shop, and Cost, the latter of which I want to be right-aligned with some extra formatting to account for single-coin price amounts.
This works fine normally. When only 1 shop is returned, however, the "Cost" column has an empty cell under it, and the actual cost data is instead shifted into a new, hanging column 1 cell to the right, as shown in the source html below:
<table class="wikitable sortable"> <tr> <th> Location </th><th> Shop </th><th> Cost </th></tr> <tr> <td><a href="/wiki/Tero_(city)" title="Tero (city)">Tero</a> </td><td> <a href="/wiki/Shoreline_Supplies" title="Shoreline Supplies">Shoreline Supplies</a> </td><td> <--- extra cell added? </td><td style="text-align: right;">40 coppers </td></tr></table>
I'm very new to this and have doubtless missed something, so any help is greatly appreciated. Thank you. Russ3Z (talk) 21:55, 8 February 2016 (UTC)
Trying to isolate a single paragraph inside an include
[edit]I include a chapter from a page inside another page with include=%0 but I'd like to isolate its last paragraph. My paragraph follows a specific string so I tried to delete everything before this string with {{#dplreplace: %% | .*MyString | }} but it seems that #dplreplace works line by line so it deletes the beginning of my line but not the preceding lines. Does anyone have an explication and/or a solution? --TheoHenri (talk) 15:30, 5 March 2016 (UTC)
Having difficulty with tables - extra column
[edit]Hello! Love this extension. I'm having trouble generating tables where I get an extra column. I saw a similar question above I either didn't understand the answer there, or I have another issue. I have this:
{{#dpl: |category=Category1 & Category2 |include = %TITLE%,#Overview |table = style=wikitable,Page,Overview |tablerow = %%,%% }}
But what I get is:
Page | Overview | |
---|---|---|
link | Overview info | |
link2 | Overview info2 | |
link3 | Overview info3 |
I'm having a hard time understanding where that middle column is coming from, and why the info from #Overview shows up in the third column.
Edit: Naturally I understand what I've done wrong minutes after submitting the question. For anyone running into the same thing here's what I missed: The table format includes a reference to the page by default so I didn't need %TITLE% or the extra %% in tablerow:
{{#dpl: |category=Category1 & Category2 |include = #Overview |table = style=wikitable,Page,Overview |tablerow = %% }}
How to cross information from 2 infoboxes ?
[edit]I have pages with infoboxes about inkjet heads and other Infoboxes about printers.
I could easily generate tables of printers with links to the heads because there is a "heads" field in the printer infobox, but now I would like to create backlinks from the heads to the printers that use each head.
So I wrote a Template:Printer_with_heads :
{{#DPL: |category=PRINTER |namespace= |include={Infobox printer}:name |format=, |includematch=/\s*{{{1|dummystuff}}}*/s |format=,[[%PAGE%]] ,</br>, }}
which works fine if I call it "normally" as {{Printer with heads|AKnownModelOfHead}}
and I tried to use it in my table like this:
{{#DPL: |category=HEAD |namespace= |include={Infobox head}:company:name,{Printer with heads} |table=class=sortable,-,company,model,printers using it }}
how should I pass the "heads" parameter to the Template:Printer_with_heads ?
Or should I do it differently ?
(question also posted on StackOverflow if you're looking for points...)
--Goulu (talk) 11:45, 29 April 2016 (UTC)
It is working on MW 1.27?
[edit]Does anybody know if this extension is working on MW 1.27? When I try to use it, it does not work.
Thanks!
-It is mostly working for me on 1.27.1, running 2.3.0 of DPL. Only having some trouble getting includematch to work.. Toriayl (talk) 12:45, 6 October 2016 (UTC)
MW 1.27.1 - Permission denied
[edit]After enabling DynamicPageList in LocalSettings.php access to all pages are denied. The following message is shown "You do not have permission to read this page, for the following reason: The action you have requested is limited to users in the group: Users.". I am a member of Users (and Admin too). I can not find any settings for DPL that are related to permissions. How to fix this? Sesom42 (talk) 16:05, 26 September 2016 (UTC)
After some struggling I have found that the extension won't work on a closed wiki ($wgGroupPermissions['*']['read'] = false;
). Sesom42 (talk) 10:13, 27 September 2016 (UTC)
I managed to get it work : temporarily disable your closed wiki restrictions, then a Template will be created automatically (this is what blocks).
You can then get back to $wgGroupPermissions['*']['read'] = false;
then it should work. Tuxxic (talk) 13:00, 7 December 2016 (UTC)
I'm having the same problem (MW 1.27.1), but I don't have a closed wiki (it is closed to editing, but not to reading).
When I changed $wgGroupPermissions['*']['edit'] = false;
to "true", I couldn't do anything because it created a redirect loop (the link was for a DPL template instead of the login page). Only by disabling it in LocalSettings returned things to normal, albeit without the functions DPL would have added. Boblamont (talk)
I solved my problem by manually creating the Template:Extension DPL. I googled the appropriate contents, which seem to be (wrap this in "noinclude" tags, which I can't seem to reproduce here):
<noinclude> This page was automatically created. It serves as an anchor page for all '''[[Special:WhatLinksHere/Template:Extension_DPL|invocations]]''' of [[mw:Extension:DynamicPageList (third-party)|Extension:DynamicPageList (DPL)]]. </noinclude>
Once I did that, I could enable the DPL extension in LocalSettings and it works. Boblamont (talk)
Nearly three years later, this problem still persists (MW 1.33.0). If your wiki is closed, you must add the page Boblamont mentioned before enabling this extension in LocalSettings. Thank you for figuring it out and saving me some frustration. DekuSamurai (talk) 18:22, 7 July 2019 (UTC)
Main NS/Discussion
[edit]Hello. Is there a possibility to make an intersection of pages that are in one category and their discussion pages are in another? Thanks
MW 1.27.1 - Call to undefined function wfMsg() in/DynamicPageList/DPL.php on line 683
[edit]After upgrading to 1.27.1 I noticed I’m getting the following error on pages where DPL is active.
Typical command: {{#dpl:debug=0 | matchcategory = % | linksto = Winston Churchill | addcategories = true | namespace = }}
I’ve disabled the extension for now, bit of a pity, it provided some useful functionality. --Brian of London (talk) 20:08, 16 October 2016 (UTC)
Site hosting manual flagged for malware
[edit]As of 10 Jan. 2017, when I click on the link to the DPL manual (http://semeb.com/dpldemo/DPL:Manual), Bitdefender (antivirus software) will not let me access the site because it spreads malware. Until we know if this is a false positive or the malware infection/vulnerability has been removed, you may use the manual in German at http://de.wiki-aventurica.de/wiki/Hilfe:DPL_Manual and have Google etc. translated if for you if required. Alternatively you can access the most recent version of the English manual stored by the Internet Archive's Wayback Machine at https://archive.org/web/ .
Henryfunk (talk) 13:57, 10 January 2017 (UTC)
DPL manual site is down.
[edit]I cannot access the manual for DPL. Can server be restarted? --Bgrenon (talk) 14:34, 6 February 2017 (UTC)
2017
[edit]Template name showing
[edit]I have upgraded from intersection to DPL3 and now at the top of my list I have "Template:Extension DPL" - how do I get rid of that?
The code is
{{#dpl: category=mycategory |ordermethod = title |order = ascending }}
--123hostcomau (talk) 23:43, 6 February 2017 (UTC)
Manual available in internet archive
[edit]here is a direct link to the latest manual archived : https://web.archive.org/web/20161105221036/http://semeb.com/dpldemo/DPL:Manual
Goulu (talk) 07:31, 17 March 2017 (UTC)
shownav style ("next 100") navigation bar for list generated by DPL
[edit]I would like to use DPL to generate a list of recently changed pages. List can run into 100s of entries. I would like to put a navigation bar like one that is automatically generated by Special:NewPages. Generate links like (Newest) (Newer 100) (Older 100) (Oldest). Clicking on these links, DPL should generate a list of relevant set of pages. Can this be done? Can you show me how? Size of list is not predetermined.
How do I determine depth in a DynamicPageList?
[edit]I have been composing a new main page for Dutch Wikinews. It is in the incubator now, but the project has been approved lately, so within a short time it will be live.
There are several blocks that are not functioning on the main page, because my DynamicPageList only lists the articles in the main category, and not of the subcategories. A good example is the second block at the right: "Caribisch Nederland". In the main category are 4 articles and the main page ([Template:Wn/nl/Nieuwsblok Caribisch Nederland (fixed example) (fixed template)]) shows these 4 pages. However, the main page should list the latest 7 articles in all (sub)categories. Can someone help please to solve this problem? Thanks in advance. Ymnes (talk) 16:07, 1 July 2017 (UTC)
- Note that the ping did work for me. But I'm unfortunately not familiar enough with DPL to help. SPQRobin (talk) 13:53, 3 July 2017 (UTC)
- I think DPL can't query categories recursively, which would be very expensive in terms of performance. You'll have to either specify all subcategories, or add all articles to a single category (in addition to the existing one) --Ciencia Al Poder (talk) 18:12, 4 July 2017 (UTC)
- Since we maybe go live today, I have indeed chosen to add the main page articles in special categories per block for the mean time. By the way, how do I specify all subcategories? Until now I thought I could only choose Cat1 AND Cat2 (not OR). Ymnes (talk) 08:15, 5 July 2017 (UTC)
- This page say select by a logical combination (AND,OR,NOT) of categories, although I don't know the syntax to allow this. DPL website (where all the documentation resides) is now view-restricted. Still, it probably won't work since the default setting of ExtDynamicPageList::$maxCategoryCount is set to 4 and I guess you'll need a much larger number of categories to query. The only solution would be to add all pages in those categories to another category for use with this extension, for example, with a bot. Or, if all pages in that category, use the same template, and this template is not used on other pages, you can include the category directly from the template itself --Ciencia Al Poder (talk) 09:25, 5 July 2017 (UTC)
- Thanks! If anyone knows the syntax and likes to learn me how it works, I hope to read from you on my talk page. We are reopend now at nl.wikinews.org. Ymnes (talk) 18:31, 6 July 2017 (UTC)
- This page say select by a logical combination (AND,OR,NOT) of categories, although I don't know the syntax to allow this. DPL website (where all the documentation resides) is now view-restricted. Still, it probably won't work since the default setting of ExtDynamicPageList::$maxCategoryCount is set to 4 and I guess you'll need a much larger number of categories to query. The only solution would be to add all pages in those categories to another category for use with this extension, for example, with a bot. Or, if all pages in that category, use the same template, and this template is not used on other pages, you can include the category directly from the template itself --Ciencia Al Poder (talk) 09:25, 5 July 2017 (UTC)
- Since we maybe go live today, I have indeed chosen to add the main page articles in special categories per block for the mean time. By the way, how do I specify all subcategories? Until now I thought I could only choose Cat1 AND Cat2 (not OR). Ymnes (talk) 08:15, 5 July 2017 (UTC)
- I think DPL can't query categories recursively, which would be very expensive in terms of performance. You'll have to either specify all subcategories, or add all articles to a single category (in addition to the existing one) --Ciencia Al Poder (talk) 18:12, 4 July 2017 (UTC)
2018
[edit]ordercollation brings up SQL Error
[edit]In my german wiki I have case sensitiv page names. I wanted to use ordercollation to make a case insensitiv ordered list. I enterd the code from the manual, but I always get a SQL error as result: COLLATION 'latin1_german1_ci' is not valid for CHARACTER SET 'binary' (localhost)
How do I get a case insensitiv ordered list?
[Solved] IncludeMatch: How to suppress display of matched parameters?
[edit]I'm trying to match
{{Tag|Anteater}}
Regarding https://help.gamepedia.com/DPL:Parameters:_Criteria_for_Page_Selection#includematch, and https://help.gamepedia.com/DPL:Parameters:_Controlling_Output_Volume#include
The DPL statement
{{#dpl: |uses=Template:Tag |includematch=/Anteater/ |include={Tag}:1 }}
returns the expected page list:
ScrapAnteater Scrap3Anteater
Problem is, it also displays the parameter "Anteater" after every page-name.
How to show only the pagenames, and suppress display of matched parameters, while still matching the parameters?
Johnywhy (talk) 08:41, 5 June 2018 (UTC)
Simple solution: use dplreplace to remove the string.
{{#dplreplace: {{#dpl: |uses = Template:Tag |includematch = /Anteater/ |include = {Tag}:1 }} |Anteater}}
Robust solution: use format statement to append an arbitrary delimiter before the string you want to remove, to ensure you don't remove the string from any page-titles which happen to contain the same string.
{{#dplreplace: {{#dpl: |uses = Template:Tag |format = ,\n* %PAGE%·,, |includematch = /Anteater/ |include = {Tag}:1 }} |·Anteater}}
Johnywhy (talk) 13:08, 5 June 2018 (UTC)
How to include static text?
[edit]How to embed static text in my include parameter?
Modifiedby does not work and throws ambiguous error
[edit]Upgraded our MediaWiki version to 1.30.0, DPL to 2.3.0, and we've started getting this issue. Even just {{#dpl:|modifiedby=Sgtlion}} will return no results; Doing as simple as {{#dpl:|ordermethod=firstedit|modifiedby=Sgtlion}} throws up
Query text is: SELECT DISTINCT `wiki_page`.page_namespace AS page_namespace,`wiki_page`.page_title AS page_title,`wiki_page`.page_id AS page_id, rev_user, rev_user_text, rev_comment, rev_timestamp FROM `wiki_revision` AS rev, `wiki_revision` AS change_rev, `wiki_page` WHERE 1=1 AND `wiki_page`.page_is_redirect=0 AND `wiki_page`.page_id=rev.rev_page AND rev.rev_timestamp=( SELECT MIN(rev_aux.rev_timestamp) FROM `wiki_revision` AS rev_aux WHERE rev_aux.rev_page=rev.rev_page ) AND = change_rev.rev_user_text AND change_rev.rev_page = page_id ORDER BY rev_timestamp ASC Error message is: Column 'rev_user' in field list is ambiguous (127.0.0.1)
Is this a bug, or just something silly we're doing? Any way to get it workin' an all? --Sgtlion (talk) 14:03, 30 July 2018 (UTC)
2019
[edit]Warning because of a non-numeric value
[edit]I recently updated this wiki here from MW 1.27.17 to 1.31.2. Integral part of this wiki is the DPL extension. Because of the dplcache feature, which was removed in DPL3, I still stick on this version here. It seems that with PHP 7.1 there comes a warning in case of type mismatch in the code. This here pops up:
- Warning: A non-numeric value encountered in /var/www/domains/domain-mobadaten-info/MoBaDatenInfo/extensions/DynamicPageList/DPL.php on line 722
I took a look at the code in question round line 722 in the DPL.php file:
// increase start value of ordered lists at multi-column output
$actStart = $mode->sListStart;
$start = preg_replace( '/.*start=([0-9]+).*/', '\1', $actStart );
if ( $start != '' ) {
$start += $iCount;
$mode->sListStart = preg_replace( '/start=[0-9]+/', "start=$start", $actStart );
}
Line 722 from the DPL.php file is where the warning occurs and the fifth line from the code snippet as given above. I changed the third line from the code snippet as given above, this is line 720 in the DPD.php file, by adding an explicit cast to the integer data type. This seems to bury this warning.
$start = (int)preg_replace( '/.*start=([0-9]+).*/', '\1', $actStart );
--Wgkderdicke (talk) 22:33, 15 June 2019 (UTC)
columns not working
[edit]The columns parameter on my installation is not working.
{{#dpl: |category=x |ordermethod=sortkey |columns=2 |rowcolformat=width=100% }}
(x is the category name)
Does not create a table at all in the source, just lists items the same as without the columns/rowcolformat parameters.
Any help appreciated.
Aussiejed (talk) 10:32, 21 July 2019 (UTC)
- To answer my own question, in lieu of using the DPL columns parameter (which doesn't work for me) I wrapped the whole function in Multi-Columned List code. That worked. Aussiejed (talk) 10:32, 21 July 2019 (UTC)
2020
[edit]External documentation at semeb.com has disappeared
[edit]The external wiki documenting the extension (see section 3 DPL parameters) has disappeared, is the extension still being supported? Vicarage (talk) 08:57, 31 March 2020 (UTC)
- I found a copy of that documentation on the Wiki Aventurica. Maybe this helps for the moment, if information is urgently needed.--Wgkderdicke (talk) 17:04, 5 April 2020 (UTC)
When I queried broken documentation in the DynamicPageList3 project, they updated their software and the extension page here to use https://help.gamepedia.com/Extension:DPL3/Manual etc. I hesitate to make the changes here in case there are subtle reasons, but that would seem a good consistent choice. Vicarage (talk) 17:50, 12 May 2020 (UTC)
How to do parser functions on %PAGE%? in surrogate
[edit]Is there any way to use parser functions on variables inside of a surrogate?
I'm trying to trim letters of the end of a page name in a surrogate template and it only trims the variable name itself. I've tried a few different ways to convert it to a regular string... I just can't seem to wrap my head around it. Is there any way to convert a variable to a string for operations to be completed on it?
<dpl> category=Events linksto = Article Title includepage={Events}.table mode = userformat allowcachedresults = true listseparators = ¶{|class="wikitable sortable no-padding" ¶|- ¶!Event ¶!Year ¶!Month ¶!Day ¶!Type ¶!Prize ¶!notes,¶|-, ¶|- ¶|-,¶|} secseparators = ¶|,,¶|, multisecseparators = ,¶|-¶|¶| </dpl>
And in the Events.table surrogate template:
<!-- Attempt 1 -->{{#dplvar:set|pageName|%PAGE%}}{{#sub:{{#dplvar: pageName }}|-9|2}} <!-- Attempt 2 -->{{#dplvar:set|pageName|{{#rel2abs: %PAGE% }} }}{{#sub:{{#dplvar: pageName }}|-9|2}} <!-- Attempt 3 -->{{#dplvar:set|pageName|{{#titleparts: %PAGE% }} }}{{#sub:{{#dplvar: pageName }}|-9|2}}
TiltedCerebellum (talk) 02:51, 1 August 2020 (UTC)
- I discovered that you cannot work with built-in variables using parser function in include statements, or in surrogate/phantom templates (which seems odd to me because they are for formatting table cells/rows), but they can be worked with and trimmed in tablerow statements only (also applies formatting to table cell/rows, though less flexibly because it can't call parameters like {{{parameter}}}, figure that one out). So I was not able to apply 'explode' or 'sub' to a %TITLE% in a surrogate, but I could do it in 'tablerow'. I had to use dplvar to work with items in tablerow to carry them down to table row via {{#dplvar:set|varName|%%}}, then work with them with parser functions like explode or sub and then either set that to the contents of the dplvar to the new result, or create a new dplvar to store it, then display its output with {{#dplvar:varName}}. We should be able to do parser functions on built-in dpl variables in surrogate/phantom templates, it's just bizarre not to be able to.
Is this compatible with 1.35 or does it have the same issues as DPL3?
[edit]Is this extension fully compatible with MediaWiki 1.35 or is it outdated and incompatible as Extension:DynamicPageList3 was just labeled? I need a replacement for DPL3 because it causes multiple database issues on 1.35. I get database failure messages with DPL3 and see in its extension page history it was labeled as incompatible. Since 1.33 is soon to be outdated and VE and Parsoid come packaged working with 1.35 out of the box, it is kind of important for a lot of people to update to 1.35 instead of 1.34.2 for example. I'm hoping someone can comment if this extension has been updated to be compatible with 1.35 or if it suffers from the same issues that DPL3 does (since I see many of the same contributors mentioned for this extension that are mentioned for that one). Has anyone tried this for 1.35? DPL3 is missing Extension_talk:DynamicPageList3#DynamicPageList3_does_not_follow_the_Actor_Migration Actor Migration support.
T6402 same issue.
4864 related issues again on the DPL3 bug tracker.
Lots of people really need to know how to proceed and are searching for replacements for DPL3 short of going full SMW or Cargo and replacing all DPL functionality because that's a lot of work on sites with heavy DPL3/2 integration. Please let me know if you've managed to successfully use DPL2 to sub for DPL3 or if it suffers from the exact same issues due to many of the same makers, thanks. TiltedCerebellum (talk) 01:13, 13 November 2020 (UTC)
- Edit: Nope, so far DPL3 not fully compatible with 1.35 either. Built-in DPL variables when used in surrogate templates display the output as plain text instead of the contents of the built-in variable called so if you use %PAGE% in a surrogate/phantom dpl template, it outputs the literal plain-text: "%PAGE%", instead of the page title. See T267820. I haven't looked at the db logs yet to see if it is silently failing with multiple db errors the way that DPL3 is due to a lack of Actor Migration support, though I'm guessing it is likely. We are unable to upgrade our site. TiltedCerebellum (talk) 04:57, 13 November 2020 (UTC)
DynamicPageList2/third-party does not follow the Actor Migration
[edit]I am starting a migration to Mediawiki 1.35 of my wiki, and some DPL requests are now causing a database error when extracting user information. Started with DPL3, then I switched to DPL2 hoping this would have been accounted for since it is in MediaWiki version control, and I see recent updates. It seems the Actor migration was not taken into account in the latest versions of either extension. DPL2/third-party still tries to get rev.rev_user and rev.rev_user_text fields which do not exist anymore (the same issue exists in DPL3 and both extensions are now marked as created/maintained by the same users on their extension pages). Is there a plan to correct this? Same issues as DPL 3 located here: T64024867, 4864 gitlab opened on DPL3 one year ago but no progress. I am filing a bug report for DPL2/third-party on Phabricator as well T267824. TiltedCerebellum (talk) 09:24, 13 November 2020 (UTC)
I've been having issues trying to lessen the number of wanted pages on this wiki to the point where the vast majority of wanted pages will be in the 1000 results generated by Special:WantedPages. Is there any way to generate a list of wanted pages, files, categories, and templates via DPL? Since Special:WantedPages only updates once per day. There are only 1000 pages listed on that page at a time. And there's only so many pages listed on Special:WantedPages that I feel comfortable dealing with as of writing this.
I'd rather not deal with most of the links to fanon pages that are contained in the fanon namespace just yet. Since all the pages in the fanon namespace are owned by their respective authors. And any one of those authors could come back and create the pages that are currently wanted. So I want to be able to generate a complete list of all the pages that are currently wanted, so that I will have an easier time eliminating the wanted pages that haven't shown up on Special:WantedPages yet. ― C.Syde (talk | contribs) 06:30, 19 November 2022 (UTC)
Extension:DynamicPageList (third-party)/10
[edit]The following sentence is not ready for translation BenyElbis (talk) 09:39, 2 July 2023 (UTC)