WordPress.org

Forums

Frontend Uploader
[resolved] Uploads to Custom Post Type (12 posts)

  1. karenfya
    Member
    Posted 2 years ago #

    Hello. I am trying to get a very basic forum sort of thing going with your plugin only I can't seem to actually upload after coming up with my custom code, page just refreshes on Submit. Here is what I'm using:

    [fu-upload-form form_layout="post_image" post_type="board"]
    [textarea name="caption" class="textarea" id="ug_title" description="Title"]
    [textarea name="caption" class="textarea"  class="required" id="ug_caption" description="Description"]
    [input type="file" name="photo" id="ug_photo" description="Your Photo" multiple=""]
    [input type="submit" class="btn" value="Submit"]

    You mentioned to include post_type in settings, but I don't know how. I did add it as category id 1 in the settings blank but the slug is board. So I tried post_type="board" and post_type="1" with no luck. I'm sorry. Can you help?

    http://akpetcremations.com/grief-and-comfort-board/

    http://wordpress.org/extend/plugins/frontend-uploader/

  2. Rinat Khaziev
    Member
    Plugin Author

    Posted 2 years ago #

    You should check your custom post type( see the link ):
    http://cl.ly/image/1O1A2T2v0x3P

    You forgot to close the shortcode, it should be:

    [fu-upload-form form_layout="post_image" post_type="board"]
    [textarea name="post_title" class="textarea" id="ug_title" description="Title"]
    [textarea name="post_content" class="textarea"  class="required" id="ug_caption" description="Description"]
    [input type="file" name="photo" id="ug_photo" description="Your Photo" multiple=""]
    [input type="submit" class="btn" value="Submit"]
    [/fu-upload-form]

    Also, leave category setting blank and see if that works.

    Let me know if that helps.

  3. karenfya
    Member
    Posted 2 years ago #

    Thank you very much for your help. The form now works and uses the correct category! A few things though... With a picture included you get the confirmation message, without a picture you get this on the frontend side
    Fatal error: Cannot unset string offsets in /home/content/38/7902638/html/pcsite/wp-content/plugins/frontend-uploader/frontend-uploader.php on line 377
    BUT the post is created correctly for the backend.

    When a picture is included it does not automatically add to it's created post, the post only comes up with Title and Description. Is there a way to fix this?

  4. Rinat Khaziev
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks for the catch on error, will fix in future version.

    I suggest to add class="required" to the
    [input type="file" name="photo" id="ug_photo" description="Your Photo" multiple=""]

    so that it looks like:
    [input type="file" name="photo" id="ug_photo" description="Your Photo" multiple="" class="required"]

    That'll make sure that the form won't be uploaded if user have not attached any photos.

    The files are attached automatically, you can see it in Media->Manage UGC. It won't be displayed automatically in the post, but if you click "add new media" button on post edit screen and select images attached to this post, you'll see that it's there

  5. karenfya
    Member
    Posted 2 years ago #

    Hmm... thank you for the advice, but I really don't need photos to be required. :P Your plugin is so very nice to include post creation that I would rather not bother with anything else if possible. I suppose for now I will warn users on the page that if they get that error that their submission really was received. :)

    Thanks for letting me know how to display the attached images. Perhaps a suggestion for a future update that they do display automatically? :P Before yours, I had tried the Post from Images plugin and it works decently well. It allows custom code entry for new posts and I used:
    <a class="shutterset_" href="[url]" /><img src="[url=medium]" alt="[title]" class="alignleft" /></a>
    to make the posts look better. I don't know how hard it is to integrate a similar system though. I admire you for your coding skills! I know I can't make plugins!!! :P

  6. karenfya
    Member
    Posted 2 years ago #

    Just so you know, I am now getting this error on Submit with no media attachment:

    Warning: join() [function.join]: Invalid arguments passed in /home/content/38/7902638/html/pcsite/wp-content/plugins/frontend-uploader/frontend-uploader.php on line 379
    
    Warning: Cannot modify header information - headers already sent by (output started at /home/content/38/7902638/html/pcsite/wp-content/plugins/frontend-uploader/frontend-uploader.php:379) in /home/content/38/7902638/html/pcsite/wp-includes/pluggable.php on line 876

    Still goes through though! Thanks for the awesome plugin!

  7. Rinat Khaziev
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks, I'll take a look

  8. EveretJohn
    Member
    Posted 1 year ago #

    My Theme has a custom post section called PROPERTIES. When I put this short code: [fu-upload-form form_layout="post_image" post_type="properties"]

    into >Properties> Add New Post but when a post and image are submitted from the front end they go into regulars posts but not property posts. I did set BASIC setting to check mark properties.

  9. Rinat Khaziev
    Member
    Plugin Author

    Posted 1 year ago #

    Can you provide your shortcode fully? You sure that post type is 'properties' and not 'property'? Post type slugs are usually in singular form. Can you also provide your 'register_post_type' part from your theme's functions.php?

  10. EveretJohn
    Member
    Posted 1 year ago #

    Thank you for writing me back, you are way over my head when it comes to this technical stuff.

    I read the README file in the plugin, tried every short code variation under the sun I could think to try. I clearly don't know what I'm doing and/or my Theme doesn't play nice with your plug-in.

    I literally invested 3-4 hours, reading, testing, checking the forum etc.

    I just looked at a Slug and it says properties.

    I explored my Theme's functions.php file for a 'register (register any ole thing) and had 49 results but not one looked remotely like a 'register_post_type' ???

  11. Rinat Khaziev
    Member
    Plugin Author

    Posted 1 year ago #

    Try searching in the theme folder then. It should be somewhere unless you added it with some plugin. If that's the case try searching your whole plugin directory.

    http://codex.wordpress.org/Function_Reference/register_post_type

  12. EveretJohn
    Member
    Posted 1 year ago #

    Thank you for reaching back out to me. I am going to try to go a different direction with plugin(s) have completely different functions.

    The bottom line is, I "thought" I knew what I wanted when I tried your plugin but now, in looking back, I needed something different.

    My guess is (and I have to guess since I know very little about coding, php etc.) is my Theme requires I tweak your plugin and that's way above my pay grade

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Frontend Uploader
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.