WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: Custom Field Template] Uploader progress? (10 posts)

  1. HeroicNate
    Member
    Posted 4 years ago #

    I'm testing out the beta and the custom field template plugin. Awesome by the way. However, currently I notice that to upload a file the user has to publish the post. Is it possible to have an upload option so they can upload and see the upload progress? I imagine it could use the standard wordpress uploader, like the new thumbnail option has with specified sizes etc. Then if the upload is an image, the users could even edit it with the standard wordpress tools.

    I love this plugin as it is more up to date than the others. I wish there was something I could do to help with it, but I don't really know php. My hope for this plugin is that it will get a better user interface to make things easier to set up.

  2. HeroicNate
    Member
    Posted 4 years ago #

    added proper tag. I think.

  3. proximity2008
    Member
    Posted 4 years ago #

    Hi Heroic,

    The upload progress would be tricky. It is probably too difficult to do at this stage. The ability for a user to edit the image that has been uploaded could be done; if you know some javascript or jQuery.

    I would go about it by adding a link to the right of the image that holds the uploaded attachment_id. The only way you can do that easily is by javascript. You can attach your own javascript files in the Template instruction area inside the CFT template.

    That attachment_id can be used to open up the admin Media.php file. E.g.
    /wp-admin/media.php?action=edit&attachment_id=attachment_id in a popup window. The user could make the edits from there, add captions etc and what would affect that image that you'd previously uploaded.

    A bit of an effort, but doable.

    I hope that makes a bit of sense?

  4. HeroicNate
    Member
    Posted 4 years ago #

    I see. My concern is that authors won't understand what needs to be done to upload the image. Currently the file only seems to upload once you hit the publish button with no notification of an upload. I was hoping it wouldn't be that hard as I thought it could tie into what wordpress already has. I've seen some plugins, like flutter, that have a nifty uploader and stuff, but those plugins don't have support for post types yet. I'm real excited about the post types.

    You seem to be knowledgable about what's going on with this plugin. Do you know if it will have support for categories? By that I mean allowing the poster to check multiple categories they want the post in. As it stands, it doesn't seem to, unless i'm missing something. Seems like you have to specify in the settings what cat field the post will show up on. Maybe I just don't understand how this works.

  5. HeroicNate
    Member
    Posted 4 years ago #

    ignore the category paragraph, i'm getting my plugins confused. it'd be nice it it'd work for parent/child relationships though. Where if you check any child cat it loads the parent custom field.

  6. HeroicNate
    Member
    Posted 4 years ago #

    I've been playing with it more and notice that the text box option allows you to add media via the wordpress uploader like what I was thinking of, but I don't see a way to delineate the file name of the image from the rest of what might be in the gallery. When I try the file upload field, all that is returned in the meta field is a number, rather than a file location and name. Is there a way for that to work?

  7. proximity2008
    Member
    Posted 4 years ago #

    If you use a textarea with the the media embedder you will have further problems when you try out the image on the front end. I'd stick with the file input.

    I try the file upload field, all that is returned in the meta field is a number, rather than a file location and name.

    That is the point. It is far more usable storing the image_id than a filename as it makes the plugin flexible. If you save an image id you can access just about everything you want from it when you go to output it on the front end. Of course the trade off is that you will need php to do it.

    For example:

    $image_src = wp_get_attachment_image_src($your_custom_field, $size);

    Will allow you to access the image path, width and height of the image.

    Check the WordPress codex for further info.

  8. HeroicNate
    Member
    Posted 4 years ago #

    aah. Pretty cool. I think i need to learn some php. So far I've just been getting by with what I call "wordpress php". Do you know if there's a way to set custom image sizes like the setting of sizes for the new thumbnail option?

  9. HeroicNate
    Member
    Posted 4 years ago #

    hmmm. I've hit another wall. I've now set up several post types, but it appears custom fields will only allow one form to work. When I try to make a second I can see the title but there's no form fields below it. I created the post types and taxonomies by adding the code to functions.php.

  10. proximity2008
    Member
    Posted 4 years ago #

    Nate,

    Start a new thread. This is going off topic.

    The support for custom post types was only added in 1.6 and I haven't played with it yet. In the past I've used pages and tied in different page templates with different custom field forms.

    If you've added the custom fields correctly you should see it in the cft drop down when you enter content for your post.

Topic Closed

This topic has been closed to new replies.

About this Topic