Charles,
First off, thank you for making the youtube tutorial video. It’s really great to see a modx module get this type of support
I started playing with the latest mxCalendar beta yesterday and I think I’ve found a couple bugs and some friendly suggestions. Hope it isn’t too much...
1. If I add a custom field with type set to image, then navigate to an Add/Edit Event page and click the "Insert" button I get a popup displaying the root homepage with the following as the URL:
http://raw/modxevo/manager/media/browser/mcpuk/browser.html?Type=images&Connector=/modxevo/manager/media/browser/mcpuk/connectors/php/connector.php&ServerPath=/modxevo/
the "insert" button is looking for MODx to reside within a subdirectory called modxevo/. In this case I have Evo installed to calendar/. modxevo/ appears to be hard coded in the following places of mxCalendar.class.php
line 352:
OpenServerBrowser(\'/modxevo/manager/media/browser/mcpuk/browser.html?Type=images&Connector=/modxevo/manager/media/browser/mcpuk/connectors/php/connector.php&ServerPath=/modxevo/\', w, h);
line 359:
OpenServerBrowser(\'/modxevo/manager/media/browser/mcpuk/browser.html?Type=files&Connector=/modxevo/manager/media/browser/mcpuk/connectors/php/connector.php&ServerPath=/modxevo/\', w, h);
line 370:
var p = document.getElementById(\'_pv'.$cft['name'].'\').src = \'/modxevo/\'+url;
I replaced those 7 instances of modxevo/ with calendar/ and now the "insert" button works great! Not the best solution, but the file browser now loads with the assets/images/ preselected and I am able to upload and select and a image perfectly
2. Next, after adding this new custom field, [+mxcposter], to event.detail.html an image outputs just fine, but if the field is left blank an img tag is still output:
resulting in an missing image icon showing up in the browser on the event details page.
To fix this I simply added "assets/images/dot.png" as the default value for this image field (dot.png is a 1 x 1 transparent png). Again, not the best solution but works fine for now.
Note: Thank you so much for adding custom fields to mxCalendar. It really takes this extra to the next level!
3. How can you resize the image output by the custom image field type?
Since the relative URL is automatically output as the src of an img, something like this [+mxcposter:phpthumb=`w=450`+] outputs this:
/calendar/image.php?src=<img src="assets/images/Google_Chrome.jpg" alt="" />&w=450&hash=c5227f261c442c09d212dd2f6cec5e75
Further this means that can’t manually set the alt, rel, or width/height attributes in the templates.
I think the this field type would be more useful if the placeholder outputs only the relative URL opposed to the whole tag.
We could then call something like this in our templates to resize the image and null the output if left blank.
[+mxcposter:isempty=``:else=`<img src="[+mxcposter:phpthumb=`w=650`+]" alt="[+mxcEventDetailTitle+]" />`+]
Note: not sure that snippet call even works. it’s been a few years since I’ve built an Evo site.
I think having fields output as full tags sort of neuters some of the power of MODx. That’s like having a TV with a forced output type.
I guess another way could be to enhance the field type with output options that could control whether to output inside an img tag or to set attributes or choose the dimensions to resize the output image, but heck we’re MODx users, and I think it’s far easier to change this in a chunk or templates file than combing through documentation on parameters.
Also, if options to resize the image were added, mxCalendar would probably then require phx:phpthumb or need to bundle it’s own copy, so either a potential compatibility issue or duplicate code added to a site.
4. related to the last issue, the preview image displayed beneath an image custom field is the full sized original. I’m using this field with massive poster sized images so this looks pretty crazy
5. Minor spelling mistake: under "Category List Options" in mxCalendar options "Enanble Cateogry Filters" has an extra "n" in Enable.
6. Weekly repeating events double post on the first day if the weekday to repeat on is set to the same weekday selected by Start Date-Time.
Ok, one more time, as this one’s a deal breaker. If you add an event with a Start Date-Time of say April 11th, 2011 and set it to repeat every monday, you’ll then get that event displayed twice on the 11th and once each monday following.
NOTE: Google Calendar has a similar system for adding repeating events but on "Save" it will actually modify the Start Date-Time to correspond with the closest day you’ve set to repeat on. This I think makes much more sense than being able to set an event on a different day from the days it repeats on.
7. Is it possible to disable displaying multi day events??
If I enter an End Date-Time on the day following the Start Date-Time (say at 2:30am the next day) a duplicate entry will be displayed automatically on the following day in the month view.
This is a super confusing default behaviour. The end user will have to carefully ready the end date-time on the second event to realize that the event actually occurred the day, and ended past midnight, opposed to said event occurring a second time the day after.
And to avoid this behaviour the content manager has to be careful not to add a End Date-Time past midnight.
Actually I don’t really get this functionality even if it’s intentional. Say for example a week long sports tournament, would that not already be covered by the repeating events functionality?
Only thing that springs to mind where this makes sense is something like multi day all night rave! In most cases i think events will have a unique end time on each day, no?
8. How to disable shadowbox.js from being added automatically ??
Right now, Shadowbox.js is being added automatically to the header on the month view page. I can’t seem to find a toggle this off in either the theme or options page.
Also, the addition of this script is throwing the following errors in my browser:
in Firebug 1.7 / Firefox 4 :
$(el).addEvent is not a function
[Break On This Error] (function(window,undefined){var S={ver...S.gallery.length){preventDefault(e)}}
and in Chrome 10.0.648.204
Uncaught TypeError: Object [object Object] has no method 'addEvent'
- addEventshadowbox.js:8
- K.initshadowbox.js:34
- S.loadshadowbox.js:8
- DOMContentLoaded
Note: the Shadowbox.init call in the header also seems to have a bunch of example values still commented out...
//gallery: "Name of the Gallery",
//autoplayMovies: true,
//height: 350,
//width: 650,
//modal: false,
//enableKeys: tue,
9. not sure if this is intended for the AJAX to function properly but "add JavaScript Library automatically" only seems to add MooTools to header of the event detail pages and not to the month view page. Again, note sure. I use jQuery.
10. How to change the displayed TimeStamp for the Start/End Date-Time on the Event Details??
There appears to be options to edit this output for both the month and list view but not for the Details page. Is there a way to control the format of this output directly in the templates?
UPDATE: never mind. it looks like the following parameters take care of this:
mxcStartDateFormat = Event details date/time format override; Valid PHP strftime() format
mxcEndDateFormat = Event details date/time format override; Valid PHP strftime() format
from: http://code.google.com/p/mxcalendar/wiki/Parameters_0_0_7
Suggestions:
1. Unique identifying class names to the default fields for Add/Edit Event manager pages to easily hide unwanted fields via css.
I noticed a bunch of styles in mxCalendar.css for the backend pages, plus this stylesheet gets added to the mxCalendar manager pages from the default theme.
I don’t think it would be good for updating to modify the default theme, but possibly these backend styles could be extracted to their own stylesheet and then optionally overwritten if the same .css file shows up in the loaded theme?
I don’t know. Either way, it would rock if there was an easy way to hide unwanted default fields on the Add/Edit pages with something like the following:
#fm_bsApp .fm_row .fm_entry.mxC_Link {display:none}
#fm_bsApp .fm_row .fm_entry.mxC_Link_REL {display:none}
#fm_bsApp .fm_row .fm_entry.mxC_Link_Target {display:none}
#fm_bsApp .fm_row .fm_entry.mxC_Link_Location {display:none}
...
Well, that’s all I got. Apologies for the absurdly long post. I hope it doesn’t come off ungrateful for all your work on this awesome Extra.
Even with a couple issues it really is a fantastic module!! Heck, this is what beta is for right

And really the only deal breaker for right now is the duplicate entries with repeating events thing. Otherwise the others are fairly easy to work around and I’m probably just missing something for half of them
Again thank you Charles for all your hard work. You’re awesome!!
Be well,
~ Oliver