We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22827
    • 129 Posts
    Hello.

    I have just started using MODx and EasyEvents, so if this is a bit of a cludge way of doing things, let me know. I wanted to pull in TVs into the event list, so I did this:

    In the config file I added:
    $_misc['TVs'] = array('DateDescription','EventImage');


    (I think it would be good to have this one as well, but I just hard coded to add introtext:
    $_mist['doc_fields'] = "id,pagetitle,description,introtext,content"; 


    It isn’t necessary for the TV code below)

    I added a new function to EasyEvents_class.php:

        function getTVs($id)
        {
          $tvs = $this->modx->getTemplateVarOutput($this->misc['TVs'],$docid=$id);
          return ($tvs);
        }
    


    Then to take advantage of this in the Events list, I added the following to makeEventList:

    		// Get template vars
    		
    		$tvs = $this->getTVs($ea['id']);
    		
    		// Merge tvs
    		
    		$eventData = array_merge($eventData,$tvs);
    		
                    $eventList .= $this->templify('listItem',$eventData);
    


    (the last line is already present and repeated here to see where it goes)

    So with these changes you can define which TVs you want to use in eastEvents.config, and use them like the other [+ +] placeholders in the templates.

    Cheers,

    Paul

      • 22827
      • 129 Posts
      And then do the same in makeEventDetails:

      	$tvs = $this->getTVs($eeid);
      		
      	// Merge tvs
      		
      	$templateData = array_merge($templateData,$tvs);
              
      	// Send event data to chunk template
                  $output .= $this->templify('eventDetails',$templateData);
      
        • 7127
        • 28 Posts
        Hoi,

        if you call the permalink, the event is shown without date and time. How do I put those two on top of the eventpage?

        thanks
        Olaf
          • 12390
          • 39 Posts
          Im having problems switching months. I’ve updated line 7 of easyEventsAjax.js and the error I get is:

          document.getElementById(EasyEvents.calDivId) is null
          onreadystatechange()()easyEventsAjax.js (line 34)
          [Break on this error] document.getElementById(...calDivId).innerHTML = xhro.responseText;

          Also:

          XUL box for span element contained an inline #text child, forcing all its children to be wrapped in a block.


          any ideas?

          Thanks

          Edit: Okay on removing jquery the months change now, but I still get errors:

          missing : after property id
          easyEventsAjax.js
          Line 7

          EasyEvents is not defined
          /events?ee_sy=2009&ee_sm=02
          Line 78

          Hmm I really need jquery :/
            • 22827
            • 129 Posts
            Quote from: goldsky at Feb 21, 2009, 02:39 PM

            try fix the easyEventsAjax.js, line 7:

            xhr0: window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("MSXML2.XMLHTTP.3.0"), 


            to be:

            var xhro = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("MSXML2.XMLHTTP.3.0"),


            I tried this, and the Next Month / Prev Month does page back and forth, but it isn’t ajaxing - in the javascript error log I get
            missing : in after property id"
            at line 7 xrho.

            So switching months doesn’t trigger the ajax, and selecting an event goes to the actual event page, and then the calendar can no longer display events because the snippet doesn’t run.

            If I put line 7 back how it is in the download, xrho: and next/previous no longer works, but clicking event titles does use ajax to display the event.

            Can anyone help? I have commited to getting my site live in a few hours.

            The test site is up here if it helps: http://prb.humit.com.au/events.aspx

            Many thanks.

            Paul
              • 29076
              • 615 Posts
              This might be to go backwards in development, but I want to go directly from a link in the event list to the full article. I don’t want the article content to show up in the AJAX field under the minicalendar.

              I have set the &gotoDetailsPage to be 1, so when I click on a link in the event list I can go directly to the full event document. But the content in the document still also shows up in the AJAX field under the mini calendar, and thats what I don’t want to happen.

              How can I prevent this? Thanks. smiley
                I think, thererfor I am! But what I am, and why...?
                • 22827
                • 129 Posts
                I couldn’t get some of the Ajax stuff to work, and so just removed all of the javascript calls.

                This will achieve what you want.

                  • 22829 ☆ A M B ☆
                  • 80 Posts
                  Quote from: paulkoan at Mar 05, 2009, 05:59 AM

                  Quote from: goldsky at Feb 21, 2009, 02:39 PM

                  try fix the easyEventsAjax.js, line 7:

                  xhr0: window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("MSXML2.XMLHTTP.3.0"), 


                  to be:

                  var xhro = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("MSXML2.XMLHTTP.3.0"),


                  I tried this, and the Next Month / Prev Month does page back and forth, but it isn’t ajaxing - in the javascript error log I get
                  missing : in after property id"
                  at line 7 xrho.

                  So switching months doesn’t trigger the ajax, and selecting an event goes to the actual event page, and then the calendar can no longer display events because the snippet doesn’t run.

                  If I put line 7 back how it is in the download, xrho: and next/previous no longer works, but clicking event titles does use ajax to display the event.

                  I’m not sure what goldsky was getting at with this change. I appreciated it at the time because it allowed users to move between months, but that’s just because this change, by itself, breaks the JS AJAX functionality and the calendar then works without the JS. I discovered that my AJAX problem moving between months stemmed from not naming one of my container div ids correctly (it needed to be <div id="ee_miniCalendarContainer"> or at least match what I had in the config). Once that was fixed, the errors went away and the calendar worked without the change above.
                    Time is what keeps everything from happening all at once.
                    • 20731
                    • 2 Posts
                    this is my first post on the forum. thanks a lot to all contributors for this great piece of software (modx).

                    thanks to jaredc for this great plugin. saved me a lot of time. where can I donate to buy you a cup of tasty cappuccino?

                    @derluecke
                    as to your question about problems with PHx I ran into the same problem. I found this solution quite helpful: http://modxcms.com/forums/index.php?topic=33316.0.

                    cheers martin
                      • 29076
                      • 615 Posts
                      Quote from: Sylvaticus at Mar 10, 2009, 09:41 AM

                      This might be to go backwards in development, but I want to go directly from a link in the event list to the full article. I don’t want the article content to show up in the AJAX field under the minicalendar.
                      Quote from: paulkoan at Mar 10, 2009, 04:44 PM

                      I couldn’t get some of the Ajax stuff to work, and so just removed all of the javascript calls.

                      This will achieve what you want.
                      Thanks for your answer, but I still want to have the rest of the AJAX functions. The only thing I want to have is the original eventlist under the calendar when I click on an eventlink, and not the content of the event document. The rest works perfect. See it here (in Norwegian).

                      I tried several hacks in some of the EasyEvent files, but with no luck. I think it must be something about the onclick function in the the event title link, but I just can’t get it to work. Can someone please help me on this?

                      Thanks. smiley
                        I think, thererfor I am! But what I am, and why...?