We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    I see both are used in Evo ($modx->Event in siteCache.idx.php) but I could only find $modx->event in Revo.

    Wondering what’s up with this. huh

    Also, is the event name available in Evo as $modx->event->name?
      Did I help you? Buy me a beer
      Get my Book: MODX:The Official Guide
      MODX info for everyone: http://bobsguides.com/modx.html
      My MODX Extras
      Bob's Guides is now hosted at A2 MODX Hosting
    • Quote from: BobRay at Sep 12, 2009, 06:13 AM

      I see both are used in Evo ($modx->Event in siteCache.idx.php) but I could only find $modx->event in Revo.

      Wondering what’s up with this. huh

      Also, is the event name available in Evo as $modx->event->name?
      Event as a reference to event was removed in Revo on purpose. event->name should be available in Evo, but I’m not sure.
        • 3749
        • 24,544 Posts
        Quote from: OpenGeek at Sep 12, 2009, 03:44 PM

        Quote from: BobRay at Sep 12, 2009, 06:13 AM

        I see both are used in Evo ($modx->Event in siteCache.idx.php) but I could only find $modx->event in Revo.

        Wondering what’s up with this. huh

        Also, is the event name available in Evo as $modx->event->name?
        Event as a reference to event was removed in Revo on purpose. event->name should be available in Evo, but I’m not sure.

        Thanks, I’ll test it and let you know. That reminds me of a question I’ve been meaning to ask about debugging plugins. What’s the best way to pop up a debugging message in a plugin in Revo? I’ve tried alert() but it usually doesn’t work.
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
        • Quote from: BobRay at Sep 12, 2009, 05:37 PM

          Thanks, I’ll test it and let you know. That reminds me of a question I’ve been meaning to ask about debugging plugins. What’s the best way to pop up a debugging message in a plugin in Revo? I’ve tried alert() but it usually doesn’t work.
          I use $modx->log() and this IMO should become the standard way of debugging. An error console, similar to what is seen in Package Management should be developed (which uses $modx->log()), but how to implement this for front-end use needs TBD.
            • 3749
            • 24,544 Posts
            Quote from: OpenGeek at Sep 12, 2009, 07:33 PM

            I use $modx->log() and this IMO should become the standard way of debugging. An error console, similar to what is seen in Package Management should be developed (which uses $modx->log()), but how to implement this for front-end use needs TBD.

            Can you remind me how to get $modx->log() to display a message on the screen rather then writing to the error log?
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
            • Quote from: BobRay at Sep 12, 2009, 11:15 PM

              Quote from: OpenGeek at Sep 12, 2009, 07:33 PM

              I use $modx->log() and this IMO should become the standard way of debugging. An error console, similar to what is seen in Package Management should be developed (which uses $modx->log()), but how to implement this for front-end use needs TBD.

              Can you remind me how to get $modx->log() to display a message on the screen rather then writing to the error log?

              This is done by changing the "log target" via $modx->setLogTarget($target), where $target can be "HTML", "ECHO", a file target definition, or a modRegister instance. By default, MODx uses a file target definition which points at the core/cache/logs/error.log, and when installing a package, it is temporarily directed to a modRegister instance. The setLogTarget() function returns the current target so you can set it back once you are done redirecting to another target temporarily.