Boonex: Who's the HTML Purifier around here?

Boonex: Who's the HTML Purifier expert around here? ... is what I meant to title this.

I want to add another filter to allow embedding of Vimeo videos.  I have the filter code, and it works for Vimeo, if I call it a YouTube filter, but I'm a little perplexed at how to completely implement the filter along with the YouTube filter.  The documentation on htmlpurifier.org is probably crystal clear to them, but to me, it sucks.


I have added Vimeo.php to the directory: plugins/htmlpurifier/standalone/HTMLPurifier/Filter

I have added this line to inc/utils.inc.php: $oConfig->set('Filter.Vimeo', true);  as shown below.

$oConfig = HTMLPurifier_Config::createDefault();       

$oConfig->set('Filter.YouTube', true);

$oConfig->set('Filter.Vimeo', true);


When I post a news article with Vimeo embed code within, I get these php warnings:

Warning: Cannot set undefined directive Filter.Vimeo to value on line 1114 in file /plugins/htmlpurifier/HTMLPurifier.standalone.php on line 3483

Warning: Cannot modify header information - headers already sent by (output started at /plugins/htmlpurifier/HTMLPurifier.standalone.php:3483) in /inc/classes/BxDolTextData.php on line 170

Warning: Cannot modify header information - headers already sent by (output started at /plugins/htmlpurifier/HTMLPurifier.standalone.php:3483) in /inc/admin_design.inc.php on line 56

As far as I can tell, all configuration directives are stored in /plugins/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/schema.ser, which is of a format I do not understand at all.  I have no idea what the process is of definining a configuration directive, so this all works.

I could sure use some help on this because I'm ready to rip my eyeballs out of their sockets

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 20 Jan 2010

So far, I have been able to locate filters for:

Google Video

LiveLeak

Vimeo

WeGame

LocalMovie (An example filter that awwlows you to embed videos hosted on your own site)

There's a lot more video video sites to consider developing filters for.  It would be nice if there were a section in admin where you could select which sites from which to allow embedded videos.  To name a few:

Hulu

Metacafe

ESPN

Truveo

Somebody should work on this

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 20 Jan 2010

yeah i was also looking into this list as well.   i wanted to have a dropdownlist for embeded videos in the upload video section.

the sulotion you are working on now, will this allow for that or is the filters only for like forum and blog post embeding ?

Thanks

https://dolphin-techs.com - Skype: Dolphin Techs
Quote · 20 Jan 2010

This is for anywhere a TinyMCE editor is used to post content.  The embed option for the video uploader has nothing to do with html purifier.

It took a while, but I've finally got it figured out.  The tricky part is being able to generate a new directive configuration file (schema.ser), but I figured out how to do that.  Now I can embed both YouTube and Vimeo videos.  I'll keep working on more filters.

The strange thing I noticed when I was doing all this, is that I can embed videos from any site at all in the forums.  At first I thought I messed something up, but when I reverted to the original configuration, I could still do it.  I'll have to post a special thread about that.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 20 Jan 2010
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.