User talk:Gero

From FollowTheScore
Revision as of 21:48, 7 September 2007 by Nad (talk | contribs) (TreeView4: moving block discussion to User talk:Eep)
Jump to: navigation, search

I am interested to promote DPL to become part of mediawiki / wikipedia. How do you feel about this idea?

I agree, it seems very useful.--Patrick 15:14, 17 February 2007 (CET)
Gero, maybe make a list with possible effects this might have. And then analyse whether you want that. Possible effects:
  • you are not the sole maintainer
  • the development and feedback will be on mediawiki servers - contributers that are blocked there may find it harder to give feedback
  • win people that only contribute directly to mediawiki
  • no need for seperate install
  • no possibility of upgrade, without whole mediawiki upgrade
Tobias Conradi 17:32, 10 August 2007 (CEST)
  • I wouldn´t have problems in not being the sole maintainer. But I must confess that DPL is rather monolithic (I inherited the code and did not dare to change it fundamentally - although looking backwars I probably should have done so).
  • hosting my mediawiki is fine with me, as are the other two points
  • But at the moment I still care for stability. I enjoy the freedom to publish updates every now and then.
  • Used without care DPL could cause a lot of unnecessary and unwanted server load. I am also a little bit concerned about that.
  • But still I think the MediaWiki software should copme as a bundle together with the possibilities DPL provides.
Is there anybody out there who has an opinion on that point? Gero 23:53, 10 August 2007 (CEST)
Well, which point? I think you should not be the sole maintainer because, for example, DPL development stagnates when you aren't around/available. ;) -Eep² 10:59, 11 August 2007 (CEST)
I think DPL functionality should definately be a part of the MediaWiki install, but I don't think it's currently suitable for Wikipedia due to their high traffic and the ability to easily make expensive queries. Perhaps DPL queries could be restricted to protected pages, or the ability could be added to cap the resource that a query can consume...? --Nad 07:13, 3 September 2007 (CEST)

Your message at my Wikisource talk page

Hi, and thanks for your message (you said to reply here).

I tool a look at your DPL extension. It looks nice, and I think I understand some of what you are trying to accomplish with it, but my technical expertise is limited and I don't fully understand it. I am also not entirely clear as to what elements of Labeled Section Transclusion are included in DPL.

As to how to promote these things: First, people with technical expertise have to build a working, tested extension. That has apparently been accomplished both with DPL and LST.

