Page 1 of 1

Calendar in menu column of site !!!_SOLVED_!!!

Posted: Tue Feb 27, 2007 3:26 pm
by jans
Hi I have installed calendar mod and now I like to see the calendar on the left (menu) directley under the news box.

Can someone help me with that ?

PS I am a dutch user so probably the day enumeration (monday, tuesday) must be altered to in Ma Di Wo

Thanks in advance

Re: Calendar in menu column of site

Posted: Tue Feb 27, 2007 5:23 pm
by Nullig
I added a small calendar under the news items by inserting the following into the template, immediately under the news module:

Code: Select all

<div style="padding: 10px;">
{cms_module module='Calendar' first_day_of_week='0' table_id='small'}
</div>
And the following into the calendar stylesheet:

Code: Select all

/** Start small calendar rules (assuming table_id='small') **/
/* border on for #small */

#small {
  margin: 0px;
  border-collapse: collapse;
  border: 1px solid black;
}

/* nice squares for the #small table */
#small th
{
  border: 1px solid black;
  background-color: #dddddd;
  padding: 1px;
  width: 20px;
  text-align: center;
}

#small td {
  border: 1px solid black;
  vertical-align: middle;
  text-align: right;
  padding: 1px;
  height: 20px;
  width: 20px;
}

/* format summaries nicely in #small */
#small ul
{
  margin: 0px;
  padding: 0px;
  padding-left: 0px;
}

#small li
{
  list-style-type: none;
  padding: 0px;
  margin: 0px;
}

/* background colours for #small */
#small td
{
  background-color: #eeeeee;
}

#small .calendar-month
{
  padding: 0 0 5px 0;
}

#small .calendar-day
{
  background-color: #eeeeee;
}

#small .calendar-today
{
  font-weight: normal;
  background-color: #FFC4E2;
}

/** End small calendar rules  **/
Then I edited the lang file to make the short day names 2 characters in length, instead of 3.

Hope that helps.

Nullig

Re: Calendar in menu column of site

Posted: Tue Feb 27, 2007 6:00 pm
by jans
Thanks this helps me a lot, one question though, which langusge file Do I need to change and is it possible to have a " long day" and "short day" version ? perhaps based on if you choose "big" or "small" for the calendar stylesheet ?

Re: Calendar in menu column of site

Posted: Tue Feb 27, 2007 6:10 pm
by heatherfeuer
Each module comes with it's own language file.  For Calendar, it would be home directory-->modules-->calendar-->lang.  Open up your language file and look for the days of the week.  I believe, if I recall correctly, that there is both a long and short version of the days of the week.

Re: Calendar in menu column of site

Posted: Tue Feb 27, 2007 6:19 pm
by jans
if so and there is a long day and a short day version, how do I get calendar to use the short notation ?

Re: Calendar in menu column of site

Posted: Tue Feb 27, 2007 6:42 pm
by jans
found something strange, I got o lng file in that place bu't...

I do have a page in the settings menu of calendar and if I choose Englisch I get day format in 3 digits if I select any other language its in 3 digits BUT if I select nl_NL I get full days in the display.

I guess I have to edit some file to correct that, I guess one of the translators made a small error there ?

Re: Calendar in menu column of site

Posted: Tue Feb 27, 2007 7:43 pm
by jans
indeed there arte some errors in the translated file, I corrected them to my needs and now all is okay.

Thanks for helping me out ;)