define("MEDIA_AUTOPLAY", 1); //autoplay videos by default?
"liveleak" => array("#^http://(www.)?liveleak.com/view.*[?&]i=([^&]+)#i",
2,
"http://www.liveleak.com/e/{ID}",
null,
MEDIA_BBCODE_YES,
"",
),
Hello, what should I do the same videos of www.myvideo.de work?Re-do step 1 and step 4
Furthermore, there is no preview screen. In what could be the reason?If you mean no thumbnails, then this mod doesn't create thumbnails automatically
"youtube" => "#^http://(www\.)?youtube\.com/watch/?.*[\?&]v=([^&]+)#i",
Replace with: "youtube" => "#^http://([^.]+\.)?youtube\.com/watch/?.*[\?&]v=([^&]+)#i",
<?php
/**************************************************************************
* *
* 4images - A Web Based Image Gallery Management System *
* ---------------------------------------------------------------- *
* *
* File: media_sites.php *
* File Version: 1.1 *
* Copyright: (C) 2002 Jan Sorgalla *
* Email: jan@4homepages.de *
* Web: http://www.4homepages.de *
* Scriptversion: 1.7.6 *
* *
* Never released without support from: Nicky (http://www.nicky.net) *
* *
**************************************************************************
* *
* Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz- *
* bedingungen (Lizenz.txt) für weitere Informationen. *
* --------------------------------------------------------------- *
* This script is NOT freeware! Please read the Copyright Notice *
* (Licence.txt) for further information. *
* *
*************************************************************************/
/*
Changes since previous version:
- added myvideo.de
*/
if (!defined('ROOT_PATH')) {
die("Security violation");
}
define("MEDIA_AUTOPLAY", 1); //autoplay videos by default?
/*
$media_sites = array(
"FUNCNAME" => array("REGEX"
or
"EXTENSION" => array("REGEX", array("template_tag" => REGEXMATCH, "template_tag2" => REGEXMATCH2)),
or
"EXTENSION" => array("REGEX", array("template_tag" => array(REGEXMATCH, "SPRINTF"), "template_tag2" => REGEXMATCH2)),
or
if used FUNCNAME, FUNCNAME will be used as EXTENSION and a function with name media_sites_custom_FUNCNAME must exist!
*/
$media_sites = array(
"youtube" => "#^http://([^.]+\.)?youtube\.com/watch/?.*[\?&]v=([^&]+)#i",
"metacafe" => "#^http://(www\.)?metacafe\.com/watch/(.*)#i",
"stupidvideos" => "#^http://(www\.|images\.)?stupidvideos\.com.*([\?&]i=|\#)([0-9]+)#i",
"yahoovideo" => "#^http://video\.yahoo\.com/watch/([0-9]+)/([0-9]+)#i",
"myspacevideo" => "#^http://vids\.myspace\.com/.*[\?&]videoid=([0-9]+)#i",
"break" => "#^http://embed\.break\.com/([0-9]+)#i", //(must use address from src in <embed> link)
"liveleak" => "#^http://(www\.)?liveleak\.com/view\?.*&?i=([^&]+)#i",
"spikedhumor" => "#^http://(www\.)?spikedhumor\.com/articles/([0-9]+)/Living-Glass\.html#i",
"hulu" => "#^http://(www\.)hulu\.com/embed/([^/&\?]+)#i", //(must use address from src in <embed> link)
"myvideo_de" => "#^http://(www\.)myvideo\.de/movie/([0-9]+)#i",
// "youtube" => array("#^http:\/\/(www\.)?youtube\.com\/watch\/?[\?&]v=([^&]+)#i", array("media_id" => 2)),//functionless
// "youtube" => array("#^http:\/\/(www\.)?youtube\.com\/watch\/?[\?&]v=([^&]+)#i", array("media_dl" => array(2, "http://www.youtube.com/v/%s"))),//functionless
// "metacafe" => array("#^http:\/\/(www\.)?metacafe\.com\/watch\/(.*)#i", array("media_dl" => array(2, "http://www.metacafe.com/fplayer/%s.swf"))), //functionless
);
function media_sites($url, $type = 0)
{
global $config, $media_sites;
static $sites_cache = array();
if (!isset($sites_cache[$url]))
{
$sites_cache[$url] = false;
foreach($media_sites as $key => $val)
{
// if (!in_array($key, $config['allowed_mediatypes_array']))
// continue;
if (preg_match((is_array($val) ? $val[0] : $val), $url, $match))
{
if (is_array($val))
{
$sites_cache[$url][0] = $key;
$sites_cache[$url][1] = array();
foreach($val[1] as $tag => $m)
{
$sites_cache[$url][1][$tag] = (is_array($m)) ? sprintf($m[1], $match[$m[0]]) : $match[$m];
}
}
elseif (function_exists("media_sites_custom_".$key))
{
$func = "media_sites_custom_".$key;
if ($result = $func($url, $match))
{
$sites_cache[$url][0] = $key;
$sites_cache[$url][1] = $result;
}
}
break;
}
}
}
return ($type ? $sites_cache[$url] : ($sites_cache[$url] ? 1 : 0));
}
function media_sites_template_vars($url)
{
if (!($data = media_sites($url, 1)))
return false;
global $site_template;
$site_template->register_vars($data[1]);
return true;
}
// BEGIN MEDIA FUNCTIONS
//youtube.com
function media_sites_custom_youtube($url, $match)
{
$return = false;
if (isset($match[2]))
{
$return = array(
"media_dl" => "http://www.youtube.com/v/".$match[2],
"media_id" => $match[2],
"media_ext" => "flv",
"image_width" => REPLACE_EMPTY,
"image_height" => REPLACE_EMPTY,
"image_autoplay" => MEDIA_AUTOPLAY,
);
if (preg_match_all("#[\?&](width|height|autoplay)=([0-9]+)#i", $url, $match))
{
foreach($match[1] as $key => $val)
{
$return["image_".$val] = $match[2][$key];
}
}
$return['image_autoplay'] = ($return['image_autoplay']) ? 1 : 0;
}
return $return;
}
//metacafe.com
function media_sites_custom_metacafe($url, $match)
{
$return = false;
if (isset($match[2]))
{
$return = array(
"media_id" => $match[2],
"media_dl" => "http://www.metacafe.com/fplayer/".$match[2].".swf",
"media_ext" => "swf",
"image_width" => REPLACE_EMPTY,
"image_height" => REPLACE_EMPTY,
"image_autoplay" => MEDIA_AUTOPLAY,
);
if (preg_match_all("#[\?&](width|height|autoplay)=([0-9]+)#i", $url, $match))
{
foreach($match[1] as $key => $val)
{
$return["image_".$val] = $match[2][$key];
}
}
$return['image_autoplay'] = ($return['image_autoplay']) ? 1 : 0;
}
return $return;
}
//stupidvideos.com
function media_sites_custom_stupidvideos($url, $match)
{
$return = false;
if (isset($match[3]))
{
$return = array(
"media_id" => $match[3],
"media_dl" => "http://images.stupidvideos.com/2.0.2/swf/video.swf?i=".$match[3]."&sa=1&sk=7&si=2&uid=0&usn=0",
"media_ext" => "flv",
"image_width" => REPLACE_EMPTY,
"image_height" => REPLACE_EMPTY,
"image_autoplay" => MEDIA_AUTOPLAY,
);
if (preg_match_all("#[\?&](width|height|autoplay)=([0-9]+)#i", $url, $match))
{
foreach($match[1] as $key => $val)
{
$return["image_".$val] = $match[2][$key];
}
}
$return['image_autoplay'] = ($return['image_autoplay']) ? 1 : 0;
}
return $return;
}
//video.yahoo.com
function media_sites_custom_yahoovideo($url, $match)
{
$return = false;
if (isset($match[1]) || isset($match[2]))
{
$return = array(
"media_id" => @$match[2],
"media_vid" => @$match[1],
"media_dl" => "http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.34&id=".$match[2]."&vid=".$match[1]."&embed=1",
"media_ext" => "flv",
"image_width" => REPLACE_EMPTY,
"image_height" => REPLACE_EMPTY,
"image_autoplay" => MEDIA_AUTOPLAY,
);
if (preg_match_all("#[\?&](width|height|autoplay)=([0-9]+)#i", $url, $match))
{
foreach($match[1] as $key => $val)
{
$return["image_".$val] = $match[2][$key];
}
}
$return['image_autoplay'] = ($return['image_autoplay']) ? 1 : 0;
}
return $return;
}
//vids.myspace.com
function media_sites_custom_myspacevideo($url, $match)
{
$return = false;
if (isset($match[1]))
{
$return = array(
"media_id" => $match[1],
"media_dl" => "http://player.hulu.com/embed/myspace_viral_player.swf?pid=nC2V0izs_saj6gpqL2XfgmEkV64au1rT&embed=true&autoplay=0&videoID=".$match[1],
"media_ext" => "flv",
"image_width" => REPLACE_EMPTY,
"image_height" => REPLACE_EMPTY,
"image_autoplay" => MEDIA_AUTOPLAY,
);
if (preg_match_all("#[\?&](width|height|autoplay)=([0-9]+)#i", $url, $match))
{
foreach($match[1] as $key => $val)
{
$return["image_".$val] = $match[2][$key];
}
}
$return['image_autoplay'] = ($return['image_autoplay']) ? 1 : 0;
}
return $return;
}
//break.com (must use address from src in <embed> link)
function media_sites_custom_break($url, $match)
{
$return = false;
if (isset($match[1]))
{
$return = array(
"media_id" => $match[1],
"media_dl" => "http://embed.break.com/".$match[1],
"media_ext" => "flv",
"image_width" => REPLACE_EMPTY,
"image_height" => REPLACE_EMPTY,
"image_autoplay" => MEDIA_AUTOPLAY,
);
if (preg_match_all("#[\?&](width|height|autoplay)=([0-9]+)#i", $url, $match))
{
foreach($match[1] as $key => $val)
{
$return["image_".$val] = $match[2][$key];
}
}
$return['image_autoplay'] = ($return['image_autoplay']) ? 1 : 0;
}
return $return;
}
//liveleak.com
function media_sites_custom_liveleak($url, $match)
{
$return = false;
if (isset($match[2]))
{
$return = array(
"media_id" => $match[2],
"media_dl" => "http://www.liveleak.com/e/".$match[2],
"media_ext" => "flv",
"image_width" => REPLACE_EMPTY,
"image_height" => REPLACE_EMPTY,
"image_autoplay" => MEDIA_AUTOPLAY,
);
if (preg_match_all("#[\?&](width|height|autoplay)=([0-9]+)#i", $url, $match))
{
foreach($match[1] as $key => $val)
{
$return["image_".$val] = $match[2][$key];
}
}
$return['image_autoplay'] = ($return['image_autoplay']) ? 1 : 0;
}
return $return;
}
//spikedhumor.com
function media_sites_custom_spikedhumor($url, $match)
{
$return = false;
if (isset($match[2]))
{
$return = array(
"media_id" => $match[2],
"media_dl" => "http://www.spikedhumor.com/player/vcplayer.swf?file=http://www.spikedhumor.com/videocodes/".$match[2]."/data.xml",
"media_ext" => "flv",
"image_width" => REPLACE_EMPTY,
"image_height" => REPLACE_EMPTY,
"image_autoplay" => MEDIA_AUTOPLAY,
);
if (preg_match_all("#[\?&](width|height|autoplay)=([0-9]+)#i", $url, $match))
{
foreach($match[1] as $key => $val)
{
$return["image_".$val] = $match[2][$key];
}
}
$return['image_autoplay'] = ($return['image_autoplay']) ? 1 : 0;
}
return $return;
}
//hulu.com (must use address from src in <embed> link)
function media_sites_custom_hulu($url, $match)
{
$return = false;
if (isset($match[2]))
{
$return = array(
"media_id" => $match[2],
"media_dl" => "http://www.hulu.com/embed/".$match[2],
"media_ext" => "flv",
"image_width" => REPLACE_EMPTY,
"image_height" => REPLACE_EMPTY,
"image_autoplay" => MEDIA_AUTOPLAY,
);
if (preg_match_all("#[\?&](width|height|autoplay)=([0-9]+)#i", $url, $match))
{
foreach($match[1] as $key => $val)
{
$return["image_".$val] = $match[2][$key];
}
}
$return['image_autoplay'] = ($return['image_autoplay']) ? 1 : 0;
}
return $return;
}
//myvide.de
function media_sites_custom_myvideo_de($url, $match)
{
$return = false;
if (isset($match[2]))
{
$return = array(
"media_id" => $match[2],
"media_dl" => "http://www.myvideo.de/movie/".$match[2],
"media_ext" => "flv",
"image_width" => REPLACE_EMPTY,
"image_height" => REPLACE_EMPTY,
"image_autoplay" => MEDIA_AUTOPLAY,
);
if (preg_match_all("#[\?&](width|height|autoplay)=([0-9]+)#i", $url, $match))
{
foreach($match[1] as $key => $val)
{
$return["image_".$val] = $match[2][$key];
}
}
$return['image_autoplay'] = ($return['image_autoplay']) ? 1 : 0;
}
return $return;
}
// END MEDIA FUNCTIONS
?>
<?php
/**************************************************************************
* *
* 4images - A Web Based Image Gallery Management System *
* ---------------------------------------------------------------- *
* *
* File: media_sites.php *
* File Version: 1.1 *
* Copyright: (C) 2002 Jan Sorgalla *
* Email: jan@4homepages.de *
* Web: http://www.4homepages.de *
* Scriptversion: 1.7.6 *
* *
* Never released without support from: Nicky (http://www.nicky.net) *
* *
**************************************************************************
* *
* Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz- *
* bedingungen (Lizenz.txt) für weitere Informationen. *
* --------------------------------------------------------------- *
* This script is NOT freeware! Please read the Copyright Notice *
* (Licence.txt) for further information. *
* *
*************************************************************************/
/*
Changes since previous version:
- added myvideo.de
*/
if (!defined('ROOT_PATH')) {
die("Security violation");
}
define("MEDIA_AUTOPLAY", 1); //autoplay videos by default?
/*
$media_sites = array(
"FUNCNAME" => array("REGEX"
or
"EXTENSION" => array("REGEX", array("template_tag" => REGEXMATCH, "template_tag2" => REGEXMATCH2)),
or
"EXTENSION" => array("REGEX", array("template_tag" => array(REGEXMATCH, "SPRINTF"), "template_tag2" => REGEXMATCH2)),
or
if used FUNCNAME, FUNCNAME will be used as EXTENSION and a function with name media_sites_custom_FUNCNAME must exist!
*/
$media_sites = array(
"youtube" => "#^http://([^.]+\.)?youtube\.com/watch/?.*[\?&]v=([^&]+)#i",
"metacafe" => "#^http://(www\.)?metacafe\.com/watch/(.*)#i",
"stupidvideos" => "#^http://(www\.|images\.)?stupidvideos\.com.*([\?&]i=|\#)([0-9]+)#i",
"yahoovideo" => "#^http://video\.yahoo\.com/watch/([0-9]+)/([0-9]+)#i",
"myspacevideo" => "#^http://vids\.myspace\.com/.*[\?&]videoid=([0-9]+)#i",
"break" => "#^http://embed\.break\.com/([0-9]+)#i", //(must use address from src in <embed> link)
"liveleak" => "#^http://(www\.)?liveleak\.com/view\?.*&?i=([^&]+)#i",
"spikedhumor" => "#^http://(www\.)?spikedhumor\.com/articles/([0-9]+)/Living-Glass\.html#i",
"hulu" => "#^http://(www\.)hulu\.com/embed/([^/&\?]+)#i", //(must use address from src in <embed> link)
"myvideo_de" => "#^http://(www\.)myvideo\.de/watch/([0-9]+)/([^/&\?]+)#i",
// "youtube" => array("#^http:\/\/(www\.)?youtube\.com\/watch\/?[\?&]v=([^&]+)#i", array("media_id" => 2)),//functionless
// "youtube" => array("#^http:\/\/(www\.)?youtube\.com\/watch\/?[\?&]v=([^&]+)#i", array("media_dl" => array(2, "http://www.youtube.com/v/%s"))),//functionless
// "metacafe" => array("#^http:\/\/(www\.)?metacafe\.com\/watch\/(.*)#i", array("media_dl" => array(2, "http://www.metacafe.com/fplayer/%s.swf"))), //functionless
);
function media_sites($url, $type = 0)
{
global $config, $media_sites;
static $sites_cache = array();
if (!isset($sites_cache[$url]))
{
$sites_cache[$url] = false;
foreach($media_sites as $key => $val)
{
// if (!in_array($key, $config['allowed_mediatypes_array']))
// continue;
if (preg_match((is_array($val) ? $val[0] : $val), $url, $match))
{
if (is_array($val))
{
$sites_cache[$url][0] = $key;
$sites_cache[$url][1] = array();
foreach($val[1] as $tag => $m)
{
$sites_cache[$url][1][$tag] = (is_array($m)) ? sprintf($m[1], $match[$m[0]]) : $match[$m];
}
}
elseif (function_exists("media_sites_custom_".$key))
{
$func = "media_sites_custom_".$key;
if ($result = $func($url, $match))
{
$sites_cache[$url][0] = $key;
$sites_cache[$url][1] = $result;
}
}
break;
}
}
}
return ($type ? $sites_cache[$url] : ($sites_cache[$url] ? 1 : 0));
}
function media_sites_template_vars($url)
{
if (!($data = media_sites($url, 1)))
return false;
global $site_template;
$site_template->register_vars($data[1]);
return true;
}
// BEGIN MEDIA FUNCTIONS
//youtube.com
function media_sites_custom_youtube($url, $match)
{
$return = false;
if (isset($match[2]))
{
$return = array(
"media_dl" => "http://www.youtube.com/v/".$match[2],
"media_id" => $match[2],
"media_ext" => "flv",
"image_width" => REPLACE_EMPTY,
"image_height" => REPLACE_EMPTY,
"image_autoplay" => MEDIA_AUTOPLAY,
);
if (preg_match_all("#[\?&](width|height|autoplay)=([0-9]+)#i", $url, $match))
{
foreach($match[1] as $key => $val)
{
$return["image_".$val] = $match[2][$key];
}
}
$return['image_autoplay'] = ($return['image_autoplay']) ? 1 : 0;
}
return $return;
}
//metacafe.com
function media_sites_custom_metacafe($url, $match)
{
$return = false;
if (isset($match[2]))
{
$return = array(
"media_id" => $match[2],
"media_dl" => "http://www.metacafe.com/fplayer/".$match[2].".swf",
"media_ext" => "swf",
"image_width" => REPLACE_EMPTY,
"image_height" => REPLACE_EMPTY,
"image_autoplay" => MEDIA_AUTOPLAY,
);
if (preg_match_all("#[\?&](width|height|autoplay)=([0-9]+)#i", $url, $match))
{
foreach($match[1] as $key => $val)
{
$return["image_".$val] = $match[2][$key];
}
}
$return['image_autoplay'] = ($return['image_autoplay']) ? 1 : 0;
}
return $return;
}
//stupidvideos.com
function media_sites_custom_stupidvideos($url, $match)
{
$return = false;
if (isset($match[3]))
{
$return = array(
"media_id" => $match[3],
"media_dl" => "http://images.stupidvideos.com/2.0.2/swf/video.swf?i=".$match[3]."&sa=1&sk=7&si=2&uid=0&usn=0",
"media_ext" => "flv",
"image_width" => REPLACE_EMPTY,
"image_height" => REPLACE_EMPTY,
"image_autoplay" => MEDIA_AUTOPLAY,
);
if (preg_match_all("#[\?&](width|height|autoplay)=([0-9]+)#i", $url, $match))
{
foreach($match[1] as $key => $val)
{
$return["image_".$val] = $match[2][$key];
}
}
$return['image_autoplay'] = ($return['image_autoplay']) ? 1 : 0;
}
return $return;
}
//video.yahoo.com
function media_sites_custom_yahoovideo($url, $match)
{
$return = false;
if (isset($match[1]) || isset($match[2]))
{
$return = array(
"media_id" => @$match[2],
"media_vid" => @$match[1],
"media_dl" => "http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.34&id=".$match[2]."&vid=".$match[1]."&embed=1",
"media_ext" => "flv",
"image_width" => REPLACE_EMPTY,
"image_height" => REPLACE_EMPTY,
"image_autoplay" => MEDIA_AUTOPLAY,
);
if (preg_match_all("#[\?&](width|height|autoplay)=([0-9]+)#i", $url, $match))
{
foreach($match[1] as $key => $val)
{
$return["image_".$val] = $match[2][$key];
}
}
$return['image_autoplay'] = ($return['image_autoplay']) ? 1 : 0;
}
return $return;
}
//vids.myspace.com
function media_sites_custom_myspacevideo($url, $match)
{
$return = false;
if (isset($match[1]))
{
$return = array(
"media_id" => $match[1],
"media_dl" => "http://player.hulu.com/embed/myspace_viral_player.swf?pid=nC2V0izs_saj6gpqL2XfgmEkV64au1rT&embed=true&autoplay=0&videoID=".$match[1],
"media_ext" => "flv",
"image_width" => REPLACE_EMPTY,
"image_height" => REPLACE_EMPTY,
"image_autoplay" => MEDIA_AUTOPLAY,
);
if (preg_match_all("#[\?&](width|height|autoplay)=([0-9]+)#i", $url, $match))
{
foreach($match[1] as $key => $val)
{
$return["image_".$val] = $match[2][$key];
}
}
$return['image_autoplay'] = ($return['image_autoplay']) ? 1 : 0;
}
return $return;
}
//break.com (must use address from src in <embed> link)
function media_sites_custom_break($url, $match)
{
$return = false;
if (isset($match[1]))
{
$return = array(
"media_id" => $match[1],
"media_dl" => "http://embed.break.com/".$match[1],
"media_ext" => "flv",
"image_width" => REPLACE_EMPTY,
"image_height" => REPLACE_EMPTY,
"image_autoplay" => MEDIA_AUTOPLAY,
);
if (preg_match_all("#[\?&](width|height|autoplay)=([0-9]+)#i", $url, $match))
{
foreach($match[1] as $key => $val)
{
$return["image_".$val] = $match[2][$key];
}
}
$return['image_autoplay'] = ($return['image_autoplay']) ? 1 : 0;
}
return $return;
}
//liveleak.com
function media_sites_custom_liveleak($url, $match)
{
$return = false;
if (isset($match[2]))
{
$return = array(
"media_id" => $match[2],
"media_dl" => "http://www.liveleak.com/e/".$match[2],
"media_ext" => "flv",
"image_width" => REPLACE_EMPTY,
"image_height" => REPLACE_EMPTY,
"image_autoplay" => MEDIA_AUTOPLAY,
);
if (preg_match_all("#[\?&](width|height|autoplay)=([0-9]+)#i", $url, $match))
{
foreach($match[1] as $key => $val)
{
$return["image_".$val] = $match[2][$key];
}
}
$return['image_autoplay'] = ($return['image_autoplay']) ? 1 : 0;
}
return $return;
}
//spikedhumor.com
function media_sites_custom_spikedhumor($url, $match)
{
$return = false;
if (isset($match[2]))
{
$return = array(
"media_id" => $match[2],
"media_dl" => "http://www.spikedhumor.com/player/vcplayer.swf?file=http://www.spikedhumor.com/videocodes/".$match[2]."/data.xml",
"media_ext" => "flv",
"image_width" => REPLACE_EMPTY,
"image_height" => REPLACE_EMPTY,
"image_autoplay" => MEDIA_AUTOPLAY,
);
if (preg_match_all("#[\?&](width|height|autoplay)=([0-9]+)#i", $url, $match))
{
foreach($match[1] as $key => $val)
{
$return["image_".$val] = $match[2][$key];
}
}
$return['image_autoplay'] = ($return['image_autoplay']) ? 1 : 0;
}
return $return;
}
//hulu.com (must use address from src in <embed> link)
function media_sites_custom_hulu($url, $match)
{
$return = false;
if (isset($match[2]))
{
$return = array(
"media_id" => $match[2],
"media_dl" => "http://www.hulu.com/embed/".$match[2],
"media_ext" => "flv",
"image_width" => REPLACE_EMPTY,
"image_height" => REPLACE_EMPTY,
"image_autoplay" => MEDIA_AUTOPLAY,
);
if (preg_match_all("#[\?&](width|height|autoplay)=([0-9]+)#i", $url, $match))
{
foreach($match[1] as $key => $val)
{
$return["image_".$val] = $match[2][$key];
}
}
$return['image_autoplay'] = ($return['image_autoplay']) ? 1 : 0;
}
return $return;
}
//myvide.de
function media_sites_custom_myvideo_de($url, $match)
{
$return = false;
if (isset($match[2]))
{
$return = array(
"media_id" => $match[2],
"media_dl" => "http://www.myvideo.de/watch/".$match[2],
"media_ext" => "flv",
"image_width" => REPLACE_EMPTY,
"image_height" => REPLACE_EMPTY,
"image_autoplay" => MEDIA_AUTOPLAY,
);
if (preg_match_all("#[\?&](width|height|autoplay)=([0-9]+)#i", $url, $match))
{
foreach($match[1] as $key => $val)
{
$return["image_".$val] = $match[2][$key];
}
}
$return['image_autoplay'] = ($return['image_autoplay']) ? 1 : 0;
}
return $return;
}
// END MEDIA FUNCTIONS
?>
wow it works great quick question what if we wanna upload a custom thumnail for the video instead of default youtube or google or yahoo video thumnail i tryd uploading a custom thumnail but still the default one pops up i hope someone can help me here :DOk, try update to v1.2:
Does anybody have a working site example or maybe a screenshotThe screenshot was available from the beginning, not sure how is that you missed it.
thanks
DIDOMAN
hi can someone make dailymotion video possible with this mod there site is http://www.dailymotion.com/ :DAdded in v1.3
I agree, the thing with embed urls is p.i.a., I might add few more steps that would allow use the whole embed code at upload and automatically exstract the needed url out of it.
- Added fullscreen support for mtv.com
- Added ability use entire <embed> code to "upload" media sites
- Added bbcode support
- Fixed: problem with RSS feed when media site was used in a comment
- Fixed: sometimes additional options in the URL didn't work (width/height/autoplay)
- Fixed: metacafe.com didn't obey autoplay url option
- Fixed: mtv.com didn't obey autoplay options
- Added: width/height limit for BBCode
- Added: addresses to media sites home page
- Added: control for autoplay in ACP
- Added: sevenload.com support
- Added: auto thumbnails for youtube, metacafe, stupidvideos, yahoovideo, myspacevideo, liveleak, spikedhumor, myvideo.de, rutube.ru, dailymotion.com, mtv.com
- Changed: dailymotion.com doesn't require address from <embed> anymore
- Changed: break.com doesn't require address from <embed> anymore
- Changed: hulu.com doesn't require address from <embed> anymore
<object
width="480"
height="295"
>
<param name="movie" value="http://www.youtube.com/v/&fs=1&autoplay=" />
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="autoplay" value="" />
<embed
width="480"
height="295"
src="http://www.youtube.com/v/&fs=1&autoplay="
type="application/x-shockwave-flash"
allowscriptaccess="always"
allowfullscreen="true"
></embed>
</object>
..... Geht das alles nur über das ACP?No, you can "upload" via members upload form.
..... Werden die Videos via Link oder Embedcode eingefügt?Most of the supported sites use links, but some can only be used from embed code (stupidvideos.com)
Make sure you added myvideo_de into allowed extensions list in ACP settings (Step 4)
Warning: move_uploaded_file(./data/thumbnails/1/youtube_rWY8k8hto_s.jpg) [function.move-uploaded-file]: failed to open stream: Permission denied in /www/htdocs/w00b2576/anitube/includes/upload.php on line 121
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpWMZBa8' to './data/thumbnails/1/youtube_rWY8k8hto_s.jpg' in /www/htdocs/w00b2576/anitube/includes/upload.php on line 121
<a href="http://MYSITE.de/details.php?image_id=5"><img src="http://MYSITE.de/data/thumbnails/1/http://www.youtube.com/watch?v=rWY8k8hto_s" border="0" alt="http://www.youtube.com/watch?v=rWY8k8hto_s"></a>
<a href="http://MYSITE.de"><img src="http://MYSITE.de/data/media/1/http://www.youtube.com/watch?v=rWY8k8hto_s" border="0" alt="http://www.youtube.com/watch?v=rWY8k8hto_s"></a>
Thumbnail for Forum:[URL=http://MYSITE.de/details.php?image_id=5][IMG]http://MYSITE.de/data/thumbnails/1/http://www.youtube.com/watch?v=rWY8k8hto_s[/IMG][/URL]
[URL=http://MYSITE.de][IMG]http://MYSITE.de/data/media/1/http://www.youtube.com/watch?v=rWY8k8hto_s[/IMG][/URL]
http://MYSITE.de/details.php?image_id=5
http://MYSITE.de/data/media/1/http://www.youtube.com/watch?v=rWY8k8hto_s
http://MYSITE.de/details.php?image_id=5
Code: [Select]Warning: move_uploaded_file(./data/thumbnails/1/youtube_rWY8k8hto_s.jpg) [function.move-uploaded-file]: failed to open stream: Permission denied in /www/htdocs/w00b2576/anitube/includes/upload.php on line 121
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpWMZBa8' to './data/thumbnails/1/youtube_rWY8k8hto_s.jpg' in /www/htdocs/w00b2576/anitube/includes/upload.php on line 121
Edit.//
Vano, würdest du vielleicht ein kleines Addon schreiben? Das sollte dann so ähnlich wie bei Youtube funktionieren!
Vano, would you perhaps write a small addon? This should then be similar in function Youtube!
(http://s8b.directupload.net/images/090611/yjopv53s.png)
Edit.//
To see the links at me, but dont work:
<input value="{if is_media_site}{media_src}{endif is_media_site}{ifno is_media_site}http://MYSITE.de/{media_src}{endifno is_media_site}">
&& ($image_info[0] > $dimension || $image_info[1] > $dimension))
)
$num_comments = ($image_row['image_allow_comments'] == 1) ? $image_row['image_comments'] : "";
if ($data = media_sites($image_row['image_media_file']))
{
$image_row['image_name'] = "Video: ".$image_row['image_name'];
}
It will only show on home and category pages. if (!check_permission("auth_download", $image_row['cat_id'])) {
if (!check_permission("auth_download", $image_row['cat_id']) || media_sites($image_row['image_media_file'])) {
(added it at optional step 2.7)
- Added: optional Step 2.7
- Changed: mod's constants now can be copied into includes/constants.php
- Changed: template tag {is_media_site} now contains the ID of media site. can be used to display icons: {if is_media_site}<img src="icons/{is_media_site}.gif">{endif is_media_site}
The problem with "cleaning up" the url, is that it might accidentally remove something important. same video but different quality:Maybe you can find a solution... anytime :wink:
http://www.youtube.com/watch?fmt=0&v=M-yGsP9PBrc
http://www.youtube.com/watch?fmt=22&v=M-yGsP9PBrc
The thumbnail-Creater doesn't work with the [snippet] Square Thumbs / Quadratische Thumbs (http://www.4homepages.de/forum/index.php?topic=20353.msg111341#msg111341).
For every new video I have to delete the thumbs via ftp, and must use the [Plugin] Rebuild Thumbnails v1.1 (http://www.4homepages.de/forum/index.php?topic=7059.0) to resize it to my square-size manually! How to add the Snippet to media stuff?
Very good mod, I worked great!
But I have a query, I can make on the home page (home.html) appears New Videos?
Ie to separate "New Image" and "New Videos"
Could be done? would be very nice if you could, thanks.
One question, you can change the thumbails of:
youtube.gif, yahoovideo.gif, rutube_ru.gif etc.
For a video image, as is done when subis a youtube video. A girl in the video picture. You can replace it. Gif for that?
What I mean is that you change the thumbail youtube.gif, and others. Gif, as shown by thumbail website youtube.
Youtube.gif appears not, but a photo of the video in thumbail.
Link Photo:
http://img80.imageshack.us/img80/1613/fullposteo.jpg
No, he tried to say, that thumbnails will be created ONLY via the member's uploadform, NOT via the admin-panel.... and everything SINCE version 1.5.They didn't even mention ACP
<?php
/**************************************************************************
* *
* 4images - A Web Based Image Gallery Management System *
* ---------------------------------------------------------------- *
* *
* File: index.php *
* Copyright: (C) 2002-2009 Jan Sorgalla *
* Email: jan@4homepages.de *
* Web: http://www.4homepages.de *
* Scriptversion: 1.7.7 *
* *
* Never released without support from: Nicky (http://www.nicky.net) *
* *
**************************************************************************
* *
* Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz- *
* bedingungen (Lizenz.txt) für weitere Informationen. *
* --------------------------------------------------------------- *
* This script is NOT freeware! Please read the Copyright Notice *
* (Licence.txt) for further information. *
* *
*************************************************************************/
$templates_used = 'home,category_bit,whos_online,thumbnail_bit';
$main_template = 'home';
define('GET_CACHES', 1);
define('ROOT_PATH', './');
define('GET_USER_ONLINE', 1);
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
include(ROOT_PATH.'includes/stats.php');
$user_access = get_permission();
if (isset($HTTP_GET_VARS['go']) || isset($HTTP_POST_VARS['go'])) {
$template = (isset($HTTP_GET_VARS['go'])) ? get_basefile(stripslashes($HTTP_GET_VARS['go'])) : get_basefile(stripslashes($HTTP_POST_VARS['go']));
if (!file_exists(TEMPLATE_PATH."/".$template.".".$site_template->template_extension)) {
$template = "";
}
else {
$main_template = $template;
}
}
else {
$template = "";
}
include(ROOT_PATH.'includes/page_header.php');
if (!empty($template)) {
$clickstream = "<a href=\"".$site_sess->url(ROOT_PATH."index.php")."\">".$lang['home']."</a>".$config['category_separator'].str_replace("_", " ", ucfirst($template));
$site_template->register_vars("clickstream", $clickstream);
$site_template->print_template($site_template->parse_template($main_template));
include(ROOT_PATH.'includes/page_footer.php');
}
$cache_id = create_cache_id(
'page.index',
array(
$user_info[$user_table_fields['user_id']],
isset($user_info['lightbox_image_ids']) ? substr(md5($user_info['lightbox_image_ids']), 0, 8) : 0,
$config['template_dir'],
$config['language_dir']
)
);
if (!$cache_page_index || !$content = get_cache_file($cache_id)) {
// Always append session id if cache is enabled
if ($cache_page_index) {
$old_session_mode = $site_sess->mode;
$site_sess->mode = 'get';
}
ob_start();
//-----------------------------------------------------
//--- Show Categories ---------------------------------
//-----------------------------------------------------
$categories = get_categories(0);
if (!$categories) {
$categories = $lang['no_categories'];
}
$site_template->register_vars("categories", $categories);
unset($categories);
//-----------------------------------------------------
//--- Show New Images ---------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
"has_rss" => true,
"rss_title" => "RSS Feed: ".format_text($config['site_name'], 2)." (".str_replace(':', '', $lang['new_images']).")",
"rss_url" => $script_url."/rss.php?action=images"
));
$imgtable_width = ceil(intval($config['image_table_width']) / $config['image_cells']);
if ((substr($config['image_table_width'], -1)) == "%") {
$imgtable_width .= "%";
}
$additional_sql = "";
if (!empty($additional_image_fields)) {
foreach ($additional_image_fields as $key => $val) {
$additional_sql .= ", i.".$key;
}
}
$sql = "SELECT setting_value as cat_rand_pic FROM ".SETTINGS_TABLE." WHERE setting_name = 'cat_rand_pic'";
$result = $site_db->query($sql); $row = mysql_fetch_object($result);
$cat_in = $row->cat_rand_pic;
$cat_total = str_replace(",","','",$cat_in);
//--------------------------------------- Start Total Hits Foto --------------------------------------------------
$sql = "SELECT SUM(image_hits) AS sum
FROM ".IMAGES_TABLE."
WHERE cat_id IN ('$cat_total')";
$row = $site_db->query_firstrow($sql);
$sum = (isset($row['sum'])) ? $row['sum'] : 0;
$total_hits_foto = "".$lang['total_hits_foto']."<B> ".$row['sum']."</B>\n";
$site_template->register_vars("total_hits_foto", $total_hits_foto);
//--------------------------------------- End Total Hits Foto --------------------------------------------------
$sql = "SELECT SUM(image_hits) AS sum
FROM ".IMAGES_TABLE."
WHERE cat_id NOT IN ('$cat_total')";
$row = $site_db->query_firstrow($sql);
$sum = (isset($row['sum'])) ? $row['sum'] : 0;
$total_hits_video = "".$lang['total_hits_video']."<B> ".$row['sum']."</B>\n";
$site_template->register_vars("total_hits_video", $total_hits_video);
//--------------------------------------- End Total Hits Video --------------------------------------------------
$num_new_images = $config['image_cells'];
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
FROM (".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c)
LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id NOT IN (".get_auth_cat_sql("auth_viewcat", "NOTIN").")AND i.cat_id IN (".$cat_in.")
ORDER BY i.image_date DESC
LIMIT $num_new_images";
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);
if (!$num_rows) {
$new_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
$new_images .= $lang['no_new_images'];
$new_images .= "</td></tr></table>";
}
else {
$new_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
$count = 0;
$bgcounter = 0;
while ($image_row = $site_db->fetch_array($result)){
if ($count == 0) {
$row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
$new_images .= "<tr class=\"imagerow".$row_bg_number."\">\n";
}
$new_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
show_image($image_row);
$new_images .= $site_template->parse_template("thumbnail_bit");
$new_images .= "\n</td>\n";
$count++;
if ($count == $config['image_cells']) {
$new_images .= "</tr>\n";
$count = 0;
}
} // end while
if ($count > 0) {
$leftover = ($config['image_cells'] - $count);
if ($leftover >= 1) {
for ($f = 0; $f < $leftover; $f++) {
$new_images .= "<td width=\"".$imgtable_width."\">\n \n</td>\n";
}
$new_images .= "</tr>\n";
}
}
$new_images .= "</table>\n";
} // end else
$site_template->register_vars("new_images", $new_images);
unset($new_images);
//--------------------------------- Start cat select pic2 ---------------------------------
//$num_new_images = $config['image_cells'];
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
FROM (".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c)
LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id NOT IN (".get_auth_cat_sql("auth_viewcat", "NOTIN").")AND i.cat_id NOT IN (".$cat_in.")
ORDER BY i.image_date DESC
LIMIT $num_new_images";
$result = $site_db->query($sql);
$num_rows2 = $site_db->get_numrows($result);
if (!$num_rows2) {
$new_images2 = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
$new_images2 .= $lang['no_new_images'];
$new_images2 .= "</td></tr></table>";
}
else {
$new_images2 = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
$count = 0;
$bgcounter = 0;
while ($image_row = $site_db->fetch_array($result)){
if ($count == 0) {
$row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
$new_images2 .= "<tr class=\"imagerow".$row_bg_number."\">\n";
}
$new_images2 .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
show_image($image_row);
$new_images2 .= $site_template->parse_template("thumbnail_bit");
$new_images2 .= "\n</td>\n";
$count++;
if ($count == $config['image_cells']) {
$new_images2 .= "</tr>\n";
$count = 0;
}
} // end while
if ($count > 0) {
$leftover = ($config['image_cells'] - $count);
if ($leftover >= 1) {
for ($f = 0; $f < $leftover; $f++) {
$new_images2 .= "<td width=\"".$imgtable_width."\">\n \n</td>\n";
}
$new_images2 .= "</tr>\n";
}
}
$new_images2 .= "</table>\n";
} // end else
$site_template->register_vars("new_images2", $new_images2);
unset($new_images2);
//--------------------------------- End cat select pic ---------------------------------
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream
));
$site_template->print_template($site_template->parse_template($main_template));
$content = ob_get_contents();
ob_end_clean();
if ($cache_page_index) {
// Reset session mode
$site_sess->mode = $old_session_mode;
save_cache_file($cache_id, $content);
}
} // end if get_cache_file()
echo $content;
include(ROOT_PATH.'includes/page_footer.php');
?>
@V@no Do you know how to add a german MTV Video?Link please
@V@no Do you know how to add a german MTV Video?Link please
FAQ -> How to add FLV (Flash Video) support (http://www.4homepages.de/forum/index.php?topic=23885.0)
I Did it..it works great , Thanks for the great mod sir.. bt i have 1 doubt..how can we add the Viral Player which has the embeed,advertisement and etc fetures .. pleaes Help :)Sorry, I don't know and besides, the question has nothing to do with media sites mod. Please stay on topic.
Thanks In Advance !
I Did it..it works great , Thanks for the great mod sir.. bt i have 1 doubt..how can we add the Viral Player which has the embeed,advertisement and etc fetures .. pleaes Help :)Sorry, I don't know and besides, the question has nothing to do with media sites mod. Please stay on topic.
Thanks In Advance !
<object width="480" height="411" id="delve_player718925o" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param name="movie" value="http://assets.delvenetworks.com/player/loader.swf"/><param name="wmode" value="window"/><param name="allowScriptAccess" value="always"/><param name="allowFullScreen" value="true"/><param name="flashvars" value="playerForm=55b3958c3abb4c7ca117adf1f1962024&mediaId=cdfd4e5d31f543cb9f5e324e74275fac"/><embed src="http://assets.delvenetworks.com/player/loader.swf" name="delve_player718925e" wmode="window" width="480" height="411" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" flashvars="playerForm=55b3958c3abb4c7ca117adf1f1962024&mediaId=cdfd4e5d31f543cb9f5e324e74275fac"></embed></object><p><a href="http://www.playsportstv.com//basketball/basketball-dribbling_keep-away-drill">Basketball Dribbling: Keep Away Drill</a></p>>
http://www.playsportstv.com/basketball#basketball-dribbling_keep-away-drill
<object
width="{if image_width}{image_width}{endif image_width}{ifno image_width}480{endifno image_width}"
height="{if image_height}{image_height}{endif image_height}{ifno image_height}411{endifno image_height}"
>
<param name="movie" value="http://assets.delvenetworks.com/player/loader.swf" />
<param name="allowFullScreen" value="true" />
<param name="AllowScriptAccess" VALUE="always" />
<param name="bgcolor" value="#000000" />
<param name="flashVars" value="i={media_id}&playerForm=55b3958c3abb4c7ca117adf1f1962024&mediaId=e726e57866a64833ad01459b5a4d14b9" />
<embed
src="http://assets.delvenetworks.com/player/loader.swf"
type="application/x-shockwave-flash"
width="{if image_width}{image_width}{endif image_width}{ifno image_width}480{endifno image_width}"
height="{if image_height}{image_height}{endif image_height}{ifno image_height}411{endifno image_height}"
allowFullScreen="true"
AllowScriptAccess="always"
bgcolor="#000000"
flashVars="i={media_id}&playerForm=55b3958c3abb4c7ca117adf1f1962024&mediaId=e726e57866a64833ad01459b5a4d14b9"
></embed>
</object>
$media_sites = array(
and insert below "playsports" => array("#^http://(www\.)?playsportstv\.com/(.*)#i",
4,
"http://assets.delvenetworks.com/player/loader.swf",
null,
MEDIA_BBCODE_YES,
"http://www.playsportstv.com",
"", //works
), //no autoplay
// BEGIN MEDIA CUSTOM FUNCTIONS
and insert below//playsportstv.com
function media_sites_custom_playsports($url, $match, $key, $val, $thumb = 0)
{
$return = media_sites_common($url, $match, $key, $val);
if ($thumb)
{
$patern = '#<link rel="videothumbnail" href="([^"]+)" type="([^"]*)"\s*/>#im';
if ($result = media_sites_fetch($match[1], $patern, array(1, 2)))
{
$return['thumb'] = $result[0][1];
}
}
return $return;
}
and in the ACP Valid file extensions I inserted playsports, $patern = '#<DIV class="player" id="pid"><IMG src="([^"]+)" border=0 alt="[^"]*"></DIV>#im';
if ($result = media_sites_fetch($match[1], $patern, array(1)))
{
$return['thumb'] = $result[0][1];
$patern = '#image=([a-z0-9%.]+'.preg_quote($match[4], "#").'[^&]+)&#i';
if ($result = media_sites_fetch($match[1], $patern, array(1)))
{
$return['thumb'] = urldecode($result[0][1]);
<embed src='http://video.mynet.com/gagarino/Canli-yayinda-birbirlerine-girdiler/386916.swf' type='application/x-shockwave-flash' wmode='transparent' allowfullscreen='true'width='400' height='334'></embed>
<embed src='http://video.mynet.com/ismvdo/Kedini-yikildigi-an/385268.swf' type='application/x-shockwave-flash' wmode='transparent' allowfullscreen='true'width='400' height='334'></embed>
<embed src='http://video.mynet.com/gagarino/Canli-yayinda-birbirlerine-girdiler/386916.swf' type='application/x-shockwave-flash' wmode='transparent' allowfullscreen='true'width='400' height='334'></embed>
<embed src='http://video.mynet.com/ismvdo/Kedini-yikildigi-an/385268.swf' type='application/x-shockwave-flash' wmode='transparent' allowfullscreen='true'width='400' height='334'></embed>
- Added: izlesene.com (no autoplay)
- Added: video.mynet.com
- Added: videos.onsmash.com
- Added: gametrailers.com
- Added: gamespot.com
- Fixed: break.com auto thumbnails didn't work
- Fixed: MEDIA_THUMB constant was ignored
very nice mod
salloumi.com
how do add ?
Salloumi is unavailable in UNITED STATES
- Added: smotri.com
- Added: collegehumor.com
Any support for 2 more video sites? 220.ro and trilulilu.roAdded in v1.8
- Added: googlewave (experimental, must have google wave account to view)
- Added: 220.ro (video links only!)
- Added: trilulilu.ro (video links only!)
- Added: funnyordie.com
- Added: dailyhaha.com (no autoplay)
- Added: megavideo.com (no autoplay)
Please, Sir, can also add this site :oops:Added in v1.9 (I'll release it once I have few more sites)
http://vimeo.com/8313504
thaks so much!, one little question, when the video is added in the database, the system dont display the video inmediatelyYeah, I was aware of this issue, but since nobody complained...:D
- Fixed: wrong video or nothing showed after upload (added step 5.2)
- Added: work around if host disabled allow_url_fopen, which prevents downloading thumbnails
- Added: youtube playlist support
- Added: aniboom.com support
- Added: vimeo.com support
- Added: tm-tube.com support
To get the automatic thumbnail creation working, there is the thumbnail function (ImageMagick or GD or NetPBM) from the ACP needed, right?Correct.
- ADDED: {media_ext} and {media_ext_icon} tags can be used to display file extension icon
- ADDED: vevo.com support (no autoplay)
- ADDED: megavideo "download" type urls (d= instead of v= url query)
- FIXED: in some cases fetching thumbnail could fail and corrupt already retreved data of the video
- FIXED: rutube.ru thumbnail creation
One question: it's not easier to add a text area and paste the entire (specific for each site) embed code, generated by each site? Instead of creating support for each one separately. Because the number of video sites is huge and it grows every day...Easier - maybe, safer - definitely not.
But if you add some limitations? For example: "do not save/execute embed codes if they are not from following sites: youtube.com, vimeo.com, google.com, etc". And the admin can add from the ACP witch sites are allowed.Then you loop back to this kind mod...this mod does exactly that - limiting ;)
Also, maybe it's better to add this option for admins only in ACP, or for some group (trusted user) in front end.
<meta property="og:image" content="{if details}http://domain.com/data/thumbnails/{cat_id}/{media_url}{endif details}{ifnot details}http://domain.com/standard_preview_jpg{endifnot details}">
- CHANGED: thumbnail creation now using create_thumbnail() 4images function, not resize_image()
- ADDED: mp3upload.ca support
- ADDED: zippyshare support (audio only)
- REMOVED: myspacevideo support
thank u so much for the reply.. so if i go ahead and modify my 4images with this MOD, and when a user for examples puts www.youtube.com, it will show up as the specific user that has put it up and not just anonomosly.that is correct. And you can test it yourself at my demo site.
Also regarding user groups, u said that there isnt really a restriction that u know off regarding this MOD, so does this mean regardless of what user group a user is in they all have privileges and are allowed to upload media from all of the web video sites mentionedCorrect. The only restrictions 4images has is weather visitors/users are allowed upload anything in specific category or not. If a category permissions allow a visitor to upload, then they can upload whatever is allowed in the settings (images, videos, media sites, etc)
more thing im sorry, to put new file extensions in valid file extensions what do i need to do, because there are a few other sites i would like to include like for example, flickr, tinypic, photobucket, and thats about it, how do i do it?flickr, tinypic, photobucket they are mostly image hosting sites, you don't need any mods to support them, just use direct link to the images.
Hello,,This is what I get when trying visit your site:
Thanks for the's mod
but i have problem when i tray to use it ..make my site verey slow and some time no't work
and when i remove the mod it work fine
u can check now my site i use the mod and u will see how is work verey slow ..
http://6arh.com/youtube/
i use the mod media sites v1.11 and i do like you'r topic
regards.
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@6arh.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
1) I have tried [media]http://www.youtube.com/watch?v=urNyg1ftMIU[/media] on comments bit and it not working sir, please help me find why this is not workig i beg of u sir,not working how? make sure you did step 2.6 correctly.
2) i didnt know where to post help for this question on multiuploud topic or this topic but they apply to both so im going to ask this hear sir.. Budduke tried kindly to help me and i want to thank him for this, but it not work and he ask me to ask u if maybe u will know this issue. When i uploading for example youtube url on the multi user upload MOD it just giving me the youtube thumbnail, however when i upload previously using the original upload functioanlity it straight away gave me a video thumbnail automaticailly. Do you might now why this issue is caused plz sir,It seems the multiupload mod removes ability upload remote media...
2) i didnt know where to post help for this question on multiuploud topic or this topic but they apply to both so im going to ask this hear sir.. Budduke tried kindly to help me and i want to thank him for this, but it not work and he ask me to ask u if maybe u will know this issue. When i uploading for example youtube url on the multi user upload MOD it just giving me the youtube thumbnail, however when i upload previously using the original upload functioanlity it straight away gave me a video thumbnail automaticailly. Do you might now why this issue is caused plz sir,It seems the multiupload mod removes ability upload remote media...
Tehse's what i finde in error logWhat is in includes/functions.php at line 2092 and between 2080 - 2100?
--------------------------
[22-Aug-2010 12:02:15] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/bahrain/public_html/clip/includes/functions.php:2092) in /home/bahrain/public_html/clip/includes/sessions.php on line 101
[22-Aug-2010 12:02:15] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/bahrain/public_html/clip/includes/functions.php:2092) in /home/bahrain/public_html/clip/includes/sessions.php on line 101
---------------------
and when i loke to sessions.php on line 101 i finde
setcookie($cookie_name, $value, $cookie_expire, COOKIE_PATH, COOKIE_DOMAIN, COOKIE_SECURE);
$HTTP_COOKIE_VARS[$cookie_name] = $value;
---------
ENGI'm not quiet understand the question, would you give an example, like what size should change and which shouldn't...
Is it possible to make for youtube thumbs size remained fixed (= 100) or increases to the size specified in the settings, and for others - dimensions are taken from the settings?
RUS
а возможно ли сделать так, чтобы для youtube размер превью оставался фиксированным (=100) или увеличивался до размеров заданных в настройках, а для остальных - размеры беруться из настроек?
very nice idea..Yes, you put media link into "remote image url" field on member's upload page. Thumbnails should automatically be created for most sites (see notes for each media site on top of the first post)
but how it works..
do we need to put media link..like youtube etc and also a thumbnail too??
http://img.youtube.com/vi/{ID}/hqdefault.jpg
will produce an image much larger than the default thumb youtube provides.Works great.
But my template is wider than default one. How can I make YT video window bigger?
Gibts denn schon eine neue Version 1.12?no, not really, just a typo ;) nothing was added on the demo site.
Das Archiv ist beschädigtClear your browser's cache and try re-download. File is fine when I download it with FF7, IE9, Chrome16
At the end, above closing ?> insert:am ende nach closing ?> einfuegen ?????
...am ende nach closing ?> einfuegen ?????
verstehe ich da was falsch, ....
<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" height="{if image_height}{image_height}{endif image_height}{ifno image_height}353{endifno image_height}" width="{if image_width}{image_width}{endif image_width}{ifno image_width}470{endifno image_width}">
<param name="movie" value="http://www.ecostream.tv/assets/swf/player.swf">
<param name="allowfullscreen" value="true">
<param name="allowscriptaccess" value="always">
<param name="flashvars" value="file=http://www.ecostream.tv/stream/{media_id}.mp4%3Fst%3DEEgJ5G2FJ2YFJDw-JL--Fw%26e%3D1370108234&image=http://www.ecostream.tv/assets/img/player-bg.jpg&provider=http&bufferlength=1">
<embed type="application/x-shockwave-flash" id="player2" name="player2" src="http://www.ecostream.tv/assets/swf/player.swf" allowscriptaccess="always" allowfullscreen="true" flashvars="file=http://www.ecostream.tv/stream/{media_id}.mp4%3Fst%3DEEgJ5G2FJ2YFJDw-JL--Fw%26e%3D1370108234&image=http://www.ecostream.tv/assets/img/player-bg.jpg&provider=http&bufferlength=1" height="{if image_height}{image_height}{endif image_height}{ifno image_height}353{endifno image_height}" width="{if image_width}{image_width}{endif image_width}{ifno image_width}470{endifno image_width}">
</object>
"ecostream" => array("#^(http://(www\.)?ecostream\.tv/stream/([a-zA-Z0-9]+)\.html)#",<!-- http://code.google.com/apis/youtube/player_parameters.html -->
<object
width="{if image_width}{image_width}{endif image_width}{ifno image_width}480{endifno image_width}"
height="{if image_height}{image_height}{endif image_height}{ifno image_height}295{endifno image_height}"
>
<param name="movie" value="http://www.youtube.com/v/{media_id}&fs=1&autoplay={image_autoplay}" />
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="never"></param>
<embed
width="{if image_width}{image_width}{endif image_width}{ifno image_width}480{endifno image_width}"
height="{if image_height}{image_height}{endif image_height}{ifno image_height}295{endifno image_height}"
src="http://www.youtube.com/v/{media_id}&fs=1&autoplay={image_autoplay}"
type="application/x-shockwave-flash"
allowscriptaccess="never"
allowfullscreen="true"
></embed>
</object>
Does this MOD work with the latest version of 4images? Thank you.
<!-- http://code.google.com/apis/youtube/player_parameters.html -->
<iframe width="{if image_width}{image_width}{endif image_width}{ifno image_width}480{endifno image_width}" height="{if image_height}{image_height}{endif image_height}{ifno image_height}390{endifno image_height}" src="https://www.youtube.com/embed/{media_id}?autoplay=1&rel=0" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen></iframe>
$text = preg_replace($search_array, $replace_array, $text);
/*
MOD MEDIA SITES
BEGIN INSERT
*/
$text = media_sites_bbcode($text);
/*
MOD MEDIA SITES
END INSERT
*/
I removed that code and all the description and comments text came back. It's an optional step in the MOD, so it's not a big deal as far as the MOD goes.