We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28215
    • 4,149 Posts
    And the end part of creating 3rd party components, this section deals with creating the snippet, the lexicon, and building and installing the component package.

    http://svn.modxcms.com/docs/display/~splittingred/2008/06/26/Writing+a+3rd+Party+Component+in+MODx+Revolution%2C+Pt.+II

    Enjoy!
      shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
      • 34127
      • 135 Posts
      Great tutorial series you have going, these will definitely be helpful to those of us unfamiliar with 097!

      I’m having trouble with this tutorial though, namely getting the package to install. I’ve followed your instructions exactly: created the DB table and XML schema, ran the build file, created the snippet, and built the package. Everything seems to work fine - up to this point all of the files are where they should be. But when I try installing the package nothing happens. It find the package, I select to install it, and no errors occur, but the assets/snippets directory is doesn’t contain anything for doodles. huh

      I’m running on WAMP and the latest SVN version, if that makes a difference. I have a feeling it has to do with the "Source" resolver, but I’ve tried so many combinations ( "/wamp/www/modx097/doodles/trunk/assets", "C://wamp/www/modx097/doodles/trunk/assets" and "/modx097/doodles/trunk/assets" to start with) that I’m out of ideas. Any idea what I’m doing wrong? Thanks!
        • 3749
        • 24,544 Posts
        Quote from: splittingred at Jun 26, 2008, 03:01 PM

        And the end part of creating 3rd party components, this section deals with creating the snippet, the lexicon, and building and installing the component package.

        http://svn.modxcms.com/docs/display/~splittingred/2008/06/26/Writing+a+3rd+Party+Component+in+MODx+Revolution%2C+Pt.+II

        Enjoy!

        Great stuff. Thanks!

        I struggled with part III before. It might help to slow the presentation down a little in that one and offer a tiny bit more explanation. Parts I and II were fantastic as is this one.

        Bob
          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
          • 25663 MODX Staff
          • 12,272 Posts
          Thanks for the feedback Bob et al. If you’ve got some concrete examples of what you’d like to see, it’d be great to jump in there and make a few edits ... it is a wiki after all!
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 28215
            • 4,149 Posts
            Quote from: Ricjustsaid at Jul 07, 2008, 11:01 PM

            I’m having trouble with this tutorial though, namely getting the package to install. I’ve followed your instructions exactly: created the DB table and XML schema, ran the build file, created the snippet, and built the package. Everything seems to work fine - up to this point all of the files are where they should be. But when I try installing the package nothing happens. It find the package, I select to install it, and no errors occur, but the assets/snippets directory is doesn’t contain anything for doodles. huh

            I’m running on WAMP and the latest SVN version, if that makes a difference. I have a feeling it has to do with the "Source" resolver, but I’ve tried so many combinations ( "/wamp/www/modx097/doodles/trunk/assets", "C://wamp/www/modx097/doodles/trunk/assets" and "/modx097/doodles/trunk/assets" to start with) that I’m out of ideas. Any idea what I’m doing wrong? Thanks!

            Where is the doodles/trunk/assets directory located on your hard drive?

            Is it at: C:/wamp/www/modx097/doodles/trunk/assets/ ? Make sure you only have one / after C:
              shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
              • 22770
              • 285 Posts
              Thanks for this! I’m finding it much easier to follow. One question, though:

              Where in the documentation can I find information about functions like $modx->newQuery and $modx->getCollection ? I’ve tried looking through http://docs.modxcms.com/ but I’ve no idea how to find anything in there, and I don’t even know if that’s the right place to look for info.

              smiley
                • 28215
                • 4,149 Posts
                Quote from: PatrickSamphire at Jul 08, 2008, 08:33 AM

                Thanks for this! I’m finding it much easier to follow. One question, though:

                Where in the documentation can I find information about functions like $modx->newQuery and $modx->getCollection ? I’ve tried looking through http://docs.modxcms.com/ but I’ve no idea how to find anything in there, and I don’t even know if that’s the right place to look for info.

                They are at docs.modxcms.com, but in the xPDO package, since those are xPDO functions (the modx class extends xPDO).

                Try using the dropdown in the top right to select the xpdo package. That should show you the xPDO classes and methods.
                  shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                  • 22303 MODX Staff
                  • 10,725 Posts
                  If you go all the way to the bottom of the modX class page, you will see links to all the methods inherited by that class from xPDO.
                    • 34127
                    • 135 Posts
                    Quote from: splittingred at Jul 08, 2008, 06:54 AM

                    Quote from: Ricjustsaid at Jul 07, 2008, 11:01 PM

                    I’m having trouble with this tutorial though, namely getting the package to install. I’ve followed your instructions exactly: created the DB table and XML schema, ran the build file, created the snippet, and built the package. Everything seems to work fine - up to this point all of the files are where they should be. But when I try installing the package nothing happens. It find the package, I select to install it, and no errors occur, but the assets/snippets directory is doesn’t contain anything for doodles. huh

                    I’m running on WAMP and the latest SVN version, if that makes a difference. I have a feeling it has to do with the "Source" resolver, but I’ve tried so many combinations ( "/wamp/www/modx097/doodles/trunk/assets", "C://wamp/www/modx097/doodles/trunk/assets" and "/modx097/doodles/trunk/assets" to start with) that I’m out of ideas. Any idea what I’m doing wrong? Thanks!

                    Where is the doodles/trunk/assets directory located on your hard drive?

                    Is it at: C:/wamp/www/modx097/doodles/trunk/assets/ ? Make sure you only have one / after C:
                    Yep, I placed it inside my root modx097 directory. I gave it another try just now using backslashes for the path (C:\wamp\www\modx097\doodles\trunk\assets) and it worked beautifully -- stupid backslashes! I thought windows used both?? tongue

                    I have a quick question: if were were going to add multiple elements to our package (ie. several chunks, along with a snippet), we would just add vehicles for each of those elements and build it like normal?
                      • 22770
                      • 285 Posts
                      Okay, found them. Now all I have to do is try to understand... grin