Difference between revisions of "Issue:Simply does not work"
(→Answer) |
Dejudicibus (talk | contribs) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
|Version = last | |Version = last | ||
|Description = Installed, but not parsed | |Description = Installed, but not parsed | ||
− | |Status = | + | |Status = closed |
}} | }} | ||
Line 61: | Line 61: | ||
=== Answer === | === Answer === | ||
− | If you define a category condition, pages with no category will not be part of the result set. So there is no need for a "notcategory" statement (I was wrong in that regard). B.t.w., the "|" is not recognized within <tt>notcategory</tt>. I simply deleted the <tt>notcategory</tt> and now [[Template:CategoryGallery]] works as expected. But the result is | + | The main problem is that you want to expand a parameter within the DPL call using triple curly braces. As the manual explains parameter expansion only works within parser function calls. I changed the syntax in your template. As you can see you also have to use special angle brackets; otherwise the parser will expland the gallery tags before it invokes DPL. See the [[DPL:Manual_-_General_Usage_and_Invocation_Syntax]]. This is '''really important to understand'''! |
+ | |||
+ | If you define a category condition, pages with no category will not be part of the result set anyway. So there is no need for a "notcategory" statement (I was wrong in that regard). B.t.w., the "|" is not recognized within <tt>notcategory</tt>. I simply deleted the <tt>notcategory</tt> and now [[Template:CategoryGallery]] works as expected. But the result is not the Baka dancers but some other picture (which is correct as far as I can see). --[[User:Gero|Gero]] 00:28, 20 October 2007 (CEST) | ||
+ | |||
+ | ==Closed== | ||
+ | It works now! Thank you very much for support and patience. Yours is one of the most powerful and useful MediaWiki extensions. A possible improvement might be to support localizations. Fo instance, if I write | ||
+ | |||
+ | <tt>namespace=Image</tt> | ||
+ | |||
+ | in an Italian wiki, the extension realizes it should convert it to | ||
+ | |||
+ | <tt>namespace=Immagine</tt> | ||
+ | |||
+ | In such a way any template based on DPL will be portable to other languages. But it is really a minor chage. We can live without it. Thank you again. Great work.--[[User:Dejudicibus|Dejudicibus]] 16:01, 20 October 2007 (CEST) |
Latest revision as of 15:02, 20 October 2007
Description: | Installed, but not parsed |
Extension / Version: | DPL / last |
Type / Status: | Bug / closed |
Problem
I add the correct statement in LocalSettings.php and the extension in wiki/extensions/DynamicPageList but when I use it in my wiki with either <dpl> or <DPL> or {{#dpl: }}, I see what I wrote, that is tag is not parsed and template is not executed.
See CategoryGallery in USNB wiki.
Reply
It appears that it is not installed as suggested, in your Special:Version there is no extension Dynamic Page List. --Zven 02:13, 17 October 2007 (CEST)
Reply
Maybe one of the other extensions causes a problem? I suggest to
- install some other extension than DPL and see if it works
- install only DPL and check then
--Gero 08:35, 17 October 2007 (CEST)
Reply
I made some change to LocalSettings and now it works, but it looks like there is a bug. I tried FIRST
<DPL>
category = aCategoryOfMineForImages nocategory = namespace = Immagine mode = userformat format = <gallery>,%PAGE%\n,,</gallery>
</DPL>
Please, note that Immagine is the Italian term for Image. I got the gallery, but NOT just for aCategoryOfMineForImages, but ALL images. So I tried:
<DPL>
category = {{{categoria}}} nocategory = namespace = Immagine mode = userformat format = <gallery>,%TITLE%\n%CATNAMES%\n,,</gallery>
</DPL>
and I got the name of each image but NOT the categories. I suspect that
- category does not work when image namespace si used
- or, in some way you have Category reserved word hardcoded somewhere, that is, you do not use Categoria, the Italian term for Category
Am I correct? See CategoryGallery --Dejudicibus 17:25, 18 October 2007 (CEST)
Reply
Try notcategory; nocategory is not a valid command. Maybe you have to put a | character behind the statement, so that it reads "notcategory=|". Download the latest version, then this error in your statement should be marked. In all earlier versions it will unfortunately be silently ignored. --Gero 23:32, 19 October 2007 (CEST)
Reply
It does not work. I was able to reproduce the error in this wiki too. Look at Template:CategoryGallery. As you can see, all images are shown, whereas I expected to see only . Am I wrong?--Dejudicibus 23:46, 19 October 2007 (CEST)
Answer
The main problem is that you want to expand a parameter within the DPL call using triple curly braces. As the manual explains parameter expansion only works within parser function calls. I changed the syntax in your template. As you can see you also have to use special angle brackets; otherwise the parser will expland the gallery tags before it invokes DPL. See the DPL:Manual_-_General_Usage_and_Invocation_Syntax. This is really important to understand!
If you define a category condition, pages with no category will not be part of the result set anyway. So there is no need for a "notcategory" statement (I was wrong in that regard). B.t.w., the "|" is not recognized within notcategory. I simply deleted the notcategory and now Template:CategoryGallery works as expected. But the result is not the Baka dancers but some other picture (which is correct as far as I can see). --Gero 00:28, 20 October 2007 (CEST)
Closed
It works now! Thank you very much for support and patience. Yours is one of the most powerful and useful MediaWiki extensions. A possible improvement might be to support localizations. Fo instance, if I write
namespace=Image
in an Italian wiki, the extension realizes it should convert it to
namespace=Immagine
In such a way any template based on DPL will be portable to other languages. But it is really a minor chage. We can live without it. Thank you again. Great work.--Dejudicibus 16:01, 20 October 2007 (CEST)