In part three of the User Submitted Image Galleries series, we're going to look at automatically creating our "guest" user account, and process the image uploads from the submission form. This is where our plugin really begins to take shape. After this section, we will get into actually displaying our images on the "gallery" page.

You must be logged in and have an active premium membership to view the rest of this content. Register or login from the sidebar.

Join now to gain access to this tutorial and more.

Join Now
  1. humannature84

    Can you make this a plug in? I would purchase it NOW!

    • Pippin

      Once complete, it will be made into a plugin ready to download / purchase. There are a couple of parts left to the series though before the plugin will be ready.

  2. humannature84

    Your plug in support is rock solid! Do you have and idea when it will be available? My site launch will depend on it.

    • Pippin

      Not yet sure. There is quite a bit of work left to do on the plugin. I’m hoping to finish Part 4 sometime in the next three days. Once that’s done, the bulk of the plugin will be done.

  3. humannature84

    OK, no problem. Keep it up!

  4. Eric

    I’m really interested in a plugin doing this, hope you will launch it soon!

    I’m working on a client website and he wants this feature.

    Thank you!

    • Pippin

      I hope to get it done soon too :)

  5. Chris

    Not sure if you were planning on it — but a voting option would really help as no other plugin does it very well.

    • Pippin

      A voting option for the images will not be included with this plugin, but maybe I will do a tutorial on creating a voting plugin in general, for all post types.

  6. Predrag Vuklis

    Hi Pippin,

    very useful plug in! Need help with changing guest with part that user have to login to upload image. can you help?

    As a matter a fact this one from is exactly what I need. can you list what plugins I have to add in order to make all of this that you have done here?


    • Pippin

      The CG Cookie one is extremely heavily modified version of this. It’s all custom work.

  7. Predrag Vuklis

    ok. Can you help with changing guest with part that user have to login to upload image?

    Thanks in advanced

  8. Jay Adamsson

    You seem to have an error when you are checking extensions. Your code has “||”. It should use “&&”. Otherwise, it always produces an error.

    Also, when the $ext variable is set from the POST, I wrapped it in strtolower() to make sure that capitalization alone wouldn’t generate an error.

    • Pippin

      Which line are you seeing the error on?

    • Jay Adamsson

      The error is in the line that reads:

      if($ext != ‘jpg’ || $ext != ‘png’ || $ext != ‘gif’) {

  9. Eryanto Eryanto

    Hi, I’ve been working on your plugins, but I cannot get the categories to be attached to the image. I’ve checked that on this line,

    $cat = strip_tags(stripslashes($_POST[‘uig_image_cat’]));

    the $cat value is correct.

    However, the user submits, the category is not attached.
    Can you help on this?

  10. Eryanto Eryanto

    Hi Pippin,

    I’ve been trying your plugins. However, I couldn’t get the category input to be attached to the post. Up until this line,

    $cat = strip_tags(stripslashes($_POST[‘uig_image_cat’]));

    the value of $cat is still correct. However, the value is not attached to the post. When I check at the dashboard, the category is not selected. Can you help on this?


    • Pippin

      Have you modified the plugin at all?

  11. Eryanto Eryanto

    No, I didn’t.
    However, I tested on different machine, it worked. But on my machine, it’s not.

  12. Eryanto Eryanto

    I noticed that the problem only happens if the uploader is not the admin. If the uploaded is the admin, the category works fine.

    And also I have found the solution.

    I ditched this line
    ‘tax_input’ => array( ‘uig_image_category’ => array( $cat ) )

    and use wp_set_object_terms to set the category.

Error: Please enter a valid email address

Error: Invalid email

Error: Please enter your first name

Error: Please enter your last name

Error: Please enter a username

Error: Please enter a password

Error: Please confirm your password

Error: Password and password confirmation do not match