1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

BBcode MediaSites Package [Deleted]

Discussion in 'Add-on Releases' started by EQnoble, Jan 30, 2012.

  1. EQnoble

    EQnoble Well-Known Member

  2. EQnoble

    EQnoble Well-Known Member

  3. Rudy

    Rudy Well-Known Member

  4. EQnoble

    EQnoble Well-Known Member

    Rudy and Fuhrmann like this.
  5. Rudy

    Rudy Well-Known Member

    Thanks again, and great work! (y)
     
  6. DRE

    DRE Well-Known Member

  7. Sheldon

    Sheldon Well-Known Member

    I continually have the issue of Tweets never showing. It only shows as a blank post.

    *edit

    Seems to continually happen with Firefox. Just checked Chrome, it is working fine.
     
  8. Sheldon

    Sheldon Well-Known Member

    Something else really wierd.... not sure what it is.

    On a page "refresh", it starts off like this:
    [​IMG]

    Then after the refresh is finished, it moves and changes to this:
    [​IMG]

    o_O

    I actually like the second image posted, I think it fits the "Twitter" style. My only issue is it leaves about 4 or 5 blank lines from top of post, and also "auto-centers" it. Is this a bug, as designed, or what? Also, if designed as such, is there a way to change the output location to be the same as first line of post?
     
    Brian Chance likes this.
  9. EQnoble

    EQnoble Well-Known Member

    The8thLegion likes this.
  10. Rudy

    Rudy Well-Known Member

    For requests for new media types, would you prefer them here, or over in the ongoing forum thread? I'm wondering if there's a way to embed min.us galleries, but the code they give seems to be more like an IFRAME than anything else.
     
  11. EQnoble

    EQnoble Well-Known Member

    the other thread is probably better...but since you posted it here already I will see what I can make of it and respond over there to this ...gimme a sec...I got a bangin headache right now and think caffeine will help some. I'ma grab some coffee and try this out...should be fine though
     
    yavuz likes this.
  12. Rudy

    Rudy Well-Known Member

    No big deal on this one--it only seems to embed the gallery page in a window. Not what I expected. I'd have loved to be able to embed a music or video player right from their site.
     
  13. EQnoble

    EQnoble Well-Known Member

    Yeah their embed code is literally the entire page :) not really useful , elegant , or pretty. Shame though...I test uploaded a file and it took about 3 seconds to drag, drop and upload..Would be nice if they finished up creating their embedding method.
     
  14. Trombones13

    Trombones13 Well-Known Member

    I'm not sure if this is the right place to post these now, so feel free to move it or tell me where to repost it if necessary. There's an HTML5 version of the SoundCloud widget (see here) that I can't seem to get working. The Match URLs should be the same as the Flash version, but the Embed HTML is obviously different. I'm just stuck figuring out where to put the {$id} and do it so that I don't have to go back through and update all of my old embeds (i.e. I'd just update my current SoundCloud BB code and it would update the embeds automatically, since the URLs didn't change).
     
  15. EQnoble

    EQnoble Well-Known Member

    There will be a thread created at some point today entirely for this purpose I just need to gather a bunch of data and post it up before I can create it (Basically the complete working list of codes for those that don't want to use the addon) but once the list is complete at the top of the thread it will be used as the support thread for sites in this addon and all other sites as well. I will do that before I go to sleep tonight.

    I actually have the html5 version of this working already , do me a favor... lemme see what you have in a post in a bbcode like when you click edit on one of your posts...
    ex [media=soundcloud]I NEED TO SEE THIS PART[/media] ....so I can see what it looks like...(I honestly don't remember if the formatting changed or not...it's been a while.

    I also believe the match url expression changed once I noticed the other two embeddable types. If it is in fact different I will create the post replacement regex you will need as well to correct all your soundcloud posts in one shot.

    I will say it does not use the embed html form , it actually uses a callback now because I have found that soundcloud has three different types of media that can be embedded each with slightly different html.
     
  16. Trombones13

    Trombones13 Well-Known Member

  17. EQnoble

    EQnoble Well-Known Member

    This is my match urls...

    Code:
    #(?P<id>soundcloud\.com/(([a-z0-9-_]+/[a-z0-9-_]+/[a-z0-9-_]+)|([a-z0-9-_]+/[a-z0-9-_]+)))#si
    #(?P<id>snd\.sc/[a-z0-9]+)#si
    there is 2 because soundcloud uses a tld hack for short links, these 2 will cover the normal and the short, one per line.


    It also needs to have a callback because there is 3 unique embed types from their site.

    this is what I had come up with before (I swear I thought I posted this..I must be losing my mind...)

    Code:
    <?php
    class MediaSites_Soundcloud
    {
        public static function buildEmbed($mediaKey, array $site)
        {
            $pageHtml = file_get_contents( 'http://' . $mediaKey );
            if(preg_match('#<meta.+player.swf\?url=.+tracks%2F(?P<scid>[0-9]+)#i', $pageHtml, $match))
            {
                $embedHtml = '<iframe width="100%" height="166" class="html5player" scrolling="no" frameborder="no" src="http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F__MEDIAKEY__&show_artwork=true"></iframe>';
                $finalHtml = str_replace('__MEDIAKEY__', $match['scid'], $embedHtml);
                return $finalHtml;
            }
            elseif(preg_match('#<meta.+player.swf\?url=.+playlists%2F(?P<scid>[0-9]+)#i', $pageHtml, $match))
                {
                $embedHtml = '<iframe width="100%" height="450" class="html5player" scrolling="no" frameborder="no" src="http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Fplaylists%2F__MEDIAKEY__&show_artwork=true"></iframe>';
                $finalHtml = str_replace('__MEDIAKEY__', $match['scid'], $embedHtml);
                return $finalHtml;
            }
            elseif(preg_match('#<meta.+player.swf\?url=.+users%2F(?P<scid>[0-9]+)#i', $pageHtml, $match))
            {
                $embedHtml = '<iframe width="100%" height="450" class="html5player" scrolling="no" frameborder="no" src="http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Fusers%2F__MEDIAKEY__&show_artwork=true"></iframe>';
                $finalHtml = str_replace('__MEDIAKEY__', $match['scid'], $embedHtml);
                return $finalHtml;
            }
            else return '<a href="http://' . $mediaKey . '">http://' . $mediaKey . '</a>'; 
        }
    }
    I will be making the support thread for this in a short while...just walked in the door and need a few minutes of me time but as soon as I finish taking a breather I will startup the thread.
     
  18. tom2tom

    tom2tom Member

    Maybe i miss out on something really simple, but no matter which code is use to transform Soundcloud and Twitter.. the result is always the same.
    I seem to get proper BBCODEs but not the expected visual output.

    The BBCODEs:

    Code:
    [media=twitter]179368126859853824[/media]
    [media=soundcloud]soundcloud.com/kasabianofficial/table-tennis-boom-box[/media]

    The visual output:
    http://awesomescreenshot.com/0ee1i0m6c

    Can anybody point me into the right direction please? Thanks!
     
  19. duydangle

    duydangle Active Member

    Can anybody get embed videos and livestream from twitch.tv/justin.tv? Thanks.
     
  20. Strong

    Strong Member

    I bet you we could figure out what we needed for justin.tv if we can figure out how to make a simple flv play using a self hosted player like flowplayer. I'm trying to learn how to start with small simple stuff first and expand from that. I'm hosting the flv files on cl.ly (free cloud service) and they use some kind of random string in the url before the flash file. Much like how a tinyurl type service would do. So the file is actually at something like this: http://cl.ly/0x322q251c372K0a0q0w/grenade.flv

    It seems I have two {$id} variables in this scenario.
    And just like the soundcloud example above, I've got to figure out how to match the two urls users will possible capture from the file serving webpage (because the other possible url people might use is http://cl.ly/0x322q251c372K0a0q0w )and make a callback.php somewhere to pipe and enter all the corresponding details into the ACP -> Edit BB code media sites

    Lots of digging to do because I have no idea where the callbacks are or how it even works but I'm determined to figure this out. And OH MY! What is this "regular expression"?
     

Share This Page