Jump to content

Tourcalendar V1


Strider

Recommended Posts

Dont work for me :( when i upload files and replace EventsData.class.php the event i create dosent show in Admin Panel ( on calendar itself also dont show ) but when i upload oryginal EventsData.class.php from event mod its ok i got all my events but i dont show on calendar.

Link to comment
Share on other sites

I am unable to access your events module as I need to be logged in. Try uploading simpilots original file, imy one only has an extra bit of code, which shouldn't hinder the operating of the events module.

I will pm you with login details to test account on my page , have a look now is with simpilots original file.

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

Here is the updated version of the EventsData.class.php that should work. It should solve the problem with the events disappering. All i did was add

".TABLE_PREFIX."events"

between

public function get_upcoming_events_dates()
   {
    $query = "SELECT * FROM ".TABLE_PREFIX."events";

   return DB::get_results($query);
   }

and i basically did that for each function.

EventsData.class.php.zip

Link to comment
Share on other sites

  • 8 months later...
  • 5 months later...
  • 3 months later...
  • 8 months later...
  • Administrators

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 ..... "

TourCalendar.zip

Link to comment
Share on other sites

  • 11 months later...

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

**EDIT**

I fixed the lines 24 and 25 error by using a

$month = (int) (!empty($_GET['month']) ? $_GET['month'] : date('m'));
$year = (int) (!empty($_GET['year']) ? $_GET['year'] : date('Y'));

instead of the supplied

$month = (int) ($_GET['month'] ? $_GET['month'] : date('m'));
$year = (int) ($_GET['year'] ? $_GET['year'] : date('Y'));

I still have the static error going on

**EDIT**

All fixed

Edited by TAV1702
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...