Template talk:Catlist

From FollowTheScore
Revision as of 20:47, 6 December 2007 by Sledged (talk | contribs) (Simple Forms and Call)
Jump to: navigation, search

Manual: DPL:Catlist

Multiple categories, namespaces, etc

Per DPL talk:Catlist and User talk:Gero#Hello? (mentioning this again here since Gero still has yet to reply to it directly...), this form needs to support multiple same parameters. Also, if DPL supported "1"/"0" in boolean operators (whatever), checkboxes could replace the "yes"/"no", "true"/"false" select listbox pulldowns (since HTML uses "1"/"0"... Also, the special page should not have been removed because it does handle multiple same parameters. -Eep² 22:58, 30 August 2007 (CEST)

My version

http://www.tnlc.com/wiki/index.php?title=Template:dplquery which uses checkboxes (that don't stay checked since Simple Forms doesn't seem to be able to do that) but still doesn't have mutliple category/namespace/template, and other field support like the original DPL special page can handle (and why I still think it should not have been replaced with this template yet). -Eep² 14:07, 9 September 2007 (CEST)

Hi! Eep². Thank you for your sharing. But your version have a error in it, The
-->{{#ifeq:{{{addpagetoucheddate|no||}}}|addpagetoucheddate
should be changed to
-->{{#ifeq:{{{addpagetoucheddate}}}|no||addpagetoucheddate
and
-->{{#ifeq:{{{count|}}}|-||{{#if:{{{count|}}}
should be changed to
-->{{#ifeq:{{{count|}}}|||{{#if:{{{count|}}}
--Roc michael 12:04, 15 September 2007 (CEST)
Thanks. I just copied this code from Gero's and hadn't modified that section. I still need to add some other parameters to it but thought I'd wait until Gero updated his with the new variables before I updated mine any more. -Eep² 21:42, 15 September 2007 (CEST)
Hi Eep²! In fact, I should thank you for your sharing. Please see this and Template:Catlist/test.
Oh, I really love DPL. But since Semantic Forms seems to be more powerful than Simple Forms at this time, I, a Chinese who is not good at English and PHP, feel so tired to learn both for my work in my unit. Thank you all guys for offering so much help to me. --Roc michael 04:59, 16 September 2007 (CEST)
Well, the problem with Semantic Forms is that it's made for Semantic MediaWiki (though it can run without SMW but is buggy) and requires SMW relations/types (like "has form"). It's autocomplete option is nice (though slow with its MooTools Javascript library) but can't even support a select listbox, a common HTML form element (which Simple Forms can) without requiring complicated and confusing SMW types that can't automatically pull in all values like, for example, in a specific category. Semantic Forms also can't take any wiki formatting in its forms, thus requiring duplicating the table layout in wiki markup (and making links to local pages is annoying). Both form extensions are good and bad but, unfortunately, are both lacking in being a complete and total form solution for MediaWiki. I'm trying to use them in my 3D game comparison wiki but there are just way too many incompatibilities between them, DPL, and MediaWiki. I'm probably going to end up just using a normal HTML form with PHP elements and getting that into an article somehow (with a template to format the results, I guess). I dunno...MediaWiki just doesn't make a very good database system, I'm finding out... I like DPL too but also find it unable to do what I want, unfortunately. -Eep² 07:05, 16 September 2007 (CEST)
Hi Michael, I think you are doing a very good job (considering that English is not your mother tongue ;-). Thank you for finding the error in Catlist. I corrected it. If there is something (not too complicated) which could be improved at SimpleForms you could try and leave a message to the author (Nad) at the talk page of SimpleForms extension. He is very co-operative.
Gero 10:40, 16 September 2007 (CEST)

Simple Forms and Call

Why exactly is the Call extension needed with simple forms, when the {{#request:}} parser function can use HTTP request parameters in the body of an article? Couldn't you just change:

value = Special:Call/Catlist

to

value = Template:Catlist

and replace all the template parameters with {{#request:}} calls? —Sledged (talk) 19:55, 4 December 2007 (CET)

I tried to do exactly this but it did not work. Maybe you can find out why? Even some of the simpler examples from Nad´s website did not work reliably here :-(
Gero 22:03, 4 December 2007 (CET)
It seems it's still experimental. I tried the DPL example, and I ended up getting HTML will all the angle brackets replaced with < and >. I'm also having trouble getting method=post to work. However, I implemented my aforementioned suggestion and it worked like a charm. —Sledged (talk) 00:42, 6 December 2007 (CET)
Here's some very unexpected behavior. My implementation returns one less than than what's entered in the "maxrecords" field, but only if I set the value to more than 210. 210 or less and it works as expected. —Sledged (talk) 19:47, 6 December 2007 (CET)