Extension talk:Semantic Result Formats/calendar format

Hi! Is it somehow possible to have a calendar entry for more than one day? Right now it seems that one wiki page can have only one date that is displayed in the calendar. If the property date is used several times (each with different dates) on that page, only the last entry is used for the calendar. So can I somehow either give the page several date entries or a "from...to", so that it is displayed for several days in the calendar? I also tried using two properties, start date and end date, and querying for both, but then again the calendar uses only the last date it finds on the page. - FR


 * That sounds like a bug; you should be able to specify more than one day. To use more than one property, though, you have to use this format within Semantic Compound Queries. Yaron Koren 14:00, 24 September 2009 (UTC)


 * Thanks for the fast reply. I have to admit that I am currently still using the old semantic calendar extension. However I could not find any information that the behavior changed (in contrast to the semantic google maps, where the changelog points out that just in the newer versions a page can have more than one set of coordinates). Will try with the current version of semantic results format and the compound queries... - FR 80.152.199.128 15:24, 24 September 2009 (UTC)

At least in my wiki the calendar produces a bug. My wiki has an URL like

https://wiki.mypage.com/index.php

Now when I open the calendar, it might link to an entry like

https://wiki.mypage.com/index.php/Appointment_2010

So far everything is fine. But once I change the month (or just go forward an backwards, having the same month on the screen as before) the calendar suddenly links to

https://wiki.mypage.com/Appointment_2010

This is invalid, as the index.php is missing in the URL. The reason is that relative paths are used, and while the calendar has the URL

https://wiki.mypage.com/index.php/Calendar when I open it, once I change the month it becomes

https://wiki.mypage.com/index.php?title=Calender&month=11&year=2009

So this is where it has problems with the relative paths, because now the index.php is not part of the local URL anymore. Do you agree that this should be fixed? And can you probably provide some quick code that needs to be changed to make it work again? --80.152.199.128 16:24, 29 October 2009 (UTC)Thanks,


 * Is it possible that you have $wgArticlePath set incorrectly in your LocalSettings.php file? It should be "/index.php/$1". Yaron Koren 19:38, 29 October 2009 (UTC)


 * Thanks. So far I did not have an $wgArticlePath in my LocalSettings.php at all, it was never specified automatically. However, also when I put it in, the problem stays the same. I now have this:

$wgScriptPath      = ""; $wgScriptExtension = ".php";

$wgArticlePath = "/index.php/$1"; Any more ideas? --80.152.199.128 20:05, 29 October 2009 (UTC)


 * No idea; that should work. Do regular wiki-links work on a page, when you have the page's URL set to the form "/index.php?title=Page_name"? Yaron Koren 23:06, 29 October 2009 (UTC)


 * Yes, manually changing the URL from "/index.php/Testpage" to "index.php?title=Testpage" leaves the links working. Problem only exists on calendar when I jump to a different calendar page.--78.34.102.66 11:04, 2 November 2009 (UTC)
 * What versions of MediaWiki, SMW and SRF are you using? Yaron Koren 15:32, 2 November 2009 (UTC)
 * MediaWiki 1.15, SMW 1.4.1 and SRF 1.4.5, pretty up to date I think. --78.34.102.66 15:45, 2 November 2009 (UTC)
 * Okay, found out something more: There is no problem with the calendar when selecting different months with the drop-down box on the right side, then the URL keeps the right format "/index.php/Kalender?title=Kalender&month=7&year=2009". Just when going to next or previous month with the two arrows right and left of the "Today" link, the URL switches to "/index.php?title=Kalender&month=11&year=2009". Here is a screenshot of what I mean: http://www.abload.de/img/calendarr9rp.png. Wondering that no one else has experienced this issue before, there seems to be a problem with those two buttons. --87.79.175.64 18:03, 2 November 2009 (UTC)


 * Wait, those arrows point to URLs that contain "index.php"? The problem before was that they didn't include "index.php", right? Yaron Koren 18:49, 2 November 2009 (UTC)
 * With the arrows you reach an URL where the index.php is followed by a question mark, as stated above. And once the calendar URL is like this, all links within the calendar are missing the index.php. If I edit the URL manually, putting the "/" after the index.php and reloading the page, also the links in the calendar have the index.php included again.--87.79.176.218 07:51, 3 November 2009 (UTC)


 * My guess is that this is somehow a problem with your wiki's URL rewriting, but I don't know more than that. Yaron Koren 18:10, 4 November 2009 (UTC)

I find the text a bit unclear, at least it isn't clear to me how I should be able to get this to work. I am able to get a calendar, but don't get any events on there.

Could someone add a step-by-step guide? Questions I have are: - Do I need to add anything more than the property date, within or outside a template? I now did (left out the {}):

update
 * date=February 22, 2010

- Do I need to define date as date? So edit date to state "has type::date"? - Do I need to define a page explicitly as event, or does that happen automatically due to it having a date? - Or, should I just define a different kind of category and use that one? - Do I need to define #calendarstartdate and #calendarenddate?

Sorry if I have missed something in the semantic mediawiki guide, please give me specific pointers to what, if anything, I clearly missed or misunderstood.

Thanks a lot in advance,

Frank