collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 179
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

NEED HELP? If you're looking for support with Simple Portal, look no further than the Support Board!

Author Topic: Calendar Information Block displays wrong dates  (Read 4284 times)

0 Members and 1 Guest are viewing this topic.

Offline velorooms

  • Jr. Member
  • **
  • Posts: 83
    • Velorooms
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Calendar Information Block displays wrong dates
« on: February 18, 2012, 10:18:32 AM »
Hi guys.

Hoping someone can help. Having problems on our forum with the calendar dates appearing wrong.

On multi day events, the calendar information block is showing the MIDDLE date of the event as opposed to the first date.

Our forum is here
http://velorooms.com/index.php

as you will see we are a cycling forum so stage races cover anything from 2 days to 21 days, so obviously having the middle date appear as the date isnt very productive.

I have had a good search of the forum but cant seem to find an answer.

many thanks.
Dave
admin of velorooms
Admin and Owner of Velorooms.com - Using SMF 2.0.3 and Simpleportal 2.3.5

Offline velorooms

  • Jr. Member
  • **
  • Posts: 83
    • Velorooms
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Calendar Information Block displays wrong dates
« Reply #1 on: February 19, 2012, 02:56:41 PM »
in the short term we have had to disable it and use an alternative calendar option.
Admin and Owner of Velorooms.com - Using SMF 2.0.3 and Simpleportal 2.3.5

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Calendar Information Block displays wrong dates
« Reply #2 on: February 22, 2012, 09:24:57 AM »
Firstly welcome and apologizes for the extreme delay on approving your topic.

I have tried a few combinations on Calendar Information block with events spanning multiple days but couldn't reproduce this behavior. Can you provide a more concrete example giving step-by-step instructions to re-create the issue?
And slowly, you come to realize... It's all as it should be...

Offline tomeh

  • Full Member
  • ***
  • Posts: 113
    • infomiasto.eu
  • SMF Version: 2.0.10
  • SP Version: 2.3.6
Re: Calendar Information Block displays wrong dates
« Reply #3 on: February 22, 2012, 05:31:34 PM »
usaw range of more days - for example, 100 to the front, maybe this will help. This must be completed in calendar settings in the forum - how to show to the front. Max is probably 60 days.
Serwis infomiasto.eu - poradniki i przewodniki tematyczne

Offline velorooms

  • Jr. Member
  • **
  • Posts: 83
    • Velorooms
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Calendar Information Block displays wrong dates
« Reply #4 on: February 26, 2012, 06:40:44 PM »
Hi guys

have tried a number of things, and for certain calendar entries its going to the middle day.

I think it may be compounded by the sheer number of calendar events we have, it may be that smf simply doesnt like that many events.

for instance this is feb> http://velorooms.com/calendar/

For this reason extending the number of days on view isnt an option as it would very quickly be an extremely long list.

For the time being we have gone with a modified calendar suggested by someone on this forum that weve made a couple of changes to and embedded within a portal panel.

at the moment, if you go to our page http://velorooms.com/index.php and look to the very bottom of the page ive enabled the calender information block for a couple of days.
If you look at Paris Nice for example. its down on the calendar as 7th when the event actually starts on the 4th, 3 days of west flanders says the 3rd when it runs 2nd to the 4th. All have the midle date.
Admin and Owner of Velorooms.com - Using SMF 2.0.3 and Simpleportal 2.3.5

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Calendar Information Block displays wrong dates
« Reply #5 on: February 27, 2012, 12:21:31 PM »
I see. Can you try removing this code from Sources/PortalBlocks.php file and taking a screenshot of the same block after that change?

Code: [Select]
$displayed = array();
foreach ($events as $day => $day_events)
foreach ($day_events as $event_key => $event)
if (in_array($event['id'], $displayed))
unset($events[$day][$event_key]);
else
$displayed[] = $event['id'];
And slowly, you come to realize... It's all as it should be...

Offline velorooms

  • Jr. Member
  • **
  • Posts: 83
    • Velorooms
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Calendar Information Block displays wrong dates
« Reply #6 on: February 27, 2012, 01:15:59 PM »
attached as calendarss1

For the purposes of the thread, screenshot (calendarss2) is how it appears normally so the issue with the incorrect event start dates is clear to anyone reading this in the future ;)
Admin and Owner of Velorooms.com - Using SMF 2.0.3 and Simpleportal 2.3.5

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Calendar Information Block displays wrong dates
« Reply #7 on: February 29, 2012, 09:35:07 AM »
It looks like removing that little bit of code did the trick.  The information in calendarss1.PNG is correct, where it was wrong in calendarss2.PNG

I think Sinan is on to something.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Calendar Information Block displays wrong dates
« Reply #8 on: February 29, 2012, 12:58:18 PM »
See if this fixes it:

Sources/PortalBlocks.php

Code: (Find) [Select]
$displayed = array();
Code: (Replace) [Select]
ksort($events);
$displayed = array();

I think that should work, if I'm lucky enough.
And slowly, you come to realize... It's all as it should be...

Offline Jorge_CS_

  • Semi Newbie
  • *
  • Posts: 11
  • Gender: Male
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Calendar Information Block displays wrong dates
« Reply #9 on: July 25, 2012, 05:38:47 PM »
Worked! Thanks.