xoops forums

avtx30

Not too shy to talk
Posted on: 2008/6/14 16:04
avtx30
avtx30 (Show more)
Not too shy to talk
Posts: 181
Since: 2006/10/12
#1

Streaming flash videos and Euro 2008 :-)

Are you enjoying the UEFA Euro 2008?

I wanted to stream the goals on my XOOPS site, I found a way. Want to share with you.

1. Download the The JW FLV Media Player

2. Unzip and upload the mediaplayer.swf to XOOPS_ROOT_PATH

3.1 With XOOPS (org), you have to hack the class/module.textsanitizer.php

$patterns[] = "/[video align=(['"]?)(left|center|right)\1 w=(['"]?)(d+)\3 h=(['"]?)(d+)\5]([^"()?&'<>]*).flv[/video]/sU";

$replacements[0][] = $replacements[1][] = '
<div align="\2"><embed src="'.XOOPS_URL.'/mediaplayer.swf" allowscriptaccess="always" allowfullscreen="true" flashvars="width=\4&height=\6&file='.XOOPS_URL.'/\7.flv&image='.XOOPS_URL.'/\7.jpg" width="\4" height="\6"></div>';


3.2 With other XOOPS with Preload feature, just save the following file as Flash.class.php under XOOPS_ROOT_PATH/preload/

http://www.nhatban.net/tmp/Flash.class.txt

4. Usage: upload FLV videos and their screenshots to a same folder with the same file name excluded the extension. For example, if your video file is italia-france.flv then its screenshot should be italia-france.jpg

Add to XOOPS contents as following:

[video align=center w=320 h=260]uploads/euro2008/italia-france.flv[/video]


Demo: Euro 2008

Mamba

Moderator
Posted on: 2008/6/21 23:00
Mamba
Mamba (Show more)
Moderator
Posts: 10818
Since: 2004/4/23
#2

Re: Streaming flash videos and Euro 2008 :-)

Very nice!!!

Thanks for sharing!!
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs