We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9757
    • 82 Posts
    Quote from: charless at Jun 13, 2010, 09:36 PM

    @fixedmachine - I see validity in both request and will taken them under strong consideration for the next release.

    Great. Can’t wait for next release then.

    I think that all cultural determined settings, like:
    - time/data format
    - start day of week (that’s already implemented as: mxcStartDayID right?)
    should be passed as a snippet parameters.

    Quote from: bonds73 at Jun 11, 2010, 12:26 PM

    And my Categories don’t seem to work.

    I have the same problem. I’m choosing one of my categories and still see all the events.

    Is there a parameter for setting default (initial) category to display? Something like &CatId=# but to pass in the snippet call? I want to create two different calendars on my site. One for one category, and second one for the other category - managed from one place, but without relations between them. Any suggestions?

    EDIT:
    Seems that publishing and un-publishing a category has no visible results.

    EDIT2:
    Ok. I think that the problem lies in the MySQL queries. Here is version which is working for me.

    At line 1404 in function _getNEvents now is:
    <?php> // highlighting
    WHERE startdate >= \''.$date.'\' or enddate >= \''.$date.'\' or  `lastrepeat` >= \''.$date.'\' and E.active=1
    


    and my working version is:
    <?php> // highlighting
    WHERE (startdate >= \''.$date.'\' or enddate >= \''.$date.'\' or  `lastrepeat` >= \''.$date.'\') and C.active=1 and E.active=1
    


    At line 1429 in function _getEventsSingleDay now is:
    <?php> // highlighting
     WHERE (startdate >= \''.$date.'\' and enddate < ADDDATE(\''.$date.'\', INTERVAL 1 MONTH))  or `repeat` REGEXP \'[[:alnum:]]+\' '.$catID.' and E.active=1
    


    and my working version is:
    <?php> // highlighting
    WHERE ((startdate >= \''.$date.'\' and enddate < ADDDATE(\''.$date.'\', INTERVAL 1 MONTH))  or `repeat` REGEXP \'[[:alnum:]]+\') '.$catID.' and C.active=1 and E.active=1
    


    Charless, why there is an active field for events when there is no option in events add/edit tab for publishing/un-publishing them?

    I’ve added to query condition for C.active - so if a category is unpublished then events form that category aren’t displayed.

    Don’t you think that the `event list` could be filtered by category just like `callendar` ?

    EDIT3:
    I’ve created slightly modified version of mxCallendar. There are two new parameters for snippet call:
    &mxcCategory - for setting initial category displayed after snippet call
    &mxcCategoryLocked - if it’s true than one can’t change category for that snippet with the request variable &CatId. It’s locked on the category from &mxcCategory.

    - Now you can filter by category in the calendar view and in list view (by snippet params and request params).
    - If you unpublish category, then events from that category are not displayed.

    Maybe somebody find it useful so all code is in the attachment. You should follow official installation guide for 0.0.6 or just replace mxCalendar.class.php, calendar.inc.php and snippet code.

    EDIT4:
    There is a bug in the code (my mod included) which unable you to assign different mxcTplEventListItemWrap from chunk.

    Solution. Replace the code in mxCalendar.class.php at line 1232:
    if(!empty($param['tplEvent'])){

    with this:
    if(!empty($param['mxcTplEventListItemWrap'])){
      • 34084 ☆ A M B ☆
      • 756 Posts
      @fixedmachine - thanks for the thorough review, please be patient and allow me the opportunity to roll this into the releases, granted you can do as you wish but I’d like to ensure that changes are logged and tested in multiple environments. mxCalendar is still in it’s infancy and needs wider use, from users like you, to mature it and needs those issues reported to help me improve it.

      Please visit http://code.google.com/p/mxcalendar/issues/list to log issues if you would please, this is my consolidated issue tracking location.

      There are lots of additional parameters and configuration changes that are scheduled for future releases. The primary goal with 0.0.6rc-1 is to get a stable enough version out to the masses so that I can then start building on that foundation.

      Quote from: fixedmachine at Jun 15, 2010, 03:26 PM

      I think that all cultural determined settings, like:
      - time/data format
      - start day of week (that’s already implemented as: mxcStartDayID right?)
      Yes, the parameter mxcStartDayID is used to set which weekday is the start of the week. As to the format of the date and time. The time/date format had not crossed my mind in the sense that I was think more UI, but makes sense if a site is multi-lingual that there would be a valid need for that to be changed on an individual instance and not globally.

      Side note, I want to make sure that this stays lean but also provides proper flexibility through parameters. The choice to use the configuration tab inside the mxCalendar module was to provide more laymen users a better experience when using mxCalendar. In addition we didn’t want to get too crazy with all the parameters as that can become more confusing as additional features are rolled into this project.

      Quote from: fixedmachine at Jun 15, 2010, 03:26 PM

      Is there a parameter for setting default (initial) category to display? Something like &CatId=# but to pass in the snippet call? I want to create two different calendars on my site. One for one category, and second one for the other category - managed from one place, but without relations between them. Any suggestions?
      Not currently, but that’s a good enhancement request. This request is also noted as a road-map item that would also extended this feature out to ACL through webuser groups for section of the site where you might have authenticated users as well. I’m also trying to track any feature request at http://code.google.com/p/mxcalendar/wiki/FeatureRequest.

      Quote from: fixedmachine at Jun 15, 2010, 03:26 PM

      EDIT:
      Seems that publishing and un-publishing a category has no visible results.
      The result here is that the category will no longer be visible when entering in events, but wanted to allow legacy events in un-published categories to still visible to the end-user. In case, lets say you had a special category for an yearly event, but then you unpublished that category so that no other events were added to that category, by un-plushing this no new events could be entered yet the event would still be visible to end users to filter on as a category.

      I think a better solution would be to add a second layer to the un-publish state that is for the end-user visibility. Then that would allow you to remove all events from the display.

      Quote from: fixedmachine at Jun 15, 2010, 03:26 PM

      Charless, why there is an active field for events when there is no option in events add/edit tab for publishing/un-publishing them?
      This was first put in place so that when an event was "deleted" it never left the system, to retain an historical log. Then in a later release I converted to actual removal for data storage purposes with the intent on adding in an up-publish vs. full delete of the event.

      Quote from: fixedmachine at Jun 15, 2010, 03:26 PM

      Don’t you think that the `event list` could be filtered by category just like `callendar` ?
      Yes, this I will certainly add in.

      Quote from: fixedmachine at Jun 15, 2010, 03:26 PM

      There is a bug in the code (my mod included) which unable you to assign different mxcTplEventListItemWrap from chunk.
      Thanks for catching this one, in previous pilot release I went back through and renamed all parameters to avoid any collisions with other snippets and this one did not get caught. It will be updated in the next release.

      thanks again for your diligence and please keep the bug reports coming in

      cheers
        Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
        Visit CharlesMx.com for latest news and status updates.
        • 9757
        • 82 Posts
        Quote from: charless at Jun 17, 2010, 09:18 AM

        @fixedmachine - thanks for the thorough review, please be patient and allow me the opportunity to roll this into the releases, granted you can do as you wish but I’d like to ensure that changes are logged and tested in multiple environments.
        No problem. I think that my changes are so ’light’ that they shouldn’t generate any additional problems. I need your module now, so I can’t wait until the next release - that’s why I’m patching it by myself. I thought that there are people who may need category filtering which works, so that’s why I uploaded my code. If you grant me the access to SVN I could help you with that project.

        Quote from: charless at Jun 17, 2010, 09:18 AM

        Please visit http://code.google.com/p/mxcalendar/issues/list to log issues if you would please, this is my consolidated issue tracking location.
        I was using that for previous release. But this time I thought that it’ll be faster to write that on the forum.

        Quote from: charless at Jun 17, 2010, 09:18 AM

        Side note, I want to make sure that this stays lean but also provides proper flexibility through parameters. The choice to use the configuration tab inside the mxCalendar module was to provide more laymen users a better experience when using mxCalendar. In addition we didn’t want to get too crazy with all the parameters as that can become more confusing as additional features are rolled into this project.
        I fully agree with you. But there should be much more parameters for advanced users. Without that we’ll be doomed to hacking the code.

        Quote from: charless at Jun 17, 2010, 09:18 AM

        Quote from: fixedmachine at Jun 15, 2010, 03:26 PM

        EDIT:
        Seems that publishing and un-publishing a category has no visible results.
        The result here is that the category will no longer be visible when entering in events, but wanted to allow legacy events in un-published categories to still visible to the end-user. In case, lets say you had a special category for an yearly event, but then you unpublished that category so that no other events were added to that category, by un-plushing this no new events could be entered yet the event would still be visible to end users to filter on as a category.

        I think a better solution would be to add a second layer to the un-publish state that is for the end-user visibility. Then that would allow you to remove all events from the display.
        I understand your intentions, but I think that it’s unintuitive behaviour. ’Un-publishing’ category should hide all the events from that category. They are unpublished now right? So they, implicitly, ’were never published’. I think that you are talking about ’hiding’ that category from module interface, so it will not be displayed in "add event" form and it won’t be possible to add any new event within that category. Now ’un-publishing’ category not causing hide of that category inside "add event" form. Maybe there should be another button ’in use’/’not in use’ or something like that. Of course it would be great if only some users could change those options. But managing user privileges... that’s another story...

        Quote from: charless at Jun 17, 2010, 09:18 AM

        This was first put in place so that when an event was "deleted" it never left the system, to retain an historical log. Then in a later release I converted to actual removal for data storage purposes with the intent on adding in an up-publish vs. full delete of the event.
        Hmm... so maybe we could use it for publishing/un-publishing single events? It would be a useful feature. It’s already implemented in some way, we just need to add a little check box in add/edit tab.

        Quote from: charless at Jun 17, 2010, 09:18 AM

        Thanks for catching this one, in previous pilot release I went back through and renamed all parameters to avoid any collisions with other snippets and this one did not get caught. It will be updated in the next release.

        Two more things in this case:
        http://code.google.com/p/mxcalendar/wiki/Placeholders_Release_0_0_6

        You’ve got all the placeholders named incorrectly - they begin from ’xc’ but should begin from ’mxc’ so many users could have problems with that.

        Second: I think that we need another ’mxcEventListItemTitle’ and ’mxcMonthInnerEventTitle’ - they should return ONLY title not title link. Maybe ’mxcEventListItemTitleLink’ will do the trick? I’m talking about this because I’m using mxCalendar for XML generation. I want to avoid <a href=...> tag in my XML, I need only title - that’s what I’m expecting from Title placeholder - no more no less, and I see that the <a> tag is hardcoded.

        thanks again for your diligence and please keep the bug reports coming in

        Thanks for your great job! I really appreciate it smiley If I can help in some way, I surely will smiley
          • 34084 ☆ A M B ☆
          • 756 Posts
          can’t believe they all were missing the "m" in front of the placeholder; sorry everyone it is now updated on the wiki - darn space messed them all up.

          :)

          http://code.google.com/p/mxcalendar/wiki/Placeholders_Release_0_0_6
            Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
            Visit CharlesMx.com for latest news and status updates.
            • 9757
            • 82 Posts
            Another idea:
            don’t you think that it will be better to store start/end date in database in UTC time format? It’s much much easier to interpret that time for different time zones. And to calculate time intervals too.

            Of course we need additional placeholders for returning raw date in UTC smiley

            Think about it smiley

            EDIT:
            Another bug:
            [+mxcEventListItemStateDateStamp+] shouldn’t that be [+mxcEventListItemStartDateStamp+] ?

            and if we are talking about that phs - they return only time, not date.
              • 36507
              • 9 Posts
              I just wanted to thank Charless for creating this app and a very special thanks to Vlad for PMing me and providing the fix to my issue. I figured it’s important that I share the solution to my issue with the community...seeing as the community seems to go out of the way to help others.

              So in summary the Event Title wasn’t appearing for me in the Event Details. The solution:

              Change the mxCalendar.class.php line

              From

              $modx->setPlaceholder(’mxcEventDetailTitle’,$title);

              To

              $modx->setPlaceholder(’mxcEventDetailTitle’,$p_val[’title’]);

              and now the Event Title should now appear.

              Thanks everyone.
                • 34084 ☆ A M B ☆
                • 756 Posts
                Quote from: bonds73 at Jun 21, 2010, 08:46 AM

                So in summary the Event Title wasn’t appearing for me in the Event Details. The solution:

                Change the mxCalendar.class.php line

                From

                $modx->setPlaceholder(’mxcEventDetailTitle’,$title);

                To

                $modx->setPlaceholder(’mxcEventDetailTitle’,$p_val[’title’]);

                and now the Event Title should now appear.

                Thanks everyone.

                thanks everyone for your support of the community. I’ve added this to the bug fixes on the next release which should be coming out in the next several days.

                ~cheers
                  Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
                  Visit CharlesMx.com for latest news and status updates.
                  • 25803 ☆ A M B ☆
                  • 721 Posts
                  My Categories and Configuration tabs are empty.

                  MODx: 1.0.4
                  MySQL 5.0.90-community
                  PHP: 5.2.12

                  Same result on another server:

                  MODx: 1.0.4
                  MySQL 5.0.67-community
                  PHP: 5.2.9
                    • 34084 ☆ A M B ☆
                    • 756 Posts
                    Quote from: rx2 at Jun 25, 2010, 10:22 AM

                    My Categories and Configuration tabs are empty.

                    MODx: 1.0.4
                    MySQL 5.0.90-community
                    PHP: 5.2.12

                    Same result on another server:

                    MODx: 1.0.4
                    MySQL 5.0.67-community
                    PHP: 5.2.9


                    and just confirming you’re using version mxCalendar 0.0.6-rc1. This is usually caused when the tpl file node containers (div) where not closed properly causing the nesting to be off for the tabs.

                    please confirm your version of mxCalendar and also open the file /assets/modules/mxCalendar/mxCalendar.tpl.php and validate the version information there is "Version: 0.0.6" on line 5.

                    If that is the same in the meantime you can change the order of the tabs in the mxCalendar.tpl.php file moving lines 103 - 110 to just above the "//-- end tab-pane" code line 130.

                    cheers
                      Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
                      Visit CharlesMx.com for latest news and status updates.
                      • 11055 ☆ A M B ☆
                      • 3,112 Posts
                      charless, what is the download link?
                      the first post’s link is absurd.


                      nevermind, got it. Thx.
                        Rico
                        Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
                        MODx is great, but knowing how to use it well makes it perfect!

                        www.virtudraft.com

                        Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

                        Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

                        Maintainter/contributor of Babel

                        Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.