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.
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.
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]
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.
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.
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