• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

[Add More Video Sites] BB Code Media

It's the same exact embed code except for this piece:

Rich (BB code):
<param name="flashvars" value="url=http://www.ign.com/videos/2011/10/22/blizzard-dota-giant-stone-zealot"/>

But the "www" video URL works even with "uk" in the embed code.
Your right, all I did was change the match url to
Code:
#http://ign\.com/videos/(?P<id>\d+/\d+/\d+/[\-a-z0-9_]+)(\?.*)?$#siU
and it worked for both videos.

You can even change the embed code to use www or uk. It doesn't seem to matter.
 

Admin CP -> Home -> BB Code Media Sites -> Add BB Code Media Site

Media Site ID: mixpod

Site Title: MixPod

Site URL: http://www.mixpod.com/

Match URLs: http://mixpod.com/play/{$id}

Embed HTML:

Code:
<object data="http://assets.mixpod.com/swf/mp3/mixpod.swf" type="application/x-shockwave-flash" height="128" width="320">
<param value="false" name="menu">
<param value="TL" name="salign">
<param value="window" name="wmode">
<param value="myid={$id}&autoplay=false&addMode=false&prev=3" name="flashvars">
</object>

URLs tested:
http://mixpod.com/play/14spx1
http://mixpod.com/play/13fnqr
(I had to get these URLs from the 'share' link in the videos)
 
They are using javascript. The embed code is not in the source and their video doesn't give it to you. I can't do anything with that.
Got it. Thanks Jake.
How do I know which video should be doable before I present it to you as a request?
Anything that has an embed option would work?
 
How do I know which video should be doable before I present it to you as a request?
Anything that has an embed option would work?

Videos that give you the embed code are doable. If they don't give it to you then it's not always possible.
 
Update: i need to change this: {$id:alphanum} to something that will include also the url slash /

so something like: {$id:alphanum and slash}

because soundcloud url is : soundcloud.com / artist / song

Thanks!
 
I got soundcloud working with 1.1:

Admin CP -> Home -> BB Code Media Sites -> Add BB Code Media Site

Media Site ID: soundcloud

Site Title: SoundCloud

Site URL: http://soundcloud.com/

Match URLs: #http://soundcloud\.com/(?P<id>[\-a-z0-9_]+/[\-a-z0-9_]+)$#siU

Embed HTML:

Code:
<object height="81" width="100%">
<param name="movie" value="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fsoundcloud.com%2F{$id}&amp;g=bb"></param>
<param name="allowscriptaccess" value="always"></param>
<embed allowscriptaccess="always" height="81" src="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fsoundcloud.com%2F{$id}&amp;g=bb" type="application/x-shockwave-flash" width="100%"></embed>
</object>

And be sure to enable Use 'Match URLs' as PCRE regular expressions under Advanced Options.

URLs tested:
http://soundcloud.com/chimpstudio/tes-27-apr
http://soundcloud.com/chimpstudio/acid-drinkers-ania-brachaczek-love-shack-jacek-mix1

You really saved my day!

PS: the tested url above here rocks :D
 

Admin CP -> Home -> BB Code Media Sites -> Add BB Code Media Site

Media Site ID: 8tracks

Site Title: 8tracks

Site URL: http://8tracks.com/

Match URLs: #http://8tracks\.com/(?P<id>[\-a-z0-9_]+/[\-a-z0-9_]+)(\?.*)?$#siU

Embed HTML:

Code:
<see html callback>

Then under Advanced Options:

Use 'Match URLs' as PCRE regular expressions: <checked>

Embed HTML Callback: MediaSites_8Tracks::buildEmbed

And you need to create the following directory/file (also attached to this post):

library/MediaSites/8Tracks.php

Code:
<?php

class MediaSites_8Tracks
{
	public static function buildEmbed($mediaKey, array $site)
	{
		// CAPTURE WEB PAGE
		$pageHtml = file_get_contents('http://8tracks.com/' . $mediaKey);

		// ISOLATE THE MIX NUMBER FROM THE META TAG
		if(preg_match('#<meta content="http://8tracks\.com/mixes/(?P<mixnumber>\d+)/player_v3/autoplay" property="og:video" />#si', $pageHtml, $match))
		{
			// DEFINE GENERIC EMBED HTML WITH REPLACEMENT VARIABLE __MEDIAKEY__
			$embedHtml = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="300" height="250">
<param name="movie" value="http://8tracks.com/mixes/__MEDIAKEY__/player_v3">
<param name="allowscriptaccess" value="always">
<embed src="http://8tracks.com/mixes/__MEDIAKEY__/player_v3" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="300" height="250" allowscriptaccess="always" ></embed>
</object>';

			// MAKE THE REPLACEMENTS
			$finalHtml = str_replace('__MEDIAKEY__', $match['mixnumber'], $embedHtml);

			// RETURN THE FINISHED HTML
			return $finalHtml;
		}

		// RETURN NOTHING IF NO MATCH
		return '';
	}
}

URLs tested:
http://8tracks.com/lnnickl/going-back-the-ultimate-90-s-mix?mix_set_id=3 (90's music ftw!)
http://8tracks.com/skigirl1239/chill-out-life-s-short
 

Attachments


Admin CP -> Home -> BB Code Media Sites -> Add BB Code Media Site

Media Site ID: espn

Site Title: ESPN Video

Site URL: http://espn.go.com/video/

Match URLs:

Code:
http://espn.go.com/video/clip?id=espn:{$id}
http://espn.go.com/video/clip?id={$id}

Embed HTML:

Code:
<script src="http://player.espn.com/player.js?pcode=1kNG061cgaoolOncv54OAO1ceO-I&width=576&height=324&externalId=espn:{$id}&thruParam_espn-ui[autoPlay]=false&thruParam_espn-ui[playRelatedExternally]=true"></script>

URLs tested:
http://espn.go.com/video/clip?id=espn:7173410
http://espn.go.com/video/clip?id=7178809
 
Can we have metacafe.com videos?

Example: http://www.metacafe.com/watch/7650774/the_hidden_a_ghost_filled_3ds_game_trailer/
 
Back
Top Bottom