Status
Not open for further replies.

DmC

Active Member
31
2013
7
0
Hi,

I'm trying to create a media code to embed gamespot videos on my forum but cant seem to figure out something.

Example Url

Code:
http://www.gamespot.com/insurgency/videos/insurgency-2-alpha-gamplay-trailer-6391060/
Embed code of the above url

Code:
<iframe width="640" height="360" src="http://www.gamespot.com/videoembed/6391060&mapp=false&ads=0&onsite=0" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
The problem is that the structure of gamespot's embed code is different as compared to other (normal) websites. e.g.

Gamespot's structure

Code:
http://www.gamespot.com/GAME NAME/videos/NAME OF TOPIC-GAME ID/

The main problem is with the game ID.

I tried the following Media Replacement Match:

Code:
http://www.gamespot.com/{1}/videos/{2}-{3}/
But this doesn't work as the IPB takes both {2}-{3} and places it in the embed code but i only need the GAME ID to be used in that code i.e.

Code:
<iframe width="640" height="360"  src="http://www.gamespot.com/videoembed/[U][B]GAME ID[/B][/U]&mapp=false&ads=0&onsite=0"  frameborder="0" webkitAllowFullScreen mozallowfullscreen  allowFullScreen></iframe>
I then changed the media replacement match to this

Code:
http://www.gamespot.com/{1}/videos/{2}-([0-9]{3})
But this code causes a problem if the gamespot url contains a number before the game ID

E.G. this url

Code:
http://www.gamespot.com/insurgency/videos/insurgency-2-alpha-gamplay-trailer-6391060/
IPB inserts everything after the number '2' in the embed code.


So i would really appreciate it if someone can help me get the code right and get the media tag to work properly.


Thanks in advance.
 
3 comments
That doesn't work, its for gamespot's old url structure and player. I'm sure someone with adequate knowledge of php can figure this out in a few seconds. :)
 
Status
Not open for further replies.
Back
Top