Easy PHP Calendar - We really take care of your dates!


Go Back   Easy PHP Calendar > Integration > Mambo/Joomla Integration

Mambo/Joomla Integration Information about integrating the calendar with the Mambo Content Management System.

Closed Thread
 
Thread Tools Search this Thread Display Modes

popup path issue
Old 11-14-2010, 11:09 PM   #1
metalshaper
not quite smart enough...
 
metalshaper's Avatar
 
metalshaper is offline
Join Date: Jan 2010
Location: Northwest CT USA
Posts: 10
Default popup path issue

Hey Gurus,

Got nothing but love for ephpcal! It does everything I need it to do! Love it so much I bought 2!

I was asked to add a second calendar just for events. OK. No problem. Admin works great. Add/Edit/Remove events no problem.

Got a funny issue here with popups on mini cals and the path for the url that creates the popup.

Background:
mod_escal
Joomla 1.5.8
Microsoft-IIS/6.0
PHP 5.2.9-1
http://sharonct.org
Two calendars in different directories [each with its own license]
Town Hall is MySQL
Events is flatfile [for now]

Issue:
The path for the popups for each calendar are the same. In other words, when a user clicks a date in the "Town Hall Calendar" they get the appropriate event info. When a user clicks a date in the "Events Calendar" they get a popup but with no event info.

The URL in the popup for "Town Hall Events" is:
hxxp://sharonct.org/calendar/functions/popup.php?ev=2455513&showCat=&oc=1

The URL in the popup for "Event Calendar" is the same. It looks like it is pulling the event data from the wrong path. There is no event data for that date in the SQL for the "Town Hall" If I change the URL to reflect the correct path [event_calendar/functions/] it works and shows the events. If I add event data for that date on the "Town Hall" it shows up for the "Event Calendar".

I read elsewhere in the forum that two calendars on the same page = bad idea. So I turned off the "Town Hall" module and left the "Event Calendar" module. Now I figured it would be just fine. Nope. Same URL in the popup. OK check my calendar.php and server path is good. My urlPath is good.

Also I checked the source and each mini cal shows a different path:

Town Hall:
function popupEvent(ev, w, h) { var winl = (screen.width - w) / 2; var wint = (screen.height - h) / 2; win = window.open("/calendar/functions/popup.php?

Event Calendar:
function popupEvent(ev, w, h) { var winl = (screen.width - w) / 2; var wint = (screen.height - h) / 2; win =window.open("/event_calendar/functions/popup.php?

So now I'm confused. Anyone have any ideas?

TIA

Joel

Last edited by metalshaper; 11-14-2010 at 11:17 PM.
 

Old 11-15-2010, 07:30 AM   #2
ve9gra
Support Team
 
ve9gra's Avatar
 
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
Default

That is because the function popupEvent is declared twice. Since only the first declaration is used, you'll never get the second popup.

Did you do two installs because it's different people that need to manage the events, without having access to the "other side"? If not, you have no reason to have two installs. Simply create a sub-category that will define which calendar this event is meant for. Then on your page, use the $showCat variable to limit the display of each calendar.

That way, you have everything running off a single installation, and then your popups would work fine

If you need help getting this working, we're here.
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
 

Old 11-15-2010, 01:59 PM   #3
metalshaper
not quite smart enough...
 
metalshaper's Avatar
 
metalshaper is offline
Join Date: Jan 2010
Location: Northwest CT USA
Posts: 10
Default

Thanks ve9gra.

Just so I can try to understand,

--That is because the function popupEvent is declared twice. Since only the first declaration is used, you'll never get the second popup.

Even if I turn off the module for the "working" calendar?

--Did you do two installs because it's different people that need to manage the events, without having access to the "other side"?

Yes. But I can work around this requirement.

--Simply create a sub-category that will define which calendar this event is meant for.

OK. I think I will need some guidance here....

--Then on your page, use the $showCat variable to limit the display of each calendar.

So would this be adding the $showCat variable to the mod_escal.php?

I do think I will need some help with this.

TIA

Joel
 

Old 11-15-2010, 04:22 PM   #4
ve9gra
Support Team
 
ve9gra's Avatar
 
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
Default

Quote:
Originally Posted by metalshaper View Post
Even if I turn off the module for the "working" calendar?
I don't know. It's been a while since I've worked with Joomla, but I seem to remember having to clear the output cache several times before being able to see code changes in the plugin.
Quote:
Originally Posted by metalshaper View Post
Yes. But I can work around this requirement.
That's good. If it's not a problem for the users to see "each other's" events, then it should work fine.
Quote:
Originally Posted by metalshaper View Post
OK. I think I will need some guidance here....
Setup Manager - Categories. You'll find "New Category" at the bottom. Add an entry like "Show on Event Calendar", and then add a selection of "Yes" to that new category. When you enter your events, by selecting Yes for that field, it will show the entry on the Event Calendar.
Quote:
Originally Posted by metalshaper View Post
So would this be adding the $showCat variable to the mod_escal.php?

I do think I will need some help with this.
This works with the category you just created. You'll set the $showCat inside of each of the mod_escal (you'll need two) so that each calendar only shows the proper list of events. See the Online Docs in the Customize - Command-Line Variables section. You'll find how to use $showCat.
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
 

Old 11-16-2010, 11:06 AM   #5
metalshaper
not quite smart enough...
 
metalshaper's Avatar
 
metalshaper is offline
Join Date: Jan 2010
Location: Northwest CT USA
Posts: 10
Default

OK. Thanks ve9gra!

I went through the docs. Should I add $showCat="x|x|x" before each instance of require("calendar/calendar.php");? or do I add it before the require at or around line 37-39? And to have a clear understanding, I need the pipes for multiple cats right? I know it should be obvious but I'm just checking.

================================================
Here is a snippet:

$jm_epclistYear=$params->get('listYear', 0);
$jm_epclistEvents=$params->get('listEvents', 0);
$jm_epcnoOld=$params->get('noOld', 0);
$jm_epcTemplate=$params->get('epcTemplate', 0);

$jm_epcListMouseover=$params->get('ListMouseover', 0);
$jm_epctocListMouseover=$params->get('tocListMouseover', 0);
$CSS=1;
require ("calendar/calendar.php");
$OL=1;
require ("calendar/calendar.php");
$showCat="2";
require ("calendar/calendar.php");
<--here?
switch($jm_epccaltype)
{
case "mini":

if($jm_epcnoNavMini)
{
$noNav="1";
}
if($jm_epcnoEventsMini)
{
$noEvents="1";
}
require ("calendar/calendar.php"); <--or here?
break;

================================================

I had two mod_escal modules to start with so I will mod each to reflect the categories that need display respectively.

Joel
 

Old 11-16-2010, 06:22 PM   #6
metalshaper
not quite smart enough...
 
metalshaper's Avatar
 
metalshaper is offline
Join Date: Jan 2010
Location: Northwest CT USA
Posts: 10
Default

OK. Got that sorted! Thanks Gervais!

+1 to ve9gra
 
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Popup issue - too far right Andre General Support 5 10-09-2009 02:55 PM
Popup Image issue Invictus General Support 2 12-09-2008 09:39 PM
Popup window path is wrong bocal Installation / Upgrade Questions 7 08-29-2007 05:37 PM
Session Path Problems??? mungojeerie Installation / Upgrade Questions 5 01-15-2007 11:12 PM



All times are GMT -4. The time now is 02:05 AM.


vBulletin skins developed by: eXtremepixels
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright 2009 NashTech, Inc.

| Home | Register | Today's Posts | Search | New Posts |