I've just found a safe way to insert videos (from youtube, metacafe, etc.) into Xoops Cube Legacy. Thanks to photositelinks.com.
1) Download Videobox from http://videobox-lb.sourceforge.net/
2) Unzip and upload javascript files, CSS file to XOOPS_ROOT_PATH
3) Edit theme.html
4) Save the following codes as Videobox.class.php into XOOPS_ROOT_PATH/preload/
5) Usage:
or
Notes:
- the related preload can be downloaded from here
- tested with XCL 2.1.4
Edited 25.5.2008
I removed the Video box from this site because I found a better way to insert videos. Please read this
1) Download Videobox from http://videobox-lb.sourceforge.net/
2) Unzip and upload javascript files, CSS file to XOOPS_ROOT_PATH
3) Edit theme.html
<script type="text/javascript" src="mootools.js"></script>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript" src="videobox.js"></script>
<link rel="stylesheet" href="videobox.css" type="text/css" media="screen" />
4) Save the following codes as Videobox.class.php into XOOPS_ROOT_PATH/preload/
<?php
//================================================================
// Videobox Preload
// by photosite, http://www.photositelinks.com/
//================================================================
if (!defined('XOOPS_ROOT_PATH')) exit();
class Videobox extends XCube_ActionFilter
{
function preBlockFilter()
{
$this->mRoot->mDelegateManager->add('Legacy_TextFilter.MakeXCodeConvertTable', 'Videobox::MakeXCodeConvertTable');
}
function MakeXCodeConvertTable(&$patterns, &$replacements)
{
// [video] tag for videobox
$patterns[] = "/\[video\=(['\"]?)(http[s]?:\/\/[^\"'<>]*)\\1\ title=(['\"]?)([^\s]*)\\3 w=(['\"]?)(\d+)\\5 h=(['\"]?)(\d+)\\7](.*)\[\/video\]/sU";
$replacements[0][] = $replacements[1][] = '<a href="\\2" rel="vidbox \\6 \\8" title="\\4">\\9</a>';
$patterns[] = "/\[video\=(['\"]?)(http[s]?:\/\/[^\"'<>]*)\\1\ w=(['\"]?)(\d+)\\3 h=(['\"]?)(\d+)\\5](.*)\[\/video\]/sU";
$replacements[0][] = $replacements[1][] = '<a href="\\2" rel="vidbox \\4 \\6">\\7</a>';
$patterns[] = "/\[video\=(['\"]?)(http[s]?:\/\/[^\"'<>]*)\\1\ title=(['\"]?)([^\s]*)\\3](.*)\[\/video\]/sU";
$replacements[0][] = $replacements[1][] = '<a href="\\2" rel="vidbox" title="\\4">\\5</a>';
$patterns[] = "/\[video\=(['\"]?)(http[s]?:\/\/[^\"'<>]*)\\1\](.*)\[\/video\]/sU";
$replacements[0][] = $replacements[1][] = '<a href="\\2" rel="vidbox">\\3</a>';
}
}
?>
5) Usage:
[video=http://youtube.com/watch?v=Pe5p1BXNCQM]Somewhere Over The Rainbow[/video]
or
[video=http://youtube.com/watch?v=Pe5p1BXNCQM][img]http://i.ytimg.com/vi/Pe5p1BXNCQM/default.jpg[/img][/video]
Notes:
- the related preload can be downloaded from here
- tested with XCL 2.1.4
Edited 25.5.2008
I removed the Video box from this site because I found a better way to insert videos. Please read this
Votes:3
Average:10.00
|
Xoops |
Getting WF-Links worked on Xoops Cube Legacy |


