Calendar populated with CMS Builder records

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

By Mikey - September 17, 2010 - edited: September 19, 2010

Thanks Zickey, Chris and everyone.

Here's the 9/17 Zickey Calendar update.

You can see it in operation, using the files included in the attached .zip file at:
http://thecmsbcookbook.com/Calendar4.php

Changelog:
8/31/10 - Original Zickey Calendar Files uploaded
9/9-10/10 – Links added and modified by Chris
9/16/10 – Rudimentary ToolTips added that appear when an event title is hovered over.
9/17/10 - Calendar now includes multiple date event entry and rounded corners (except in IE) ToolTips that appear when an event title is hovered over.

Note:
There seems to be an issue with ToolTip displaying intermittently in the latest version of Firefox. (They’re fine in IE (except for the square corners) and in Safari and Chrome. If anyone has an idea, please post it on the forum thread and I’ll modify the code accordingly.

Keep posting your modifications.
This project's going to be AWESOME!

Best,

Jerry Kornbluth


Little update to the CSS for Tool Tips
I've noticed the tool tip feature requiring the background:#ffffff (white) can cause other links to have the same white background. During testing I found this to cause some gif images used in my calendar to load the white background in areas that it shouldn't. So here's my update to fix the need to have required background for IE6 and eliminate the white background loading where it shouldn't. The following code should be added to the original CSS and does not replace any of the existing the #calFonts styles. I don't have IE6 so I haven't been able to test it in that browser version, but it works fine in IE8, Safari, Safari for iPhone and FireFox.


#calFonts a {
text-decoration:none;
color:#333333;
}
#calFonts a:hover {
background:#ffffff;
text-decoration:none;
color:#333333;
}
#calFonts a.tooltip span {
font-family: "Trebuchet MS", "Trebuchet MS Bold";
font-weight:400;
font-size:14px;
color:#333;
display:none;
padding-top:12px;
padding-left:12px;
padding-right:12px;
padding-bottom:10px;
margin-left:28px;
width:180px;
}
#calFonts a.tooltip:hover span {
display:inline;
position:absolute;
border:1px solid #999999;
background:#ffffff;
color:#000;
}


Cheers,
Zickey

Re: [jtedescojam] Calendar populated with CMS Builder records

By Toledoh - October 12, 2010

Hi Guys.

For those watching this thread - you may be interested in http://www.interactivetools.com/iforum/P83943

I'm building a site for a football club, where each team member logs into the site and see info pertinent to their team... photos, news, etc.

With help from Chris (thanks!) I can now show a calendar view that filters the events and shows only what is specific to that team... ie. training dates etc.
Cheers,

Tim (toledoh.com.au)

Re: [Toledoh] Calendar populated with CMS Builder records

By Mikey - October 12, 2010

Thanks for sharing Tim,
I'm going to look at how I can integrate this into the calendar.

I've made a few more updates to the calendar, but I need to clean up the code a bit more. I've been trying to get back into it for a few weeks now, but just haven't had a chance.

Once I get it wrapped up, I plan to post a new version of the calendar.

If you build any other solutions, please do share.
Cheers, Zick

Re: [chris] Calendar populated with CMS Builder records

By Mikey - October 15, 2010

Chris, any suggestions on how to get a bit of CSS to highlight the repeating day in the "repeating_events_2.php" file so any repeating events will be highlighted and span the width of the day cell. Below is the CSS I'm trying to working into your "repeating_events_2.php" file.

#CalendarFonts .CalendarRepeatingEvent {
background-color:#FFFFCC;
width:100%;
display:block;
}

Re: [zick] Calendar populated with CMS Builder records

By Chris - October 18, 2010

Hi zick,

Do you just want some code to output a different class depending on whether the event is a repeating event or not? If so, this should do the trick:

<div class="<?php echo strtotime($record['end_date']) ? "CalendarRepeatingEvent" : "CalendarSingleEvent" ?>">

Getting your repeating events to line up with each other would be a much harder problem. I would solve this by using separate table rows for day numbers, then dynamically adding rows per week to contain table cells with COLSPANs to model contiguous days of events — multiple rows would be needed for overlapping events. I imagine the code for this would be pretty complex!

I hope this helps. Please let me know if you have any questions.
All the best,
Chris

Re: [chris] Calendar populated with CMS Builder records

By Mikey - October 19, 2010

Thanks Chris, works like a charm!

Re: [zick] Calendar populated with CMS Builder records

By Codee - October 27, 2010

Hi Jerry...don't see the updated "attached zip file" either on this part of the thread or at the calendar4.php page. can you include it there or here? thanks!

Re: [chris] Calendar populated with CMS Builder records

Hi All,

While implementing the calendar script with the rollover popups described earlier in this post, I came across a strange anomaly which seems to appear in Firefox (3..5 or 3.6) on the first month’s page of a repeating event.

(See http://aranmoredance.com/calendar2.php?month=10&year=2010# )

In IE (7 or 8), Chrome and Safari, all the text for each iteration of a repeating event is underlined (as in a link) and the popups on rollover seem to work perfectly.

Only in Firefox, and only on a random basis, the text for repeating events is underlined (as in a link) and rolling over the underlined text does not produce a popup “tip”.

If I click on a link or refresh the page, either different events are “underlined” or the page works as planned, with no apparent logic or pattern (at least to me).

I’ve attached the viewer code, which includes all the active CSS.

I’m sorry that the problem is so hard to accurately describe.

Hope someone has an insight.

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
Attachments:

calendar2.php 10K

By Mikey - January 1, 2011 - edited: January 1, 2011

Jerry,
I think I've got this figured out. I've attached a revised calendar2.php file. When you view the source code search for "Zick edits:" to see where the changes are that I made.

I believe the problem was caused by wrapping H1 around the following code <h1><?php echo $record['title'] ?></h1>. So I commented out the <h1> like so: <!--<h1>--><?php echo $record['title'] ?><!--</h1>--> I then added the font size to the a.tip class.

I tested this quite thoroughly in FireFox and have not been able to reproduce the problem once the <h1> was removed and a.tip controlled with font-size: 11px; added to the a.tip css.

You may have to mess around with the css bit to stylize the font more, but I'm fairly certain at this point that the <h1> is where the problem existed.

PS: I briefly tested in Safari and Explorer and it seems to work fine now, but if you come across any more issues with this, let me know and I'll look into it more.

Zick

Hi All,

While implementing the calendar script with the rollover popups described earlier in this post, I came across a strange anomaly which seems to appear in Firefox (3..5 or 3.6) on the first month’s page of a repeating event.

(See http://aranmoredance.com/calendar2.php?month=10&year=2010# )

In IE (7 or 8), Chrome and Safari, all the text for each iteration of a repeating event is underlined (as in a link) and the popups on rollover seem to work perfectly.

Only in Firefox, and only on a random basis, the text for repeating events is underlined (as in a link) and rolling over the underlined text does not produce a popup “tip”.

If I click on a link or refresh the page, either different events are “underlined” or the page works as planned, with no apparent logic or pattern (at least to me).

I’ve attached the viewer code, which includes all the active CSS.

I’m sorry that the problem is so hard to accurately describe.

Hope someone has an insight.

Thanks,

Jerry Kornbluth

Attachments:

calendar2_001.php 10K