| View previous topic :: View next topic |
| Author |
Message |
Buff
Joined: 17 Feb 2007 Posts: 23
|
Posted: Mon May 26, 2008 3:29 am Post subject: get_event_list yields empty arrays |
|
|
I hope someone can help me. I keep coming up with empty arrays when calling get_event_list.
Here is my code:
define("_CAL_BASE_PATH_", "/home/nsrca.org/public_html/thyme-1.3-ioncube/");
include_once(_CAL_BASE_PATH_ . "include/classes/class.calendar.php");
$cal = new calendar();
$cal->set("calendar", 17);
// I have tried 'day', 'week', 'month', and 'year'
$week = $cal->get_event_list("week");
//here I get the appropriate number of items, but all empty; 1, 'day', 7, 'week', etc.
print_r($week);
echo("<br><br>");
At first I was entering the calendar name literally; like, “All Districts Calendar” in the “set” command. Then I realized (or thought) I should be using the “id” value for the “Calendar_table” as referenced in the The Selected Week's Events in the Advanced Integration Tutorial documentation. http://www.extrosoft.com/Documentation/Advanced_Integration/Advanced_Integration_Tutorial/#selected_weeks_events
I have eighteen calendars; the “All Districts Calendar” id is 17. I thought for sure when I plugged 17 in for the second parameter of the set command; $cal->set (“calendar”, 17); it would work. No such luck, I still get an empty array returned. I’m kind of stuck and don’t know what to try next.
Get_event works just fine when I plug in any valid “eid” for the Event_table. Eventually, I expect to pick up the eid and incidence values from the get_event_list array.
Thanks for your help. _________________ Buff |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
Posted: Mon May 26, 2008 4:24 pm Post subject: |
|
|
Hi,
May I have the full URL to Thyme so that I may see your calendar please? |
|
| Back to top |
|
 |
Buff
Joined: 17 Feb 2007 Posts: 23
|
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
Posted: Tue May 27, 2008 5:06 pm Post subject: |
|
|
Hi Buff,
Thank you. Can you tell me if plugging in a calendar's id rather than a global view's id works for you please? |
|
| Back to top |
|
 |
Buff
Joined: 17 Feb 2007 Posts: 23
|
Posted: Sun Jun 01, 2008 2:47 am Post subject: |
|
|
I'm not sure if I know if I'm doing this correctly. I tried this;
$week = $cal->get_event_list(17);
print_r($week);
and got this:
Array ( )
17 is the id of the "All Districts Events" calendar in the thyme_Calendars table.
There currently are 45 events in this calendar. _________________ Buff |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
Posted: Mon Jun 02, 2008 2:28 pm Post subject: |
|
|
Hi Buff,
Sorry for the delay. I had your FTP info from a previous interaction. I hope you don't mind that I used it. I copied / pasted your original code at http://nsrca.us/thyme-1.3-ioncube/test.php and do see events. Can you tell me where your page that contains this code is please? |
|
| Back to top |
|
 |
Buff
Joined: 17 Feb 2007 Posts: 23
|
Posted: Mon Jun 02, 2008 4:05 pm Post subject: |
|
|
Hi Ian,
Please feel free to surf at will.
The code is in the file: /home/nsrca.org/public_html/components/com_kcal
Please excuse the mess; I've experimented a lot, you'll find that much of the code is commented out.
The results at: http://nsrca.us/components/com_kcal/kcal.php?y=2008&m=5&d=31 _________________ Buff |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
Posted: Mon Jun 02, 2008 4:27 pm Post subject: |
|
|
It was having the incorrect URL defined here:
define("_CAL_BASE_URL_", "http://www.extrosoft.com/products/thyme/demo/");
This invalidated the license which makes it not show any events. |
|
| Back to top |
|
 |
Buff
Joined: 17 Feb 2007 Posts: 23
|
Posted: Tue Jun 03, 2008 12:10 am Post subject: |
|
|
Well, I never would have guessed that. I was taking your documentation on get_event_list literally. I certainly hope that my mistake will help others that read this thread.
Ian, I thank you very much for your time and effort. I should certainly make some progress now. I've been fighting this issue for several months now. _________________ Buff |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
Posted: Tue Jun 03, 2008 3:50 pm Post subject: |
|
|
Hi Buff,
No problem. Sorry for any confusion. I'll just remove that line from the documentation since it is not actually needed. |
|
| Back to top |
|
 |
|