I’m trying to convert about two dozen blogs away from WordPress to ContentBox however there are a few things I can’t seem to get my mind around.
How do I set the post-type? In WordPress has types like “Standard, Status, Image, Link, Quote, Video” and I have a few additional types I would like to add. But in ContentBox, how do I do this?
I am trying to build a few modules (Plugins in WordPress world) - The first module is a mimic of SEO for WordPress by Yoast. This module needs to add an area below the page/post area in the admin? How do I do that?
I am creating another module that will add additional meta data such as Open Graph, MicroData, etc… Normally I would do this via a plugin in wordpress below the post as noted above but how do I store data in the database linked to the post? Do I just create my own table?
I have more questions but this give me a HUGE start on moving forward. I DO plan on releasing both of these plugins as soon as I get them live.
Any help will be greatly appreciated.
Jeremy R. DeYoung
615.261.8201 • firstname.lastname@example.org • LunarFly.com
On #2, what do you mean by “add an area below the page/post area” in the admin? Are you talking about the editor?
In that case, you could hook into the cbadmin_pageEditorInBody interception point. It is announced after the content area is rendered. The page is modules/contentbox-admin/views/pages/editor.cfm where the event is announced.
Then, when the post is submitted, you can hook into the cbadmin_postPageSave event to do what you need to with whatever you add in your view.
Same premise for entries, as well.
perfect - is there a list of contentbox interception points and how they are used?
Dunno about a description, but the list can be found in: modules/contentbox-admin/ModuleConfig.cfc
RE: additional, custom post types, I don’t believe that’s currently possible. However, others have brought this up, so hopefully it’s something that can be integrated at some point in the future.
RE: extra fields, there is the “custom fields” section that eventually stores the extra data in cb_customfield table in the DB. I believe that that section expects the data to be entered via the interface provided, though, so if you added custom data into that table through your module via an alternate route, it might create interesting results when your custom-loaded custom fields are populated when editing the page…
Another table would work, of course. I eventually went this route when I created a module recently.
That said, I’m interested to see what suggestions others have.
For saving settings, you might wish to check my for creating settings and having them saved.
The idea is to use the cbSettings for a serialised json of the settings, it may not suit your needs but it is a start without creating extra tables.
Very good Andrew! Will check it out!