We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26903
    • 1,336 Posts
    I’m sure a link checker has been asked for before so I’ll pencil this feature in, I’ll have a look at DocFinder.
      Use MODx, or the cat gets it!
      • 26903
      • 1,336 Posts
      Evo’s DocFinder is a nice little module(never used it before, quite impressed), so nice that I’ve lifted it in its entirety, and put it on a search tab in Janitor, see the screenshot attached. Works well. Need to finish some of the button functions such as edit/preview etc. and fix the calendars but looks like a great addition to Janitor for the next release.

      Being a module its a fairly standalone beast, once again its iframed in, paths changed etc. and it needs a $modx object so we create one at its entry then all we have to look for is any API calls it uses that aren’t present in the revo modx class API(most are), luckily only getting config and the fetchRow method needed to be changed. Had to bring in the Carbon theme from Evolutions manager, I may make this common so any other modules I nick can use it!



        Use MODx, or the cat gets it!
        • 28215
        • 4,149 Posts
        You should seriously consider recoding the DB access parts to xPDO, as then they would be database-agnostic, which DBAPI is not. *cough*
          shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
          • 26903
          • 1,336 Posts
          Yes, this is the first time I’ve had to use a modx object to get something in Janitor working. I think I was just a bit lucky here this time.

          I was originally thinking of making a pseudo evolution modx class whereby it exposed the same interface as the evo doc parser class but internally it had an embedded revo modx object, then anybody calling evo’s DB methods could just carry on but internally these would be passed to the revo modx object using either its API or XPDO as needed. That way any existing evo module code should just work without tweaking at all as it thinks its still inside evo.

          Its just a matter of taking the doc parser class, hollowing it out, adding a constructed revo modx object to it and filling it back in, some methods would just be pass through because of the API overlap, some wouldn’t of course and some may not be doable. Once done it could be used in any evo module porting work.

          I’ll probably just tidy up the back end of DocFinder for now and look at all this gain later given time.
            Use MODx, or the cat gets it!
            • 33337
            • 3,975 Posts
            This is fantastic! smiley
              Zaigham R - MODX Professional | Skype | Email | Twitter

              Digging the interwebs for #MODX gems and bringing it to you. modx.link
              • 26903
              • 1,336 Posts
              OK, DocFinder is working OK now on the Search tab, I’ll push this as the next release now(1.2beta).
                Use MODx, or the cat gets it!
                • 26903
                • 1,336 Posts
                OK, 1.3 beta about to hit the streets, added the link checker and a few layout tidy ups. Only the events tab to do now.
                  Use MODx, or the cat gets it!
                  • 37796
                  • 1 Posts
                  Can't see better place to report an error
                  The 'modx.php' in 'assets/components/janitor/common/' should have an amend at the top to
                  require_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . "/config.core.php";
                  require_once MODX_CORE_PATH . "config/".MODX_CONFIG_KEY.".inc.php";

                  From
                  require_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . "/config.core.php";
                  require_once MODX_CORE_PATH . "/config/config.inc.php";