Difference between revisions of "Template talk:Catlist"

From FollowTheScore
Jump to: navigation, search
(Simple Forms and Call)
 
(13 intermediate revisions by 3 users not shown)
Line 20: Line 20:
  
 
::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. -[[User:Eep²|Eep²]] 21:42, 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. -[[User:Eep²|Eep²]] 21:42, 15 September 2007 (CEST)
::: Hi Eep²! In fact, I should thank you for your sharing. Please see [http://semeb.com/dpldemo/index.php?title=DPL:Requests_for_new_features#Integrating_templates this] and [[Template:Catlist/test]].
+
 
::: Oh, I really love DPL. But since the Semantic Form seems to be more powerful than the simple from in this time, I ,a Chiese, not good at English and php, fell so tired to learn the both for my work in my unit. Thank you all guys offer so many help to me. --[[User:Roc michael|Roc michael]] 04:59, 16 September 2007 (CEST)
+
::: Hi Eep²! In fact, I should thank you for your sharing. Please see [http://semeb.com/dpldemo/index.php?title=DPL:Requests_for_new_features#Integrating_templates 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. --[[User:Roc michael|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 [http://tnlc.com/wiki/ 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 [http://tnlc.com/wiki/index.html?title=Comparison_table unable to do what I want], unfortunately. -[[User:Eep²|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.
 +
::::[[User:Gero|Gero]] 10:40, 16 September 2007 (CEST)
 +
 
 +
== Simple Forms and Call ==
 +
 
 +
Why exactly is the [[Special:Call|Call]] extension needed with [[mw:Extension:Simple Forms|simple forms]], when the <tt>{<nowiki/>{#request:}}</tt> 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 <tt>{<nowiki/>{#request:}}</tt> calls?  —[[User:Sledged|Sledged]] ([[User talk: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 :-(
 +
:[[User:Gero|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 <tt>&amp;lt;</tt> and <tt>&amp;gt;</tt>.  I'm also having trouble getting <tt>method=post</tt> to work.  However, I implemented my aforementioned suggestion and it [[DPL Simple Forms Test|worked like a charm]].  —[[User:Sledged|Sledged]] ([[User talk: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.  (An empty field returns 499.)  210 or less and it works as expected.  —[[User:Sledged|Sledged]] ([[User talk:Sledged|talk]]) 19:47, 6 December 2007 (CET)
 +
 
 +
::::Silly me.  Forgot that the page making the DPL call is not included in the list.  Though, shouldn't the DPL call still return the specified number of pages outside the omitted one?  Shouldn't it just add the current page to the <tt>nottitlematch</tt> parameter?  —[[User:Sledged|Sledged]] ([[User talk:Sledged|talk]]) 20:42, 6 December 2007 (CET)
 +
 
 +
:::::Nevermind.  That wouldn't work.  Well... it would, but <tt>nottitlematch</tt> ignores namespace, so potentially other unintended pages would get omitted, too.  —[[User:Sledged|Sledged]] ([[User talk:Sledged|talk]]) 20:45, 6 December 2007 (CET)
 +
 
 +
::::::Which begs the question: is there a way to omit a group of pages within a namespace without omitting all the pages in the namespace and without omitting all the titles that match in all the namespaces?  —[[User:Sledged|Sledged]] ([[User talk:Sledged|talk]]) 22:37, 6 December 2007 (CET)
 +
 
 +
:::Now it gives paged results!  [[DPL Simple Forms Test|Whee!]]  (I may be enjoying this a bit too much.)  —[[User:Sledged|Sledged]] ([[User talk:Sledged|talk]]) 00:30, 7 December 2007 (CET)
 +
 
 +
----
 +
You know that [[skipthispage]]=no will return also the current page? [[User:Gero|Gero]] 22:11, 6 December 2007 (CET)
 +
 
 +
:I know, but I still think if <tt>[[skipthispage]]=yes</tt> is used, it should still return <tt>[[count]]</tt> number of pages, not <tt>[[count]]</tt> minus one. —[[User:Sledged|Sledged]] ([[User talk:Sledged|talk]]) 22:37, 6 December 2007 (CET)

Latest revision as of 00:30, 7 December 2007

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 &lt; and &gt;. 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. (An empty field returns 499.) 210 or less and it works as expected. —Sledged (talk) 19:47, 6 December 2007 (CET)
Silly me. Forgot that the page making the DPL call is not included in the list. Though, shouldn't the DPL call still return the specified number of pages outside the omitted one? Shouldn't it just add the current page to the nottitlematch parameter? —Sledged (talk) 20:42, 6 December 2007 (CET)
Nevermind. That wouldn't work. Well... it would, but nottitlematch ignores namespace, so potentially other unintended pages would get omitted, too. —Sledged (talk) 20:45, 6 December 2007 (CET)
Which begs the question: is there a way to omit a group of pages within a namespace without omitting all the pages in the namespace and without omitting all the titles that match in all the namespaces? —Sledged (talk) 22:37, 6 December 2007 (CET)
Now it gives paged results! Whee! (I may be enjoying this a bit too much.) —Sledged (talk) 00:30, 7 December 2007 (CET)

You know that skipthispage=no will return also the current page? Gero 22:11, 6 December 2007 (CET)

I know, but I still think if skipthispage=yes is used, it should still return count number of pages, not count minus one. —Sledged (talk) 22:37, 6 December 2007 (CET)