WARNING : Currently only for NFB (National Film Board of Canada) and Vimeo. As more video sites add oEmbed to their sites and allow auto-discovery, you can use their URLs too.
Woot! Okay, so I finally finished the first version of my plugin. It’s for the National Film Board of Canada, so it’s not hosted with me, but I’ll give you the links you need for it!
Firstly, if you want to download the zip, you’ll find it here.
Basically how it works, you extract it to your plugins directory on your WordPress, activate it, then in settings, you can modify the width/height and let the plugin know if you want to show title/author/provider of the video.
To use it. You post a URL of a film page from http://www.nfb.ca/ or from http://www.vimeo.com/ and the plugin will read the URL when you load the post. It should not mess with URL’s in a link and links without oembed will not try to show the video.
Will be presenting at Wordcamp Montreal 2009.
To see the download/upload the code here.
To find out more about what oEmbed is, visit the website.
Babe your some special kind of smart this is wayyyyy cool as you may have seen I am now ambushing my site with videos using it, well 2 so far but there will be more *evil laugh*
Here’s a blog I posted on what I thought about it though – http://www.bekibex.com/blog/hothothot/seriously-easy-to-use-wordpress-plugin/
When I try to active the plugin Version 0.6.1, it makes this error:
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /web/htdocs/www.angolocreativo.com/home/wp-content/plugins/nfb-video-plugin/nfb_video_plugin.php on line 89
Why?
I’am using wordpress 2.8.4
Hi sorry for the delay in reply I only just checked my blog admin. I tried adding my plugin using the automatic install on my site which uses WordPress 2.8.4 and I don’t seem to get your error. Would you be manually installing the plugin or doing it automatic as well?
I have download it from http://wordpress.org/extend/plugins/nfb-video-plugin/ and I tried to install it, but it maked the error I said below.
sorry,
I wanted to say…I downloaded it from http://wordpress.org/extend/plugins/nfb-video-plugin/ and I tried to install it, but it maked the error I said before.
I just tried out downloading it and installing it by uploading the zip and by dropping it into my plugin folder, but I don’t seem to be getting the error you get when I activate. Have you tried installing it via the automatic option in case that works?
How did you install your version of WordPress? Was it an automatic upgrade or did you download the files and install it on your server? I ask, because all my current versions of 2.8.4 are automatic upgrades right now.
I downloaded the files and installed them on the the sever. I downloaded also the plugin, as I said before. I was the first time I used it, I never used the old the version.
$NFB_OEMBED['version'] = $xml_file->getElementByTagName(‘version’)->plaintext; //must be 1.0 according to the specification
That’s the line it errors on. And -> is a PHP5+ thing, I believe. Are you possibly using a version of PHP 4.x?
I am tring to active the plugin Version 0.6.1 again, but it makes the usual error:
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /web/htdocs/www.angolocreativo.com/home/wp-content/plugins/nfb-video-plugin/nfb_video_plugin.php on line 89
Why?
I’am using now wordpress 2.8.5 and PHP5
I’m hunting through the simple_html_dom to try to find out why you’re getting this error. Hopefully I’ll have the answer for you soon
Nice website by the way.
Sorry, all I could find with that error was other plugins that use simple_html_dom and they all says it’s a PHP 4 issue. :/
I am using PHP5…I don’t know why the plugin make this error.
Can you go into the code and replace line 89
$NFB_OEMBED['version'] = $xml_file->getElementByTagName(‘version’)->plaintext; //must be 1.0 according to the specification
with the following 2 lines and tell me if your error moves to line 91?
$NFB_OEMBED['version'] = $xml_file->getElementByTagName(‘version’);
$NFB_OEMBED['version'] = $NFB_OEMBED['version']->plaintext; //must be 1.0 according to the specification
If it moves to 91, I know how I can fix this problem for you.
The error moved to line 91, as you said:
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /web/htdocs/www.angolocreativo.com/home/wp-content/plugins/nfb-video-plugin/nfb_video_plugin.php on line 91
What can I do?
I’ve updated the file on the wordpress.org website, I believe it takes about 15-20 mins to update, then you can go ahead and try to re-install it. Let me know if you have more difficulties.
It’s me again…
I tried to active the plugin, but it made this new error:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /web/htdocs/www.angolocreativo.com/home/wp-content/plugins/nfb-video-plugi/simple_html_dom.php on line 84
why?
honestly couldn’t tell you that one, it’s a plugin on this page http://simplehtmldom.sourceforge.net/ i’ll have to have a look at it, but i’m not familiar with the code
The plugin make again this error:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /web/htdocs/www.angolocreativo.com/home/wp-content/plugins/nfb-video-plugi/simple_html_dom.php on line 84
I am using PHP5 and wordpress 2.8.6
I know. I’ve sent the author of simple_html_dom.php an e-mail and am waiting for an answer from him to know why this error may be showing up.
News from the author of simple_html_dom.php?
None and since I can’t duplicate your error at all I guess we have to trial and error this.
Step 1 : replace line 84 in simple_html_dom.php with
public $nodetype = ”.HDOM_TYPE_TEXT.”;
Step 2 : If this doesn’t fix the problem, please send me the error report and a link to a page on your server that has php info on it? You can send this to my e-mail, a.savard@nfb.ca
Hey there,
I really love your weblog. Bing sent me to this blog. I found very much good imformation here.
Will surely visit it again.