New Community Forums are coming. Watch this space for news.
Subscribe: RSS
  • OCD Coder, that looks great. Have you considered submitting it as a pull request (or at least posting the code at the bug tracker)? That would make it much more likely that your work will make it in to the MODX code.

    PLEASE, PLEASE specify the version of MODX you are using.
    MODX info for everyone:
      Get my Book: MODX:The Official Guide
      MODX info for everyone:
      My MODX Extras
      Bob's Guides is now hosted at A2 MODX Hosting
    • Thank you! I actually sat down a couple of weeks ago on a Friday night to get myself all set up with GitHub so I could start submitting things, but got interrupted. (Did I just admit that's how I spend my Friday nights? Um...) I got to the point of having a local clone, but I haven't figured out how you deal with branches as far as running and testing in a browser. I need to talk to people who know things about development environments.

      I have a list a mile long of things I want to submit and add-ons I want to make. Problem is I usually end up doing stuff like the above (or all those changes I did to Newspublisher) as part of big projects, and then the next big project comes along...

      Anyone is welcome to grab that and submit it if they want, I don't need my name on it. Or I'll try to get it together enough to finish setting up my development environment here so I can finally contribute. It is Friday, after all. ;-)

      (I actually had a dream last night about an alternate method for form customization that (to me) would be much simpler and less confusing. I don't think I need to be working Friday nights, I think I need a nice long vacation!)
        If there's a better way to do it, I'll find it.
      • The short version (off the top of my head):

        • Create your own github account
        • Create a fork of MODX by clicking on the fork button at the MODx repo
        • If on Windows, do this so your line endings won't cause trouble: git config --global core.autocrlf true
          [li]Clone your fork with git clone -- you'll be on your master branch: git clone modx
        • You need two remotes, origin (your fork) should already exist. Create a second called upstream pointing to the MODX repo:
        • git remote add upstream
        • Create a tracking branch that tracks the MODx repo:
          [li] git fetch upstream
        • git checkout -b develop upstream/develop
        • Just before making any changes, update your local develop branch (be sure you're on that branch):
        • git fetch upstream develop
        • git merge --ff-only upstream/develop
        • Create a branch to work on your contribution (e.g., git checkout -b mycode)
        • Make your changes.
        • Make sure your changes are staged (git add . ) -- note the dot
        • Commit your changes with a comment (e.g., git commit -a -m "Here's what I did")
        • Type git status to make sure everything got committed
        • Just before issuing your pull request, update again, but like this:
        • git fetch upstream develop
        • git rebase upstream/develop (rebase will tack your changes on to the end of any MODX changes)
        • Push your new branch to your fork (git push origin mycode)
        • Go to the modx repo at GitHub and make a pull request to pull your mycode branch into the MODx dev branch
        • Have a beer

        Never merge your own changes into the develop branch and never make changes in that branch yourself. If you do, and MODX uses your pull request, your changes will be in there twice when you update develop and future pull requests from you will be very difficult to use.

        For future pull requests, switch to your develop branch (git checkout develop), update it with fetch/merge and create a *new* branch to work following the steps above from that point on.

        Optional: You can remove the unnecessary local branches and unnecessary branches at your fork (e.g., master, release 1.1, etc. This will free up disk space and cut down on the clutter. Be sure not to delete the develop branch.

        This will show you all the local branches: git remote
        This will show you the remote branches: git remote -r

        remove local branches with: git branch -D branchname
        remove remote branches at your fork with: git push origin :branchname

        PLEASE, PLEASE specify the version of MODX you are using.
        MODX info for everyone:
          Get my Book: MODX:The Official Guide
          MODX info for everyone:
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
        • Hey,
          whats up with this feature? Can this (natively) be done in Revo 2.3.3? I am really tired of duplicating dozens of customization sets.. I would love being able to use comma separated values. I also tried OCDCoders suggestion from page #3, but without luck sad