Help talk:Eventcalendar format

From semantic-mediawiki.org
Jump to: navigation, search

Contents

Thread titleRepliesLast modified
Parameter values117:46, 27 October 2016
Does the jQuery eventcalendar plugin come already installed on Semantic Mediawiki/Mediawiki or do we have to install it separately?216:03, 17 March 2016
Size409:14, 24 December 2014
"No Results" Yellow errorbar217:13, 23 December 2014
Template Option for Event Calendar?400:58, 3 April 2014
How can I Change the default Color?111:17, 26 March 2014
EventCalendar Requirements023:04, 19 November 2013
Can icons be scaled?016:44, 12 September 2013
Template parameter003:49, 2 April 2013
Time displays only when there is an "end date/time"223:21, 26 November 2012
Description113:32, 5 November 2012
Internationalization520:24, 5 October 2012

Parameter values

I'd like to see possible values for parameters within the table. It took me a while to figure out how to hide headers, is it "none", is it "hide"? (It's the latter.) Maybe that's more difficult for non-natives or non-devs, but possible parameter values should be exclusive, hence easy to name. I would have expanded the table myself (and included the format specific values within the table in a certain column), but #smdoc is new to me, couldn't find where to edit the table. :( While I'm at it, I'm also missing a simple complete usage example (embed code).

Zabien (talk)15:21, 27 October 2016

#smwdoc cannot handle this right now. I only shows the default values. I think there is a feature request for this somewhere.

[[kgh]] (talk)17:46, 27 October 2016
 

Does the jQuery eventcalendar plugin come already installed on Semantic Mediawiki/Mediawiki or do we have to install it separately?

The first sentence of the Help page is unclear:

  • The result format eventcalendar the jquery.fullcalendar plugin to generate an event calendar with different views ('month', 'basicweek', 'basicday', 'agendaweek', 'agendaday' ) to choose from.

Just as the subject line says, does the jQuery eventcalendar plugin come already installed on Semantic Mediawiki/Mediawiki or do we have to install it separately?

Md06 (talk)20:23, 11 March 2016

I just amended the sentence a bit. No, the jQuery eventcalendar plugin is shipped bundled with the software. What you need to install though is the Semantic Result Formats extension, since this result format is not part of Semantic MediaWiki core.

[[kgh]] (talk)21:48, 11 March 2016

Thanks for the reply!

Md06 (talk)16:03, 17 March 2016
 
 

Is there a way to make this calender less huge?

Jeroen De Dauw (talk)03:57, 2 April 2013

I succeeded in making this calendar less high by putting this in my MediaWiki:Common.css :

/* Event calendar help class */ 
.smw-eventcalendar {
  width:100%;
  height:200px;
}

then I added this to the ask request :

{{#ask:
...
|class=smw-eventcalendar
...
}}

(this is "hinted" in the Help page)

Pierro78 (talk)23:01, 27 July 2013

That did not work for me. The calendar stays the same size, though the content below thinks its only 200px and thus ends up on top of the calendar.

Jeroen De Dauw (talk)05:01, 6 August 2013

right, I was with smw 1.8 and it was working (as long as the content of the calendar was not too high)

now with smw 2.0 I ve got the same issue that you have : the calendar stays the same height, though the content below thinks its only 200px and thus ends up on top of the calendar.

Pierro78 (talk)23:34, 8 October 2014
 
 
 

"No Results" Yellow errorbar

I've been trying to get a calendar up and running on http://testwiki.gotannetworks.com/wiki2/ But for the life of me I can't get it to work. It keeps giving me the 'No Results' error. I followed (I think) the instructions and examples pretty well.

It's probably something stupid and minor, yet I can't find it =\

Could anybody help me? login = Tempuser password = powerrangers

Gotanius (talk)10:06, 23 December 2014

One important factor is to have appropriate datatypes declared for each property otherwise functionality is limited or not guaranteed (see [0]). Please carefully examine what has been done on this wiki and compare it to your wiki environment.

[0] http://testwiki.gotannetworks.com/wiki2/index.php?title=Property:Has_event_start

MWJames (talk)12:30, 23 December 2014

Thank you very much, I already thought it was something I did wrong or forgot :). I think I've got the hang of it. However, when I look at the Demo eventcalendar and I hover over an event it only shows the description in the mouse-over. I can't seem to get this same information correctly displayed in mine.

When I create Property:Has_event with datatype text (or string) the event completely disappears from the calendar.

Any thoughts?

Gotanius (talk)16:58, 23 December 2014
 
 

Template Option for Event Calendar?

I have an 'Event:' namespace and would like to strip the prefix before displaying the article links on the calendar. I see format=Calendar can do this by specifying a template. Is there a way to accomplish the same with Eventcalendar? (or in the query itself?)

I've just started mucking about with the calendar formats. Seriously amazing stuff. Blew my mind. - Lbillett (talk) 17:32, 9 March 2014 (CET)

