I saw this at a point and couldn’t remember whose code it was so I developed it from the ground up for Delta Virtual with links to new and previous months. I see I’ve used the same base code you did.
I have been unable to get any events to display other than those of the current month. When viewing months other than the current month, the current month’s events displayed - same current month’s events no matter what month I selected. After finding a blog by a gentleman named David Walsh (possible original code for the php calendar) and doing a bit of reading of the comments there, I was able to get all events to show in their correct month.
I am not a PHP coder. I only edited one existing file in Strider’s original package. There may be a more efficient way to achieve the same outcome I was able to attain.
There are just a few minor changes/additions to the code in “TourCalendar.tpl”. The attached fie contains my edited file. Of course, the calendar display is specific to my site and the format may not match yours - this includes everything between the <style> </style> tags near the top of the file - so don’t change that in your file if your calendar display already fits well with your site.
Changes which corrected my issue from above are between " /* keep going with days… */" and " /** QUERY THE DATABASE …"
Ok so is anyone else getting the calling static error now days? I know this is old news but I have been away from coding for some time and I am out of touch. How did everyone fix this issue?
Notice : Undefined index: month in /home/xxxxxx/public_html/xxxxxxx/core/templates/TourCalendar.php on line 24
Notice : Undefined index: year in /home/xxxxxxx/public_html/xxxxxx/core/templates/TourCalendar.php on line 25
Strict Standards : Non-static method EventsData::get_upcoming_events_dates() should not be called statically in /home/xxxxx/public_html/xxxxxx/core/templates/TourCalendar.php on line 83
I believe the date lines come from the tpl file that someone uploaded on the last page to show previous month and next month as well as current month.
Interesting, I got the one from ProAvia (which is the one I think you were talking about) and the date lines only showed the date(‘m’), etc. and not the lines above.
Sorry to revive an old thread but I am experiencing the same issues as above and was wondering if there was any fix? I change the “public function” to public static function after getting;
Strict Standards: Non-static method EventsData::get\_upcoming\_events\_dates() should not be called statically in
But then get the following error:
Fatal error: Using $this when not in object context in
Sorry to revive an old thread but I am experiencing the same issues as above and was wondering if there was any fix? I change the “public function” to public static function after getting;
Strict Standards: Non-static method EventsData::get_upcoming_events_dates() should not be called statically in
But then get the following error:
Fatal error: Using $this when not in object context in
Using SimPilot’s 5.5.2, php version 5.4.
Well, fixed all errors. I had been using the old EventsData class file, uploaded the new one, changed all of the “public function” to “public static function” values, and it all shows correctly! Now the only thing left is figuring out why it somehow is not connected to the database anymore. Admin module won’t push anything to the database after this change and even though there is something in the database from before I fixed the first reported error, it does not show on the website.
Well, fixed all errors. I had been using the old EventsData class file, uploaded the new one, changed all of the “public function” to “public static function” values, and it all shows correctly! Now the only thing left is figuring out why it somehow is not connected to the database anymore. Admin module won’t push anything to the database after this change and even though there is something in the database from before I fixed the first reported error, it does not show on the website.
The search continues lol.
FIXED!
The EventsData.class.php needed the added
".TABLE\_PREFIX."
added before each of the db calls. Utilize all other fixes in this thread and then also add the change and you should be golden.
Too much coding, not enough coffee. Hopefully this helps others!