• I have a solid programming background but am brand new to wordpress(never written a plugin or a theme just basic stuff from the admin dashboard). I need to write a simple plugin that will add two sub-pages to the posts menu on the admin dashboard. The pages will be forms allowing users to input the post title, a featured image, a few paragraphs and list items. When the user submits the form the plugin will need to take the users input add some formatting and then create a new post. The point of this plugin is to allow many authors to quickly create posts that have a standard look across the site. I am reading through the plugin api looking for what I need now, I’m not looking for someone to write it for me, but if someone could kinda give me a jumpstart in the right direction, or point me to some pages that might help it would be greatly appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • It may be easier to use a plugin to display how the editor appears to certain users – e.g., give all the users who would fill out this form the “author” role and customize what capabilities that role has in your installation. It would use the same post screen, but wouldn’t display all the options. You can also control the ability to publish posts, so someone with a higher capability (editor/admin) could review. Take a look at add_cap() and remove_cap().

    Alternatively, if you’re going for a more streamlined content system (like eHow) have you considered using custom post types for the various content types. After rerereading your post, I’m pretty positive this would be the best option (probably in tandem with the user capabilities).

    Thread Starter TheNextBillGates

    (@thenextbillgates)

    Thanks a lot, I did some further reading and custom post types is the way to go with this one.

    Moderator bcworkz

    (@bcworkz)

    Rebecca has some great ideas, but I would probably take an only slightly different approach. Instead of dumbing down the author role, it makes more sense to create a new… uh, well, “dumb” author role. But that’s really just semantics.

    I would want to keep the ‘dumb author’ (I’m already regretting that choice of word) out of the main editor. Partly because I’m not too keen on hacking it. The modular concept of the content makes me want to create something like meta boxes to emphasize the modularity of the content. Only they would not be true meta boxes, the content elements would be parsed and assembled into formatted post content and stored as such. Nothing to do with meta data table other than the box concept.

    I may go so far as creating a separate new post panel for dumb authors. It almost sounds easier to create needed elements on a new page than to hide unneeded elements on the usual new post page. Just hide the whole page.

    I’m not convinced this demands custom post types, but it is certainly an option that could be used to some advantage. My two cents FWIW.

    Thread Starter TheNextBillGates

    (@thenextbillgates)

    It may not demand the custom post types but after further reading and some coding, I believe that custom post types highly simplify the implementation, and helps with the modularity of the site. I do plan on implementing custom meta boxes as you mention, you wouldn’t happen to have any links on doing that would you? I’ve found this Extending Custom Post Types.

    That link should give you a pretty good start.

    I do agree with the idea of creating a new user role. That may offer some more flexibility that simply editing an existing one.

    Creating an entirely new panel rather than custom post types, though, I’m not so sure. If you’re doing a List style post, for example, you can add all list element to a serialized array and store them as a single post option.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Posting from a plugin’ is closed to new replies.