CGCalendar question... displaying the event

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
fearmydesign
Power Poster
Power Poster
Posts: 363
Joined: Sun Feb 28, 2010 10:54 pm

CGCalendar question... displaying the event

Post by fearmydesign »

Hello everyone, is there a way for this CGCalendar to open a new small window showing the Event details instead of showing the event on the same page below the calendar? So basically when you click on any event, a window pops up showing all the details for it.

Or maybe someone has customize it to do this, maybe they can share how they did it. Thank you in advance

Regards,
Last edited by fearmydesign on Wed Jan 12, 2011 5:11 am, edited 1 time in total.
Rod
"Be careful who you step on your way up; because you never know who you'll meet on your way down!" - or something like that.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: CGCalendar question... displaying the event

Post by calguy1000 »

Simple stuff.

a: Modify the calendar template to i) give a class to the href associated with the event url, and ii) add a showtemplate=false parameter

Code: Select all

{foreach from=$day.events item=event}
<li><a class="calendar_event" href="{$event.url}?showtemplate=false">{$event.event_title}</a></li>
{/foreach}
b: install the JQueryTools module and make sure it is called in the page template, or the page specific metadata.

Code: Select all

{JQueryTools action='incjs'}
c: Setup Fancybox to handle links with the class you specified above:

Code: Select all

<__script__ type="text/javascript">
{literal}
jQuery(document).ready(function(){
  jQuery('a.calendar_event').fancybox();
});
{/literal}
</__script>
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
fearmydesign
Power Poster
Power Poster
Posts: 363
Joined: Sun Feb 28, 2010 10:54 pm

Re: CGCalendar question... displaying the event

Post by fearmydesign »

Simple stuff.
Thank you Calguy, it works but it will not display the data for some reason. The box pops up but it says: The requested content cannot be loaded.
Please try again later.


You can see it here http://www.courtsidesportsbar.com/cms/i ... e=calendar

Any idea why? :-\
Rod
"Be careful who you step on your way up; because you never know who you'll meet on your way down!" - or something like that.
User avatar
fearmydesign
Power Poster
Power Poster
Posts: 363
Joined: Sun Feb 28, 2010 10:54 pm

Re: CGCalendar question... displaying the event

Post by fearmydesign »

Hi, is there anyone that can help me on this? Calguys code and instructions worked perfectly, but for some reason the events don't show up on the pop-up window...

Regards,
Rod
"Be careful who you step on your way up; because you never know who you'll meet on your way down!" - or something like that.
User avatar
fearmydesign
Power Poster
Power Poster
Posts: 363
Joined: Sun Feb 28, 2010 10:54 pm

Re: CGCalendar question... displaying the event

Post by fearmydesign »

I saw this thread and thought I would like to use this as well. I have it working after finding a typo in the script.

Instead of ?showtemplate=false if should be &showtemplate=false.
Thanks for posting this Paul!
Rod
"Be careful who you step on your way up; because you never know who you'll meet on your way down!" - or something like that.
Post Reply

Return to “Modules/Add-Ons”