User Submitted Posts lets your visitors submit posts and images from anywhere on your site and from anywhere on the page. User-submitted posts optionally include tags, categories, post title, and author name & URL. Submitted-post status can be set to draft, publish immediately, or publish after some number of approved posts. User Submitted Posts (USP) also handles multiple image uploads, custom URL redirects, and much more. And the easy USP Settings Page makes setting up and fine-tuning a breeze.
Let your visitors submit content
User Submitted Posts makes it easy to display a public post-submission form virtually anywhere on your site. Use the USP shortcode to display the submission form in any post or page, or use the USP template tag to include the form anywhere in your theme design. Visitors may then use the form to submit posts to your site. Depending on your preferences, user-submitted posts may include the following input fields:
- Author Name
- Author URL
- Post Title
- Post Tags
- Post Category
- Post Content
- Image upload(s)
Using the Settings Page, you choose which fields to display, min/max number of images, min/max image size, redirect location, error messages and more. User Submitted Posts makes it easy to setup just about any type of user-submitted functionality for your WordPress-powered site. Here are some examples of how the USP plugin could be used:
- Public Submit a Link form with tags
- Simple Submit News form with post, title & author
- Use as Contact Form that allows image attachments
- Use as an Image Uploader, maybe with tags, title or whatever
Once a user has submitted a post, it’s saved as a “Draft” by default, but may optionally be set to “Publish Immediately” or even to publish if the author has “x” number of approved submissions. The plugin also displays a User Submitted Posts button at the top of the Posts Page that lets you filter all user-submitted posts/drafts with the click of a button.
Features
- Let visitors submit posts from anywhere in your site
- Posts may include title, tags, category, author, url, content & image(s)
- Display submission form anywhere on the page via shortcode or template tag
- Redirect user to anywhere or return to current page after successful post submission
Image Uploads
- Optionally allow/require visitors to upload any number of images
- Specify minimum and maximum width and height for uploaded images
- Specicy min/max number of allowed image uploads for each post
- Includes jQuery snippet for easy choosing of multiple images
Customization
- Control which fields are displayed in the submission form
- Choose which categories users are allowed to select
- Assign submitted posts to any registered user
- Customizable error and upload messages
Post Management
- Includes template tags for easy display of post attachments and images
- One-click post-filtering of user-submitted posts on the Admin Posts page
- Saves as custom-fields with each post: name, IP, URL, & path info for each uploaded image
- Set submitted posts to any status: Draft, Publish, or publish after some number of approved posts
Installation
- Upload the
user-submitted-postsdirectory to your plugins folder - Activate the plugin in the WordPress Admin via the Plugins Page
- Go to the User Submitted Posts Settings page to customize the plugin
- Display the submission form using template tag or shortcode:
- To display the form on a post or page, use the shortcode:
[user-submitted-posts] - To display the form anywhere in your theme, use the template tag:
<?php public_submission_form(true); ?>
- To display the form on a post or page, use the shortcode:
- By default, the form width is 300px. To change the width, do the following:
- Open the CSS file:
/resources/user-submitted-posts.css - Edit the first rule block with the desired width, like so:
div#usp { width: 300px; } /* <- CHANGE FORM WIDTH */ - All other styles are relative to that width, so no other changes should be required (continue reading for more info about styling the form)
- Open the CSS file:
USP Template Tags
The User Submitted Posts plugin provides several additional template tags for greater flexibility.
Display image attachments for submitted posts
This template tag displays the images attached to user-submitted posts:
<?php post_attachments(); ?>
The post_attachments template tag prints the URLs for the specified image attachments. It accepts the following parameters:
<?php post_attachments($size, $beforeUrl, $afterUrl, $numberImages, $postId); ?>
$size = image size as thumbnail, medium, large or full -> default = full
$beforeUrl = text/markup displayed before the image URL -> default = <img src="
$afterUrl = text/markup displayed after the image URL -> default = " />
$numberImages = the number of images to display for each post -> default = false (display all)
$postId = an optional post ID to use -> default = uses global post
Return an array of attached images
This template tag returns an array of URLs for the specified post image:
<?php get_post_images(); ?>
Check if a post is a public submission
This template tag returns a boolean value indicating whether the specified post is a public submission:
<?php is_public_submission(); ?>
Styling the Submission Form
By default a CSS file is included with the submission form. It includes some basic styles for uniform structural and font display, but you will probably want to customize the look and feel of the form by adding a few styles of your own. The stylesheet includes all available selectors and is located in the following directory:
/user-submitted-posts/resources/user-submitted-posts.css
jQuery/JavaScript
Along with the stylesheet, an external JavaScript file is included on any page that displays the submission form. This file is located in the following directory:
/user-submitted-posts/resources/user-submitted-posts.js
By default, this file contains only a jQuery snippet for multiple image uploads. If you are customizing the form with additional jQuery/JavaScript, this is a convenient place to do so.
Screenshots
Here are some screenshots of the USP Settings Page, Posts Page, and Edit Post page:
120 Responses
Rob – March 18, 2012
Awesome plugin, thanks. One strange thing, the ‘choose file’ button is not clickable from iphone 4s with Safari.
John Briggs – March 21, 2012
Rob, that’s because iOS doesn’t allow access to files on the phone for browser uploading… It’s kind of a bummer for web-stuff.
Matt Rhys-Davies – March 19, 2012
Have just downloaded this and am testing it now – it sounds like it’s exactly what I’ve been searcging for.
sibichan – March 19, 2012
Not showing user submitted url (Author URL).
All other details showing correctly.
Author Name
Post Title
Post Tags
Post Category
Post Content
Do i need to add any short code to display Author URL ?
kirofabv – March 20, 2012
Greetings. A great plugin.
How can I show all images as a thumbnail, or at least 10-20 of them in my index page? And when someone clicks to go to the page the picture?
kirofabv – March 20, 2012
fixed –
<img src="ID, ‘user_submit_image’, true); ?>” />
;)
Matt Rhys-Davies – March 22, 2012
Hi,
Am having a play about with this. How can I add / customise specific error messages please?
Bahadır – March 22, 2012
hi, how can i add new fields? like youtube url, twitter user name, facebook page etc.
allison – March 23, 2012
Hi, seems like a great plugin! i added without any problems. However, when you post images they are not showing up. I see them in the media folder, but they are not displayed on the page.
Thanks,
Allison
allison – March 23, 2012
Hi, I found where to put the image code, but I need assistance with the code itself. Can you give an example of how to edit this?
<?php post_attachments($size, $beforeUrl, $afterUrl, $numberImages, $postId); ?>For example, I want to put a
<br>after the image. Everything else can be the default.Thanks!
Matt Rhys-Davies – March 26, 2012
Hi,
Could you advise how I can add in custom error messages please?
E.g. “you need to provide an image that is XXX by XXX?” instead of the generic error message.
That would be greatly appreciated.
Thanks,
Matt
Laurence – March 27, 2012
Hi looks like a great plugin but I can’t see the images in pending posts after a user has completed the form.
Any ideas welcome!
Tony – March 29, 2012
Hi, when the plugin displays your categories to choose to include in the form – it translates an Ampersand in the category name to ” & “.
For example, the category “Banks & Financial Institutions” turns into “Banks & Financial Institutions”.
Any idea how I can fix this?