Skip to:
Content
Pages
Categories
Search
Top
Bottom

Media uploads with custom taxonomy

  • Hi, I am pretty new to Buddypress and have decided to use it on my current project. I know out of the box, Buddypress does not support uploading media like photos, video, audio, etc for members. There seems to be a few plugins out there that do this and I tested out the rtMedia plugin.

    The issue I am having is I need to add an option to add a custom taxonomy to a piece of media upon uploading. Basically a dropdown box with a list of genre categories that the media they are uploading should go in. This will be used later in taxonomy archive pages to show all the media posts for a certain taxonomy.

    My question is: Are there any better ways to do this then using a plugin and modifying it? rtmedia uses the attachment post type for all media uploaded which is fine, but looking at the template files to add a dropdown box to the uploader has been elusive.

Viewing 8 replies - 1 through 8 (of 8 total)

  • Henry Wright
    Moderator

    @henrywright

    Hi @lbpp

    Check out the Attachments API (which is currently in the pipeline and should be available in the 2.3 release). As you’ll see, this kind of thing will be far easier going forward.

    Hey @henrywright, thanks for your response!

    This looks great, but it does not seem to be coming until the very soonest “end of May”. So I will assume June or July really. That kinda leaves me in a bind with this project. Any other suggestion for a solution with the current BP release? I feel I can’t be the only one that would have wanted this feature.


    Henry Wright
    Moderator

    @henrywright

    @lbpp OK so the short term approach would be to write a HTML form with the option list and file upload button as form elements. Then, server-side, you’d have your processing script which processes the $_POST data after the user has submitted.

    There’s 101 ways to do that. Plupload springs to mind as the most elegant solution because you can do all sorts of stuff with the uploaded file (and of course Plupload is a core library so the solution will be lightweight). In terms of where the media gets uploaded to, I assume you’d want it to go into the back-end Media Library? If so, then checkout the async upload script. If you use that when setting your Plupload defaults, then most of the heavy lifting is done for you automatically.

    Check out the Plupload docs for more info on that library.

    Of course, that’s just one approach you could go with (the one I’d choose myself), but there will be many more alternative approaches you could take.

    Great advice! I will look into these solutions. Would these plugins also tie into Buddypress well and get posted to Activity, notifications, etc?


    Henry Wright
    Moderator

    @henrywright

    Plupload isn’t a plugin, rather, it’s an ‘upload’ library used in WordPress core. It’s a great way of uploading media. We’ve all used it even though we might not know it because it’s the tool that powers the media uploading when you go to WP admin > Media > Add New

    Oh, ahaha! Ok so I would have to find a way to hook into all the Buddypress functions then to have it actually incorporated into the BP experience.


    Henry Wright
    Moderator

    @henrywright

    You wouldn’t necessarily need to hook into BuddyPress functions. Instead, the main thing to do would be to upload the file, associate that file with a BuddyPress member, and record any associated data for that upload (the user’s choice from your option list).

    Check out this article for getting started with Plupload:

    http://www.plupload.com/docs/Getting-Started

    Thanks for all the helpful advice Henry!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Media uploads with custom taxonomy’ is closed to new replies.
Skip to toolbar