Tag Archives: Wordpress

How to make Timely’s All-in-One Event Calendar navigation load a new page

A particular web host running IIS 6 did not support the MIME type application/json.  This support was needed because Timely’s All-in-One Event Calendar plugin uses AJAX to perform server requests and returns data in the JSON format.  After frustratingly working with the web host to unsuccessfully apply the MIME type to their server, I decided to change the calendar code to perform a page load rather than use AJAX to load the data.  Here is what I did (This assumes you already have the Standard Calendar version 1.10.9 plugin installed in WordPress version 3.7.1.  I have not tried this with other versions.):

  1. Deactivate the plugin.
  2. Navigate to [Wordpress directory]/wp-content/plugins/all-in-one-event-calendar/app/view/admin/js/scripts.
  3. Rename calendar.js to calendar_ORIGINAL.js.  Just in case you have to revert back.
  4. Open the calendar.js file in your favorite editor.
  5. Copy the obfuscated code, not the comments.
  6. Open a web browser and go to jsbeautifier.org.
  7. Paste the code in the window clearing any existing code first.
  8. Press ctrl-enter to deobfuscate the code.
  9. Copy the code.
  10. Create a new calendar.js file in the [Wordpress directory]/wp-content/plugins/all-in-one-event-calendar/app/view/admin/js/scripts directory.
  11. Paste the code in the new calendar.js file.
  12. Comment out lines 2270 – 2288.  This is where the ajax is called to get the new data.
  13. Add the following code after the commented area: window.location.reload();
  14. Comment out line 2303.  This will allow the default action of the anchors in the calendar to be triggered (in this case navigate to a new page).
  15. Save the file.
  16. Activate the plugin and test the calendar.  When you click a control in the calendar the browser should perform a page load.