WordPress.org

Ideas

Custom Attachment Type

  1. intz
    Member

    12345

    Its sound like it would be veru usefull. I have a portfolio on a custommers'site and this hack would be very handy. +1

    Posted: 2 years ago #
  2. LeyCosmica
    Member

    12345

    I'm always in favor of squeezing the brain for get new ideas. Sometimes it is difficult or impossible to get something concrete but there are always alternatives or another ways to achieve the purpose.

    Posted: 2 years ago #
  3. FF_Will
    Member

    Agreed. I registered today just to support this idea. I also view this as a natural extension of custom post types / taxonomy functionality. Came here looking for a solution to separate out custom ad images from other photos in the media library for a sponsorship widget in a custom theme.

    Posted: 2 years ago #
  4. jennsenth
    Member

    I'm going to implement in in a new plugin I'm working on name dCustomAttach. Its amazing how many ideas I get from this forum!

    The plugin will include seperation of posts types and the ability to define a customn ad image.

    Heres a snippet:

    <?php query_posts('category_name=special_cat&posts_per_page=10'); ?>

    <?php while (have_posts()) : the_post(); ?>
    post_custom_ads();
    <?php endwhile; ?>
    <?php endif; ?>

    Posted: 2 years ago #
  5. obsess90210
    Member

    12345

    I agree completely with this idea! It just came to mind as the perfect solution to a problem I'm working with in a client's site.

    What if, for instance, user uploaded files could be "archived" when a user decides to end his or her subscription to our site? This sounds as simple as a taxonomy but for administrative purposes, I also don't want the archived files to show up in the regular Media Library. Solution: "Archived" Attachments have their own interface! The only way I see to implement this currently while still retaining attachment information is to store the information as post meta and delete the attachment without removing the file. There has to be a cleaner, more direct way to accomplish this.

    Posted: 10 months ago #
  6. aendrew
    Member

    12345

    Here's another use case: I've built a chart builder similar to http://quartz.github.io/Chartbuilder/, and have it wired up in TinyMCE to load it in a modal when the relevant toolbar button is clicked. When the user clicks "export to CMS", it inserts a new image into TinyMCE with a Base64 representation of the chart's configuration serialised into a data attribute, the chart builder's PNG output viewed as a data URI.

    I'll likely have to do some hacky stuff (like the above!) to get data back into my chart builder from WordPress and thus make my charts editable. But this seems like it'd be a great use case for a custom attachment type.

    Posted: 10 months ago #
  7. vatavale
    Member

    12345

    +1

    Posted: 8 months ago #
  8. +1 I really like the sound of that idea!
    This suggestion could be very usefull!

    Posted: 7 months ago #
  9. jeffhayford
    Member

    Where do we stand on this? CPT UI can create custom post types and I can assign the capability to "attachment" but it doesn't show up in the admin panel.

    I can do it manually in functions.php but again changing it from capability type post to attachment causes the custom post type to disappear from the admin panel.

    It would be really helpful to have additional media pools and it seems like the functionality is already there, why doesn't this work?

    Posted: 2 months ago #
  10. Scott Kingsley Clark
    Member

    12345

    The functionality is not in there, that's why it doesn't work, it just hasn't been abstracted yet.

    Posted: 2 months ago #

RSS feed for this topic

Reply »

You must log in to post.

  • Rating

    12345
    26 Votes
  • Status

    This is plugin territory