We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34162
    • 1 Posts
    If you are going to use "class" to identify class contruct and rather than using "inc" which is too general how about using "function" if it is for function and "html" if it is used for html and etc.
      • 1764
      • 680 Posts
      Quote from: OpenGeek at Nov 16, 2005, 03:32 PM

      the notation for identifying what role the PHP file plays is important IMO.

      I can see your point to an extent especially with .class or something similar. But why specify .inc for files that are already in the includes directory? Or action.static for files in the /actions/static folder?
        • 25663 MODX Staff
        • 12,272 Posts
        I’ll buy the ".class" for sure. That definitely makes sense.

        I’ll pass on .inc when it’s in an includes directory, or other such nonsense. Unless any potential error reporting doesnt return the path to the erroring file. wink
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 22303 MODX Staff
          • 10,725 Posts
          For that matter then, we could do away with the dot notation in the file names and just organize the files into directories for includes, scripts, classes, etc. -- however, I often create a folder of resources that might have one of each of these (WebLogin snippet is an example) and I like to know which is which in that directory. I just think it’s more consistent to stick with one convention.
            • 32963
            • 1,732 Posts
            Hmm,

            IMO .inc tells me that the file is to be included inside another file. I think we should keep it. The .class extension is also good to have

              xWisdom
              www.xwisdomhtml.com
              The fear of the Lord is the beginning of wisdom:
              MODx Co-Founder - Create and do more with less.
              • 22303 MODX Staff
              • 10,725 Posts
              However, class and inc together is redundant; class files aren’t very useful if they aren’t included somewhere. wink
                • 32963
                • 1,732 Posts
                Quote from: OpenGeek at Nov 16, 2005, 10:06 PM

                However, class and inc together is redundant; class files aren’t very useful if they aren’t included somewhere.   ;)

                Hmmm,

                True! All class files are considered include files but not all included files contains class objects
                  xWisdom
                  www.xwisdomhtml.com
                  The fear of the Lord is the beginning of wisdom:
                  MODx Co-Founder - Create and do more with less.
                  • 25663 MODX Staff
                  • 12,272 Posts
                  How classy of you to include the distinction! (Insert gong sound here...)
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me