Calendar 5 download

7 posts by 3 authors in: Forums > CMS Builder
Last Post: August 4, 2014   (RSS)

By kitsguru - July 30, 2014

The download zickey_calendar5.zip in the following post seems to be corrupted. Does anyone have a clean copy they can put up?

http://www.interactivetools.com/forum/forum-posts.php?page=4&Calendar-populated-with-CMS-Builder-records-71673

Jeff Shields

By gkornbluth - July 30, 2014 - edited: August 4, 2014

Hi Jeff,

I just uploaded a clean copy of the zickey_calendar5.zip file, both here and on the original post. Try downloading it again.

BTW: You'll have to look at Sept, Oct and November 2011 to see  test results on the demo at http://www.thecmsbcookbook.com/calendar5.php

NOTE Zip file updated 8/4/14 per Jeff Shields' suggestion

Best,

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
Attachments:

zickey_calendar5.zip 18K

By kitsguru - August 4, 2014

I just discovered a bug in the calendar5.php

strtotime('0000-00-00 00:00:00') on a 64 bit system does not return false as expected but -62169984000, which according to the PHP manual is the expected behaviour.

so:

foreach ($eventsRecords as $record) {   

   if (strtotime($record['end_date'])) {

does not return the correct result

corrected code s/b

foreach ($eventsRecords as $record) {
    if ($record['end_date'] != '0000-00-00 00:00:00') {

modified version attached

Jeff Shields
Attachments:

calendar5.php 7K

Thanks Jeff

I have been using a plugin that Dave Edis made a while ago that takes care of blank dates and other fields that are blank, and have attached it here.

Could you see if that works without your fix.

Thanks,

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By kitsguru - August 4, 2014

i saw that plugin before but ruled it out, the default for a blank date in mysql is 0000-00-00 00:00:00.

Didn't see why we should hack it when we can use the natural default just as easily. IMHO

A blank date evals to a negative number and not false on 64 bits systems, this is due to the size of a big int being twice as large as 32 bit systems.

strtotime('') does not eval to false on 64 bit systems. 

What happens with the calendar on a 64 bit system is that the one day events are not shown ever, no error is thrown.

Jeff Shields

Thanks again Jeff,

I'll update the calendar

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php