WordPress.org

Ready to get started?Download WordPress

Forums

Custom Content Type Manager
Media uploader functionality missing (4 posts)

  1. Peter vanDoorn
    Member
    Posted 1 year ago #

    The normal WordPress media uploaded has the option to set the title, alt and caption details for the uploaded image file. However, in a CCTM image field, the uploader does not offer these options. Is it possible to make the field uploader use the full WP media uploader, rather than the cut down version?

    Thanks

    Peter

    http://wordpress.org/extend/plugins/custom-content-type-manager/

  2. fireproofsocks
    Member
    Plugin Author

    Posted 1 year ago #

    Good question -- It was a long and difficult road to get even the partial uploader there because the core WP code was very poorly architected. Apparently, t was not built to be reused -- much of it was hardcoded throughout the admin pages. If you need to edit image details, I'm afraid the best way to do it is to do it via the Media library menu.

  3. Peter vanDoorn
    Member
    Posted 1 year ago #

    Thanks for the reply, but, since the one called up by the field is different to the normal uploader, surely you've already changed the uploader? Is it not possible to change the call so that you don't make any changes to the standard uploader? If you could point me in the direction of where (and how) to change the code I can add the hack myself if you don't want to change the way CCTM works (and on my head be it!)

    Cheers

  4. fireproofsocks
    Member
    Plugin Author

    Posted 1 year ago #

    No, I really didn't change much in the uploader -- I just figured out a way of pointing to it by hijacking the javascript. Only part of the WP code is reproduced in the upload variation -- as I recall, the handler was not easily isolated. It was tough, but if you want to look into it further, be my guest.

    This post was useful: http://www.webmaster-source.com/2010/01/08/using-the-wordpress-uploader-in-your-plugin-or-theme/

    In the code, look at the js/relation.js file, specifically the cctm_upload() function -- you can see how I had to forcefully override the send_to_editor() function so I could do something useful with the output, then after doing my business, I had to replace the function. It's just icky, but that's the only way I could reuse the code for the uploader.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic