Language: 
To browser these website, it's necessary to store cookies on your computer.
The cookies contain no personal information, they are required for program control.
  the storage of cookies while browsing this website, on Login and Register.
Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

Community



Donate

Donate for PortaMx !
Your donation is safe and helps support the issues and causes you care most about.

Stats

  • *Total Members: 4319
  • *Latest: thygrim

  • *Total Posts: 15779
  • *Total Topics: 2382
  • *Online Today: 4
  • *Most Online: 157
(27.08.09, 03:54:53)
  • *Users: 0
  • *Guests: 1
  • *Total: 1

Author Topic: Issue Calendar  (Read 1764 times)

0 Members and 0 Guests are viewing this topic.

Offline digiscrap

  • PortaMx Language
  • *
  • Posts: 198
  • Gender: Male
    • Digiscrap.nl
Issue Calendar
« on: 21.11.11, 13:16:15 »
Hello Fel,

How are you?

I have a small issue with the calendar.. please see the attachment. Don't know if you can reproduce it... It's about the date of December....

Thanks,

Vincent
Digiscrap.nl, digitaal scrappen

SMF2.0.2GOLD + PortaMx v1.45
Dutch translation PortaMx1.45

Offline feline

  • CO PortaMx corp.
  • Administrator
  • *
  • Posts: 5586
  • Gender: Female
Re: Issue Calendar
« Reply #1 on: 21.11.11, 14:06:02 »
Well .. this is a problem because the month names in dutch stored in lowercase letter.
To solve this, we must make a little bit bigger changes for ALL languages.

First step: In ALL PortaMx.language.php find
Code: [Select]
// Birthday, Holiday, Event date format chars: M = Month (Jan - Dec), m = Month (01 - 12), d = Day (01 - 31), j = Day (1 - 31)
$txt['pmx_minical_dateform'] = array(
'M d', // single date
'M d', // start-date same month
' - d', // end-date same month
'M d', // start-date not same month
' - M d' // end-date not same month
);

Replace with (or put a % before the letter):
Code: [Select]
// Birthday, Holiday, Event date format chars: %M = Month (Jan - Dec), %m = Month (01 - 12), %d = Day (01 - 31), %j = Day (1 - 31)
$txt['pmx_minical_dateform'] = array(
'%M %d', // single date
'%M %d', // start-date same month
' - %d', // end-date same month
'%M %d', // start-date not same month
' - %M %d' // end-date not same month
);


Second: find in /Sources/PortaMx/Class/mini_calendar.php
Code: [Select]
// Birthday, Holiday, Event date format
function caldateform($dat1, $dat2 = '')
{
global $txt;

list($d1['year'], $d1['month'], $d1['day']) = explode('-', $dat1);
if(empty($dat2))
return str_replace(array('M', 'm', 'd', 'j'), array($txt['months_short'][intval($d1['month'])], $d1['month'], $d1['day'], intval($d1['day'])), $txt['pmx_minical_dateform'][0]);
else
{
list($d2['year'], $d2['month'], $d2['day']) = explode('-', $dat2);
if($d1['month'] == $d2['month'])
{
$tmp = str_replace(array('M', 'm', 'd', 'j'), array($txt['months_short'][intval($d1['month'])], $d1['month'], $d1['day'], intval($d1['day'])), $txt['pmx_minical_dateform'][1]);
return $tmp . str_replace(array('M', 'm', 'd', 'j'), array($txt['months_short'][intval($d2['month'])], $d2['month'], $d2['day'], intval($d2['day'])), $txt['pmx_minical_dateform'][2]);
}
else
{
$tmp = str_replace(array('M', 'm', 'd', 'j'), array($txt['months_short'][intval($d1['month'])], $d1['month'], $d1['day'], intval($d1['day'])), $txt['pmx_minical_dateform'][3]);
return $tmp . str_replace(array('M', 'm', 'd', 'j'), array($txt['months_short'][intval($d2['month'])], $d2['month'], $d2['day'], intval($d2['day'])), $txt['pmx_minical_dateform'][4]);
}
}
}

Replace with:
Code: [Select]
// Birthday, Holiday, Event date format
function caldateform($dat1, $dat2 = '')
{
global $txt;

list($d1['year'], $d1['month'], $d1['day']) = explode('-', $dat1);
if(empty($dat2))
return str_replace(array('%M', '%m', '%d', '%j'), array($txt['months_short'][intval($d1['month'])], $d1['month'], $d1['day'], intval($d1['day'])), $txt['pmx_minical_dateform'][0]);
else
{
list($d2['year'], $d2['month'], $d2['day']) = explode('-', $dat2);
if($d1['month'] == $d2['month'])
{
$tmp = str_replace(array('%M', '%m', '%d', '%j'), array($txt['months_short'][intval($d1['month'])], $d1['month'], $d1['day'], intval($d1['day'])), $txt['pmx_minical_dateform'][1]);
return $tmp . str_replace(array('%M', '%m', '%d', '%j'), array($txt['months_short'][intval($d2['month'])], $d2['month'], $d2['day'], intval($d2['day'])), $txt['pmx_minical_dateform'][2]);
}
else
{
$tmp = str_replace(array('%M', '%m', '%d', '%j'), array($txt['months_short'][intval($d1['month'])], $d1['month'], $d1['day'], intval($d1['day'])), $txt['pmx_minical_dateform'][3]);
return $tmp . str_replace(array('%M', '%m', '%d', '%j'), array($txt['months_short'][intval($d2['month'])], $d2['month'], $d2['day'], intval($d2['day'])), $txt['pmx_minical_dateform'][4]);
}
}
}
Many are stubborn in relation to the path, a few in relation to the target.

Offline digiscrap

  • PortaMx Language
  • *
  • Posts: 198
  • Gender: Male
    • Digiscrap.nl
Re: Issue Calendar
« Reply #2 on: 21.11.11, 14:49:28 »
Did it! thanks again  :-*
Digiscrap.nl, digitaal scrappen

SMF2.0.2GOLD + PortaMx v1.45
Dutch translation PortaMx1.45

star15

  • Guest
Re: Issue Calendar
« Reply #3 on: 24.11.11, 14:15:25 »
Well .. this is a trouble because the 30 days brands in nederlander saved in lowercase page.
To remedy this, we must develop a little bit greater changes for ALL different languages.

Offline peronik

  • Newbie
  • *
  • Posts: 1
  • Gender: Male
Re: Issue Calendar
« Reply #4 on: 14.05.12, 08:25:49 »
Hi
This is my first post in the forum, so hello all.
I refresh post because the problem is similar.
I have a problem with the mini-calendar. For a short month name is appended day. How to remove?
A link to the page www.portal-szkoleniowy.com.pl

Offline feline

  • CO PortaMx corp.
  • Administrator
  • *
  • Posts: 5586
  • Gender: Female
Re: Issue Calendar
« Reply #5 on: 14.05.12, 18:26:07 »
You are Welcome  ;)
Your problem ... it's a small bug in the calendar and will be fixed in the next release ...
Many are stubborn in relation to the path, a few in relation to the target.