We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18397
    • 3,250 Posts
    What we really need is a function in the manager so that when you are editing (or adding) a resource, if the assets/resourcetype/resourcename/documenation.txt file exists, it will show you a link saying view documenation!

    Now that would be slick!

    ---Ryan Approved---
      • 25663 MODX Staff
      • 12,272 Posts
      Mark claims it’s only four lines of code to implement, and it was spurned by the fact that Newslisting now has about 25Kb of documentation code. Sounds like a winner to me!
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 18397
        • 3,250 Posts
        It would look something like this:

        <?php
        $file = "assets/$resourcename/$resourcename/$docfilename.$docext";
        if (file_exists($file)) {
        
        OUTPUT LINK STUFF (maybe some AJAX?)
        
        }
        php?>
        
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          In the "snippets" tag for editing documents, clicking on a snippet name producing a pop-up with at least the argument list would be nice. Actually, it would not be difficult to do something about extracting the commented head from a snippet and making a FAQ-style dropdown out of it immediately under the name. That would mean that snippet writers would have to use a standard format for the comments in the beginning of their code, or at least have a standard header delimiter.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 33337
            • 3,975 Posts
            Sounds very interesting !

            Keep up the good work guys-n-gals laugh

            regards,

            zi
              Zaigham R - MODX Professional | Skype | Email | Twitter

              Digging the interwebs for #MODX gems and bringing it to you. modx.link
              • 32241
              • 1,495 Posts
              Agree to this!

              We can havea better standard, so it’s easier for users to use it. While I have my own standar, susan has her own standard, same thing with Mark and the rest of the team. So any thoght of implementing a standard commenting system will be awesome. It will be much better if we set a standard for the code itself.

              I’m all for standard, so if any progress on this, please holler me.
                Wendy Novianto
                [font=Verdana]PT DJAMOER Technology Media
                [font=Verdana]Xituz Media
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Well, I’ve learned over the years not to become dogmatic over a standard I may prefer; the best standard is one that people will use!
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 32241
                  • 1,495 Posts
                  Quote from: sottwell at Feb 02, 2006, 09:31 AM

                  Well, I’ve learned over the years not to become dogmatic over a standard I may prefer; the best standard is one that people will use!

                  Well, that’s true as well. But what I have in mind is a better/simpler way for people to have an auth system on their snippet for example. Instead of hard coding it like myself, I think having a more flexible API for this auth system will be awesome. So far I only found one for webuser, but i need to make my own for manager user. I think this is not related to coding standard at all, so forget about my post. grin
                    Wendy Novianto
                    [font=Verdana]PT DJAMOER Technology Media
                    [font=Verdana]Xituz Media