Calendar populated with CMS Builder records

46 posts by 12 authors in: Forums > CMS Builder
Last Post: February 27, 2012   (RSS)

By gkornbluth - January 1, 2011

Thanks Zick,

Pretty nice New Year's present.

All the best,

Jerry
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

Re: [gkornbluth] Calendar populated with CMS Builder records

By Jason - January 3, 2011

Hi Jerry,

What exactly are the names of your day checkboxes and what values are they storing?

Here is some code for looping through each of the dates one at a time. This will include the start and the end date:

<?php
$startDate = strtotime($event['start_date']);
$endDate = strtotime($event['end_date']);
$date = $startDate;
?>


<?php while($date <=$endDate): ?>

<?php $date=strtotime("+1 day",$date);?>
<?php endwhile ?>


Hope this helps get you started.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Calendar populated with CMS Builder records

By gkornbluth - January 3, 2011

Jason,

A happy new year wish to everyone,

Thanks for looking at this.

The names are monday, tuesday, wednesday, thursday, etc. and the values are 1 = checked and 0 = unchecked

Thanks agan,

Jerry
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

Re: [gkornbluth] Calendar populated with CMS Builder records

By Jason - January 3, 2011

Hi Jerry,

We can use the date function to get the textual day of the week for a given date. We can use this to check if a checkbox of that name has been checked.

<?php while($date <=$endDate): ?>
<?php $dayOfTheWeek = strtolower(date("l",$date)); ?>

<?php if(@$event[$dayOfTheWeek]): ?>
**OUTPUT DATE**
<?php endif ?>

<?php $date=strtotime("+1 day",$date);?>
<?php endwhile ?>


Give that a try and let me know if that works for you.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Calendar populated with CMS Builder records

By gkornbluth - January 3, 2011

Hi Jason,

Thanks for the quick reply.

At the risk of feeling dumb.

Where in Zickey's code would that go?

Thanks

Jerry
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

Re: [gkornbluth] Calendar populated with CMS Builder records

By Jason - January 4, 2011

Hi Jerry,

You can use this on your detail page where ever you want to output a list of dates that your event would occur on.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Calendar populated with CMS Builder records

By gkornbluth - February 2, 2011 - edited: August 4, 2014

Hi All,

FEBRUARY 2011 CALENDAR UPDATE

It took a while, but my latest version of the Zickey Calendar files is attached.

You can see it in operation, using the files included in the attached .zip file at:

http://thecmsbcookbook.com/calendar5.php

There are test events there for February and March 2011

The detail page is straight out of the code generator so, nothing fancy.

the 2/2/11 update includes some code cleanup and re-documentation as well as a fix for the intermittent tips issue with FireFox.

Thanks to all of you who contributed to this project.

Keep those cards, letters, and suggestions coming.

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

Re: [gkornbluth] Calendar populated with CMS Builder records

By Toledoh - February 5, 2011

This is great!

Does anyone else have any problems with viewing single day events?

The repeating events seem fine, but If I put in an event that has a start date, but no "day" or end date, nothing shows.
Cheers,

Tim (toledoh.com.au)

Re: [Toledoh] Calendar populated with CMS Builder records

By gkornbluth - February 5, 2011

Hi Tim,

On the test page at: http://www.thecmsbcookbook.com/calendar5.php
Event 5 is a single day event (Feb 3). I can see it in both FF3.6 and IE8.

If you can see that one, then the issue is probably an errant character in your code.

Best,

Jerry
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