The MU forums have moved to WordPress.org

Creating an embed mu-plugin (20 posts)

  1. Farms2
    Member
    Posted 15 years ago #

    Hallo there,

    This is one of those 'calls to the experts' / 'let's help each other' / begging things :)

    Basically I want to be able to simply create mu-plugins to allow users to embed flash objects from various sites... the slideshare one was a great example, but how can I customise & renam that to allow, say, teachertube.

    Oh mighty coding gurs... any help would be beyond appreciated.

    Here's the slideshare code:

    [code deleted so we can see the forums - drmike]

    Here's the teachertube embed:

    [code deleted so we can see the forums - drmike]

    Here's me being overwhelmingly grateful at anyone who can help / point me in the right direction as to how I can fix it up!

    Cheers, James

  2. lunabyte
    Member
    Posted 15 years ago #

    Look at it from the perspective of, "What are the common elements between these objects?"

    You'll notice that the basics of it are width/height settings, and the file source.

    Make a widget that accepts the required fields, then spits out the generic code with the fields placed as need be.

  3. drmike
    Member
    Posted 15 years ago #

    Someone bump this after 8:30pm US eastern time and I'll take a look at this tomorrow morning. I;'ve been added new video sites to my own wpmu install. not using the filter emthod but it should be too hard to do it this way.

  4. andrea_r
    Moderator
    Posted 15 years ago #

    Should be easy to add it to an existing video plugin too, like Anarchymedia. Hmmm..

    It mostly involes looking (ie, reading the code. :D )

  5. lunabyte
    Member
    Posted 15 years ago #

    But Andrea, we all know James can't read! :D

  6. drmike
    Member
    Posted 15 years ago #

    Making this a sticky just so I won't forget it. I have to change locations after lunch.

  7. drmike
    Member
    Posted 15 years ago #

    Done. Up at wpmudev.org

    http://wpmudevorg.wordpress.com/project/Teachertube.com-Video-Support

    Format is [teachertube IDNumber]

    Someone care to do me a favor and hop over to pornotube.com and grab the ebmed code for one of their videos? It's blocked from here and I can't view the site. I had a request for that as well.

    I think a check for the mature flag is in order for that, don't you? ;)

    Hope this helps,
    -drmike

  8. drmike
    Member
    Posted 15 years ago #

    The other thing is that wp.com lists the video options for what they support under a tab in the inline uploader. Anyone care to see about adding in a tab so that we can list out supported options?

    Do also note that I'm looking for video sites to plugin. Feel free to suggest them:

    http://mu.wordpress.org/forums/topic.php?id=4219

    Thanks,
    -drmike

  9. dsader
    Member
    Posted 15 years ago #

    Thanks drmike and farms2, etal.

    Love the exploding barrel.
    Can't find a good barrel, now I've got the video.

  10. kingler
    Member
    Posted 15 years ago #

    Hi, Dr Mike

    Check out this one:
    http://www.martinaberastegue.com/wpvidz/

  11. drmike
    Member
    Posted 15 years ago #

    Farms, just following up. Did this work for you?

  12. drmike
    Member
    Posted 15 years ago #

    heh heh

    A Google search for teachertube.com. Kind of funny to see the announcement listed so high so quickly.

  13. drmike
    Member
    Posted 15 years ago #

    And what's even funnier is that teachertube contacted me and wants to do a demo. :)

  14. demonicume
    Member
    Posted 15 years ago #

    wow, i dont know how i missed this thread. it even has a porno tube reference!

    this looks cool. i'll give it a try!

  15. Farms2
    Member
    Posted 15 years ago #

    Must've got lost amongst the spam (I follow the whole forum feed) - sorry!

    Good stuff, it worked a treat, but then they've come up with an ingenious AMP supported paste code themselves, take a look (bottom right):

    http://www.teachertube.com/view_video.php?viewkey=bb2a95e79248486a5f6d

    One day, when I have time, I'm actually going to take some classes in php :)

  16. drmike
    Member
    Posted 15 years ago #

    Farms, drop me an email and I'll pass along the email from teachertube. I'd rather have them use your site as a demo since you're teacher involved. :)

    Doesn't that code just link to it?

    If someone would kindly get me a demo URL from pronotube along with the embed code that would go along with it *HINT!* *HINT!*, I'll write up a plugin for that as well. I don't dare pull up the site from here.

  17. wccw75
    Member
    Posted 15 years ago #

    is there a plugin for heavy.com?
    if i use the embeded code on wordpress.com, it can display the video without a problem.
    i use the same code on wpmu and everything is stripped of.
    right now, i just go to the database and add it on the post itself.

  18. drmike
    Member
    Posted 15 years ago #

    I hate it when sites use 'wordpress' and they mean only specifically 'wordpress.com'

    I don't have a way to do it since they use an md5 embed code in there and I don't see where they're getting it from.

    Hmm, I guess we could hard code the embedid code and see if that works.

  19. drmike
    Member
    Posted 15 years ago #

    I so much want this on my blog :)

    http://www.heavy.com/video/3960

    Gone to see what I can do.

    edit: They're on wp.com. That's why the code over there works:

    http://heavypr.wordpress.com/

  20. mixle
    Blocked
    Posted 15 years ago #

    Re embeded code in blogs.
    I have managed to use embeded code from Blip tv, grouper, jumpcut, slideshare, vSocial, youtube, I'm still trying out other video site's.
    I used the vPIP plugin (http://vpip.org/home/vpip-wordpressmu-installation/)in my mu pligins folder,
    Then I added the this into the head of the theme I am testing on.

    <script src="http://[url where vPIP was uploaded to]/vpip.js" type="text/javascript"></script>
    <style type="text/css" media="all">@import "http://[url where vPIP was uploaded to]/vPIPBox.css";</style>
    <script src="http://[url where vPIP was uploaded to]/jquery.js" type="text/javascript"></script>
    <script src="http://[url where vPIP was uploaded to]/vpipit.js" type="text/javascript"></script>

    All I do is add the embedded code from whatever site and put straight into the code section in writing a post,
    I have managed to get success doing things this way, rathere than using the vPip box, to generate the code.

About this Topic