Lbillett (talk)17:32, 9 March 2014

Sorry, rookie mistake. Looks like I can do this by specifying |?Title=title (all my Event: namespace pages have a Title property). While this very much gives the desired output, I'd still like to modify the display color depending on the condition of another property (Property:Complete). This can be done with the calendar format and a template, but not sure if it's possible here. Maybe with a compound query, but that's probably a ways off.

Lbillett (talk)17:14, 13 March 2014

Well, I'm posting in the wrong place (I should be at the extension talk page, not the help page).

Now that I think I understand the docs, just about everything I wanted to do is totally possible. Setting the color can be accomplished by setting the event article with a text type property that contains a color, and specifying that with |?Pages color property=color in the call. Pretty cool. It's not perfect because the color is also dependent on the current date (which is why a template option would help). I'll have to find a way to refresh a certain set of pages via routine with SMW_refreshdata.

Weird that there's talk about the eventcalendar format using subobjects... I don't seem to see how they're needed in the semanticInternalObjects sense.

Lbillett (talk)23:54, 15 March 2014

> I don't seem to see how they're needed in the semanticInternalObjects sense.

Not sure what you mean by the above statement but using a subobject allows for each event the be represented as an individual entity within the same page source which enables to separate source from data.

SemanticInternalObjects has nothing to do with the EventCalendar.

> Template Option for Event Calendar?

It is not supported but of course if you want to add such feature the community would welcome such effort.

MWJames (talk)11:25, 26 March 2014

Ahhhh. I get it. I didn't realize the difference between using #subobject (now in the SMW core) and the internal objects extension. I thought they were totally different (well, I guess the used to be). Also didn't understand it was referring to multiple events set on the same page... I should have gotten that from the example.

Will see how good I get at this php business. I'm still awestruck with how you guys managed to work in the objects stuff without (from what I've seen) doing anything crazy to the content stored in articles, but having it all query just the same. Clever!

Lbillett (talk)00:58, 3 April 2014
 
 
 
 

How can I Change the default Color?

I want to set a different color for all events, when you create a Eventcalendar the default color is kind of blue, How can I change this color? I tried putting "| color=red" on the query but it doesn't work...

Juan Cristobal Viscarra (talk)04:20, 26 March 2014

A query doesn't change the composition of an entity (an event), properties describe an entity therefore you should use a property to describe the color. See [0] on how a template sets default colors depending on its context.

Please also have a look at the Demo:Event calendar page which demonstrates how a query uses printout statements to generate events with different colors.

For some technical details about the colors, see [1].

[0] http://semantic-mediawiki.org/w/index.php?title=Template:Event_calendar_item&action=edit

[1] http://arshaw.com/fullcalendar/docs/event_rendering/Colors/

MWJames (talk)11:17, 26 March 2014
 

EventCalendar Requirements

I am running the current version of Mediawiki along with SMW and the SMW Bundle on IIS7.

Do I need anything additional to make this extension work?

When I create a form and link it to a button, when the button is clicked, I get taken to the front page.

Are there any step by step instructions for building a calendar?

Thanks,

Wade

Wade.courtney (talk)23:04, 19 November 2013

Can icons be scaled?

I would expect sth like:

... | ?has file=icon#12px ...

or

... | has file=icon | iconsize=12px ...

or can I pass the size from the queried page somehow...

or is the only way to upload the icon that size i want eventcalender to use...

Carchaias (talk)16:44, 12 September 2013

Template parameter

Request from SMWCon Spring 2013: add template parameter support

Jeroen De Dauw (talk)03:49, 2 April 2013

Time displays only when there is an "end date/time"

The "Start date/time" column/statement is mandatory while the "End date/time" is optional. Still the date/time is displayed only whene both a "Start date/time" and an "End date/time" is given. When only the "Start date/time" is given there is no date/time displayed. Example: http://www.wikiteater.se/index.php/F%C3%B6rest%C3%A4llningar

Is this the correct behaviour?

Martinwiss (talk)10:15, 3 November 2012

The current implemented logic follows [1] and [2]

[1] https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/SemanticResultFormats.git;a=blob;f=formats/calendar/SRF_EventCalendar.php#l136

[2] http://arshaw.com/fullcalendar/docs/event_data/Event_Object/

MWJames (talk)13:41, 5 November 2012

SRF_EventCalendar.php is perfectly correct. This is an issue with fullcalendar.

