Extension talk:Semantic Result Formats/Archive 2012 to 2013

From mediawiki.org

Parser in #set[edit]

Dear friends!

I use SMW in my origami wiki.

In version SMW 1.5 and SemanticResultFormats 1.5 I can use Wiki syntax with parser in #set

  {{#set:model= {{#if:{{{step|}}}|({{{step|}}})|}} ''{{{name|}}}'' }}

property for model - text. See here property on russian (описание модели)

On page in gallery caption I get wiki text

After update to version SMW 1.7.1 and SemanticResultFormats 1.7.1 now property model is empty.

Can you help me, how I can use parser and wiki syntax in my property for caption.

Thanks

Timeline: Data range < 1900 doesn't appear[edit]

Hello,
I recently have installed the latest revision of Mediawiki (1.18.1) and created my own wiki. I also installed the lates version of SMW (1.7.0.2) and Semantic Result Formats (1.7.0) in order to create a timeline with historic data from the village where I live.
It all works perfectly well - except the fact that all dates prior to 1900 are not displayed in the timeline.
In the documentation of the SMW Extension it says that dates back to the beginning of time are supported. However, somewhere inside the Mediawiki forums I read a hint that Mediawiki might only support dates back to approx. 1900 and not further back.
Is this true and is there any workaround? I actually can't believe that there isn't one...
Furthermore, I've seen other Mediawiki timeline extensions like EasyTimeline that show up historic data back to stoneages, therefore it's hard to believe that the reason for this "bug" is Mediawiki.
Versions:
PHP: 5.2.12-nmm2 (apache2handler)
MySQL: 5.1.43-nmm4-log
Could anybody please give me a hint?
Many thanks!
--Sochin67 (talk) 21:53, 3 March 2012 (UTC)Reply

jqplotbar horizontal not working[edit]

I'm noticing that jqplotbar returns no bars (only background). I have confirmed with SRF 1.7 and SRF 1.8a (including on scratchpad).

Can you link to the example on Scratchpad? Yaron Koren (talk) 15:59, 27 April 2012 (UTC)Reply
Same problem here - no bars with jqplotbar after upgrading from SRF 1.6. Any idea, yet? I could give access if neccessary. Thanks a lot for support! Filburt
I figured out that the parameter bardirection=horizontal is not working anymore (I also tested it here with the same result: http://semantic-mediawiki.org/w/index.php?title=Help:Jqplotbar_format). Cheers, Filburt

Plain output of sum for calculations[edit]

Hi, is there a way to have a plain output from 'format=sum' so that the result can be used in 0? --AdSvS (talk) 10:00, 27 April 2012 (UTC)Reply

Calendar stopped working[edit]

After an upgrade (from SMW 1.6.x) to SMW 1.7.1 / SRF 1.7.1, I noticed that the calendar stopped working all of a sudden. It gives me the following error:

Warning: Invalid argument supplied for foreach() in ..../wiki/extensions/SemanticResultFormats/Calendar/SRF_Calendar.php on line 186

Any breaking changes lately? Syntax-wise, for instance? Cavila MW 1.17, MySQL 5.5.16, Php 5.3.8 18:15, 3 May 2012 (UTC)Reply

I'm aware of that problem, and I have code to fix it, which I plan to check in as soon as I figure out how to do that in Git. :) Yaron Koren (talk) 19:25, 3 May 2012 (UTC)Reply
Thanks for the speedy reply. The problem appears to have something to do with template support, or any rate a simpler calendar without the use of a template to format the query is still possible. Cavila MW 1.17, MySQL 5.5.16, Php 5.3.8 19:34, 3 May 2012 (UTC)Reply
Yeah, it only happens with templates. Yaron Koren (talk) 22:08, 3 May 2012 (UTC)Reply
Has the bug fix been added into the SRF 1.7.1 download? --Dgennaro 16:36, 8 May 2012 (UTC)Reply
No - unfortunately, the bug fix hasn't been added anywhere yet. Hopefully I'll be able to do it soon, one way or another. Yaron Koren (talk) 22:50, 8 May 2012 (UTC)Reply
I just wanted to follow up and see if this was ever fixed. Thanks. --Dgennaro 14:53, 23 July 2012 (UTC)Reply
Hi, sorry - yes, it was fixed. If you get the latest version from Git, everything should work fine. Yaron Koren (talk) 14:56, 23 July 2012 (UTC)Reply
Awesome! Thanks. Is there a way you can put up a download link like on the Semantic Drilldown page? --Dgennaro 15:01, 23 July 2012 (UTC)Reply

That's a good idea - I just added it to the page. Yaron Koren (talk) 17:58, 23 July 2012 (UTC)Reply

Thanks. You are the best. I can't do the Git from command here :( --Dgennaro 18:11, 23 July 2012 (UTC)Reply

Format: filtered - no collapse/uncollapse toggle appears[edit]

Hello,

I´ve created a filtered printer which works great. I´ve added the CSS tweaks and even tried one from the implementation listed on the format talk page but in none of the cases the toggle switch appears. I have stated collapsable just as described in the format page (copy/paste indeed) but the HTML code for the toggle is never generated. Is there anything else I should do?

Thanks for this great extension!

jQuery.jqplot is undefined[edit]

We are testing this extension on a Windows XP machine but it seems it does not want to work because I get the above fault in Firebug (Firefox 14.0.1). I have search the internet but there is not a specific description on this fault in combination with this extension. I tested this on a clean (empty) install following the documentation on http://semantic-mediawiki.org/wiki/Semantic_Result_Formats. The rest of the wiki works fine. I am not a programmer but I can find my way around in the code but it seems odd that it does not work.

Software and extensions[edit]

Software

  • Windows XP SP3
  • MediaWiki 1.19.1
  • PHP 5.3.8 (apache2handler)
  • MySQL 5.5.19

Extensions

  • Semantic MediaWiki 1.7.1 (alpha3)
  • Semantic Result Format 1.7.1
  • Validator 0.4.14

Pages and Query[edit]

I have made 6 pages going from Mach1 ... Mach6. All of them are in the category Machine and have the properties Type & Country. The Type and the Country differs for each page. Example:

[[Category:Machine]]
[[Type::1]]
[[Country::Germany]]

The property Type [[Has type::number]] and the property Country [[Has type::string]]. Then i try to generate the graph with:

{{#ask: [[Category:Machine]] [[Country::Germany]]
 |?Type
 |format=jqplotbar
 |height=200
 |width=400
}}

The page stays empty and the jQuery.jqplot is undefined pops up in Firebug (Firefox 14.0.1).

JQuery.jqplot is undefined
JQuery.jqplot is undefined

The data in the image does not represent the example data, it shows an earlier attempt with different data but with the same result. for some reason the debugger in Firebug stopped working so I could not make a new screen shot. I have spend some time now trying to figure out what is going on here but I am lost at the moment. What am I doing wrong here? --Felipe de Jong (talk) 11:47, 17 August 2012 (UTC)Reply

The version you are using will not work with MW 1.19, that's why with SMW 1.8/SRF 1.8 (planned release in Sep 2012) the jqplotbar/pie will retire and be replaced by jqplotchart. The re-factoring was part of an effort to support MW's ResourceLoader. I would advice to wait until to official release is available. --MWJames (talk) 00:17, 18 August 2012 (UTC)Reply
Thanks, does this mean that "all" jQuery functionality in version 1.7.1 of Semantic Result Format stopped working as of MW 1.17? --Felipe de Jong (talk) 06:21, 18 August 2012 (UTC)Reply
No, it is not a problem of jQuery. It is a problem of how jqplot was implemented because the use of inline JavaScript (such as seen in your screen shot) beyond MW 1.18/SMW 1.7.1 has been deprecated. --MWJames (talk) 07:30, 18 August 2012 (UTC)Reply

Google Rich Snippets[edit]

how can i add google rich snippets to the semantic calendar? here's my website: http://www.dentopolis.org/pl/Kalendarz_Dentysty i know i have to put city, date and title like this:

{{{date}}} {{{city}}} <a href="{{{date}}} - {{{name}}} - {{{city}}}" class="url summary" {{{name}}}</a>

probably in the file: SRF_Calendar.php around line 468.

	foreach ( $events as $event ) {
				list( $event_title, $other_text, $event_date, $color ) = $event;
				if ( $event_date == $date_str ) {
					if ( $this->mTemplate != '' ) {
						$templatetext = '{{' . $this->mTemplate . $other_text . '|thisdate=' . $date_str . '}}';
						$templatetext = $wgParser->replaceVariables( $templatetext );
						$templatetext = $wgParser->recursiveTagParse( $templatetext );
						$text .= $templatetext;
					} else {
						$event_str = $skin->makeLinkObj( $event_title );
						if ( $color != '' ) {
							$text .= "<p class=\"colored-entry\" style=\"border-left: 7px $color solid;\">$event_str $other_text</p>\n";
						} else {
							$text .= "$event_str $other_text\n\n";
						}
					}
				}
First, the calendar module you referring to on your website is the eventcalendar module which has nothing to do with the file your where hinting at (SRF_Calendar.php) but since I don't really know what the Google Rich Snippets is and what your trying to achieve I can't really comment on this. Further more, the eventcalendar has entirely changed its PHP implementation class (see SRF\EventCalendar changes mail as it now requires the SMW 1.9+ API to work with therefore any changes you make on behalf of the PHP implementation will be nullified in the upcoming SMW/SRF 1.9 release.
By the way, I think any inquires related to SRF should be posted here or here because this page is hardly been monitored.