The next step is to get the senior developers to actually apply the extension live at Wikimedia wikis (for instance, LST was designed for Wikisource). I thought that this second step would be easy, but apparently it is not, because the developers are extremely busy and have a huge list of things to be implemented. So you have to keep reminding, lobbying, etc., for instance on IRC or Wikitech mail (I don't have access to IRC).

It would be great if you could further clarify, in layman's terms, about DPL and how it incorporates LST. And lobbying is useful too...

Best to reach me at my Wikisource page as you did. Dovi


please see my answer at the end of Talk:Manual --Gero 20:53, 19 February 2007 (CET)

Developer note

Hi! Thanks for the hard work on the DPL, it's so much more useful than when I used to work on it. Please see my message at Discussion. -- IlyaHaykinson 12:00, 25 February 2007 (CET)

Thanks for the compliment. I think something like DPL is really needed for MediaWiki and it´s worth investing time and energy ... -- Gero 15:31, 26 February 2007 (CET)

Quick turnaround

Gero, just wanted to thank you for your fix to "replaceintitle". We decided this morning to deploy DPL at http://busytonight.com/wiki, specifically because we need "replaceintitle" in one particular context. I tested, it didn't work as advertised -- then I noticed on the issues list here that you made a comment today that it had been fixed, based on a comment yesterday that it wasn't working as advertised in 1.0.7. So I opened an internal ticket for us to upgrade from 1.0.7 to 1.0.8. (The person I assigned it to said, "But I just installed it last week! How can I have to upgrade it already?" :-) Richmintz 18:36, 9 April 2007 (CEST)

glitch in Special:Allmessages

Your code is printing a warning upon loading Special:Allmessages. Just FYI.

cat1 AND cat2

Hi Gero I found no way for "cat1 AND cat2". Is there an example somewhere? 84.190.56.160 11:20, 21 June 2007 (CEST)

Ok, it's category=cat1 category =cat2 ... ;-) regards Tobias 84.190.56.160 11:28, 21 June 2007 (CEST)

css files

Greetings,

This is kind of an obscure request and not directly related to the dpl extension, but I was wondering if you could email me the css files used in your example pages. I'm trying to get wiki tables and html working together, and those pages have some good examples. Or maybe just the classes used? Either would be great! Feel free to email me directly if you'd like. Thanks! --Natebsi 02:29, 20 July 2007 (CEST)

There is no css code except the MediaWiki:Common.css file.

#n-Manual { background-color: #ffddaa; }
#n-Source { background-color: #ccccff; }
#n-Test { background-color: #ccffcc; }
#n-Type { background-color: #dedede; }
/* wikitable, sortable, and prettytable class definitions
** based on meta.wikimedia.org MediaWiki:Common.css 
*/
table.wikitable, table.sortable, table.prettytable {
  margin: 1em 1em 1em 0;
  background: #f9f9f9;
  border: 1px #aaaaaa solid;
  border-collapse: collapse;
}
table.wikitable td, table.sortable td, table.prettytable td {
  border: 1px #aaaaaa solid;
  padding: 0.2em;
}
table.wikitable th, table.sortable th, table.prettytable th {
  background: #E6E6FA; /* lavender; wikimedia: #f2f2f2 */
  border: 1px #aaaaaa solid;
  text-align: center;
}
table.wikitable caption, table.sortable caption, table.prettytable caption {
  margin-left: inherit;
  margin-right: inherit;
}

Is it that what you were looking for?

Gero 08:00, 20 July 2007 (CEST)
Thats exactly what I'm looking for, thank you so much! --Natebsi 18:35, 20 July 2007 (CEST)

Parsing problems

Recently the Guild Wars Wiki has installed DPL. Currently I'm trying to get DPL to work in a certain fashion. See this page. The problem I am having, is that I am trying to fill my output table with entries that contain a |-character (table cell separator). What I would like to know is, if the following is possible with DPL:

Page "A" (which is included in Category:Skills):

{{Skill infobox
| description = This skill does {{gr|10|100}} damage.}}

Page "B" calling a DPL function as follows:

<DPL>
category=Skills
includepage={skill infobox}:description
mode=userformat
listseparators=\n{| {{STDT}} class=sortable\n|- \n! ||Name||Description,\n|-\n|STYLE="padding: 0px;"|[[Image:%PAGE%.jpg]]\n![[%PAGE%]],,\n|}
secseparators=\n|
</DPL>

My output page will only show a table like this:

  Name Description
Skill image Skill name This skill does {{gr

Where I want it to show:

  Name Description
Skill image Skill name This skill does 10...82...100 damage.

Is this possible? CoRrRan --86.87.179.57 23:57, 23 July 2007 (CEST)

Reply to "parsing problems"

First, thank you for this clear explanation about what you want, what you tried and what did not work as expected. And then my answer:

  • The 'include= {macro}:parameter' syntax is meant for simple access to one parameter and indeed it takes the value of the parameter literally (mainly for performance reasons)
  • Therefore you will see the plain wiki text if the value of your parameter contains template calls.
  • But there is another way which should work:
    • write a "phantom" template which is used as a surrogate for the original template and use that template in the include statement.
    • For example: 'include={macro}.xyz' where 'xyz' would be a hopefully meaningful suffix to the name of the original macro (aka template). In your case the macro is named 'skill infobox', so just write 'include={skill infobox}.xyz'.
    • DPL will then use the template 'skill infobox.xyz' instead of 'skill infobox'. And in 'skill infobox.xyz' you can do whatever you want. It receives the same parameters as {skill infobox} PLUS additional parameters named %PAGE% and %TITLE% which you can access in the usual way with triple curly braces.
    • The trick is, that the call to {gr} will be resolved before the parameters are being passed to 'skill infobox.xyz'
    • Last hint: If you do not have a good idea what suffix to use (in place of 'xyz') you might use '.dpl'. This would at least make clear that this template is used within a DPL query. As its basename is the same as the original template, you will find them next to each other in an alphabetical listing.

Last comment: If you get everything to work based on this advice and if you think that others may have the same kind of questions, please create a DPL:FAQ document and use this as a first entry.

Gero 19:37, 24 July 2007 (CEST)
This is exactly the information I wanted to have! I have been able to modify my output table in such a way that my {gr}-template is now properly parsed before being put into the DPL table output.
Now another thing I would like to be able to do: would it be possible to dictate the output to certain table cells? For instance, I would like to be able to do something like this:
  Name Description Rest
{{{Image1|}}} {{{Name1|}}} {{{Description1|}}} {{{Energy1|}}} {{{Cast1|}}} {{{Recharge1|}}}
{{{Campaign1|}}} {{{Quest1|}}}  
{{{Image2|}}} {{{Name2|}}} {{{Description2|}}} {{{Energy2|}}} {{{Cast2|}}} {{{Recharge2|}}}
{{{Campaign2|}}} {{{Quest2|}}}  
Is this at all possible?
Anyway, I really want to thank you with your help on pointing me to the {skill infobox}.dpl-call, that really worked. If the next question isn't possible, that's not too big a problem, just a "nice to have". And regarding that DPL:FAQ : is there a page already for it, because the link you created resulted in a red link... Regards, CoRrRan --86.87.179.57 00:24, 25 July 2007 (CEST)
Yes, this is possible. You just have to create the subtable structure within the "alternate template". The template creates a row of a table each tikme it is called, and one field of this row is another table. I assume that the template has enough information to create the row completely. Maybe Test identical chapters can give you an idea how it works.
Regarding the FAQ: Just go ahead and create it!
Gero 05:10, 25 July 2007 (CEST)

I think the original problem here was actually due to DPL not retrieving the literal value of the parameter. In Page "A", which has:

{{Skill infobox
| description = This skill does {{gr|10|100}} damage.}}

Is the complete description parameter represented by

description = This skill does {{gr|10|100}} damage.

or does that pipe symbol after "gr" signal the end of the parameter and start of the next?

description = This skill does {{gr

By MediaWiki standards, the former is correct, but DPL seems to go by the latter in this case.

You are right. The latest release (1.2.9) handles this now correctly. So the original form you wanted to use should now work as expected.. Gero 08:48, 27 July 2007 (CEST)
Very nice, thanks. Also though, the same bug still exists for pipes within "[[ ]]"s. (See Nigunda Test within Test section inclusion# include a single template parameter).


Thanks for your help

I just wanted to say thanks for your suggestions. Based on your feedback, I wrote an FAQ. Then, to meet our work requirements (see example using Template:Todo2), I wrote an extension that

  1. creates a "My Tasks" personalized button at the upper right hand of every page
  2. creates a Special:TaskList page to list all tasks assigned to a user with the {{todo2}} template
  3. sends out email reminders to task assignees when tasks are created/modified.

I would like to share this extension with everyone who want to use it but don't know the best way to do so. What would you recommend? --Gri6507 19:32, 2 August 2007 (CEST)

P.S. Unfortunately, I cannot do a live example of this extension because our company wiki is behind a firewall :-(

Add it to http://mediawiki.org/wiki/Extension:My_Tasks (or whatever you want to call it; and be sure to add a http://mediawiki.org/wiki/template:extension for it). But you may want to check out http://mediawiki.org/wiki/Extension:Tasks_Extension first... -Eep² 11:23, 3 August 2007 (CEST)
Thanks for the suggestion. I have created the new extension on MediaWiki's website. Please feel free to give feedback. --Gri6507 15:33, 3 August 2007 (CEST)

Hello?

Would you please reply (on the appropriate page) to my comments/suggestions/bugs in the past week or so:

Thanks. -Eep² 06:46, 15 August 2007 (CEST)

DPL talk:Manual - DPL parameters: Controlling output format#resultsfooter bug as parser function too... -Eep² 06:50, 15 August 2007 (CEST)
Talk:C and DPL:Discussion#Redirects to include pages that link to them? too please...you've replied to other people since then...I don't appreciate being ignored and/or blown off like this, Gero... -Eep² 09:29, 24 August 2007 (CEST)
I try to do my best - but my time is limited. I helped you a lot and implemented several things due to your requests. I consider the #redirect problem as too complicated to solve within the php code. I showed you how to solve it with simple query nesting. It is by no means necessary to change something in "each redirect article" as you wrote. The only thing you have to do is to split your query into two articles. I recommend that you have a second look at C and CC. Maybe you want to change the names of these two articles anyway.
I don't understand the C/CC thing, which is why I posted about it on Talk:C, which I would prefer you reply on in order to keep the discussion in context and not require switching back and forth to follow the discussion... You'll note I didn't ask any specific questions about DPL on this talk page--only to get your attention to visit the links (and reply there instead of here)... Please reply on Talk:C and answer my questions there. -Eep² 06:35, 25 August 2007 (CEST)
I appreciate your comments, criticism and stimuli but please accept that I have to set priorities. Extending the booleans e.g. would of course be possible but I can´t see why it should be a big gain.
Again, as I state on DPL:Requests for new features#More boolean support: "on"/"off" (for HTML checkbox form support) and "1"/"0" for easier typing. In other words, HTML form compatibility and user-friendliness is the gain... -Eep² 06:35, 25 August 2007 (CEST)
Row/column is too hard to do
How/why is it "too hard to do"? It should be a fairly simple optional switch to put the headers on the side vs. the top... -Eep² 06:35, 25 August 2007 (CEST)
and Template field output is against the existing concept of template substitution (which I feel is more powerful and better suited).
Not always--especially in my case. Your way forces excessive templating that could better be handled more efficiently in a single template. Why reinvent the wheel and duplicate data unnecessarily? That's basic database design right there... -Eep² 06:35, 25 August 2007 (CEST)
The database error will be corrected (bugs always have priority). The idea of importing text from other wikis has nothing to do with DPL (I answered to that request quite recently).
So, from my side, there is nothing 'open' at the moment.
As DPL is open software it is of course possible for you and all others to make the changes you feel are desirable. From time to time people have done so as you may have observed. If nobody objects I will try to integrate such changes. Therefore I recommend to upload a diff file which shows the code changes.
As long as I feel responsible for DPL (which I currently do) I will be open for ideas from everybody. Have a nice day. Gero 10:25, 24 August 2007 (CEST)
Unfortunately, I'm not a coder. -Eep² 06:35, 25 August 2007 (CEST)

Help on limited lists

Hi Gero, I'm Poke from the official Guild Wars Wiki (see some comments above). Currently I'm working with various DPL lists and came to one issue I want to solve. When I create a limited list with count is there any way to include the number of all found pages instead of the limited one? In my example I limit the list of ~250 pages to 50 and I want to display that there are 250 pages, not 50. Is there any way to do this without using another DPL list?
Thank you very much. Poke 23:41, 29 August 2007 (CEST)

Answer

Currently there is no other solution than using nested queries, for example

{{#dpl:namespace=Template
|resultsheader=<h2>Templates (%PAGES% out of {{#dpl:namespace=Template|format=,|resultsheader=%PAGES%}})</h2>
|count=10
}}

Templates (10 out of 500)

Gero 09:22, 30 August 2007 (CEST)

Hm, thank you - I hoped there was another method.. Poke 16:51, 30 August 2007 (CEST)

Mootools conflict

Hi Gero, I found that Mootools conflicts with the wikibits.js code prior to MW1.10 but works fine if that script is replaced with the 1.10 version. --Nad 01:00, 3 September 2007 (CEST)

I found the exact problem of the conflict which is outlined at http://www.mediawiki.org/wiki/Mootools. MW1.10's wikibits.js has a simple bug-fix implemented which involves changing the add-button loops to loop only through numerical keys rather than all the children, since many components add event callbacks to such elements. --Nad 07:06, 3 September 2007 (CEST)
Have you tested MW 1.9.x and below to make sure the MW 1.10 wikibits.js is compatible? I've replaced just the for loops and the "undefined" errors go away at least. -Eep² 12:52, 3 September 2007 (CEST)
I've tested replacing the entire file which appears to work but could have problems, replacing only the loops is best. --Nad 13:03, 3 September 2007 (CEST)

TreeView4

The new Treeview4 code is able to handle transclusion much better and allows those templates like Template:Links 2 to include the tree definition within them to make their syntax much simpler. For example see Category Tree Example. TreeView4 is still in testing but seems fine so far and can be run easily along side the current version, see treeview doc page --Nad 13:13, 7 September 2007 (CEST)

Thanks for the information about TreeView4. I will install it here in the next days .. Gero 14:02, 7 September 2007 (CEST)