[07:14:57] kghbln pong [10:29:55] New review: Markus Kroetzsch; "Thanks for looking into this. To make this a success, you should first familiarize yourself a bit wi..." [mediawiki/extensions/SemanticMediaWiki] (master); V: 0 C: -2; - https://gerrit.wikimedia.org/r/34976 [10:33:25] New patchset: Pastakhov; "new implementation #ask as #ask2" [mediawiki/extensions/SemanticMediaWiki] (master) - https://gerrit.wikimedia.org/r/34976 [10:35:27] New patchset: Pastakhov; "new implementation #ask as #ask2" [mediawiki/extensions/SemanticMediaWiki] (master) - https://gerrit.wikimedia.org/r/34976 [14:08:31] New patchset: Nischayn22; "DRAFT:Display property counts in property pages." [mediawiki/extensions/SemanticMediaWiki] (master) - https://gerrit.wikimedia.org/r/35156 [14:10:02] New review: Nischayn22; "This will fail for other stores, not to be merged, but rfc" [mediawiki/extensions/SemanticMediaWiki] (master); V: -1 C: 0; - https://gerrit.wikimedia.org/r/35156 [14:18:47] New review: Pastakhov; "I try to go from the back." [mediawiki/extensions/SemanticMediaWiki] (master) C: 0; - https://gerrit.wikimedia.org/r/34976 [15:11:32] I feel stupid. Working so long with mediawiki. And still i dont know how i can connect a form field with a property [15:18:47] Rinkel: https://www.mediawiki.org/wiki/Extension:Semantic_Forms/Defining_forms#.27field.27_tag [15:18:53] input type=propertyname [15:19:23] oh wait that's not right [15:19:30] Is more like. the have to make in the template something like: [15:19:45] property=property name [15:19:46] [[propertyname::{{{name}}}]] [15:19:57] not necessarily. [15:20:38] if the form has field {{{blaat}}} you cna just specify blaat as a field in SF [15:20:49] doesn't even need to be semantic [15:20:57] there are people that use SF without using SMW [15:21:46] But i want to store information in the property so i can show it in the template. [15:22:23] in the template, think up a name for a field, and annotate it somewhere in the template anywhere you want [15:22:35] indeed [[propertyname::{{{name}}}]] [15:22:54] then in the form, create {{{name}}} as an input field [15:23:53] So have always to make this [[propertyname::{{{name}}}]] connection [15:23:54] if you'd like examples, check out http://www.infra-repository.org/oiar/index.php/Special:Forms [15:24:17] only if you want the content of {{{name}}} annotated as [15:24:29] plus, you could use the #set function instead of [[ :: ]] [15:24:45] Okeeh. [15:25:06] That #set sounds interresting. [15:25:22] {{ #if:[[Is with youtube::{{{Youtube|}}}]] | {{#widget:{{{Youtube}}} }} }} [15:25:32] i gonna test this one now. [15:26:14] Oh, found a mistake :D [15:26:46] strange #if condition [15:27:20] I'd expect {{#if: {{{Youtube|}}} | [[Is with youtube::{{{Youtube}}}]]{{#widget:{{{Youtube}}} }} }} [15:27:48] Is with youtube is the property name. [15:28:06] I call all properties " is with blaat" [15:28:07] can't put that in the if [15:28:18] So i have to use the #set [15:28:21] sound naming convention [15:28:42] i think you're mixing up a few things [15:29:08] happens a lot with wiki code :p [15:29:33] #if: should only check if some string exists, e.g. if a field was entered [15:29:50] you shouln't attempt to annotate anything in the #if condition [15:30:24] annotation (silent or otherwise) should happen on the right side of the first | [15:30:57] So i can do #set [[Is with youtube::{{{Youtube}}}]] on the start of the template and do the if simple [15:31:38] you could, but it makes no sense [15:31:57] if there's no content in {{{Youtube}}} you cannot set it anyhow [15:32:11] Even Nederlands ? [15:32:28] als de field {{{Youtube}}} leeg is, wat wil je dan setten of annoteren? [15:32:52] je checkt met #if of er een veld is meegegeven; zo ja, dan annoteer je (silent of expliciet) en toont de widget [15:33:06] {{#if: {{{Youtube|}}} | [[Is with youtube::{{{Youtube}}}]]{{#widget:{{{Youtube}}} }} }} [15:35:34] {#if: {{{Youtube|}}} | [[Is with youtube::{{{Youtube}}}]] {{#widget:YouTube|id={{{Youtube}}} }} }} [15:36:06] looks sane [15:36:54] It works. But for 1 thing :p [15:36:59]

h9lO-TO7L7s [15:36:59]

