News:

Wondering if this will always be free?  See why free is better.

Main Menu

EbaumsWorld BBCode

Started by karlbenson, September 04, 2007, 10:32:45 PM

Previous topic - Next topic

karlbenson

Link to Mod



EBAUM'S WORLD BBCODE v1.1
By Karl Benson


Link to Mod | Comment On This Mod

Introduction
Adds [ebaumsworld][/ebaumsworld] bbcode to show Ebaums World clips

Ebaum's World do not use the same video id in the url and for the video file like YouTube, so I've devised a lookup table in the database.
The first time each clip is shown on your forum, the information you will need to embed the video is obtained from ebaumsworld.
The height/width and id/reference are then stored in the lookup table so that any time after that the clip is used on your forum, the information is retrieved from the lookup table.
(Since its a hundred times faster to perform the query, the go and get the id/reference every time)
To keep the lookup table fairly optimized, lookup references get wiped after 3 months/90 days
(and an new version of the lookup reference will be obtained)

Installation
Simply install the package to install this modification on the Default theme.

Manual edits will be required for non-default themes to insert the BBcode button onto the Post.template.php.
And a copy of the ebaumsworld.gif placed in the bbcode images folder for each theme (Theme/{themename}/images/bbc/)

Features
o BBCode Button to insert [ebaumsworld][/ebaumsworld] tags
- works with full urls [ebaumsworld]http://www.ebaumsworld.co.uk/video/watch/12345[/ebaumsworld]
- works with video id [ebaumsworld]12345[/ebaumsworld]
- supports custom sizes (width,height) [ebaumsworld=250,250]12345[/ebaumsworld]

Support
Please use the modification thread for support with this modification.
(Please don't ask me to do the edits for you)

Changelog
1.0 - 18th August 2007
o Initial release by request (fuelthescene)
1.1 - 19th August 2007
o Fixed language string insertion so adds before ?> and not at end

styckx

This does not work for me at all.. All the other video codes worked fine. This shows nothing


karlbenson

does your server support the php function file_get_contents?

styckx

Quote from: karlbenson on September 07, 2007, 02:43:12 PM
does your server support the php function file_get_contents?

That I wouldn't know. It's a dedicatedbox.net box. Not shared, it shouldn't be restricted.. Is there a easy way to tell. If it's not, is it possible to enabled it..

winrules

Karl, you should use fetch_web_data() (in Subs-Package.php) instead of file_get_contents(). Using file_get_contents with a URL will only work if the allow_url_fopen php.ini setting is enabled (it is commonly disabled).


winrules
SMF Developer
               
My Mods
Please do not PM me for support.


karlbenson

I have reuploaded this mod and screenshots for it.

I am in the process of doing it for ALL my other mods aswell.  Please bear with me.

Advertisement: