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
    Quote from: mattcdavis1 at Jan 23, 2010, 08:21 PM

    Templates of packages? Templates are simple - even easier than WP. It’s creating packages that I find challenging.
    You might want to look into this:
    http://modxcms.com/extras/package/613
      shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
      • 18654
      • 191 Posts
      That looks really cool! I’m going to try it out and see how it goes. Thanks!
        God does not save those who are only imaginary sinners. Be a sinner, and let your sins be strong, but let your trust in Christ be stronger, and rejoice in Christ who is the victor over sin, death, and the world.
        • 18654
        • 191 Posts
        Quote from: splittingred at Jan 23, 2010, 11:57 PM

        You might want to look into this:
        http://modxcms.com/extras/package/613

        I created my first package with the templatepackager component which was really cool. I have a couple questions:

        1. I’m guessing the files that are to be included with the template are for images/css/javascript correct?
        2. How do I integrate php functionality into my package? At first I thought I would just create a file with a bunch of classes in it and then put an include in the template file, but I forgot that I couldn’t use php in my template.
        3. How do I integrate chunks and snippets into my package?
        4. Is there a way to have a script run at package install to programatically create snippets, chunks, custom DB tables, etc.?
        5. Will multiple templates eventually be supported via this component?

        As a side question related to question 2, is there any disadvantage to bypassing chunks and snippets in favor of includes which would contain the equivalent of chunks and snippets but would be located on the file system instead of the database?

        -matt
          God does not save those who are only imaginary sinners. Be a sinner, and let your sins be strong, but let your trust in Christ be stronger, and rejoice in Christ who is the victor over sin, death, and the world.
          • 17499 ☆ A M B ☆
          • 872 Posts
          That’s why i said "almost" smiley

          I don’t know about the templatepackager component, but by making your own build.package you can:

          1. Integrate any snippet, chunk, plugin or tvs with the template
          2. Run a custom php script at install

            • 28495
            • 17 Posts
            In our market segment, business owners are not technical, but they want to blog, and obviously wordpress with its blogging interface and support for blogging clients, thousands of widgets and ease of use makes life very easy for them.

            I’m not so sure always positioning modx as a framework for developers and sort of scoffing at questions that are front end related is the right attitude...as I know from our experience, it’s much easier to simply use wordpress for blogging, as apposed to the "build bespoke blogging project by project"...

            That doesn’t seem to be a message that is well received here, I find that both interesting and a bit disappointing...but in the end we’ll look to third party options, and on our current project, we’ll do what we’ve been doing, modx for site, with wordpress for blog...
              ------------------------
              Stephen White
              Cofounder
              Zemelo Corporation
              [email protected]
              • 17499 ☆ A M B ☆
              • 872 Posts
              Quote from: stephenwh at Feb 04, 2010, 11:27 AM

              In our market segment, business owners are not technical, but they want to blog, and obviously wordpress with its blogging interface and support for blogging clients, thousands of widgets and ease of use makes life very easy for them.

              I’m not so sure always positioning modx as a framework for developers and sort of scoffing at questions that are front end related is the right attitude...as I know from our experience, it’s much easier to simply use wordpress for blogging, as apposed to the "build bespoke blogging project by project"...

              That doesn’t seem to be a message that is well received here, I find that both interesting and a bit disappointing...but in the end we’ll look to third party options, and on our current project, we’ll do what we’ve been doing, modx for site, with wordpress for blog...

              You’re right, Wordpress is better than MODx for blogging purpose, and as a matter of a fact, i use it when i need to build blog based service.

              In the meantime, i don’t believe that your message is not well received, it’s just that some of us hope to stay with MODx even with blogging.
              I do think that a good front end editor can be as easy as the back end of Wordpress, to use for non technical user. That’s not the case (yet!) with MODx, but future can be surprising.

              To summarize, i do understand that Wordpress is better, but exactly like a wordpress fanboy who try to hack Wordpress to use as a regular CMS, i would like to make MODx an amazing blog platform if needed.

              Easy to say...
                • 30497
                • 245 Posts
                Quote from: stephenwh at Feb 04, 2010, 11:27 AM

                In our market segment, business owners are not technical, but they want to blog, and obviously wordpress with its blogging interface and support for blogging clients, thousands of widgets and ease of use makes life very easy for them.

                I’m not so sure always positioning modx as a framework for developers and sort of scoffing at questions that are front end related is the right attitude...as I know from our experience, it’s much easier to simply use wordpress for blogging, as apposed to the "build bespoke blogging project by project"...

                That doesn’t seem to be a message that is well received here, I find that both interesting and a bit disappointing...but in the end we’ll look to third party options, and on our current project, we’ll do what we’ve been doing, modx for site, with wordpress for blog...

                Hi Stephen,

                I am not a Revo expert, but I am playing around with it, and I have done many installs of evo by now, including many sites with blogs.

                I think in order to get to a better understanding of what you are asking, I’d really like to know, exactly, what would make a robust blogging system.

                Also (related), What missing features make you grab for wordpress instead of building the blogs on previous work directly in modx evo?

                With the simple combination of modx evo + ditto + PHx + ManagerManager + Jot I think you can cover all the essentials of a "blog". Other stuff that is delegated to plugins in WordPress, for instance URL and other SEO stuff, is right in the core of MODx evo.



                  • 3749
                  • 24,544 Posts
                  Quote from: stephenwh at Feb 04, 2010, 11:27 AM

                  In our market segment, business owners are not technical, but they want to blog, and obviously wordpress with its blogging interface and support for blogging clients, thousands of widgets and ease of use makes life very easy for them.

                  I’m not so sure always positioning modx as a framework for developers and sort of scoffing at questions that are front end related is the right attitude...as I know from our experience, it’s much easier to simply use wordpress for blogging, as apposed to the "build bespoke blogging project by project"...

                  That doesn’t seem to be a message that is well received here, I find that both interesting and a bit disappointing...but in the end we’ll look to third party options, and on our current project, we’ll do what we’ve been doing, modx for site, with wordpress for blog...

                  Stephen, Honestly, I don’t recall seeing anything I could call "scoffing" at front-end questions (or anything else, for that matter), but MODx would be pretty foolish to position itself primarily as a blogging platform since WP already does that so well. I think if you search these forums for "WordPress," overall, you’ll find that the senior members here often *recommend* WordPress for people who want to create a blog and sometimes use it themselves. I do both.

                  If, OTOH, a planned site will be expanded significantly beyond its blog, it makes sense to use both MODx and WP and try to integrate them in various ways, or to create your blog in MODx. Many people have very sophisticated blogs in MODx, but since there is no complete blog plugin for MODx at this point, that strategy is limited to people you would call "developers." We don’t have a lot of choice about that.

                  We also have to get the platform built before we can add a blog package and MODx Revolution -- where the blog package would go -- is still in Beta.

                  I believe that once Revolution is widely adopted, a turn-key blog package will be developed for it (I may do it myself). At that point, you may want to rethink your current strategy. smiley
                    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
                    • 18654
                    • 191 Posts
                    I’m currently getting ready to implement blog functionality into an existing website. I know one approach would be to use Quip, which I’ve experimented with a bit. However, I prefer to write my own snippets as much as possible because it gives me more control and I know how to fix stuff when it breaks.

                    One method I’m thinking of trying is as follows - I’d like some input as to whether there’s any significant downside to this approach:

                    1. Create a resource "blog page" with a template suitable for blogging.
                    2. When the client wants to make a new post, simply add a child.
                    3. When a web user wants to comment, create a new object using $modx->newObject and assign the the blog post as it’s parent. If the client wants to approve the comment before allowing it to display on the web page, simply set published to ’0’ or vice-versa.

                    The resource template would then simply fetch all the blogs and their children and display them accordingly. Tags could be added via a template variable with comma separated values and categories could be applied using the category functionality already provided in ModX.

                    Additionally, if the client wanted to require users to be logged in to make comments, this functionality could easily be added.

                    Any thoughts on this approach?

                    Also, are there built-in modx functions for making user input database safe? And for escaping output (neutralizing any javascript / html characters)? Or do we just use native php functions for this?

                    For example, I know with Zend I can use $this->escape($output) for displaying content and for inserting data to DB, nearly all input is automatically made DB safe using the insert method of the Zend_Db object.

                    -matt
                      God does not save those who are only imaginary sinners. Be a sinner, and let your sins be strong, but let your trust in Christ be stronger, and rejoice in Christ who is the victor over sin, death, and the world.
                      • 3749
                      • 24,544 Posts
                      Your approach sounds reasonable as long as the total number of blog posts + comments doesn’t get too large. At some point, things will start to slow down.

                      Other things to think about:

                      * A system for archiving and retrieving older posts and their comments.
                      * Pagination once there are a significant number of posts.
                      * A "Report to Moderator" function when posts and comments are published immediately
                      * Ability to email the author of a post.
                      * Ability to see all posts from a particular author (for multi-author blogs).
                      * Search.
                      * Front-end deletion and/or editing of posts by admins.
                      * Tagging
                        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