From: Samuel L. <sam...@gm...> - 2014-03-25 23:24:34
|
Hi Yaron and others, I finally found the solution now to this old problem of mine! It turns "Tag extensions" [1] don't work together with "parsy" stuff like templates and semantic facts, and that one should create a "Parser function extension" [2] instead! :-o So, after I did this, in the following commit, it works!: https://github.com/samuell/GeneIdConvert/commit/b681cab79993648a06e940dca4961d688727a809 [1] http://www.mediawiki.org/wiki/Manual:Tag_extensions [2] http://www.mediawiki.org/wiki/Manual:Parser_functions Cheers // Samuel On 2013-11-28 21:09, Yaron Koren wrote: > Hi Samuel, > > Are you sure that that parser function only outputs a string? I would > try calling it with text around it, like "A{{#your tag here}}B" or > something, then looking at the resulting HTML source, to see if > perhaps there are newlines, <p> tags or the like being placed as well. > If there are, this may help (though I don't know if it can work for > the combination of tag functions + #tag): > > http://jimbojw.com/wiki/index.php?title=Raw_HTML_Output_from_a_MediaWiki_Parser_Function > > -Yaron > > > On Thu, Nov 28, 2013 at 2:31 PM, Samuel Lampa <sam...@gm... > <mailto:sam...@gm...>> wrote: > > Hi, > > I got problems with a value that SMW tells "is not properly > understood", > or more exactly: "The given value was not understood", in a balloon. > > It looks like this: > https://lh5.googleusercontent.com/-x-Q9tEGMPaM/UpeWH9UyyjI/AAAAAAAACyc/HD07aURLOGs/w853-h601-no/HNSCC_problem.png > > As can be seen in the screenshot, the value is properly shown when > used > in normal wiki text (and echo:ed from PHP), but just fails to be > recognized as an SMW fact. > > > The code that sets this fact, is: > > [[Entrez ID::{{#tag:geneidconv|{{PAGENAMEE}}|to=EntrezGene}}]] > > I have tried also with: > > {{#set={{#tag:geneidconv|{{PAGENAMEE}}|to=EntrezGene}}}} > > ... with the same result. > > The code for the geneidconv parser tag, is on line 52 at: > https://github.com/samuell/GeneIdConvert/blob/master/GeneIdConvert.php#L52 > > ... that is, it just returns a normal string, which in this case > happens > to be a number. > > I have tried adding a (string) cast to the return statement of > wfGeneIdConvRender() too, to no avail. > > The "Property:Entrez ID" page, just contains: > > This is a property of type [[Has type::String]]. > > > I can't really come any further. Any hints? > > Cheers > // Samuel > > -- > Developer at www.uppmax.uu.se/uppnex > <http://www.uppmax.uu.se/uppnex> / www.farmbio.uu.se > <http://www.farmbio.uu.se> / rilpartner.se <http://rilpartner.se> > G: http://google.com/+samuellampa > B: http://saml.rilspace.org > T: http://twitter.com/smllmp > > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. > Most IT > organizations don't have a clear picture of how application > performance > affects their revenue. With AppDynamics, you get 100% visibility > into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of > AppDynamics Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > <mailto:Sem...@li...> > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > > > > > -- > WikiWorks · MediaWiki Consulting · http://wikiworks.com -- Developer at www.uppmax.uu.se/uppnex / www.farmbio.uu.se / rilpartner.se G: http://google.com/+samuellampa B: http://saml.rilspace.org T: http://twitter.com/smllmp |