Firefox PHP

Module: BBcode Video

Posted by Maurice Makaay 
Re: Module: BBcode Video
November 15, 2009 12:58PM
Thomas Seifert
well, you could start with the exact error message.

You're right !

The same test today, well it is a php error in fact !

PHP Error Message

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/a4420328/public_html/phorum-5.2.13/mods/bbcode_video/bbcode_video.php on line 115

PHP Error Message

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/a4420328/public_html/phorum-5.2.13/mods/bbcode_video/bbcode_video.php on line 115
Re: Module: BBcode Video
November 15, 2009 01:28PM
I have corrected the mistake in my file and it works well !

The php error, on the line 115, a " must be deleted.
Re: Module: BBcode Video
December 06, 2009 04:01AM
Are there any plans for embed code from YouTube etc., rather than just the link URL? The existing BBcode Video mod is very rudimentary. One size hard-coded in bbcode_video.php doesn't work for a lot of files on YouTube for example. I.e., one size doesn't fit all. The (YouTube) embed code is very flexible, allowing borders on or off, related videos on or off, and selectable video sizes.
Re: Module: BBcode Video
December 06, 2009 08:36AM
I do see where you are coming from and what you are expecting from this module, but it's exactly the flexibility of embedding code that needs to be harnessed instead unleashed.

Allowing full youtube embed code would result in a very open format for adding embedded objects into the page. Not a problem at all when you are in control of your own page content and for example putting Youtube videos on your personal blog, but certainly a problem when you allow anonymous third parties to put arbitrary embedding code into your website's pages.

To make this fully safe, a lot of work would go in thoroughly checking the contents of the embedding code and deciding whether or not it would be safe to include the embedding code in the page. That sounds a lot like inspecting and filtering HTML code to prevent arbitrary JavaScript from being entered in a page by a malicious user: we all know how well that worked.

For this reason, the choice for the BBcode video module was to take the safe route of trying to recognize a Youtube URL in the embedding code and using that, instead of allowing a full embedding block directly.

Maybe some functionality could be added to recognize specific video playing parameters and copy those but things like setting the video size from the parameters would quickly be a problem for site owners, when users start posting videos with huge sizes that fill up the screen and possibly ruin the site layout.

If you still want to allow your users to post any embedding code, then you could consider installing the HTML module for allowing HTML code in the pages. It will filter out JavaScript code, but the embedding code should work.

Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: BBcode Video
December 06, 2009 02:26PM
I made a nasty hack of Maurice's BBCode Video and called it BBCode Flash. The URL is placed in the brackets and any parameters you want within the embed tag are placed between the bbcode flash brackets.

Everything gets placed into an <object> tag and an <embed> tag. It might work for you. I use it for flash games at my forum and the only time it did not work was when there was some attributes that work well in the embed tag but the object tag didn't like at all.

I've thought about removing the object tag altogether for simplicity. I think all browsers should recognize the embed tag now.

- Bob
Re: Module: BBcode Video
February 23, 2010 02:05PM
Hello Maurice,

I have upgraded to 5.2 but I have a few hundred videos with an embed code from a Dolphin-Boonex-Ray website and they are not appearing.
I read the entire subject but I am not clear as how to proceed:
- Is it possible for me to write some code for them to appear and if yes, what are the parameters?
- Do you offer a solution where this code could be written by you or somebody else (with payment of course)?
Thanks for your help and your work.
Re: Module: BBcode Video
February 24, 2010 08:30AM
Could you paste an example of the BoonEx Dolphin embed code that causes the video to appear in a normal HTML web page?

I am not familiar with BoonEx Dolphin, but was able to hack this module to create one for embedding flash files. It was more straight forward than some of the other modules here, so I might be able to take a stab at it. No guarantees though.

PHP is something that I wanna know, sometimes think I know, but really do not know :-)

Robert Angle
Phorum lover, nothing more.
Re: Module: BBcode Video
February 26, 2010 02:32PM
Thanks for your reply.
Here is the embed code:

<div><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="[]; width="350" height="365" id="ray_player_object" align="middle"><param name="allowScriptAccess" value="always" /><param name="movie" value="[]; /><param name="quality" value="high" /><param name="allowFullScreen" value="true" /><param name="base" value="[]; /><param name="FlashVars" value="module=movie&amp;app=player&amp;id=&amp;file=264&amp;url=" /><embed id="ray_player_embed" name="ray_player" src="[]; quality="high" allowFullScreen="true" width="350" height="365" align="middle" allowScriptAccess="always" base="[]; FlashVars="module=movie&amp;app=player&amp;id=&amp;file=264&amp;url=" pluginspage="[]; /></object></div>
Re: Module: BBcode Video
February 27, 2010 01:08PM
If I am seeing that correctly, the code probably stays the same with every movie, with the .swf file being the player and the FlashVars determining which video of several will be played. In the example above, "file=264" identifies the clip.

Is that the code that you or your users have put into the message body of your phorum posts?

If so, then I think Maurice's statement above might be the best solution...

He said...

Maurice Mckaay
If you still want to allow your users to post any embedding code, then you could consider installing the HTML module for allowing HTML code in the pages. It will filter out JavaScript code, but the embedding code should work.

The BBCode Video module, and my BBCode Flash module that rips off Maurice's BBCode Video module, simply recognizes a video URL and adds all that embed code for you.

Robert Angle
Phorum lover, nothing more.
Re: Module: BBcode Video
March 02, 2010 02:31PM
Hello Maurice and Robert,

Thanks for your precious answers.
I did install the html module and the html purifier but nothing changed.
Sorry, only registered users may post in this forum.

Click here to login