The reason for this behavior was because of fullcalendar.min.js (line 4652 in fullcalendar.js):

    if (!event.allDay && seg.isStart) {
        html += ...

This is the js-code for displaying the time in month view. Events without end-time are set to allDay-events. This code only shows the time if it is not an event.allDay. To show the time if there is a start date we can change this to:

    if (event.start && seg.isStart) {
        html += ...

Best regards Martin

Martinwiss (talk)23:18, 26 November 2012
 
 

Description

Could it be possible to make a custom "description tooltip" to show information from multiple printout statements, as well as pictures (for instance using a template)?

Martinwiss (talk)09:20, 3 November 2012

Doing something like ...|?Description 1|?Description 2| ... will result in a compound concatenated string that is displayed for each event. Make sure you are using the latest git repo because I saw http://www.wikiteater.se/ still uses the old tooltip. The new tooltip is capable of displaying images but the event calendar tooltip does not make use this capability but you are free to implement such feature. For an example on what needs to be done see [1] to add the appropriate image content to the tooltip ... content:

tooltip.show( {
	context: element,
	content: event.description.substring( 0 ... ,
	title: mw.msg( 'smw-ui-tooltip-title-event' ),
	button: false
} );

[1] http://craigsworks.com/projects/qtip/demos/content/images

MWJames (talk)13:32, 5 November 2012
 

Internationalization

Thanks for a beautiful calendar. How do we get this extension into other languages, are there locales, or is it possible to translate? Any advice would be appreciated.

Martinwiss (talk)18:29, 28 September 2012

Thanks and well I'd love to see other people getting involved.

As for the internationalization this is rather a fullcalendar.js issues than a SRF printer issue because the resource definition can get access to translations that are transferred from MW (see [1]). Maybe [2],[3] can shed some light on what needs to be done in order to get a more internationalized calendar version.

Something like below should be feasible (I haven't checked nor tested it)

buttonText: {
            today: mw.msg( 'srf-eventcalendar-button-today' ),
        },

Hope this helps ...

[1] https://www.mediawiki.org/wiki/Localisation#Using_messages_in_JavaScript

[2] http://code.google.com/p/fullcalendar/issues/detail?id=47

[3] http://stackoverflow.com/questions/8106646/jquery-fullcalendar-full-translation

MWJames (talk)23:08, 28 September 2012

We need to create and maintain message-identifiers in fullcalendar.js. We need to create an i18n.php-file containting those messages. We need to make them work together using the ResourceLoader.

I know php and js but not how to practically contribute code and i18n-text to the project. You can contact me by e-mail if you want.

Martin

Martinwiss (talk)16:05, 4 October 2012

You don't have to create an extra file, you only have to register all message keys with SRF_Messages.php and publish those keys with SRF_Resources.php as well (see example 'messages' => array( ...)) to ensure the resource file is able to access those messages. (If you register message keys with SRF_Resources.php than the ResourceLoader integration will taken care of.)

The only thing that is left is to adjust the ext.srf.eventcalendar.js file with those message keys (using mw.msg( 'srf-eventcalendar-label-...' )) so the fullcalendar object can access those translated messages. (see links above for proposed methods on how this can be achieved in a fullcalendar instance ).

If you need advise on how to add translations to SMW/SRF messages files (SRF_Messages.php), you can contact Kghbln on this matter.

Please be remind that all what is provided here is community work and since my timetable will not allow me to drill into this further, I hope the above description is enough to give you a heads up otherwise you might consult [1], [2] as well.

[1] http://www.mediawiki.org/wiki/ResourceLoader/Features

[2] https://www.mediawiki.org/wiki/Localisation#Using_messages_in_JavaScript

MWJames (talk)16:43, 4 October 2012

Well, since I figured that might take a bit for you to get it work. I added i18n support with [1]. Which means as soon as the keys are available in translatewiki, you can start to translate

	'srf-ui-eventcalendar-label-today' => 'Today',
	'srf-ui-eventcalendar-label-month' => 'Month',
	'srf-ui-eventcalendar-label-week' => 'Week',
	'srf-ui-eventcalendar-label-day' => 'Day',
	'srf-ui-eventcalendar-label-allday' => 'All day',
	'srf-ui-eventcalendar-format-time' => 'h(:mm)t',
	'srf-ui-eventcalendar-format-time-agenda' => 'H:mm( - H:mm)',
	'srf-ui-eventcalendar-format-axis' => 'H:mm',
	'srf-ui-eventcalendar-format-title-month' => 'MMMM yyyy',
	'srf-ui-eventcalendar-format-title-week' => 'd [ yyyy]{ \'—\'[ MMM] d MMM yyyy}',
	'srf-ui-eventcalendar-format-title-day' => 'dddd, d MMM, yyyy',
	'srf-ui-eventcalendar-format-column-month' => 'ddd',
	'srf-ui-eventcalendar-format-column-week' => 'ddd d/M',
	'srf-ui-eventcalendar-format-column-day' => 'dddd d/M',

Month, days are taken from MW's own message key's, so no need for any translation.

[1] https://gerrit.wikimedia.org/r/#/c/26735/

MWJames (talk)16:28, 5 October 2012

Perfect!

Thought it would be good to have the other texts translated as well so just did 100% of SMW and SRF (except for om SMW-message that does not show it's pop-up window).

Martinwiss (talk)20:24, 5 October 2012