[15:37:21] it echo's also the code before the widget. [15:44:20] it does so because you've instructed it to [15:45:13] if you want to annotate silently, use [[Is with youtube::{{{Youtube}}}|]] (note the pipe) or use {{#set: Is with youtube={{{Youtube}}} }} [15:50:29] {{#if: {{{Youtube|}}} | {{#set:[[Is with youtube::{{{Youtube}}}]] }} {{#widget:YouTube|id={{{Youtube}}} }} }} [15:50:33] its working :D [15:51:30] * Rinkel doet een dansje met Saruman [15:51:53] Quickstep! [15:52:29] So the content of the Is with youtube property, it's the string h9lO-TO7L7s only? [15:54:48] Yes. that string is the youtube code. The widget is doing the rest. [15:55:16] then set on page Property:Is with youtube the property type [[has type::string]] [15:55:33] The users do understand {{#widget:YouTube|id=dQw4w9WgXcQ}} [15:56:26] The property was the first time i made. I follow a checklist. But normally i show the information directly in a table. But now there was this extra obstacle with the if. [15:56:33] do = dont [15:57:07] So i decided to make it more easy that the users can copy paste the youtube code in a form. [15:57:36] Oyeah. The question you help me with Saruman a couple months ago [15:57:37] http://brightwork.webfactional.com/wateralliance/Main_Page [15:57:47] I have the semantic stuff in the sidebar. [15:58:09] great [15:58:29] so what was the problem? [15:59:03] Not really a problem . More a *beperking* [15:59:18] ok, what was the limitation? [15:59:36] Sidebar has it own code. [15:59:53] function ShowWikiPage($input) { [15:59:53] global $wgUser, $wgTitle, $wgParser; [15:59:53] if ( is_object( $wgParser ) ) $psr =& $wgParser; else $psr = new Parser; [15:59:54] $opt = ParserOptions::newFromUser( $wgUser ); [15:59:56] $nav = new Article( Title::newFromText( $input, NS_MEDIAWIKI ) ); [15:59:58] $out = $psr->parse( $nav->fetchContent( 0, false, false ), $wgTitle, $opt, true, true ); [16:00:00] echo $out->getText() ; [16:00:03] return; [16:00:04] } [16:00:08] So its now done with a hook. [16:00:18] ah... [16:00:25] * Saruman is out of his depth there [16:00:37] I only do wizardry, not PHP [16:01:26] The code is showing a wiki page on a certaint point [16:01:43] In mediawiki you have hooks. [16:02:12] the hook is calling code on a centain point. Like after a edit field etc etc [16:03:21] But my carpooler is pushing his horn. [16:03:39] * Rinkel is waving goodbye [18:14:39] howdy [18:15:46] I have this on a page: {{#ifeq:{{#var:flavor|free}}{{#var:hascore3release|no}}{{#var:hascore4release|no}}|freeyesno|bingo|bongo}} [18:16:02] even on pages where the output is clearly "freeyesno", it is saying "bongo" all the time. [18:16:36] I even surrounded output by x's, no whitespace or other weirdness, but I can't get "freeyesno" appearing to match my ifeq. [18:16:39] always says bongo [18:19:43] drobbins: as a debug output, try M{{#var:flavor|free}}{{#var:hascore3release|no}}{{#var:hascore4release|no}}M above the #ifeq statement [18:19:53] the M's are to show the beginning and end of the debug string [18:20:41] oh wait: what do you mean with {{#var:flavor|free}} [18:20:46] what does the |free do [18:21:01] #var: is not the same as a field name [18:21:44] you can't expect {{#var:flavor|free}} to produce "free" if #var:flavor is empty [18:22:21] Saruman: ah [18:22:29] * drobbins looks [18:22:53] actually, that is supported [18:23:17] surrounded by x's, no whitespace. [18:23:38] trying to figure it out, let's see [18:35:25] drobbins: you're right, |defaultvalue works - funny, you learn something every day [18:36:38] Saruman: not sure why it was failing, but by removing the hascore3release var, I got it to work. [18:36:44] Saruman: so problem "solved" [18:41:48] drobbins: how about, outside the #ifeq, do {{#vardefine:bingocheck|{{#var:flavor|free}}{{#var:hascore3release|no}}{{#var:hascore4release|no}}}} [18:42:18] and then {{#ifeq:{{#var:bingocheck|freeyesno}}|freeyesno|bingo|bongo}} [18:42:36] oh, don't even need the first freeyesno there [18:43:18] so {{#ifeq:{{#var:bingocheck}}|freeyesno|bingo|bongo}} [18:45:05] Saruman: that may help [19:34:15] New patchset: Kghbln; "Translation update by SMW community" [mediawiki/extensions/SemanticMediaWiki] (master) - https://gerrit.wikimedia.org/r/35200 [19:40:17] Change merged: Jeroen De Dauw; [mediawiki/extensions/SemanticMediaWiki] (master) - https://gerrit.wikimedia.org/r/35200 [19:51:33] New patchset: Kghbln; "Amended two system messages" [mediawiki/extensions/SemanticWatchlist] (master) - https://gerrit.wikimedia.org/r/35202 [20:07:54] JeroenDeDauw You seem to have you eyes everythere. ;) Thank you! [20:08:36] kghbln: not sure what you're talking about, but ok :) [20:09:44] JeroenDeDauw I was talking about my latest tiny changes to semantic extensions :) [20:19:00] kghbln: u got mail [20:21:26] Saruman Great. Will move it in for you now:) [20:21:31] :-) [20:37:38] New patchset: Kghbln; "Translation update by SMW community" [mediawiki/extensions/SemanticMediaWiki] (master) - https://gerrit.wikimedia.org/r/35272 [20:52:14] Change merged: Jeroen De Dauw; [mediawiki/extensions/SemanticMediaWiki] (master) - https://gerrit.wikimedia.org/r/35272 [20:53:15] JeroenDeDauw :) [20:53:37] As a matter of fact: I could have poked you.