Gametrailers BBC Tag (XHTML Compliant)

Started by Blipsqueak, September 27, 2007, 05:48:04 PM

Previous topic - Next topic

Blipsqueak

Link to Mod

A modification of the YouTube BBC Tag (XHTML Compliant) mod which allows Gametrailers videos to be added to a post.

[gametrailers=420,360][/gametrailers]

Tidea

#1
finally!! awesome dude! thanks.  Wait, how do  Iget this to show up on a custom theme?

pspturkey

Quote from: Tidea on September 28, 2007, 01:39:38 AM
finally!! awesome dude! thanks.  Wait, how do  Iget this to show up on a custom theme?

Install the mod then open Post.Template.php of your custom theme.

Search:
'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt[433]),

Add before:
'gametrailers' => array('code' => 'gametrailers', 'before' => '[gametrailers=420,360]', 'after' => '[/gametrailers]', 'description' => $txt['gametrailers']),

Then put gametrailers.gif from zip to your theme directory/images/bbc.
Türkçe PSP Kaynağı: www.pspturkey.net
Türkçe Konsol Kaynağı: www.konsolum.net
Türkçe Oyun Hileleri Kaynağı: www.hiletr.net

TraderJake

RF Generation. [nofollow] The Classic and Modern Videogames Database

Emperium

How come this BBC Tag doesn't work with Gametrailers' User Movies?

I try adding the "/usermovies/######" inside the tag but it still doesn't work. Does anyone know how to get them running?

Blipsqueak

Unfortunately the user videos currently do not work.  I'm working on an update which will add this functionality.  It should be completed soon.

Blipsqueak

#6
User videos can now be added (v1.1) !!!  :)

Marook

sorry for bothering, but the mod is not xhtml 1.1 compliant ! In v1.1 there is no attribute target="_blank" for <a> anchor tags.

You should change the code like this :

File : gt_bbc_xhtml_1.1.xml, line: 33

'disabled_content' => '<a href="$1" onclick="void(window.open(this.href, '', '')); return false;">$1</a>',
SMF Rulez ;) | Meet me home ! | My Mods

Emperium

Can't seem to download the updated mod? Just takes me to a blank page and the download doesn't start.

Blipsqueak

Seems like it was related to the downtime as the file seemed to be gone.  I re-uploaded it and it seems to be working now.

Marook

Yepp, many of the mods are gone with the wind ;( The authors have to reupload it again...
SMF Rulez ;) | Meet me home ! | My Mods

Blipsqueak

That's a shame.  Luckily I happened to pop in to check the comments.

olıverde8

#12
Hi
I did Add the mod with no problme but how do I do for user videos I was not able to figure out

Thanks



[nofollow]

Blipsqueak

Just copy the entire url of the video and post it between the tags:

[gametrailers=420,360]http://www.gametrailers.com/player/usermovies/166125.html[/gametrailers]

Blipsqueak

Quote from: Marook on January 09, 2008, 06:58:30 PM
sorry for bothering, but the mod is not xhtml 1.1 compliant ! In v1.1 there is no attribute target="_blank" for <a> anchor tags.

You should change the code like this :

File : gt_bbc_xhtml_1.1.xml, line: 33

'disabled_content' => '<a href="$1" onclick="void(window.open(this.href, '', '')); return false;">$1</a>',


9 months later I decided to update.  THANKS!

Hamst3r

#15
I was going to customize this a bit for my forum but the code is a bit too complex for me to tweak confidently. Thus, I have a question:

What do I need to modify in the code so that the tag to use this is simply [gt][/gt] instead of the long-winded [gametrailers=420,360][/gametrailers] tag? The videos should always be posted at 420x360 size.

Any help would be appreciated, thanks!

Blipsqueak

Wow, sorry I haven't visited here in a while and never got the message... I'll take a look.  Maybe I'll add that as a simple editable option for you.   I agree that the size shouldn't be adjustable.

I'll see if I can find some time and will pop back in and let you know.

stupid_maritimer101

I was just wondering, is there any hope for this BBC being available for SMF version 1.1.10? I would really like to use this mod.

Blipsqueak

Still no additional updates to the script, however stupid_maritimer101, it is compatible with 1.1.10, i just hadn't specified that it was!

KidCactus

#19
I have version 1.2 of this mod installed, but user videos won't work. For some reason, the embedded video shows the wrong one. Any ideas?

This video embedded:

http://www.gametrailers.com/user-movie/dead-space-2-gameplay/342463

shows this video:

http://www.gametrailers.com/user-movie/destiny/2




Edit: Apparently the regular expression cutting out the video ID took the first numerals it came across in the URL. In the first link, the 2 in dead-space-2-gameplay was inserted as video id. Fixed it in Subs.php:

Replaced:

$pattern = \'/([0-9]+)/i\';

With:

$pattern = \'/([0-9]+)$/\';

This new pattern only cuts out numerals at the end of the URL, ignoring other numerals in the URL in case there are some present before the actual video ID.

Advertisement: