Loading...
 
Features / Usability

Features / Usability


Calendar questions

posts: 8

Hello!

I'm looking to set-up a group calendar for events, similar to:
http://www.keycontent.org/tiki-calendar.php?viewmode=month

Can I change the calendar so the weeks start with Monday and not Sunday?

How can I call up the month only, as in the example above? I mean display "January 2006" rather than the long_date or short_date I see in the tpl.


And in any case... I see the JS Calendar has internationalization. Am I better off using that, you think?


Sorry if any questions seem obvious. I did check the forums and the docs but didn't get a very clear idea. I guess it'd help if I actually knew PHP adn was more familiar with the lingo :-(

Thanks!!

Marianne
sca.historiaviva.org

posts: 1092


> Can I change the calendar so the weeks start with Monday and not Sunday?
Currently this choice is based on the language.
So if you use the language es, you need to have in the file
lang/es/language.php
"First day of week: Sunday (its ID is 0) - translators you need to localize this string!" => "Primer día de la semana: Lunes (su ID es 1) - traductores necesitan localizar esta cadena!",


> And in any case... I see the JS Calendar has internationalization. Am I better off using that, you think?
JScalendar internalization has not be been done for each language. Look at lib/jscalendar/lang/calendar-fr-utf8.js for an example. You have to create an utf8 file from the lib/jscalendar/lang/calendar-xx-utf8.js, update the file tiki-jscalendar.php
I just done it for the Spanish
http://cvs.sourceforge.net/viewcvs.py/tikiwiki/tiki/tiki-jscalendar.php
http://cvs.sourceforge.net/viewcvs.py/tikiwiki/_jscalendar/lang/calendar-es-utf8.js

sylvie


posts: 3665 United States

Glad you liked my calendar. biggrin

To display the month and year only, here's the code from my tiki-calendar.tpl:

Image
Copy to clipboard
{if $viewmode eq "month"} <a href="tiki-calendar.php?mon={$mBefore}&day=1&year={$viewyear}" title="« {tr}Prior month{/tr}"><img src="kc/buttons/previous.gif" width="20" height="20" alt="{tr}Prior month{/tr}" border="0" align="middle" /></a>  {$daystart|user_date_format:"%B %Y"}  <a href="tiki-calendar.php?mon={$mAfter}&day=1&year={$viewyear}" title="{tr}Next month{/tr}»"><img src="kc/buttons/next.gif" width="20" height="20" alt="{tr}Next month{/tr}" border="0" align="middle" /></a> {/if}

> Hello!
>
> I'm looking to set-up a group calendar for events, similar to:
> http://www.keycontent.org/tiki-calendar.php?viewmode=month
>
> Can I change the calendar so the weeks start with Monday and not Sunday?
>
> How can I call up the month only, as in the example above? I mean display "January 2006" rather than the long_date or short_date I see in the tpl.
>
>
> And in any case... I see the JS Calendar has internationalization. Am I better off using that, you think?
>
>
> Sorry if any questions seem obvious. I did check the forums and the docs but didn't get a very clear idea. I guess it'd help if I actually knew PHP adn was more familiar with the lingo :-(
>
> Thanks!!
>
> Marianne
> sca.historiaviva.org

posts: 8

Many thanks for the code!! to both of you!!

Alas, I'm not having much luck. When I include that code in the tpl it loads a blank page. Could it be because I'm running Tiki v1.8.5?


And... is it really enough to add that line to change the first day of the week from Sunday to Monday? I've paasted it in, but nothing happened. Could it be a version issue?

I'll keep trying to think of something. Any hints very welcome!!


Thanks!


Marianne

posts: 3665 United States

> Many thanks for the code!! to both of you!!
>
> Alas, I'm not having much luck. When I include that code in the tpl it loads a blank page. Could it be because I'm running Tiki v1.8.5?
>

Make sure your TPL file is formatted correctly. Exactly where did you insert the code?

-Rick

posts: 1092


> Alas, I'm not having much luck. When I include that code in the tpl it loads a blank page. Could it be because I'm running Tiki v1.8.5?
Monday/sunday is an 1.9 feature


Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting