![]() |
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 |
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. |
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 |
Quote:
Quote:
Quote:
Quote:
|
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 |
OK. Got that sorted! Thanks Gervais!
+1 to ve9gra |
Great to hear! If there's anything else, don't hesitate.
|
| All times are GMT -4. The time now is 09:44 AM. |
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright 2009 NashTech, Inc.