phpBB embed code conversion, problem

Avatar image for warxsnake
warxsnake

2720

Forum Posts

33

Wiki Points

0

Followers

Reviews: 0

User Lists: 3

#1  Edited By warxsnake

So I'm trying to make a BB code to be able to embed giantbomb videos onto my forum, however unlike most other embed codes like vimeo or youtube or whatever, the giantbomb embed has many variables.

This is a typical GB video embed code:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="640" height="360" id="gb_player" align="middle">
                <param name="allowScriptAccess" value="sameDomain" />
                <param name="allowFullScreen" value="true" />
                <param name="movie" value="http://www.giantbomb.com/video/video.swf" />
                <param name="quality" value="high" />
                <param name="flashvars" value="paramsURI=http%3A//www.giantbomb.com/video/params/547/?w=1">
                <param name="videoURI" value="http://media.giantbomb.com/video/tr_tigerwoods_050809.flv">
                <param name="bgcolor" value="#000000" />   
                <embed src="http://www.giantbomb.com/video/video.swf" quality="high" bgcolor="#000000" width="640" height="360" name="gb_player" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="paramsURI=http%3A//www.giantbomb.com/video/params/547/?w=1" />
                </object>

Now, you can easily make a code which would look something like [GB]{text1}[/GB] where {text1} refers to the video id, which in this case is 547. However, how do you account for the .flv filename present in the code? In this case: http://media.giantbomb.com/video/tr_tigerwoods_050809.flv

Any help? Or is it just not possible?

Avatar image for lordandrew
LordAndrew

14609

Forum Posts

98305

Wiki Points

0

Followers

Reviews: 0

User Lists: 36

#2  Edited By LordAndrew

Are you using the API? You didn't mention it, but since you're posting in the API Developers forum, I'm going to assume you are. If you're not using it, I apologize in advance.

In your example, the video you want is 547, so you'll be getting your data from http://api.giantbomb.com/video/547/?api_key=<your_key>. Grab the url field to obtain the filename tr_tigerwoods_050809.flv. Now that you know the filename, you can use as the videoURI parameter (don't forget to append http://media.giantbomb.com/video/ to the beginning).