Page 1 of 1

mini_calendar days of the week

Posted: 6. August 2009 03:55
by jerkstore
Your Portal Version: 1.0.3
Your phpBB Type: Standard phpBB3
MODs installed: No
Your knowledge: Beginner

What have you done before the problem was there?


What have you already tryed to solve the problem?


Description and Message
The mini_calendar that comes with this portal has its days as "M T W Th F Sa Su". I'm an American so I want to know how to get the calendar to display "Su M T W Th F Sa" like a normal calendar. Thanks! :ugeek:

Re: mini_calendar days of the week

Posted: 6. August 2009 16:06
by NMI
The following worked for me (I did this after reading your request and it works!)

Of course, back up your files before making any edits.
Open: portal/includes/mini_cal/mini_cal_config.php
Find:

// First Day of the Week - 0=Sunday, 1=Monday...6=Saturday
// if you change this remember to change the short day names in lang_main_mini_cal.php
define('MINI_CAL_FDOW', 1);

In-Line Find: define('MINI_CAL_FDOW', 1);

Replace with: define('MINI_CAL_FDOW', 0)
;

Open: language/en/mods/lang_portal.php
Find:

//if you change the first day of the week in constants.php, you should change values for the short day names accordingly
// e.g. FDOW = Sunday -> $lang['mini_cal']['day'][1] = 'Su'; ... $lang['mini_cal']['day'][7] = 'Sa';
// FDOW = Monday -> $lang['mini_cal']['day'][1] = 'Mo'; ... $lang['mini_cal']['day'][7] = 'Su';
'mini_cal' => array(
'day' => array(
'1' => 'Mo',
'2' => 'Tu',
'3' => 'We',
'4' => 'Th',
'5' => 'Fr',
'6' => 'Sa',
'7' => 'Su',
In-Line find:
'1' => 'Mo',
'2' => 'Tu',
'3' => 'We',
'4' => 'Th',
'5' => 'Fr',
'6' => 'Sa',
'7' => 'Su',
Replace with:
'2' => 'Mo',
'3' => 'Tu',
'4' => 'We',
'5' => 'Th',
'6' => 'Fr',
'7' => 'Sa',
'1' => 'Su',
Save all changes. Purge your cache.
Final Result:
Image