[02:02:20] anyone running with 1.19? I'm running into the same thing as: http://www.wikijournals.info/api.php?action=ask&q=[[Special_need::fraises]]&po=Special_need|dummyproperty [02:02:32] (that url shows an error) [02:03:30] actually this is the one: https://wiki-dev.allizom.org/api.php?action=ask&q=[[Special_need::fraises]]&po=Special_need|dummyproperty [04:43:04] hi yaron [04:43:16] Hi, what's up. [04:43:40] I've been mostly reading up on extensions to make sure I'm doing the right thing, but basically, I think I've found a problem with the approach I suggested for ED [04:44:19] (If you remember, I was changing the way #for_external_table outputs its result, so that templates would be parsed, for example' [04:45:18] e.g. {{#for_external_table:{{template call|x={{{x}}}}}}} [04:46:23] this is actually working fine for the template rendering, the problem comes with calling #set_internal within the template called in this way [04:46:47] when I call the template 'directly' the SIO works fine, and I can query it [04:47:38] when I call the template via #for_external_table, I can see the template is being called correctly, because of what gets rendered, but the SIO isn't being set according to what I can then query [04:52:24] also, on a related topic [04:53:15] dbolser_ - I'm going to sleep soon. But feel free to email me with the rest. [04:55:29] ... [04:55:33] cool [04:55:42] * dbolser_ goes to sleep too [20:50:17] heya. Question regarding radiobuttons in SF: How can I set the values without having a default. Right now I do input type=radiobutton|values=Ja,Nein but there is always a "Keine Angabe" option which produces "on" in the wikisource [22:11:36] when I add a "=" sign in any text that is displayed by a template nothing shows. Is there an easy way to fix this? [22:18:14] sven^: probably yes, because I don't have that issue [22:20:05] sven^: sounds like your template uses positional parameters, but your text is interpreted as named parameter [22:20:57] Ftrott, sven^: just created a test template that uses positional parameter, but it works even there [22:20:58] wait... what? ;) [22:21:04] just a sec [22:21:11] got something else to do... I'll get back to this [22:21:25] I called a template with {{{ShowText|this=fun}}} [22:21:50] Saruman: sven^: Ok, then I'm out of ideas already :) [22:22:04] Ftrott: no the idea is sound [22:22:14] it's prolly even the root cause at sven^ [22:22:29] but it works on my wiki, so the question is: why [22:22:40] The text is:
[22:22:41] {{{1|}}} [22:22:50] that's my ShowText test template [22:23:03] shows the full text [22:28:46] spaces around the = don't matter for me, still works when i use "this = fun" [22:36:42] uhm... it's a "template in a template" coming from a form using "holds template". so the actual wiki source is something like {{{foo|a={{{bar|text text text}}}{{{bar|other text}}} }}} [22:38:29] well it's worth trying Ftrott's idea then [22:38:49] don't use {{{foo| }}} [22:38:59] use {{{foo|fooparam= }}} [22:39:24] then inside foo, reference {{{fooparam|}}} instead of {{{1}}} [22:40:08] yeah, it's too late for that :P [22:40:31] yaron: I found the error I was complaining about last night. You're right, a specific parser function to call a named template with ED variables is the way to go [22:40:32] I got like 160 pages each with 2-6 templates with those unnamed params [22:41:01] sven^: need a template parser? [22:41:09] Cool! [22:41:19] sven^: "it's never too late to turn back from the wrong way" [22:41:37] also: if you test it on only a single page, you'll gain info [22:42:35] yeah, will do that in a sec [22:43:07] dbolser_: what do you mean? [22:43:35] sven^: I was trying to write a template parser using the API [22:44:44] sven^: another test: try HTML encoding the equal sign with = [22:45:05] {{{foo|a={{{bar|text text text}}}{{{bar|other text}}} }}} [22:45:13] you can excape = with [22:45:48] {{{foo|a={{{bar|text text text}}}{{{bar|other text}}}}}} [22:46:10] hmmm why are we triple-accolading this? [22:46:34] * dbolser_ has no idea! [22:46:41] shouldn't template calls be double accolades? [22:47:01] {{foo|a={{bar|text text text}}{{bar|other text}} }} [22:47:56] Saruman: that won't help. If users enter text in the form they won't html encode equal signs.. [22:48:00] sec I am still on it [22:49:20] it's those damn users again [22:49:25] I say get rid of those [22:49:35] wikis with no users are the best wikis! [22:49:55] yups [22:50:02] ;) [22:59:06] well, here you go: http://codepad.org/0oBDeqQH [22:59:25] minimal example code that doesn't work in the same way my code doesn't work ;) [23:00:45] ok lemme paste it in my sandbox [23:03:16] ok works fine for me, except for the #replace_e: that my wiki doesn't understand [23:03:22] no prob with the = for me [23:03:42] by "no prob" you mean you get a different result? [23:03:48] the text shows? [23:04:28] yes [23:04:33] very strange [23:04:42] minus the motion denied [23:04:51] but thats because the replace isn't parsed, I think [23:04:51] ? [23:04:54] ah [23:04:55] ok [23:05:04] maybe I should upgrade MW/SMW/SF versions [23:05:14] what are you on now? [23:05:34] MW 1.18.1, SF 2.4, SMW 1.7.0.2 [23:05:43] every time I upgrade things break [23:05:53] so usually I don't until I have to ;) [23:06:00] I'm on MW 1.20.2/SMW1.7.1/SF 2.5.1 [23:06:17] this parser stuff will prolly be MW only [23:07:18] heh, sven^ your wiki tells you: {{#if: {{{upgrade|}}}|shithappens|shithappens}} [23:07:27] wikiparser humor :-) [23:07:41] ok, I'll just save that problem for later.. another thing: the |on}} of the second motion comes from a radiobutton's default value. Is there a way to change that? [23:08:25] Right now I have a Property:Motionvote with 3 [[Allows value::]] [23:08:34] Accepted, Denied and NoVote [23:08:52] and I use input type=radiobutton|property=Motionvote [23:09:12] but it always inserts a4th buttong for "No Value" [23:10:47] why not add a default to the input [23:10:54] default=NoVote [23:11:06] sec, I think I did that and it didn't work... [23:11:09] I'll try again [23:12:01] hmm on closer inspection, my sandbox fails as well [23:12:29] I don't get the text "This time, we think 2 = 3" [23:12:42] yeah, that's exactly the problem I am having ;) [23:12:51] but I think Ftrott was totally on the ball [23:13:01] you just cannot have = inside an unnamed parameter [23:13:32] the template is seeing it as {{{1}}} {{{This time, we think 2}}} {{{2}}} {{{3}}} [23:13:55] so your 3rd and 4th param are interpreted as 2nd and 3rd [23:14:07] ok, one thing at a time. default=No Vote "works" [23:14:13] but there is still a 4th one [23:14:13] great [23:14:16] ;) [23:14:18] less grate [23:14:20] greate [23:14:28] grrrr... "great" [23:14:31] grrr [23:14:32] :P [23:14:41] * Saruman foams at the mouth just a little [23:15:15] clearly a shot of whisky is in order [23:16:41] ok, I guess I should test if the "=" problem exists with named parameters [23:16:56] and if it doesn't I'll have a lot of work to do [23:17:16] I'm gonna go back and take a look at my test where it seemed to work [23:17:42] the "this = fun" test [23:17:42] ah, a small thing I came across: is there any way to add numbers to my #ask results? [23:17:54] yah, format=template [23:18:09] and then? [23:18:34] I tried it with a table inside the template and just putting # in the first col [23:18:40] start before the #ask with {{#vardefine:counter|0}} [23:18:46] but that failed as expected [23:18:51] uh, ok [23:18:53] yeah ;) [23:18:57] ty [23:19:07] inside the template, increas the counter var, and use it where you like [23:19:47] lemme see, something like {{#vardefine:counter|{{#expr: {{#var:counter}} + 1}} }} [23:20:13] yeah, that should be no problem. I just didn't think of that solution, for some reason [23:21:00] oh. I guess I didn't want to install another extension ;) [23:26:27] in the mean time, i found out why it "worked" on my sandbox [23:26:45] answer: it didn't. I tested too shallow while making an elementary mistake myself [23:27:04] I tested template ShowText using {{{ShowText|this = fun}}} [23:27:30] look & tell me why that showed "this = fun" with no problem... [23:27:37] ... for ten points! [23:28:12] what do I get for ten points? ;9 [23:28:33] two 5-point vouchers! [23:28:39] yay [23:29:13] took me 3 minutes and a shot of Deanston Virgin Oak to figure it out [23:29:39] damn, I want Wisky, too [23:31:25] can't MIME-encode a shot for you, sorry sven^ [23:31:57] time's up [23:32:05] {{{ShowText|this = fun}}} wasn't a call to the freshly made ShowText template [23:32:22] it was a call on field ShowText, that, if empty, would default to "this = fun" [23:32:38] triple-accolading spoiled my test [23:33:04] uh, 3 {{ ;) [23:33:06] yeah [23:36:31] = hasn't posed a problem for me because i use named parameters as a rule, positional as an exception [23:37:37] yeah.. I just used it in this case because the example to embedded templates I found used them [23:38:01] I realized that it wasn't the best solution some time ago and had to do that replace_e stuff to fix things [23:39:40] is there an easy way to "overwrite" a template as in having 2 templates with the same name and just use whichever fits? [23:40:47] not that I know of... [23:41:01] or wait: how about this [23:41:34] so I'll either have to shut everything down until I changed 180 pages using that template several times by hand [23:41:43] no, I have a solution [23:41:51] you use 4 named parameters [23:41:52] I could mass rename using a script... [23:42:00] numbered* [23:42:10] have your template accept and use the 4 parameters AND unnamed parametres [23:42:38] you mean just duplicate the code and use a lot of #if? [23:42:54] example with 1: if you use {{Foo|named1 = }} or {{Foo|}} [23:43:20] all you need to do is have the template use {{{named1|{{{1}}}}}} [23:43:28] oh ;) [23:43:29] yeah. [23:43:33] nice one [23:43:36] thanks [23:43:56] this'll fail spectacular if the template gets called anywhere iwth a mix of named and unnamed parametres :-) [23:44:00] added bonus! [23:44:12] that won't happen [23:44:17] I will change the form right now [23:44:24] and start changing pages slowly [23:44:47] better check first if the suggestion works [23:44:54] else you need more programming [23:44:57] but the idea is sound [23:45:19] if you can't put unnamed parameter as default in the named parameter, then it's going to take the Variables extension again [23:45:46] yeah, if that doesn't work I'll just use {{FooNew|named=...}} for now and change them using a script later on [23:46:13] {{#if: {{{named1|}}}|{{#vardefine:named1|{{{named1}}}}}|{{#vardefine:named1|{{{1|nothing}}}}}}} [23:46:20] eeeks. [23:46:23] nonono :P [23:46:41] then use {{#var:named1}} everywhere in the script [23:47:05] c'mon it's a harmless incantation, I've used more complex ones in Isengard! [23:48:08] oh god. [23:48:22] I just found another template using unnamed parameters [23:48:30] it is used on 200 pages -.- [23:49:52] unnamed parameters may not really be a problem, if you provide usable defaults {{{1|default}}} and if you know/control what's going to go into them [23:50:53] yeah, but if the default is used everytime there is a = in them, it's not really an option [23:52:05] if there's an = in them, you don't control what's going into them well enough [23:52:17] so then, named params is the only way to go [23:57:34] your {{{named|{{{1|}}} }}} hack works by the way [23:59:32] great