Home · Links · Contact Us
Home arrow Forums
Home
Features
FAQ
Screen Shots
Modules
Themes
Demos
Documentation
Forums
Contact Us
Download
Purchase
Quotes

" ... I want to tell you that your thyme product is functional and valuable beyond words. I cannot imagine why any portal would be without it. It is the cornerstone of our new project ..."

" ... Thanks for such a complete project, its making my job much easier. ..."

" ... I have now deployed 4 different calendars and our users love them ... "

" ... Easy to install and use and a great look/design. ..."

" ... This has to be the easiest to use program I think I've had to deal with at all this year. ..."


  FAQFAQ    SearchSearch  RegisterRegister   Log inLog in 
Can't get to _cal_months array

 
Post new topic   Reply to topic     Forum Index -> Modules
View previous topic :: View next topic  
Author Message
scottchapman



Joined: 25 Jan 2007
Posts: 90

PostPosted: Mon Apr 21, 2008 12:59 am    Post subject: Can't get to _cal_months array Reply with quote

I have tried the following code, and the array _cal_months is always empty:
require_once(@constant("_CAL_BASE_PATH_") ."include/classes/class.calendar.php");

global $_cal_months;

print "May is " . $_cal_months[5] . "\n";

This just prints:
May is

That's it...
What am I doing wrong?
Back to top
View user's profile Send private message
esoft_ian



Joined: 12 Sep 2005
Posts: 5275

PostPosted: Mon Apr 21, 2008 5:30 pm    Post subject: Reply with quote

Hi Scott,

A lot of things happen when the calendar class is instantiated. Including include()'ing the language file that contains the $_cal_months array. Please also do this:

require_once(_CAL_BASE_PATH_."include/languages/en_US.php");

Let me know if this doesn't fix it.
Back to top
View user's profile Send private message Visit poster's website
scottchapman



Joined: 25 Jan 2007
Posts: 90

PostPosted: Mon Apr 21, 2008 6:50 pm    Post subject: Reply with quote

Thanks. I am pretty sure that will work.

I am not sure why my example doesn't work. I tried including exactly the same set of files other scripts did that are able to sucessfully use the _cal_months array.
Back to top
View user's profile Send private message
esoft_ian



Joined: 12 Sep 2005
Posts: 5275

PostPosted: Mon Apr 21, 2008 7:26 pm    Post subject: Reply with quote

Hi Scott,

Other scripts probably either have the language file included in it or have $cal = new calendar() before it.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Modules All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
© 2005 eXtrovert software unless otherwise noted. All rights reserved.
Portions © 2004 Ben Brown. All rights reserved.
Trademarks are property of their respective owners.