[01:18:11] hmm. I'm trying to do a sum results format for all the values of a property on a page. however when the same value comes up only one of the two is added in the sum. any ideas how to structure the query/properties to add these same values? [01:25:07] dreamer: I had the same problem some time ago [01:25:14] I solved it using subobjects [01:26:42] hmm [01:27:24] want an example? [01:30:51] so instead of a #set: you use #subobject: ? [01:32:22] yeah. For me the "things" are bands that are booked for a gig on a specific date. So on the date's page there are several {{Gig|...}} templates, that first display some stuff regarding that band and then create a subobject [01:33:28] {{#subobject:{{{Bandname}}} | ... |{{#if:{{{Price|}}}|Price={{{Price}}}|Price=0}} }} [01:33:33] something like that [01:33:51] ok, so in your case if the values of Price are equeal they are still added? [01:33:56] hmm, I just tried it and didn't work [01:34:17] http://wiki.techinc.nl/index.php?title=Test&action=edit [01:34:32] what does your query look like? [01:35:00] it's a mess.. ;) [01:35:03] heh [01:35:57] http://codepad.org/QJDirHbj [01:36:24] it's called in a template because I use it at several different places. That's where the 1 and 2 come from [01:37:44] http://wiki.techinc.nl/index.php/Special:Browse?title=Special%3ABrowse&article=Test [01:38:04] see, your subobjects work, you just don't query in the right way [01:45:53] your looks highly obscure :P [01:46:00] I recently learned about '-' though ;) [01:47:37] hmm, gotta go home. hopefully I can figure this out later .. [03:05:47] New patchset: Yaron Koren; "{{!}} hack template is now generated as well, if it's needed and doesn't exist" [mediawiki/extensions/SemanticForms] (master) - https://gerrit.wikimedia.org/r/53130 [03:08:24] Change merged: Yaron Koren; [mediawiki/extensions/SemanticForms] (master) - https://gerrit.wikimedia.org/r/53130 [10:28:34] New patchset: Shirayuki; "Fix spelling of "Overridden". Per http://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Semanticmaps-kml-text/en_(5)" [mediawiki/extensions/SemanticMaps] (master) - https://gerrit.wikimedia.org/r/53149 [10:34:14] New patchset: Shirayuki; "Fix spelling of "Overridden"" [mediawiki/extensions/SemanticMaps] (master) - https://gerrit.wikimedia.org/r/53149 [12:38:34] hi [12:39:04] just wanted to ask if there is any programmer who can do some support or coding on the semantic mediawiki for money [12:48:07] it's difficult to get semantic mediawiki programmers. so any ideas? [12:55:55] s6581: http://semantic-mediawiki.org/wiki/Work_for_hire [12:56:25] yaron: ^ [12:59:23] sorry wrong nick [12:59:29] JeroenDeDauw: ah great [12:59:45] i would like to make it possible that you can move the map and things will be reloaded [13:04:39] and since i will support the project it will be important that the code is good enough to be used in the semantic wiki/maps [13:48:13] Flexman: did you recently main me about that? [14:00:37] JeroenDeDauw: yes i did moan you about that ;) [14:09:58] ok i have to go, would be nice if you could answer there [14:09:59] bye [14:10:20] ok i see you already did [14:26:27] JeroenDeDauw: I just saw this, sorry. Were you suggesting that I should add my name to the "Professional support" page? [14:27:34] yaron: you are already there? [14:27:46] Well, no, but WikiWorks is there. [14:28:02] yaron: that was to point you to s6581 asking for devs [14:28:12] yaron: ctrl+f Yaron :p [14:28:13] Oh... I get it. [14:28:25] Well, too late. :) [14:29:09] I didn't understand the "ctrl+f" comment... [14:41:19] yaron: your name is on the page [14:41:46] Ah - yes, that's true, I'm there also. :) [14:47:56] Hi folks. I've got a form with quite a few different checkbox fields. My template lists the contents using arraymap, and it works fine. But I'm thinking I want to let my users enter tags in their text, like "My [[Has Model::Ford]] actually runs." I can use an {{#ask: [[{{PAGENAME}}]] |?Has Model=}} to show checkbox picks and tags. [14:48:39] But if I replace all my arraymaps with {{#ask}}'s, will there be a significant performance hit, or will the asks be fast simply because the page was just loaded? [16:50:12] hi yaron, not sure if you saw my update to the ED XPath bug, basically it's an issue of case handling [16:50:27] No, I didn't see it. [16:50:35] Where did you put it? [16:50:45] nm, could you assign the bug to the person who worked on XPath [16:50:50] mediazilla [16:50:53] one moment [16:51:54] yaron: https://bugzilla.wikimedia.org/show_bug.cgi?id=45805 [16:53:57] seems that the values in the "data=key=value[,key=value]" string are 'lowercased' by ED, but the corresponding elements and attributes in the returned XML document are not [16:54:49] so 'key=//TITLE' matches string, but *not* string. [16:55:24] not sure if this is just XPATH, or XML in general [16:56:10] Ah - I guess ED shouldn't be lowercasing, then? [16:57:05] yeah, but I couln't track down where it happens [16:57:47] just looked in the obvious place, where the data= param is unpacked... there is a value passed to that function to optionally lowercase key or value parts [16:58:02] but commenting that code out didn't fix it (but I only tested this quickly) [16:58:06] * dbolser goes to have anohter look [17:00:52] gah, the example I gave above may not be right [17:01:12] in this case, I'm always getting XML attributes, not elements [17:01:57] I should have said: so 'key=//@TITLE' matches , but *not* . [17:02:31] I'm not sure if this is significant (i.e. I'm not sure if elements are supposed to be case insensitive and attributes case sensitive in XML) [17:02:44] * dbolser asks in #xml [17:08:49] I'm commenting out ... gah... I'm no good at commenting out! OK, got it working [17:10:31] right, now the value in "data=key=value" needs to match the case of that in the XML... but I'm not sure if that's desired in general? [17:16:13] this line in ED_Utils.php seems to have no effect: "$edgCurrentXMLTag = strtolower( $name );" [17:16:26] not sure what it's supposed to do... // set to all lowercase to avoid casing issues [17:16:29] ?? [17:19:07] playing with case in teh XML document doesn't show this line to have any effect [17:19:56] if it had an effect in the past, it would explain why it worked before [17:20:18] (i.e. why calling paramToArray with $lowercaseValues = true worked before) [17:20:29] but... why is paramToArray ever called that way? [17:20:56] I see it called with a variety of casing arguments, but I can't see any logic to it [17:21:38] yaron: can you see a path out of this situation? [17:22:13] What's the situation? Did you fix the problem? [17:22:45] yaron: I fixed the problem by forcing paramToArray to ignore some of it's arguments: [17:22:48] static function paramToArray( $arg, $lowercaseKeys = false, $lowercaseValues = false ) { [17:22:59] I forced it to ignore calls like this: [17:23:23] $mappings = EDUtils::paramToArray( $args['data'], false, true ); [17:23:41] but I don't know why it was ever called that way [17:23:55] What do you mean by ignore the calls? [17:24:32] I changed the code so that the 'true' in the above call is 'ignored', the $lowercaseValues option has no effect in my 'fix' [17:24:42] sorry, I'm not being clear [17:24:58] #if ( $lowercaseValues ) { [17:24:58] #$value = strtolower( $value ); [17:24:59] #} [17:25:20] Right, okay - so the call should actually be to "paramToArray( $args['data'], false, false )". [17:25:29] yaron: I'm not sure [17:25:40] I mean, in the case of using XPath. [17:25:41] because that may break other uses [17:25:51] yaron: currently, yes [17:25:59] What do you mean by "currently"? [17:26:02] however, there is a line in the XML parsing code that looks related [17:26:18] I mean currently, because I think the following line may once have had an effect: [17:26:36] // set to all lowercase to avoid casing issues [17:26:37] $edgCurrentXMLTag = strtolower( $name ); [17:26:47] currently that line has no effect AFAICT [17:27:16] So in that case, it's not relevant, right? [17:27:18] if it once did what it suggests, then everything would be fine, XML would be lower case, and xml 'paths' would be lowered [17:27:32] Oh. [17:28:04] yaron: thanks, yup, your original statement was right: 'the call should actually be to "paramToArray( $args['data'], false, false )". in the case of using XPath.' [17:28:10] Right. [17:28:11] (sorry for being dumb) [17:28:29] It looks like that 2nd line you pointed to is only used for regular XML parsing, not XPath stuff. [17:28:39] and we should remove the line that reads "$edgCurrentXMLTag = strtolower( $name );" ... I think [17:28:46] ahhh [17:29:04] OK, I think I can make a patch and send it. [17:29:09] Cool, thanks. [17:29:23] btw, XML should always be case sensitive btw: [17:29:26] http://www.w3schools.com/xml/xml_syntax.asp [17:29:45] That was my guess, yes. [17:30:25] Attribute names are also case-sensitive [17:30:34] http://xml.silmaril.ie/case.html [17:30:42] Yes, that's not surprising. [17:31:12] OK, thanks again for help, I'll submit my patch at some point [17:31:20] l8r [21:04:18] New patchset: Vedmaka Wakalaka; "Fixed but when $options array was empty in $select DomElement at SF_AutoeditAPI.php" [mediawiki/extensions/SemanticForms] (master) - https://gerrit.wikimedia.org/r/53270 [21:18:42] is there any way to make a form more dynamic? e.g. inserting sections when a certain number of "multiple" form items have been added [21:24:06] sven^_: that specific thing can't be done. [21:25:08] hmpf.. do you know a better way to handle forms with loads of items? [21:26:48] What's the issue? Too much stuff on the screen? [21:26:57] I maintain a list of books in the wiki. Right now I think there are about 80 and it starts to get messy [21:27:19] it's just a looong list of books, each with 4 fields + an add date [21:27:22] Why not put each book on its own page? [21:27:55] I wanted a quick and easy way to add them and having a "add another" button without page loads inbetween seemed like the perfect choice [21:28:23] You could do it with a popup form instead... [21:31:25] woha. Nice [21:31:32] ;) [21:32:12] ok, I am not quite sure if that solves my problem, but I can use it at other places to make things smoother [21:33:33] it's quite slow actually [21:33:49] 2s till the popup is loaded and 4s until I am back at the page [21:36:26] Yeah, it's a little slow. [21:36:54] Still, is that a big deal? 6 seconds * 80 books is around 13 minutes. [21:37:08] We've been talking about it for longer than that. :) [21:37:32] na actually I have been chatting with a girl and only looked at this window from time to time :P [21:37:58] Well, in any case, it's not a lot of time. [21:38:02] well, is there a "good" way to edit items later on? [21:38:33] I have several cases like this in the wiki, some where I already have seperate pages for items [21:38:41] I don't understand the question. [21:39:20] for example a contact list with 214 contacts.. I gather them via different #asks for a nice display and put a formlink in every row to make them editable [21:39:28] is there a better way to do this? [21:40:39] It depends on how often you need to do a mass edit. [21:40:46] this is to display my contacts: http://codepad.org/9gj0GjKV [21:40:49] not very often [21:41:04] but there are still several "features" with this that are not perfect [21:41:36] for example if you finish editing a contact, you are at that contact's page and have to navigate back to the "all contacts" page by hand [21:42:08] or if you want to delete a contact's page, you have to click edit in the table, save it, without changing anything to get to the real page and then you can delete that page [21:42:34] Well, for the first one, popup forms are good for that. [21:42:50] yeah... [21:43:01] For the second one - the table should of course include a link to the page, not just to the edit form. [21:43:37] usually you don't need that link, so I removed it to make it cleaner [21:43:40] but maybe you are right [21:43:49] is that popup thingy a new feature? [21:44:45] It's... maybe a year or two old. [21:45:26] hmm. Ok, I made the contact stuff 15 months ago.. maybe I just missed it [21:45:26] this is much nicer ;) [21:47:19] Cool. [21:49:02] thanks.. Ok, I'll just add some sort of eye or magnifier icon in the first column to display the pages [21:49:04] thanks [22:05:28] are alt text possible when I use a file as icon for a formlink? Doesn't seem to work for me [22:11:57] I don't know - probably not.