event fullcalendar v1.02

Release Notes

Bugfixes: Colorpicker, IE compatibility

Date format as user setting.

  • @FreefromDolphin4x

    Hi, in the repository web page there is a menu 'get source', in the up-right of the screen. From there you can download the latest code.

    There is other ways to download and keep the code tracked and updated, and to easily go to any change. This is done using Mercurial, a version control tool.

    For making a local copy you would need to execute:

    hg clone http://bitbucket.org/rhizomatik/elgg_calendar

    From the local copy folder, to update the code to the newest changes:
    hg pull 

    There exist more functionalities, these are the basic.

    Nice exploration, I appreciate it and hope this helps you further ;)
  • Hi,

    I get this error when I try to post an event, do you know where I should look in the code to fix this?

    "The requested action (event_calendar/manage) was not defined in the system"

    I can edit the code or fix anything on the server set up, I just need to know where and what exactly. Thanks

  • Hi there,

    I am using the calender on 1.7.4...seems to be working ok...but i have one link for which i have so far found no use...actually the link leads into nothing...it's called "event_calendar:recommend" The link appears between the 'View this event' and the 'edit this event' link.

    Any ideas?

  • Any ideas on the above?

  • @ Hekolo
    Probably it is referring to a field from a different plugin in which you can recommend this event to others. Something like the Likes plugin from Predro Prez. Probably not the same but something like that. If the link is of no use to you, just delete it from the code.

  • @M.R.A. Welkers: Thanks for your reply...i actually tried to find a plugin that the link is referring to...but wasn't lucky yet...do you have any idea where to delete the link?

    Cheers, Chris

  • how it is possible to get only upcoming events from database in a list view?

  • oh dear! 

    i installed this plugin to an install of 1.7.4.

    attempted to add an event via the profile/plugin dropdown menu and when i clicked the submit button was sent to an error message...

    now my site won't load at all! I restarted apache and also deleted the plugin folder. nada!

    any ideas?

  • ah, a reboot of my server got the site back up.. not sure what the issue was.

  • It kills profile picture in 1.7.4 and doesn't work, widget works

  • To fix this error:

    "The requested action (event_calendar/manage) was not defined in the system"

    Make sure that the folder in the mod directory for this plugin is renamed "event_calendar" not "elgg_calendar" like I guess the original plugin from Kevin was named, why you don't rename it when you created it, I don't know.

    I read the previous posts on the other Plugins page for the old version of this plugin, so you have two versions of this plugin and this plugin is a fork of Kevin's plugin - so there is a a lot of searching in different places to figure out this one plugin function. As recommended before merging your work here with Kevin's and going forward with a consoldiated plugin with all the functions, sounds like a good idea. Let us know what the status of this might be.

    There is an issue on Windows machines running this Plugin, the strptime() PHP function doesn't run in Windows so any Elgg installation will get the following error message when adding Events with this plugin:

    PHP Fatal error:  Call to undefined function strptime() in (path to Elgg)\mod\event_calendar\models\model.php on line 124

    In the browser you'll get a 500 Internal Server Error.

    So according to the PHP manuel replacing the strptime() PHP function with date_parse_from_format () is recommended if you are running PHP 5.3 or higher, which I am.

    If you switch out this function for strptime() you have to reverse the order of the parameters that were given for strptime() and replace the following associative array element names -

    "tm_mon" replace with "month"

    "tm_mday" replace with "day"

    "tm_year" replace with "year"

    This starts on line 124 of the model.php file in the model folder of this plugin.

    You will need PHP 5.3 to run this otherwise this plugin won't work on Elgg running on a Windows system, no one will be able to add events if that is the case. I'll test this configuration out and report back if there is anything interesting.

  • OK, with all of the adjustments I listed in my comment above, I still get an error with the date being listed as January 1, 1970 which is the Unix Epoch standard timestamp. So this means the timestamp isn't getting updated propely to the present time of what was picked with the Data Picker on the Add Event form.

    Where would we look in the code to make sure that when an Event is added, the correct date is adjusted to from the default Epoch timestamp?

  • Alright, I fixed it. You need to replace the code below in the model.php file starting on line 117 and ending on line 132 in my editor but double check to make sure it's right for you.

    < ---- start code ----- >

      $dateformat = get_plugin_usersetting("dateformat", $_SESSION['user']->guid, "event_calendar");
      if ($dateformat == "mm/dd/yyyy")
       $phpdateformat = "n/j/Y";
      elseif ($dateformat == "dd/mm/yyyy")
       $phpdateformat = "j/n/Y";
      else
       $phpdateformat = "j/n/Y";
      $s_date = date_parse_from_format($phpdateformat, $ed->start_date);
      $event->start_date = mktime(0, 0, 0, $s_date['month'], $s_date['day'], $s_date['year']);

      if ($ed->end_date) {
       $e_date = date_parse_from_format($phpdateformat, $ed->end_date);
       $event->end_date = mktime(0, 0, 0, $e_date['month'], $e_date['day'], $e_date['year']);
      } else {
       $event->end_date=$event->start_date;
      }

    <------ end code ------ >

    There is something that doesn't seem right in that code because I don't see a "dateformat" setting anywhere in the event_calendar Settings. Or in the profile, so I don't know how exactly it gets the correct format for the date. I tried it the with DatPicker tool so it was formated as Day/Month/Year I'll have to see if the doing it the USA way of Month/Day/Year works with some more tests.

    This revision of the code is to have this plugin work on Windows system Elgg Installations with PHP 5.3 or higher running.

  • With the changes I listed above, the date format must be entered in DD/MM/YYYY fashion in the Add Event Form for it to work if I enter it in as MM/DD/YYYY I get incorrect dates, a year later.

  • Hello

    I finally got the event displayed on my personal calendar link. But when i click on the event link it says 'Object expected' Also, i don't get the events displayed when i click on the week/day tab.

    It is also not displayed when i click on view_all events link.

    Appreciate your help!

     

  • @FreefromDolphin4x, many thanks. I did the folder name change. It works fine.

    But now I get a problem when add new event to it. It shows blank page with url http://localhost/elgg173/action/event_calendar/manage.

  • I'm missing February from my calendar, any ideas?

  • That's strange! February has come back again.

  • When installed this plugin has wron date 's for example now it say Friday 13 2011 but it has to be Thursday 13 2011 why???

  • Same issue like bart janssen. Says today is 14 Saturday...and how can i translate the months and days?

  • Nice work! thnks, but I have still some questions is there any possibility to embed the agenda in for example a drupal site? For now i have found i can use:

    <iframe src="http://mysite/portal/mod/event_calendar/pages/calendar_ext.php" width="100%" height="900"></iframe>

    and created a file called ./event_calendar/pages/calendar_ext.php whit this code inside:

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
      <meta http-equiv="content-type" content="text/html; charset=windows-1250">
      <meta name="Calendar" content="view for iframe">
      <title>Agenda</title>
       <script type="text/javascript" src="http://chirodonboscokessello.be/portal/vendors/jquery/jquery-1.3.2.min.js"></script>
       <script type="text/javascript" src="http://chirodonboscokessello.be/portal/vendors/jquery/jquery-ui-1.7.2.custom.min.js"></script>
       <script type="text/javascript" src="http://chirodonboscokessello.be/portal/vendors/jquery/jquery.form.js"></script>
       <script type="text/javascript" src="http://chirodonboscokessello.be/portal/_css/js.php"></script>
     
      </head>
      <body>
       <?php
     // Load Elgg engine
     include_once dirname(dirname(dirname(dirname(__FILE__)))) ."/engine/start.php";

     

      $body = elgg_view('page_elements/contentwrapper',array('body' =>$body, 'subclass' => 'events'));
      $title = elgg_echo('event_calendar:show_events_title');
     
     echo elgg_view ('event_calendar/fullcalendar', elgg_view_title($title).$body);
        ?>
      </body>
    </html>

     

    but the appoinments doesn t show up so I think i have to include somthing else. I have scrolt the code but i doesn t see what i am missing

     

    can you help me please?

  • Luis Pereira  subscribe to the repo and you can "pull" the latest code. checkl the explanation from

    @FreefromDolphin4x

    on top of this page

  • @bart Thank you m8 that worked like a charm.

    Any tip in how to translate the months and days?

  • do you have a language plugin installed?

Stats

  • Category: Events
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-17
  • Downloads: 8102
  • Recommendations: 16