4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: V@no on February 01, 2009, 05:07:00 AM

Title: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: V@no on February 01, 2009, 05:07:00 AM

----------------- [ Index ] -----------------

----------------- [ Introduction ] -----------------

With this mod you'll be able add to your gallery videos (as remote images) from the following media sites:
youtube.com (http://youtube.com) (since v1.9 playlist also supported)
metacafe.com (http://metacafe.com)
liveleak.com (http://liveleak.com)
stupidvideos.com (http://stupidvideos.com) (only url from <embed> can be used (or url with #NN at the end) and no autoplay)
video.yahoo.com (http://video.yahoo.com)
vids.myspace.com (http://vids.myspace.com) (only works with myspace player videos) (removed since v1.11)
break.com (http://break.com)
spikedhumor.com (http://spikedhumor.com)
hulu.com (http://hulu.com) (no autoplay)
myvideo.de (http://myvideo.de) (no autoplay) (added in v1.1)
rutube.ru (http://rutube.ru) (added in v1.2)
dailymotion.com (http://dailymotion.com) (added in v1.3)
mtv.com (http://mtv.com) (added in v1.3)
sevenload.com (http://sevenload.com) (added in v1.5)
izlesene.com (http://izlesene.com) (no autoplay) (added in v1.6)
mynet.com (http://video.mynet.com) (added in v1.6)
onsmash.com (http://videos.onsmash.com) (added in v1.6)
gametrailers.com (http://gametrailers.com) (added in v1.6)
gamespot.com (http://gamespot.com) (added in v1.6)
smotri.com (http://www.smotri.com) (added in v1.7)
collegehumor.com (http://www.collegehumor.com) (added in v1.7)
googlewave.com (http://googlewave.com) (added in v1.8 ) (experimental, must have google wave account to view)
220.ro (http://220.ro) (added in v1.8)
trilulilu.ro (http://trilulilu.ro) (video links only!) (added in v1.8)
funnyordie.com (http://funnyordie.com) (added in v1.8)
dailyhaha.com (http://dailyhaha.com) (no autoplay) (added in v1.8)
megavideo.com (http://megavideo.com) (no autoplay) (added in v1.8)
aniboom.com (http://aniboom.com) (added in v1.9)
vimeo.com (http://vimeo.com) (added in v1.9)
tm-tube.com (http://tm-tube.com) (added in v1.9)
vevo.com (http://vevo.com) (added in v1.10)
mp3upload.ca (http://mp3upload.ca) (added in v1.11)
zippyshare.com (http://zippyshare.com) (audio only!) (added in v1.11)

Since version 1.4 new BBCode tag added: [media]media site url[/media] (check out Tweak 4 (#post_tweak4) for more info)
Since version 1.5 can automatically fetch thumbnails from most media sites and save them locally on the server. For now this feature only works if media site submitted via members upload form, not ACP.

----------------- [ Screenshots / Demo ] -----------------


You can see the demo here (http://4images.vano.org/ajaxcomments/categories.php?cat_id=4)



----------------- [ Changed files ] -----------------

includes/functions.php (#post_step2)
download.php (#post_step3)
member.php (#post_step5)

----------------- [ New files ] -----------------

includes/media_sites.php
templates/<your template>/icons/*.gif (an icon for each site)
templates/<your template>/media/*.html (media template for each site)


----------------- [ Installation ] -----------------


Step 1 (#post_step1)

Download attached (#post_attachment) media_sites_vXX.zip and media_sites_templates_and_icons_vXX.zip packages. Unpack them and upload to your 4images root directory, restoring the following directory tree:

includes/media_sites.php

copy all files from template/default/icons/ folder to templates/<your template>/icons/ on your site

copy all files from template/default/media/ folder to templates/<your template>/media/ on your site


Step 2 (#post_step2)

Open includes/functions.php
Find:
function check_remote_media($remote_media_file) {

Insert below:
/*
  MOD MEDIA SITES
  BEGIN INSERT
*/
  if (media_sites($remote_media_file))
    return 1;
/*
  MOD MEDIA SITES
  END INSERT
*/



Step 2.1 (#post_step2-1)

Find:
function get_file_extension($file_name) {

Insert below:
/*
  MOD MEDIA SITES
  BEGIN INSERT
*/
  if ($data = media_sites($file_name))
    return $data[0];
/*
  MOD MEDIA SITES
  END INSERT
*/



Step 2.2 (#post_step2-2)

Find:
    $media = $site_template->parse_template("media/".$file_extension);

Insert above:
/*
  MOD MEDIA SITES
  START INSERT
*/
    media_sites_template_vars($media_src);
/*
  MOD MEDIA SITES
  END INSERT
*/



Step 2.3 (#post_step2-3)

At the end, above closing ?> insert:
/*
  MOD MEDIA SITES
  BEGIN INSERT
*/
include(ROOT_PATH."includes/media_sites.php");
/*
  MOD MEDIA SITES
  END INSERT
*/



Step 2.4 (#post_step2-4) (added in v1.2)

Find:
function get_basename($path) {

Insert below:
/*
  MOD MEDIA SITES
  BEGIN INSERT
*/
  if ($data = media_sites($path))
    return $data[1]['media_file'];
/*
  MOD MEDIA SITES
  END INSERT
*/



Step 2.5 (#post_step2-5) (added in v1.2)

Find:
function get_basefile($path) {

Insert below:
/*
  MOD MEDIA SITES
  BEGIN INSERT
*/
  if ($data = media_sites($path))
    return $data[1]['media_file'];
/*
  MOD MEDIA SITES
  END INSERT
*/



Step 2.6 (#post_step2-6) (optional, needed for bbcode in comments) (added in v1.4)

Find:
    $text = preg_replace($search_array, $replace_array, $text);

Insert above:
/*
  MOD MEDIA SITES
  BEGIN INSERT
*/
    $text = media_sites_bbcode($text);
/*
  MOD MEDIA SITES
  END INSERT
*/



Step 2.7 (#post_step2-7) (optional, it disables download button, you can skip entire step 3 if you apply this) (added in 2009-06-20)

Find:
  if (!check_permission("auth_download", $image_row['cat_id'])) {

Replace with:
/*
  MOD MEDIA SITES
  BEGIN REPLACE
*/
  if (!check_permission("auth_download", $image_row['cat_id']) || media_sites($image_row['image_media_file'])) {
/*
  MOD MEDIA SITES
  END REPLACE
*/




Step 3 (#post_step3)

Open download.php
Find:
    while ($image_row = $site_db->fetch_array($result)) {

Insert below:
/*
  MOD MEDIA SITES
  BEGIN INSERT
*/
      if (empty($image_row['image_download_url']) && $data = media_sites($image_row['image_media_file']))
        continue;
/*
  MOD MEDIA SITES
  END INSERT
*/



Step 3.1 (#post_step3-1)

Find:
  $remote_url = 0;
  if (!empty($image_row['image_download_url'])) {


Replace with:
/*
  MOD MEDIA SITES
  BEGIN REPLACE
*/
  $remote_url = 0;
  if (empty($image_row['image_download_url']) && $data = media_sites($image_row['image_media_file'], 1))
  {
    $file['file_path'] = $data[1]['media_dl'];
    $remote_url = 1;
  }
  elseif (!empty($image_row['image_download_url'])) {
/*
  MOD MEDIA SITES
  END REPLACE
*/



Step 4 (#post_step4)

In ACP (Admin Control Panel) -> Settings -> add into "Valid file extensions" list (you can add any or all, in any order):
break,
dailymotion,
hulu,
liveleak,
metacafe,
mtv,
myvideo_de,
rutube_ru,
sevenload,
spikedhumor,
stupidvideos,
yahoovideo,
youtube,
izlesene,
mynet,
onsmash,
gametrailers,
gamespot,
smotri,
collegehumor,
googlewave,
220_ro,
trilulilu_ro,
funnyordie,
dailyhaha,
megavideo,
youtube_pl,
aniboom,
vimeo,
tm_tube,
vevo,
mp3upload,
zippyshare




Step 5 (#post_step5) (added in v1.4)

Open member.php
Find:
  $remote_media_file = format_url(un_htmlspecialchars(trim($HTTP_POST_VARS['remote_media_file'])));
Insert below:
/*
  MOD MEDIA SITES
  BEGIN INSERT
*/
  if ($media_sites_data = media_sites($remote_media_file))
    $remote_media_file = $media_sites_data[1]['media_src'];
/*
  MOD MEDIA SITES
  END INSERT
*/



Step 5.1 (#post_step5-1) (added in v1.5)

Find:
    if (!$uploaderror) {

Insert above:
/*
  MOD MEDIA SITES
  BEGIN INSERT
*/
    if (empty($new_thumb_name) && $data = media_sites_thumb($media_sites_data, $cat_id, $direct_upload))
    {
      $new_thumb_name = $data[0];
    }
/*
  MOD MEDIA SITES
  END INSERT
*/



Step 5.2 (#post_step5-2) (added in v1.9)

Find:
      $media = $site_template->parse_template("media/".$file_extension);


Insert above:
/*
  MOD MEDIA SITES
  START INSERT
*/
      media_sites_template_vars($new_name);
/*
  MOD MEDIA SITES
  END INSERT
*/



Go to upload image form and use "URL:" field to upload media site videos.

Tweaks (#post_tweaks) and version history (#post_history) in the next reply.

Attachments:
Title: Re: [MOD] Media sites (tweaks, troubleshooting and history)
Post by: V@no on February 01, 2009, 05:14:41 AM
----------------- [ Tweaks ] -----------------

Tweak 1 (#post_tweak1)

You can turn on/ff default autoplay by changing in includes/media_sites.php:
Code: [Select]
define("MEDIA_AUTOPLAY", 1); //autoplay videos by default?



Tweak 2 (#post_tweak2)

You can override the default autoplay by adding into the media site URL query: autoplay=1 (force enable autoplay) or autoplay=0 (force disable autoplay)
i.e.
http://www.youtube.com/watch?v=L5EpJuK91zE&autoplay=0



Tweak 3 (#post_tweak3)

You can specify width/height of the video by adding into media URL query width=NN and height=NN (the same way as in Tweak 2 (#post_tweak2))



Tweak 4 (#post_tweak4)

Since version 1.4 you can use [media]media site url[/media] BBCode tags in comments and image descriptions (example: [media]http://www.youtube.com/watch?v=M-yGsP9PBrc[/media])
This feature is controlled in includes/media_sites.php by:
define("MEDIA_BBCODE", 1); //use media sites in bbcode?

To disable, replace 1 with 0


Also, each individual media site can be disabled or enabled in bbcode MEDIA_BBCODE_YES with MEDIA_BBCODE_NO in it's array description.

As an example this is array description for "liveleak" media site:
  "liveleak"      => array("#^http://(www.)?liveleak.com/view.*[?&]i=([^&]+)#i",
                            2,
                            "http://www.liveleak.com/e/{ID}",
                            null,
                            MEDIA_BBCODE_YES,
                            "",
                    ),

Tweaks 1,2,3 also apply to BBCode.




----------------- [ Troubleshooting ] -----------------






----------------- [ Version history ] -----------------

v1.11.1 (2010-12-22) (re-do Step 1 (#post_step1))
- Fixed: thumbnails were not created when original image is smaller then max dimentions set in 4images
- Fixed: thumbnails were not created for rutube.ru

v1.11 (2010-07-14) (more info here (http://www.4homepages.de/forum/index.php?topic=24054.msg148987#msg148987))
- CHANGED: thumbnail creation now using create_thumbnail() 4images function, not resize_image()
- ADDED: mp3upload.ca support
- ADDED: zippyshare support (audio only)
- REMOVED: myspacevideo support

v1.10 (2010-07-04) (more info here (http://www.4homepages.de/forum/index.php?topic=24054.msg148673#msg148673))
- 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

v1.9 (2010-02-13) (more info here (http://www.4homepages.de/forum/index.php?topic=24054.msg145569#msg145569))
- 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

v1.8 (2009-12-18) (more info here (http://www.4homepages.de/forum/index.php?topic=24054.msg143918#msg143918))
- 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)

v1.7 (2009-11-28) (more info here (http://www.4homepages.de/forum/index.php?topic=24054.msg143403#msg143403))
- Added: smotri.com
- Added: collegehumor.com

v1.6 (2009-10-17) (more info here (http://www.4homepages.de/forum/index.php?topic=24054.msg142209#msg142209))
- 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

v1.5.8 (2009-10-14) (more info here (http://www.4homepages.de/forum/index.php?topic=24054.msg142074#msg142074))
- Fixed: rutube.ru auto thumbnail didn't work

v1.5.7 (2009-10-13) (more info here (http://www.4homepages.de/forum/index.php?topic=24054.msg142031#msg142031))
- Fixed: rutube.ru didn't work

v1.5.6 (2009-06-20) (re-do Step 1 (#post_step1))
- Added: optional Step 2.7 (#post_step2-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}

v1.5.5 (2009-06-12) (re-do Step 1 (#post_step1))
- Added: new template tag {is_media_site} can be used as conditional tag i.e. {if is_media_site}this is a media site{endif is_media_site}

v1.5 (2009-03-21) (more info here (http://www.4homepages.de/forum/index.php?topic=24054.msg133992#msg133992)) (added Step 5.1 (#post_step5-1))
- 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

v1.4 (2009-03-11) (more info here (http://www.4homepages.de/forum/index.php?topic=24054.msg133540#msg133540)) (added Step 2.6 (#post_step2-6) and Step 5 (#post_step5))
- Added fullscreen support for mtv.com
- Added ability use entire <embed> code to "upload" media sites
- Added bbcode support

v1.3 (2009-02-16)
- fixed spikedhumor.com
- added dailymotion.com (must use address from embed code)
- added mtv.com
- changed site list array to use "generic" (common) function to process most media sites.

v1.2 (2009-02-11)
- fixed unable use custom thumbnails (added Step 2.4 (#post_step2-4) and Step 2.5 (#post_step2-5))
- fixed myvideo.de
- added multilingual youtube support
- added rutube.ru

v1.1 (2009-02-02)
- added myvideo.de support

v1.0 (2009-02-01)
- first release (9 media sites supported)
Title: Re: [MOD] Media sites v1.0 (2009-02-01)
Post by: Sunny C. on February 01, 2009, 03:09:10 PM
Very Very Nice!
Title: Re: [MOD] Media sites v1.0 (2009-02-01)
Post by: henkjan on February 01, 2009, 05:09:57 PM
Hello guys

Is it possible to get automatic thumbnails to 4images from this media sites like Youtube?

I need this for my media site.

Regards
Title: Re: [MOD] Media sites v1.0 (2009-02-01)
Post by: meier on February 02, 2009, 10:48:22 AM
Hallo, was müste ich den tun das auch videos von www.myvideo.de funktionieren?

Desweiteren wird kein Vorschaubild angezeigt. An was könnte das liegen?

-----------Google Translate--------


Hello, what should I do the same videos of www.myvideo.de work?

Furthermore, there is no preview screen. In what could be the reason?
Title: Re: [MOD] Media sites v1.1 (2009-02-02)
Post by: V@no on February 02, 2009, 03:20:59 PM
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
Title: Re: [MOD] Media sites v1.1 (2009-02-02)
Post by: meier on February 03, 2009, 10:27:28 AM
Es funktioniert nur mit youtube, aber auch nur http://youtube........ und nicht http://de.youtube......  :?:

Ich habe in der ACP myvideo_de oder myvideo eingegeben. Beides geht nicht.



---------Google-----------

   
It only works with youtube, but only http://youtube ........ and not http://de.youtube ...... ::

I have in the ACP myvideo_de or myVideo entered. Both does not work.
Title: Re: [MOD] Media sites v1.1 (2009-02-02)
Post by: V@no on February 03, 2009, 03:08:22 PM
in media_sites.php find:
Code: [Select]
  "youtube"       => "#^http://(www\.)?youtube\.com/watch/?.*[\?&]v=([^&]+)#i",Replace with:

Code: [Select]
  "youtube"       => "#^http://([^.]+\.)?youtube\.com/watch/?.*[\?&]v=([^&]+)#i",

It will be included in next update.
Title: Re: [MOD] Media sites v1.1 (2009-02-02)
Post by: meier on February 03, 2009, 05:15:15 PM
thanks
Title: Re: [MOD] Media sites v1.1 (2009-02-02)
Post by: meier on February 06, 2009, 12:10:14 AM
Hallo,

ich glaube es stimmt noch irgendetwas nicht. myvideo.de geht nicht.

Wenn man sich z.b den Verweis ansieht:

http://www.myvideo.de/watch/1159869/Modellflieger_Video_Kamera_an_Board

ist da ein watch, wo aber in der media_sites movie steht.

Ich hab es geändert aber leider geht's immer noch nicht.

----------Google-----------

Hello,

I think it is not anything. myvideo.de does not.

If you look at the link z.b viewing:

http://www.myvideo.de/watch/1159869/Modellflieger_Video_Kamera_an_Board

is there a  watch , but where in the media_sites  movie  is.

I've changed it but unfortunately it's still not.

----------------------------

Code: [Select]
<?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] ? 0));
}

function 
media_sites_template_vars($url)
{
  if (!(
$data media_sites($url1)))
    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']) ? 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']) ? 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']) ? 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']) ? 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']) ? 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']) ? 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']) ? 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']) ? 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']) ? 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']) ? 0;
  }
  return 
$return;
}
//  END MEDIA FUNCTIONS
?>
Title: Re: [MOD] Media sites v1.1 (2009-02-02)
Post by: meier on February 06, 2009, 05:38:01 PM
So gehts.......ich hab zwar keine Ahnung davon, konnte es mir aber aus dem code ableiten.

---------

ähhh.......so work  :P

--------------

Code: [Select]
<?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] ? 0));
}

function 
media_sites_template_vars($url)
{
  if (!(
$data media_sites($url1)))
    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']) ? 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']) ? 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']) ? 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']) ? 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']) ? 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']) ? 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']) ? 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']) ? 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']) ? 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']) ? 0;
  }
  return 
$return;
}
//  END MEDIA FUNCTIONS
?>
Title: Re: [MOD] Media sites v1.1 (2009-02-02)
Post by: __G__ on February 07, 2009, 11:36:09 AM
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 :D
Title: Re: [MOD] Media sites v1.1 (2009-02-02)
Post by: SnaFy on February 10, 2009, 04:51:44 PM
thnx V@no i am so Happy for this work
Title: Re: [MOD] Media sites v1.2 (2009-02-11)
Post by: V@no on February 12, 2009, 04:35:00 AM
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 :D
Ok, try update to v1.2:

1) Do new added Step 2.4 (#post_step2-4) and Step 2.5 (#post_step2-5)
2) and re-download both packages (#post_attachment)
Title: Re: [MOD] Media sites v1.2 (2009-02-11)
Post by: __G__ on February 12, 2009, 05:15:02 AM
great v@no this works like a charm exactly what i wanted and in fact its a good update so instead of just a youtube icon now we can add the real thumbnail associated with video THUMBS UP and thank you for the great mod


Title: Re: [MOD] Media sites v1.2 (2009-02-11)
Post by: didoman on February 12, 2009, 05:21:12 AM
Does anybody have a working site example or maybe a screenshot
thanks
DIDOMAN
Title: Re: [MOD] Media sites v1.2 (2009-02-11)
Post by: __G__ on February 14, 2009, 07:43:49 AM
hi can someone make dailymotion video possible with this mod there site is http://www.dailymotion.com/  :D
Title: Re: [MOD] Media sites v1.3 (2009-02-16)
Post by: V@no on February 17, 2009, 12:29:42 AM
Does anybody have a working site example or maybe a screenshot
thanks
DIDOMAN
The screenshot was available from the beginning, not sure how is that you missed it.
The demo site I just added, link at under the screenshot.

hi can someone make dailymotion video possible with this mod there site is http://www.dailymotion.com/  :D
Added in v1.3
Title: Re: [MOD] Media sites v1.3 (2009-02-16)
Post by: __G__ on February 17, 2009, 10:37:33 PM
thanks a lot V@NO so all i have to do is to download the attachment file which are media_sites_templates_and_icons_v1.3.zip, and media_sites_v1.3.zip and replace those with the old one to update it to v1.3, lemme know if i missed any step or have to redo any steps other then this if any, :D and thanks a lot for this quick update :D UR MODS ARE AMAZING :D


WHEN i try to add daily motion video it says


Please recheck the marked fields.

NOTE: In case the thumbnail file name does not correspond with the image file name it will be adapted to the image file name.


and the images where i put the embed script code that turns red Image *

and it says

   

Upload:

URL:


Uploaded by Naritchie" size="30">
Valid extensions: jpg, gif, png, aif, au, avi, mid, mov, mp3, mpg, swf, wav, ra, rm, zip, pdf, wmv, flv, 3gp, HTML, html, htm.HTM, hulu, break, metcafe, liveleak, youtube, myspacevideo, myvideo_de, spikedhumor.stupidvideos, yahoovideo, dailymotion
Title: Re: [MOD] Media sites v1.3 (2009-02-16)
Post by: __G__ on February 17, 2009, 10:57:58 PM
I figured it out i was posting the whole embed code not the link its working fine now thanks
Title: Re: [MOD] Media sites v1.3 (2009-02-16)
Post by: V@nо on February 18, 2009, 12:28:17 AM
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.
Title: Re: [MOD] Media sites v1.3 (2009-02-16)
Post by: __G__ on February 18, 2009, 01:05:47 AM
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.

thanks V@NO and i am sure you know about this but i think this is the code to get the thumnail automatically :D you might wanna look @ it seems intresting

http://www.youtube.com/dev_api_ref?m=youtube.videos.get_details

so i think what ever the youtube id is put it like this in link


http://img.youtube.com/vi/ youtube id here /2.jpg

so example video http://www.youtube.com/watch?v=jT_fnAjZNDY

image will be
http://img.youtube.com/vi/jT_fnAjZNDY/2.jpg  <<< offcourse 1,2,3 since the youtube makes three thumnails :) so we have an option to choose the thumbnail number we want :D
Title: Re: [MOD] Media sites v1.3 (2009-02-16)
Post by: AntiNSA2 on March 03, 2009, 08:37:15 AM
Hmm... it seems great... not sure yet as I do not upload any flv files as of yet... I was hoping this mod would magically enable the embedding of you tune into comments...

Thanks thoug for this I know I will be using it soon. I did install it and it seems to function... nno errors :)
Title: Re: [MOD] Media sites v1.3 (2009-02-16)
Post by: lewisr on March 04, 2009, 12:48:05 AM
is there anyway to get the download buttons to point the the youtube flv file???
Title: Re: [MOD] Media sites v1.3 (2009-02-16)
Post by: V@no on March 04, 2009, 02:47:42 AM
Hello and welcome to 4images forum.

I didn't go into details of youtube API, so I can't really tell. Especially since YT introduced HQ and HD videos, it might be difficult to achieve. But again, I'll need look at YT API to fully answer that question, for now, it's not possible.

As you might know, if a video is in High Definition, it will have 4 or more copies on YT server:
.3gp - lowest quality
.flv - normal quality
.mp4 - high/HD quality
So, make download button point to which file? Probably the simpliest and more practical way would be use javascript to show direct links to the files, which would require editing youtube.html template and nothing else.
Title: Re: [MOD] Media sites v1.3 (2009-02-16)
Post by: AntiNSA2 on March 04, 2009, 04:57:49 AM
Please tell me V@no, I can embed the code within the template and youtube videos stream, you can provide upload and such capabilities, for youtube videos, Html can be allowed in comments, why is it that within comments you can not embed youtube videos?

Is there something I am missing> It should be no different than embedding a regular jpg or other file into the link...???
Title: Re: [MOD] Media sites v1.3 (2009-02-16)
Post by: V@no on March 04, 2009, 02:25:13 PM
comments system is something completely separate from details page. this mod is not meant to be used in comments. Though it could be adopted, but that would be a separate mode.
Title: Re: [MOD] Media sites v1.4 (2009-03-11)
Post by: V@no on March 12, 2009, 02:40:32 AM
I've released version 1.4

Changes:
Quote
- Added fullscreen support for mtv.com
- Added ability use entire <embed> code to "upload" media sites
- Added bbcode support

To update from v1.3 to v1.4 you'll need do:

1) redownload both packages
2) do Step 2.6 (http://www.4homepages.de/forum/index.php?topic=24054.msg131715#post_step2-6) and Step 5 (http://www.4homepages.de/forum/index.php?topic=24054.msg131715#post_step5)
Step 2.6 is optional, you'll need it only if you wish to use new bbcode [media]media site url[/media] tag on your site. Check out Tweak 4 (http://www.4homepages.de/forum/index.php?topic=24054.msg131715#post_tweak4) for some more info.
Title: Re: [MOD] Media sites v1.4 (2009-03-11)
Post by: AntiNSA2 on March 12, 2009, 04:02:16 AM
Awsome. Thank you very much!
Title: Re: [MOD] Media sites v1.4 (2009-03-11)
Post by: baggacfreak on March 18, 2009, 10:22:37 PM
Hi,

is it possible that you can add sevenload, too? Great Mod so far!

ThXs!
Title: Re: [MOD] Media sites v1.4 (2009-03-11)
Post by: V@no on March 19, 2009, 03:38:34 AM
I've never heard of this site, even though I just added support for it into upcoming v1.5, but I need test it more, the site seem doesn't have same URL structure for each media...
Title: Re: [MOD] Media sites v1.4 (2009-03-11)
Post by: ras221 on March 19, 2009, 03:21:13 PM
Hi, i am new to this php stuff, but felt fairly good about changing my gallery to do this mod, mainly for youtube only. the problem i am having is where is the attached zip files??? i.e. media_sites.zip and media_sites_templates_and_icons.zip packages??? and what do you mean by copy all files from template/default/icons/ folder to templates/<your template>/icons/?? this is the error i am getting now Warning: Cannot modify header information - headers already sent by (output started at /home/owyheeou/public_html/gallery/includes/media_sites.php:379) in /home/owyheeou/public_html/gallery/includes/sessions.php on line 101

Warning: Cannot modify header information - headers already sent by (output started at /home/owyheeou/public_html/gallery/includes/media_sites.php:379) in /home/owyheeou/public_html/gallery/includes/sessions.php on line 101

Fatal error: Call to undefined function media_sites_bbcode() in /home/owyheeou/public_html/gallery/includes/functions.php on line 744


I have done everything exact for the mod well i thought. can you mabe explan in simple words lol?
Title: Re: [MOD] Media sites v1.4 (2009-03-11)
Post by: V@no on March 19, 2009, 03:50:35 PM
Welcome to 4images forum.

Ok, I've renamed the filenames in the the instructions, hope it's less confusing then used to.

The files you need to download are located at the very end of the first post in this topic. I put version number into filenames.
As of the error messages, media_sites.php file does not have 379 lines, so I have no clue what is in your media_sites.php file and where you got it from...

as of copying all files, if you open up the template and icons package, you should find there many files inside folders. i.e.:

templates/default/icons/youtube.gif (this is a media icon for youtube site)
...
templates/default/media/mtv.html (this is a media template for mtv site)
...

you need copy all these files into same folder in your 4images template.
As example, lets say you are using a custom template "blah21"
the path to your template will be:
templates/blah21/
inside your template should have "media" and "icons" folders

so the two files above should be copied into:
templates/blah21/icons/youtube.gif (this is a media icon for youtube site)
...
templates/blah21/media/mtv.html (this is a media template for mtv site)
...
Title: Re: [MOD] Media sites v1.4 (2009-03-11)
Post by: ras221 on March 19, 2009, 04:48:49 PM
I got it to work, it was a bit confusing on the 1st upload but understand it now. thanks

check it out http://www.owyheeoutlaws.com/gallery/index.php    :D  :D  :D
Title: Re: [MOD] Media sites v1.5 (2009-03-21)
Post by: V@no on March 21, 2009, 10:34:18 PM
Changes in v1.5:
Code: (changes) [Select]
- 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

The thumbnail fetching only works when media sites added via members upload form, no ACP support as of yet. I only tested on PHP5 and with no SAFE MODE.
If you have problem with this feature, turn off thumbnail fetching via:
define("MEDIA_THUMB", 1); //fetch thumbnails? set to 0 if you receive errors.

Thumbnail fetching doesn't work on already added media sites!


Update from v1.4 to v1.5 instructions:

1) re-do Step 1 (http://www.4homepages.de/forum/index.php?topic=24054.msg131715#post_step1) and Step 4 (http://www.4homepages.de/forum/index.php?topic=24054.msg131715#post_step4)
2) apply Step 5.1 (http://www.4homepages.de/forum/index.php?topic=24054.msg131715#post_step5-1)
Title: Re: [MOD] Media sites v1.5 (2009-03-21)
Post by: praveen on April 11, 2009, 08:37:28 AM
Hi,

thank you for the mod.

i am trying to add a video from youtube and i am kind of stuck.

in the add images, URL:
what should i add?

do i have to add like this:
http://www.youtube.com/watch?v=LvF5yzRsUgw

or
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/LvF5yzRsUgw&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/LvF5yzRsUgw&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>


please advise
Title: Re: [MOD] Media sites v1.5 (2009-03-21)
Post by: V@no on April 11, 2009, 03:56:06 PM
Hello and welcome to 4images forum.

So far the only media site that requires use of <embed> is the stupidvideos.com
All others, including youtube, can use direct url from address bar.
other words use http://www.youtube.com/watch?v=LvF5yzRsUgw
Title: Re: [MOD] Media sites v1.5 (2009-03-21)
Post by: praveen on April 11, 2009, 04:20:46 PM
Thank you :)

i added the url as u said, but when i try to view the video nothing shows up.

the detail page has the following youtube code without the video id.

Quote
<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>

am i missing anything?

here is a screenshot of the admin
http://i42.tinypic.com/2ih9x03.jpg
Title: Re: [MOD] Media sites v1.5 (2009-03-21)
Post by: V@no on April 11, 2009, 05:09:14 PM
You must have skipped a step or two. Double check each step from the installation instructions.
Title: Re: [MOD] Media sites v1.5 (2009-03-21)
Post by: praveen on April 12, 2009, 06:16:26 AM
my mistake.

instead adding a code above, i added it below.

now it works fine.

Thank you :)
Title: Re: [MOD] Media sites v1.5 (2009-03-21)
Post by: Fryz on May 05, 2009, 05:00:35 PM
Hallo Leute, mal ne Frage: Steht dieser Mod nicht mehr zur verfügung? Der "Download attached" funktioniert nicht :-(
Title: Re: [MOD] Media sites v1.5 (2009-03-21)
Post by: mawenzi on May 05, 2009, 05:18:15 PM
@Fryz

... für mich arbeitet der Download der beiden zip-Dateien perfekt ...
Title: Re: [MOD] Media sites v1.5 (2009-03-21)
Post by: Fryz on May 05, 2009, 05:31:04 PM
*autsch*

Danke mawenzi...

ich war nicht eingeloggt... *schäm*
Title: Re: [MOD] Media sites v1.5 (2009-03-21)
Post by: nl2dav on May 11, 2009, 02:14:10 PM
Superb, nice work!
Title: Re: [MOD] Media sites v1.5 (2009-03-21)
Post by: Sunny C. on June 11, 2009, 04:26:16 AM
Hallo,

..... was genau macht diese MOD?
..... Geht das alles nur über das ACP?
..... Werden die Videos via Link oder Embedcode eingefügt?

..... Verstehe die Modifikation irgendwie grad nicht. Sieht sehr interessant aus, aber ich kann mir gerade nichts darunter vorstellen.
Title: Re: [MOD] Media sites v1.5 (2009-03-21)
Post by: V@no on June 11, 2009, 04:40:06 AM
..... 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)
Title: Re: [MOD] Media sites v1.5 (2009-03-21)
Post by: Sunny C. on June 11, 2009, 03:09:01 PM
Danke V@no!

..... Fällt das dann weg? Also brauche ich das nicht mehr?
http://www.4homepages.de/forum/index.php?topic=20597.0
Title: Re: [MOD] Media sites v1.5 (2009-03-21)
Post by: V@no on June 11, 2009, 03:39:15 PM
No, you don't need that mod anymore.
Title: Re: [MOD] Media sites v1.5 (2009-03-21)
Post by: Sunny C. on June 11, 2009, 04:32:52 PM
Very Nice. You are the Best :D

Sorry, but dont work.
I have added this Mod in 4images 1.7.7

I cant Upload a Video by Remoteupload

This is the Link:
http://www.myvideo.de/watch/6522164/Shippuuden_112_Englisch_sub_Teil_3_3
Title: Re: [MOD] Media sites v1.5 (2009-03-21)
Post by: V@no on June 11, 2009, 04:56:01 PM
http://4images.vano.org/ajaxcomments/details.php?image_id=17

works fine.

Make sure you added myvideo_de into allowed extensions list in ACP settings (Step 4 (http://www.4homepages.de/forum/index.php?topic=24054.msg131715#post_step4))


P.S.
Did you try add any other sites yet?
Title: Re: [MOD] Media sites v1.5 (2009-03-21)
Post by: Sunny C. on June 11, 2009, 04:58:53 PM
Quote
Make sure you added myvideo_de into allowed extensions list in ACP settings (Step 4)

Yes!
Title: Re: [MOD] Media sites v1.5 (2009-03-21)
Post by: V@no on June 11, 2009, 05:02:23 PM
you don't have remote_media_file file input field on your upload form. you have remote_thumb_file instead.
Title: Re: [MOD] Media sites v1.5 (2009-03-21)
Post by: Sunny C. on June 11, 2009, 05:11:52 PM
Oh man! You have eyes like a fox. Thank you!

I have added in my List:_
http://www.4homepages.de/forum/index.php?topic=24888.0


Edit://
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:

Thumbnail for Website:
Code: [Select]
<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>
Hotlink for Website:
Code: [Select]
<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:
Code: [Select]
[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]
Hotlink for Forum:
Code: [Select]
[URL=http://MYSITE.de][IMG]http://MYSITE.de/data/media/1/http://www.youtube.com/watch?v=rWY8k8hto_s[/IMG][/URL]
Share this Image:
Code: [Select]
http://MYSITE.de/details.php?image_id=5
Directpath to Image:
Code: [Select]
http://MYSITE.de/data/media/1/http://www.youtube.com/watch?v=rWY8k8hto_s
I also use the SEO MOD, therefore, should the link be otherwise be spent

With the Mod "Display Image Codes...." show me the Link:
Code: [Select]
http://MYSITE.de/details.php?image_id=5
But in my Gallery, is the Link:
http://MYSITE.de/video-test-1337-5.htm

Do you have an idea as Vano? Would you possibly expand the code?
Title: Re: [MOD] Media sites v1.5 (2009-03-21)
Post by: V@no on June 13, 2009, 03:48:40 AM
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

This is permissions issue, covered in FAQ (http://www.4homepages.de/forum/index.php?topic=6836.0)

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:

I gather you found the permalinks addon.

Since I don't know which version of permalinks addon you use I can only suggest download v1.5.5 (I just updated it) and in template use {if is_media_site}...{endif is_media_site} and {ifno is_media_site}...{endifno is_media_site} combination of template tags to display proper links.
 
Here is a quick example:
Code: (HTML) [Select]
<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}">
Title: Re: [MOD] Media sites v1.5.5 (2009-06-12)
Post by: Sunny C. on June 13, 2009, 10:31:09 PM
Hallo Vano,

wieder einmal ein großes Dankeschön. Aber funktioniert das auch, dass der Embedcode ausgegeben wird? Das Video wird ja auch über den Embedcode angezeigt, dann müsste das doch auch funktionieren das der Code ausgegeben wird oder?

----- GOOGLE-TRANSLATE
 
Hi Vano,

Once again a big thank you. But does this also implies that the embedCode is spent? The video is also on the embedCode displayed, then this should also work but the code is spent is not it?

Quick
.... Can me show the Embedcode?
Title: Re: [MOD] Media sites v1.5.5 (2009-06-12)
Post by: Sebas Bonito on June 20, 2009, 02:29:12 PM
Thanx so much for this great MOD. It works fantastic!

1. I'd only like to know how to change the width-size of the thumbnails? I "need" 135px in the width, but the automatic created thumbs have 120px.  Upate: I guess it has something to do with this: http://code.google.com/intl/de-DE/apis/youtube/2.0/reference.html#youtube_data_api_tag_media:thumbnail (http://code.google.com/intl/de-DE/apis/youtube/2.0/reference.html#youtube_data_api_tag_media:thumbnail) But how to compilate?

2. To seperate videos from pictures (for the eyes  :wink: ), is it possible to add automatically "Video: " before the "Title" (e.g. "Video: Kid is jumping", while the user only "Kid is jumping" has written).

3. Another -maybe important- point is the "download"-Button below the video-clips. For sure you cannot download a video-FLV. But the most users are trying to do it. Is it possible, in case of speficied filetypes to deactivate this button (e.g. like the upload-button for unregistered users)?
Title: Re: [MOD] Media sites v1.5.5 (2009-06-12)
Post by: V@no on June 20, 2009, 11:14:28 PM
1. in includes/media_sites.php find:
Code: [Select]
       && ($image_info[0] > $dimension || $image_info[1] > $dimension))

Replace it with:
Code: [Select]
)
2. in includes/functions.php find:
Code: [Select]
 $num_comments = ($image_row['image_allow_comments'] == 1) ? $image_row['image_comments'] : "";
Insert below:
Code: [Select]
 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.


3. in includes/functions.php find:
Code: [Select]
 if (!check_permission("auth_download", $image_row['cat_id'])) {
Replace it with:
Code: [Select]
 if (!check_permission("auth_download", $image_row['cat_id']) || media_sites($image_row['image_media_file'])) {
(added it at optional step 2.7)
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: V@no on June 20, 2009, 11:38:41 PM
Another very tiny update to v1.5.6:

Quote
- 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}
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: Sebas Bonito on June 21, 2009, 10:36:31 AM
Thx it works perfectly   8)

1. NOW the thumbs will generate its width-size to the global settings.
2. Video will have now the "Videos:" in front of the title
3. And nevertheless the download buttons are deactivated

One Question to Point 1: How about the "old" videos? Is there a possibility to change the old thumbs to its new size? I already have too many comments to delete the videos and to upload them fresh and new.
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: V@no on June 21, 2009, 10:43:23 AM
Sorry, that is beyond functionality of this mod.

I might be able add support for this mod in [Plugin] Rebuild Thumbnails (http://www.4homepages.de/forum/index.php?topic=7059.0)...later ;)
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: Sebas Bonito on June 21, 2009, 10:44:54 AM
That would be great!  :)
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: V@no on June 21, 2009, 11:51:29 AM
ok, done, [Plugin] Rebuild Thumbnails v1.1 (2009-06-21) (http://www.4homepages.de/forum/index.php?topic=7059.0) should work with media sites.
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: Sebas Bonito on June 21, 2009, 12:27:09 PM
Yes, it works. Another Point I've found this hour:

How about denying Videoclips, which are already in the database? So a url-check!
With a few hundred videos, there comes a point, where you don't know, if a video
already exists... so there, doubleposts are really possible and happens to my site.
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: V@no on June 21, 2009, 12:49:06 PM
It would be difficult to do because whole url stored in the database, not just the ID. therefor http://www.youtube.com/watch?v=M-yGsP9PBrc and http://www.youtube.com/watch?v=M-yGsP9PBrc&tralivali will be treated as different videos
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: Sebas Bonito on June 21, 2009, 12:58:24 PM
You're the master... It's too complicated for me.  :oops:

But everything before the first "&" is the most important stuff, so you can cut it up from there
to get the unique URL. Everything from the first "&" to the end are only options, and not necessary.
With that you check the "daeof_images" --->> "image_media_file". Maybe it would be good to
make the "cut" and the "douple-post-check" during the upload, to improve the mod.
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: V@no on June 21, 2009, 01:05:53 PM
The problem with "cleaning up" the url, is that it might accidentally remove something important. same video but different quality:
http://www.youtube.com/watch?fmt=0&v=M-yGsP9PBrc
http://www.youtube.com/watch?fmt=22&v=M-yGsP9PBrc
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: Sebas Bonito on June 21, 2009, 07:07:25 PM
The problem with "cleaning up" the url, is that it might accidentally remove something important. same video but different quality:
http://www.youtube.com/watch?fmt=0&v=M-yGsP9PBrc
http://www.youtube.com/watch?fmt=22&v=M-yGsP9PBrc
Maybe you can find a solution... anytime  :wink:

How about the "new picture"-box on the startscreen? Is there a way to have two of them?
In case of normal pics and the second below with the newest videoclips.
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: Sebas Bonito on July 07, 2009, 03:44:10 PM
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?
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: castor on July 08, 2009, 08:13:39 PM
Hello Everyone!

I would like to add videos from picasaweb.google.de , the link to the unpublic (no shared, can only be opened with that exact link always)
example : http://picasaweb.google.de/lh/photo/FVZz1hSZ1J50b6aVgihAEQ?authkey=Gv1sRgCNSlqdy4k-6DmgE&feat=directlink

I've tried some stuff like copying another profile from youtube for example, changed links and function names as far as I understood it , but of course didnt woked :-)

Can someone please help me in creating the 1 or 2 entries in mediasites.php ?

If you need more informations, I will help as far as I can.

Thx .
Lars
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: Sebas Bonito on July 10, 2009, 12:19:46 PM
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?

I guess we need to change the function media_sites_thumb in media_sites.php
in a way like here was described (http://www.4homepages.de/forum/index.php?topic=20353.msg111341#msg111341). It's a tiny snippet, but I really need help with that,
cause this stuff is missing in my page and craps the layout.  :oops:
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: neverkas on July 15, 2009, 02:37:05 AM
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.
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: Sebas Bonito on July 15, 2009, 03:18:40 AM
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.

Already discussed and solved here (http://www.4homepages.de/forum/index.php?topic=25131.0). It's still in german, maybe Rembrandt will help you.
...and neverkas, please don't upload counterstrike-videos to my site. Thank you!

PUSH: For my site I need help to build also "Square Thumbs (http://www.4homepages.de/forum/index.php?topic=20353.msg111341#msg111341)" from the videothumbs, like for the photos.
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: neverkas on July 15, 2009, 05:06:18 PM
xDD Srry Schnack I had confused video...!

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?
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: Sebas Bonito on July 15, 2009, 06:04:13 PM
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?

Sorry, I don't understand that question. You can change the thumbnails like the normal pictures.
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: neverkas on July 15, 2009, 06:29:49 PM
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

(http://www.fullposteo.com.ar/fullposteo.jpg)
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: Sebas Bonito on July 15, 2009, 06:40:04 PM
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

Ah vice versa, I guess  8)

The thumbnails don't appear, instead the standard-Gifs represents the video.

Hmm... Actually I don't know! Do the specified folders have the correct CHMOD-rights?
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: neverkas on July 15, 2009, 06:42:39 PM
Look new image

http://img212.imageshack.us/img212/8717/videosandimages.jpg

Do you understand me?

HELP!!!!!!!!!!!!!

Who help me? Attached files, plis..! :(
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: V@no on July 16, 2009, 05:00:39 AM
Since version 1.5 the mod automatically creates thumbnails for newly added media sites, but only via members' upload form.
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: neverkas on July 16, 2009, 05:10:54 AM
I did version v1.5.6 new
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: Sebas Bonito on July 16, 2009, 05:27:09 AM
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.
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: V@no on July 16, 2009, 06:56:09 AM
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
from member's upload form it's working fine, you can test it here (http://4images.vano.org/ajaxcomments/categories.php?cat_id=5)
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: neverkas on July 16, 2009, 03:18:20 PM
V@no help, please.  :D
My problem is:
* In {new_images} doesn't appears the new photos.
* In {new_images2} appears the new photos and videos

(http://img268.imageshack.us/img268/8121/fotosyvideos.jpg)

I have put the number 3 in ACP, of the modification "admin/setting.php" and  "lang/spanish/admin.php"
(http://img125.imageshack.us/img125/3451/moda.jpg)

I wont it to appear like this:
{new_images} only photos
{new_images2} only videos

I have modified the file "Index.php", because "Schnick und Schnack" code is going well.
I have the same but mine doesn't function well, whats the problem?

My index.php  original modified width http://www.4homepages.de/forum/index.php?topic=25131.0
Code: [Select]
<?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']), 08) : 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++ % == 0) ? 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&nbsp;\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++ % == 0) ? 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&nbsp;\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');
?>

   
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: V@no on July 16, 2009, 04:59:02 PM
Unless you place your videos in a separate category there is no way of knowing if an item is actually an image or a video.
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: neverkas on July 17, 2009, 02:21:53 PM
???
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: Sebas Bonito on July 19, 2009, 03:38:56 AM
Neverkas, I've alread told you, that "{new_images2}" (the "newest videos"-box in the home) has nothing to do with the v@no's script. Instead it's a tiny modification from rembrandt, and so far as I know, he tried to help you many times and made wright decisions. Here there's noone speaking VERY good english, but yours is really really bad. We would like to help you, but you need the basic "english" vocabulary and a tiny understanding of php. It's nothing personal or against you, but please take a minute to think about it.

@V@no Do you know how to add a german MTV Video?
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: neverkas on July 20, 2009, 03:18:48 AM
I understand php time not long ago I understand but it. If I am writing here, because V@NO knows much and wanted that it help me. Which is the problem?

That can only by written by IM ( Personal Message )  :wink:
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: V@no on July 20, 2009, 03:32:10 AM
@neverkas:
You'll need create a separate category with your media site videos. That is the only way you can have video-only section.


@V@no Do you know how to add a german MTV Video?
Link please
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: Sebas Bonito on July 20, 2009, 04:28:44 AM
@V@no Do you know how to add a german MTV Video?
Link please

German's MTV Home: http://www.mtv.de/ (http://www.mtv.de/)
Video example: http://www.mtv.de/videos/2935127 (http://www.mtv.de/videos/2935127)
FLV Player: http://intl.esperanto.mtvi.com/global/apps/player/flex/Loader.swf (http://intl.esperanto.mtvi.com/global/apps/player/flex/Loader.swf)
...the source/code is mostly in english.
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: GaYan on July 20, 2009, 08:24:07 AM
hey,,this is a graet mod... but can we add our own video player to this and cant we host the vdieos in our site and play it using the vidoe player///

that will be cooll... we can uplod videos from the admin panel and users can viwe it.just like a music sharing web site... and the uer can either download it in HD , or smaller format..

what you guys think ab this ?
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: neverkas on July 20, 2009, 10:59:34 PM
Ok, I dont need that :?
You can changed the flash player?
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: wallpapers on July 25, 2009, 09:34:31 AM
Hello everybody.

I want to install this mod, but i can't find the attached files. (step 1)
Maybe i'm blind but i have searched 30 minutes now.

Do someone have the time to attach the files again please?

Thank you very much.
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: V@no on July 25, 2009, 10:07:08 AM
all attached files are located at the bottom of the post, in this case its at the bottom of first post with installation instructions.
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: wallpapers on July 25, 2009, 10:10:10 AM
I know it now.
I was not logged in when i search the site.
That was the problem (you cannot see the attached files when you not logged in.)
Thanks anyway.
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: SnaFy on August 07, 2009, 08:08:51 PM
hi V@no 
can i use my flash player ?? with this mod ?
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: V@nо on August 07, 2009, 08:47:12 PM
I don't know what is your flash player, but I guess you could
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: SnaFy on August 08, 2009, 04:51:53 AM
i am so sorry i mean how to use my with this mod
http://www.4homepages.de/forum/index.php?topic=23885.0
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: V@no on August 08, 2009, 09:44:23 AM
I'm not quiet sure what are you trying to do this mod has nothing to do with .flv local files...
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: GaYan on August 10, 2009, 11:28:19 AM
hey V@no ..  :D Sir..can u help me...!

can we add a custom flash player ? and palay our uploaded swf files ... or can we use jwplayer(viral version) /?

please help.... i went tru this post How to add FLV (Flash Video) support   !

it was great but JW Viral Plugin cannot be used :( is thier a way to fix it /// we cant use mods without this :(

Please help meeeeeeeeeeeeeee :D
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: V@no on August 10, 2009, 03:13:28 PM
FAQ -> How to add FLV (Flash Video) support (http://www.4homepages.de/forum/index.php?topic=23885.0)
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: GaYan on August 10, 2009, 03:30:20 PM
FAQ -> How to add FLV (Flash Video) support (http://www.4homepages.de/forum/index.php?topic=23885.0)

yeh..  8O  :D

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 :)
Thanks In Advance !
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: V@no on August 10, 2009, 03:48:02 PM
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 :)
Thanks In Advance !
Sorry, I don't know and besides, the question has nothing to do with media sites mod. Please stay on topic.
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: GaYan on August 10, 2009, 06:37:46 PM
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 :)
Thanks In Advance !
Sorry, I don't know and besides, the question has nothing to do with media sites mod. Please stay on topic.

Im Sorry sir.  :?
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: waynenort on August 24, 2009, 07:28:38 AM
Another nice mod v@no. If only we all had your skills  :wink:

When an extension like 'youtube' is removed from the Valid file extensions after a youtube video url is uploaded onto my site. The enabled video will still play when the thumbnail icon will say '404 file not found'. This is sort of good because I want to upload video in the ACP from time to time and have everyone view them, but I don't want any viewers or registered users uploading the videos. I only want them able to upload images like jpegs, gifs and so on.

So my question:   Is there a way to have the thumbnail display the static video image even when the 'youtube' extension is removed from the Valid file extensions box?

Thanks, Wayne
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: V@no on August 24, 2009, 03:04:17 PM
this might help:
http://www.4homepages.de/forum/index.php?topic=25556.msg140037#msg140037

you must keep the youtube extension in the valid file extensions list.
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: waynenort on August 24, 2009, 10:45:55 PM
great stuff V@no
Thanks
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: waynenort on August 26, 2009, 02:54:32 PM
Media site mod works perfect along with disabling the video upload (eg youtube) for registered users thanks to the forum link V@no kindly provided in my last post.

I'm trying to get the website called http://www.playsportstv.com to play their videos in this mod as well. This is one embed that playsportstv.com provide to put the player and .flv on a website:
Code: [Select]
<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>>
This is in the browser line:
Code: [Select]
http://www.playsportstv.com/basketball#basketball-dribbling_keep-away-drill
So this is how I adapted it to the 4images Media Site mod. The playsports url uploads to my website and plays the video.

edit: Unfortunately it plays only the first video in basketball menu no matter which basketball playsports url is uploaded and thumbnail doesn't display.  :oops:

V@no: Heeeeelp.....


Thanks, Wayne
 
Step1: Create playsports.html
Code: [Select]
<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}&amp;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}&amp;playerForm=55b3958c3abb4c7ca117adf1f1962024&mediaId=e726e57866a64833ad01459b5a4d14b9"
  ></embed>
</object>

Step2(a): media_sites.php change
Find
Code: [Select]
$media_sites = array(and insert below
Code: [Select]
 "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

Step2(b): media_sites.php change
Find  
Code: [Select]
// BEGIN MEDIA CUSTOM FUNCTIONSand insert below
Code: [Select]
//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,

Thanks, Wayne
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: Sebas Bonito on August 26, 2009, 03:16:27 PM
Has anyone an idea for mtv german's videosection?
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: live@ct on September 14, 2009, 07:09:07 PM
How can I specified the size of the video?

I want the default size to use for the video category 500 pixels, other size for the coments like 300 pixels width and for other description and additional fields 200 pixels width

thanks for your help
Title: Re: [MOD] Media sites v1.5.6 (2009-06-20)
Post by: V@no on September 15, 2009, 01:46:46 AM
you can specify the default sizes for comments in media_sites.php:
define("MEDIA_BBCODE_WIDTH", 380); //force use this width in comments; 0 = use default
define("MEDIA_BBCODE_MAX_WIDTH", 500); //use this max width in comments; if width specified in the url but it smaller then this number, the url width will be used otherwise this number will be used; 0 = use default
define("MEDIA_BBCODE_HEIGHT", 250); //force use this height in comments; 0 = use default
define("MEDIA_BBCODE_MAX_HEIGHT", 500); //use this max height in comments; 0 = use default

the default size in details page can be changed in media templates. As of descriptions (it also can be used in details page) you can specify the width/height in the url itself, see Tweak 3 (http://www.4homepages.de/forum/index.php?topic=24054.0#post_tweak3)
Title: Re: [MOD] Media sites v1.5.7 (2009-10-13)
Post by: V@no on October 13, 2009, 04:45:47 PM
just very quick update: fixed rutube.ru

Redownload media_sites.zip package (attached to first post) or

In includes/media_sites.php find:
    "media_id_hash" => $match[3],
    "media_dl" => "http://video.rutube.ru/".$match[3],

Replace it with:
    "media_id_hash" => $match[4],
    "media_dl" => "http://video.rutube.ru/".$match[4],
Title: Re: [MOD] Media sites v1.5.7 (2009-10-13)
Post by: Kaliha on October 14, 2009, 07:01:34 PM
thnx for this update, RuTube is work fine. I have one question :how can I use the standard preview, but not automatically generated? I used highslide slide show, and preview for mediasites is not work correctly. This is my site trainpix.org.ua, first image (video) for example.
Title: Re: [MOD] Media sites v1.5.8 (2009-10-14)
Post by: V@no on October 15, 2009, 02:43:28 AM
Fixed auto thumbnail on upload for rutube.ru

Either re-download attached (http://www.4homepages.de/forum/index.php?topic=24054.msg131716#post_attachment) to the first post media_sites_v1.5.8.zip

or

in includes/media_sites.php
find:
Code: [Select]
   $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];

Replace with:
Code: [Select]
   $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]);

@Kaliha:
Sorry, didn't understand your question, but I hope v1.5.8 is what you've asked for :)
Title: Re: [MOD] Media sites v1.5.8 (2009-10-14)
Post by: AKIN on October 17, 2009, 04:14:08 PM
hi.
very nice mod. thans V@no.
www.izlesene.com and http://video.mynet.com/ how do add ?

izlesene.com embed codes...
hi.
very nice mod. thans V@no.
www.izlesene.com and http://video.mynet.com/ how do add ?

video.mynet.com embed codes...
Quote
<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>



video.mynet.com embed codes...
Quote
<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>

Title: Re: [MOD] Media sites v1.6 (2009-10-17)
Post by: V@no on October 18, 2009, 03:42:35 AM
Updated to v1.6:
Quote from: Change log for v1.6
- 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

To upgrade re-do Step 1 (http://www.4homepages.de/forum/index.php?topic=24054.0#post_step1) and Step 4 (http://www.4homepages.de/forum/index.php?topic=24054.0#post_step4)
Title: Re: [MOD] Media sites v1.6 (2009-10-17)
Post by: e3lan on November 04, 2009, 04:42:37 PM
How do I add two links ?
xxx: salloumixxx:  
and
xxx: niceq8i. tv/videos/1095/

Thanks  :D

Title: Re: [MOD] Media sites v1.6 (2009-10-17)
Post by: e3lan on November 14, 2009, 02:18:02 AM
very nice mod
salloumi.com

how do add ?

Title: Re: [MOD] Media sites v1.6 (2009-10-17)
Post by: V@no on November 14, 2009, 02:26:41 AM
very nice mod
salloumi.com

how do add ?

No clue. I'm getting this message when trying access the site:
Quote
Salloumi is unavailable in UNITED STATES
Title: Re: [MOD] Media sites v1.6 (2009-10-17)
Post by: e3lan on November 14, 2009, 03:32:43 PM
Thank you, Sir, and I hope to solve the problem   :cry:
Title: Re: [MOD] Media sites v1.6 (2009-10-17)
Post by: Sebas Bonito on November 23, 2009, 03:02:19 PM
Take a look. Would be nice to assamble this into this mod  :)

http://www.youtube.com/direct
Title: Re: [MOD] Media sites v1.6 (2009-10-17)
Post by: jacktheblack on November 27, 2009, 11:10:00 AM
really appreciate it man. This is what I want and looking for :)
Title: Re: [MOD] Media sites v1.7 (2009-11-28)
Post by: V@no on November 28, 2009, 06:05:01 AM
Updated to v1.7:
Quote from: Changes log for v1.7
- Added: smotri.com
- Added: collegehumor.com

To upgrade re-do Step 1 (http://www.4homepages.de/forum/index.php?topic=24054.0#post_step1) and Step 4 (http://www.4homepages.de/forum/index.php?topic=24054.0#post_step4)
Title: Re: [MOD] Media sites v1.7 (2009-11-28)
Post by: e3lan on November 30, 2009, 01:53:50 AM
Please, Sir, can also add this site
http://www.4shared.com/file/7342071/f14bb1d/ronaldinho_-_drible_publicidad.html?s=1
Title: Re: [MOD] Media sites v1.7 (2009-11-28)
Post by: V@no on November 30, 2009, 02:23:55 AM
Perhaps you misunderstand what this mod is about? the site you are referring to has nothing to with streaming videos.
Title: Re: [MOD] Media sites v1.7 (2009-11-28)
Post by: e3lan on November 30, 2009, 05:07:39 PM
This site can raise the video and add it in the forum
Title: Re: [MOD] Media sites v1.7 (2009-11-28)
Post by: V@nо on November 30, 2009, 09:03:17 PM
any examples?
Title: Re: [MOD] Media sites v1.7 (2009-11-28)
Post by: e3lan on December 01, 2009, 01:40:58 AM
this my facebook
Title: Re: [MOD] Media sites v1.7 (2009-11-28)
Post by: V@no on December 01, 2009, 02:32:13 AM
I guess it's some sort of application in facebook itself, not something available at 4shared.com, at least not something I can find using the free service...
Title: Re: [MOD] Media sites v1.7 (2009-11-28)
Post by: e3lan on December 04, 2009, 12:04:32 AM
OK Thanks
Title: Re: [MOD] Media sites v1.7 (2009-11-28)
Post by: Bogdan on December 13, 2009, 09:11:02 AM
Hy V@no,

Any support for 2 more video sites? 220.ro and trilulilu.ro

Thanks
Title: Re: [MOD] Media sites v1.8 (2009-12-18)
Post by: V@no on December 18, 2009, 10:28:19 AM
Any support for 2 more video sites? 220.ro and trilulilu.ro
Added in v1.8

Quote from: changes log for 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)

To upgrade re-do Step 1 (http://www.4homepages.de/forum/index.php?topic=24054.0#post_step1) and Step 4 (http://www.4homepages.de/forum/index.php?topic=24054.0#post_step4)
Title: Re: [MOD] Media sites v1.8 (2009-12-18)
Post by: Bogdan on December 18, 2009, 06:48:48 PM
Thanks V@no... Santa Claus came earlier this year :D
Title: Re: [MOD] Media sites v1.8 (2009-12-18)
Post by: e3lan on December 27, 2009, 07:34:54 PM
Please, Sir, can also add this site  :oops:
http://vimeo.com/8313504
Title: Re: [MOD] Media sites v1.8 (2009-12-18)
Post by: sebaland on January 04, 2010, 06:20:18 PM
thaks so much!, one little question, when the video is added in the database, the system dont display the video inmediately


i have a screenshot, but cant upload here tinypic server
(http://i46.tinypic.com/6rhead.jpg)
Title: Re: [MOD] Media sites v1.8 (2009-12-18)
Post by: V@no on January 05, 2010, 01:00:43 AM
Please, Sir, can also add this site  :oops:
http://vimeo.com/8313504
Added in v1.9 (I'll release it once I have few more sites)

thaks so much!, one little question, when the video is added in the database, the system dont display the video inmediately
Yeah, I was aware of this issue, but since nobody complained...:D
I'll try fix it in v1.9
[EDIT]
Fixed. Added Step 5.2 (http://www.4homepages.de/forum/index.php?topic=24054.msg131715#post_step5-2) (this step can be used with v1.8 too)
Title: Re: [MOD] Media sites v1.8 (2009-12-18)
Post by: Tino23 on February 05, 2010, 05:00:07 PM
Super Mod  :!:
Hab nur mal eine Frage wegen der Tubnails zu dem Videos. Hab meine Seite auf zwei Verschiedenen Hostern laufen, bei dem einem wird mir zum Video ein Thumbnail automatisch nach dem Hochladen zum Video erzeugt und beim zweitem System wird mir dann nur das icon vom Videoportal angezeit.. Muß der Hoster etwas bestimmtes unterstüten damit mir die Thumbnails zu dem Video erzeugt werden, oder warum zeigt es mit bei dem einem Hoster nur die Icons an?
Title: Re: [MOD] Media sites v1.8 (2009-12-18)
Post by: V@no on February 06, 2010, 12:56:10 AM
Some servers don't allow downloading remote files. What php version? also, check in phpinfo  allow_url_fopen
Title: Re: [MOD] Media sites v1.8 (2009-12-18)
Post by: Tino23 on February 06, 2010, 10:51:08 AM
Hi, also es scheint wohl an dieser Einstellung liegen der Server wo es geht hat folgende Einstellung
1. PHP Version 5.2.6-1+lenny4  allow_url_fopen = ON

der Server wo es nicht geht hat folgende Einstellung
2. PHP Version 5.2.11-0.dotdeb.0  allow_url_fopen = OFF

Ich hab den Betreiber am angeschrieben, ob er diese Einstellung ändern kann, da ich sie im Adminbereich nicht gefunden habe. Mal sehen ob es dann geht.

MfG Tino

Edit:
Also hab noch mal beim Hoster geschaut und der schreibt zu der Einstellung folgendes:

Wir möchten Sie ausdrücklich darauf hinweisen, dass einige Einstellungen (register_globals, allow_url_fopen, mod_rewrite)  der Sicherheit Ihres Accounts nicht zuträglich sind! Bitte nehmen Sie Einstellungen daher nur vor, wenn eines Ihrer Skripte diese zwingend voraussetzt und Sie keine andere Möglichkeit ( zum Beispiel den Einsatz anderer Software )  sehen!

Könnte man diese Einstellung nicht auch umgehen, wie auf dieser Seite zu Lesen ist  http://www.klamm.de/forum/showthread.php?t=16149 (http://www.klamm.de/forum/showthread.php?t=16149)
Title: Re: [MOD] Media sites v1.8 (2009-12-18)
Post by: GaYan on February 13, 2010, 05:36:15 PM
hey ! its a great mod... bt i have a small prb.. how to add youtube playlists in 4images using this mod ?


tnx !
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: V@no on February 13, 2010, 10:27:38 PM
Quote from: v1.9 change log
- 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 update, re-do Step 1 (http://www.4homepages.de/forum/index.php?topic=24054.0#post_step1), Step 4 (http://www.4homepages.de/forum/index.php?topic=24054.0#post_step4) and if you haven't done it yet, do Step 5.2 (http://www.4homepages.de/forum/index.php?topic=24054.0#post_step5-2)
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: Tino23 on February 16, 2010, 08:06:24 PM
Super das die Idee so schnell umgesetzt wurde  :!: :!: Läuft jetzt alles ohne Probleme  :P
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: arabcine on February 22, 2010, 07:57:27 PM
all fine it's work but i have small problem with Thumbnail file not found.gif  why ? i was put icons in my temp..

what i can to do to fix this
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: V@nо on February 22, 2010, 10:49:03 PM
what is "not found.gif"?
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: arabcine on February 23, 2010, 12:34:00 PM
in Thumbnail  i got this pic 404.gif

why ?

see this link

http://q8bi3.com/ArabFono/

and in admin
http://i50.tinypic.com/2zjjbma.jpg
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: V@no on February 23, 2010, 01:46:42 PM
You probably missed step 2.x or 4
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: arabcine on February 23, 2010, 01:58:10 PM
ok thanks it's fixed.
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: Hagen-Roderich on March 08, 2010, 12:16:35 PM
To get the automatic thumbnail creation working, there is the thumbnail function (ImageMagick or  GD or NetPBM) from the ACP needed, right?
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: V@no on March 08, 2010, 03:32:34 PM
To get the automatic thumbnail creation working, there is the thumbnail function (ImageMagick or  GD or NetPBM) from the ACP needed, right?
Correct.
Title: No thumbnail, not even default
Post by: surferboy on March 21, 2010, 02:46:17 AM
Hi -

Really need some help on this. Have spent over 3 hours checking and rechecking all installation.  One of my uploads show a thumbnail, like dailyhaha, but no joy on youtube or dailymotion.  The tiny dot is the 'link' so no default icon thumbnail display or an automatic generated thumbnail display.  All uploads done by member sign in and NOT by ACP upload.  Tried uploading by signing in as several different users.

Attached is a screen pic.

Information for your reference:
1. using v.1.7.7
2. all media and icon files uploaded to default template icon and media folders (rechecked and reuploaded 3 times)
3. all mod steps followed. checked twice. 1, 2-2.6 (2.7 not done), 3, 4 (here is direct copy of all valid file extensions from ACP settings "jpg,gif,png,aif,au,avi,mid,mov,mp3,mpg,swf,wav,ra,rm,zip,pdf,flv,break,dailymotion,hulu,liveleak,metacafe,mtv,myspacevideo,myvideo_de,rutube_ru,sevenload,spikedhumor,stupidvideos,yahoovideo,youtube,izlesene,mynet,onsmash,gametrailers,gamespot,smotri,collegehumor,googlewave,220_ro,trilulilu_ro,funnyordie,dailyhaha,megavideo,youtube_pl,aniboom,vimeo,tm_tube"  note no comma after last file extension; and all of steps 5

Conversion tool setting for thumbnails in General Settings is ImageMagick.

Thanks for your help in trying to solve this riddle.

Cheers,

Brian
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: V@nо on March 21, 2010, 07:39:36 AM
can you see the thumbnail in the data folder?
if thumbnail is there, open it in a text editor, see what's in there.
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: surferboy on March 21, 2010, 03:28:16 PM
Hi -

Both of the files are attached. As you can see, they are .jpg files and are tiny, 286 and 287 bits. I opened both files with Photoshop and enlarged them to 1600% and they look like a tiny brown square.

What a mystery!?

Thanks for looking at this.

Brian

[UPDATE]

Just reinstalled the MOD using the control panel vs. files on my desktop. Just uploaded another youtube vid. Same result. It plays but all I get is the small dot for a thumbnail display.

[UPDATE - II]

Went into the ACP and checked the Settings -> valid file extensions and all was there. Next went to the MOD link in the ACP that says 'Valid File Extensions manager' and saw that all the video extensions were red, that they did not have an associated template or mime type. I scrolled down to the Youtube file extension and selected 'delete from allowed upload list' and hit save. That action immediately processed all the file extensions to associate with the html templates and they all turned green. Then I reselected Youtube and clicked on the 'add to allowed upload' radio button and hit save. The youtube file extension is now green.

Then I went into Edit images, and took screen shots of all the vids in the test category. [can't attach more of the screen shot files here but can send them if needed]  It showed dots for all the vids except the dailyhaha. Then I edited one of the recent vid uploads, and deleted the thumbnail.  That made the dot change to the default youtube icon display.

Then I exited the ACP and logged in as a user to test if the youtube file extension permission changes had any effect. Uploaded another vid from youtube and got another dot.

The vids all play it's just the thumbnails seem to not create.

Here is the file formats of the thumbnail for the latest vid upload from youtube:
youtube_MmPkSuwsTF0.youtube.jpg
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: V@no on March 21, 2010, 06:45:59 PM
So, youtube and dailymotion  are the only two that gives you this problem?
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: surferboy on March 22, 2010, 09:47:10 PM
Hi -

No, unfortunately, I have the same problem with break.com, dailymotion, onsmash, metacafe, youtube, break, liveleak, myvideo.de  - others where I get the default icon are sevenload, 220, and rutube.   See the attached file.  The only success for thumbnails are video.yahoo.com and dailyhaha.  The one youtube video with the default icon is the result of my deleting the thumbnail after editing the image.


and in some of the uploads, I get this warning message which I got for two vid uploads for sevenload:

Warning: file_get_contents() [function.file-get-contents]: Filename cannot be empty in /home1/xxxx/public_html/xxxxxgallery/includes/media_sites.php  on line 651

Attached is screen pic from the ACP edit images.

All vids were uploaded as a normal user in the category box using the 'upload' button in the upper right hand of the screen.  All url's were entered in the image url field and a name was provided with the video service to give you an idea.

So strange!

Thanks for looking at this.

Let me know how I can help.

Brian

[UPDATE]

Just realized that you may want to know what line 651 is from media_sites.php; here it is:
"    return file_get_contents($filename, $incpath, $resource_context);  "
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: V@no on March 23, 2010, 02:32:19 AM
I'm certain it has something to do with your server's limitations, or php version...
But as a quick test, please download media_sites_v1.8.zip file from here (http://4images.vano.org/media_sites_archive) see if anything changes.

If downgrading didn't help, I'll need ask you for ftp access to your site, if you are up to this, then pm me with the info.
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: surferboy on March 23, 2010, 03:08:14 AM
Hi -

I uploaded the earlier version of the file but nothing changed.  As a test, I uploaded another youtube video and it went right into autoplay but when I clicked on the category, I saw it listed with the name and the same "dot" in place of a thumbnail.

The php version on our server is 5.2.11

I have access to our php.ini file

safe mode is off

Will send you an IM with ftp access info.

Thanks,

Brian
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: V@no on March 23, 2010, 06:37:47 AM
Ok, it's fixed now.
Apparently it was a bug in [FIX] Max height has no affect when do image resize (http://www.4homepages.de/forum/index.php?topic=7058.msg146539#msg146539).
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: surferboy on March 23, 2010, 07:54:38 PM
Hi -

Thanks for resolving the issue. Have uploaded several vid formats now with no problems.

Got another question: is there a way of showing the vids to appear in the new images section, or ideally iin  the recently uploaded videos? They don't appear in either location.  I'm using the MOD Latest 5 videos on Home-Site, topic 25487.0  to show the recently uploaded video.   

I realize these uploads are remote vids, so they are neither images nor actual vids but would a solution of adding the file extensions of liveleak,dailyhaha, youtube, etc. do the trick in the code mentioned in the 'Latest 5 videos on Home-Site' work, or work in the New Images table? The code is in the index.php file.

To specify certain uploaded vids in the Latest 5 videos, I changed the code to:
AND ((image_media_file LIKE '%.flv') OR (image_media_file LIKE '%.wmv') OR (image_media_file LIKE '%.avi') OR (image_media_file LIKE '%.mov') OR (image_media_file LIKE '%.mpg')) 

So I was wondering if adding some more code like this: (image_media_file LIKE '%.dailyhaha)

would work?

Otherwise, our users won't know the uploaded remote videos have been added unless we create a separate 'Videos' category.  The trouble with doing that is it becomes confusing to the users. Do I go here or there kind of thing.

Thanks again.

Brian
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: V@nо on March 23, 2010, 10:15:11 PM
this question should be addressed to the last images mod. media sites mod doesn't add any extensions to the url, so your method with mysql query wont work.
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: dobster on June 28, 2010, 12:19:25 PM
I love this mod but the only thing is that it won't display the thumbnails on the index or in the album. I use youtube. I looked over the code a few times and I can't seem to get this thing work. I see that the thumbnails are in the right directory on the server so that is not the problem. My site is at http://dragtsma.nl/foto/index.php  

Can anyone please help me?
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: V@no on June 28, 2010, 02:14:47 PM
Welcome to 4images forum.

Interesting. The thumbnails indeed exist...
1) What are the permissions on these thumbnail files?
2) What if you manually change it to CHMOD 777? (all this can be done via FTP client)
3) What is PHP version on your server?
4) Try:
 in includes/media_sites.php find:
    $dimension = (intval($config['auto_thumbnail_dimension'])) ? intval($config['auto_thumbnail_dimension']) : 100;

Insert above:
    @chmod($src, CHMOD_FILES);
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: dobster on June 28, 2010, 06:11:57 PM
Thank you for the reply V@no...

1) the permission on the folder is 777, the permission on the thumbnails vary from 644 to 666.
2) I changed all the thums to 777, no change
3) php version is 4.4.7. It is a linux based system. Safe mode is off, GD support is enabled.
4) Oke, tried that and added another testvideo with the member uploadpage.

Didn't make a difference....any other suggestions?
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: V@no on June 28, 2010, 08:11:54 PM
If you can confirm, that thumbnail filename that is saved in the database matching file that is saved in /data/thumbnails/xx/ folder (including case. Just edit an image, it should show you thumbnail filename), then the only guess I have is that you've missed a step or two (Step 2.1 perhaps)
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: dobster on June 28, 2010, 08:29:40 PM
I looked in the Database. I took out one file, from one video I uploaded and the URL to the video is http://www.youtube.com/watch?v=DZofMmrchtE.
The thumbnail file in the DB says: youtube_DZofMmrchtE.youtube.jpg (same name as I can see in the directory on the server)

All of URL's of the thumbnails from my video's look like that in the DB. Maybe I have to do something different because I am in the Netherlands?

And I did not forget to do any step, I checked it more than 3 times...over a period of 3 months. I checked it today, again... I cannot see where I am going wrong  :oops:
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: V@no on June 28, 2010, 08:56:42 PM
Please attach your modified includes/functions.php
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: dobster on June 29, 2010, 04:38:52 PM
Here you go! I hope you find something...
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: V@no on June 29, 2010, 05:25:46 PM
I'm out of clues...your functions.php looks right.
Can you PM me with temporary ftp account information?
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: dobster on June 29, 2010, 06:23:50 PM
Message send. I am wondering what is wrong...
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: dobster on July 02, 2010, 08:04:52 PM
I do not want to bump this message but have you got any idea what is wrong?
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: V@no on July 02, 2010, 11:40:55 PM
I've added troubleshooting (http://www.4homepages.de/forum/index.php?topic=24054.0#post_troubleshooting) section, for some not so obvious issues ;)

In case someone else experience the same problem, make sure you added needed extensions in Step 4.
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: Sunny C. on July 03, 2010, 08:36:26 PM
Megavideo.com dont work:
Video: http://www.megavideo.com/?d=UN6NIGRS
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: V@no on July 03, 2010, 09:25:48 PM
it only works with v= type videos:
http://www.megavideo.com/?v=9RAADPVW

I don't know what is "d=" type and it seems most of the videos are v= type anyway...
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: Sunny C. on July 03, 2010, 11:24:08 PM
:(
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: V@no on July 04, 2010, 01:35:51 AM
if you can explain, or at least provide some information what this "d=" query is, perhaps I could consider add support for it ;)
Title: Re: [MOD] Media sites v1.9 (2010-02-13)
Post by: Sunny C. on July 04, 2010, 11:16:58 AM
Hello Vano,

the "d" is for "Download" and the "v" ist for "Video"

Look: This is the Video-Link: http://www.megavideo.com/?v=4WX1OEGD
Look: This is the Download-Link: http://www.megaupload.com/?d=UN6NIGRS, but you clicking on "View on Megavideo" then is the d.

V + D is the same File

Sorry for thus <i>tra-la-la</i>ing english ^^
Title: Re: [MOD] Media sites v1.10 (2010-07-04)
Post by: V@no on July 04, 2010, 02:05:22 PM
Ok, the support for download megavideo links was added in v1.10

Quote from: changes in v1.10
- 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

To update, re-do Step 1 (http://www.4homepages.de/forum/index.php?topic=24054.msg131716#post_step1) and Step 4 (http://www.4homepages.de/forum/index.php?topic=24054.msg131716#post_step4)
Title: Re: [MOD] Media sites v1.10 (2010-07-04)
Post by: Bogdan on July 04, 2010, 02:43:27 PM
Hi V@no,

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...

Title: Re: [MOD] Media sites v1.10 (2010-07-04)
Post by: V@no on July 04, 2010, 04:08:25 PM
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.

If you allow users submit html code, it would equal to give them administrative rights for your gallery.
Title: Re: [MOD] Media sites v1.10 (2010-07-04)
Post by: Bogdan on July 04, 2010, 04:34:53 PM
Ok,

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.

Also, maybe it's better to add this option for admins only in ACP, or for some group (trusted user) in front end.
Title: Re: [MOD] Media sites v1.10 (2010-07-04)
Post by: V@nо on July 04, 2010, 05:07:03 PM
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.

Also, maybe it's better to add this option for admins only in ACP, or for some group (trusted user) in front end.
Then you loop back to this kind mod...this mod does exactly that - limiting ;)
Title: Re: [MOD] Media sites v1.10 (2010-07-04)
Post by: Bogdan on July 04, 2010, 05:15:56 PM
True, but in the same time my proposal it's limiting, but gives you freedom... more sites.
Title: Re: [MOD] Media sites v1.10 (2010-07-04)
Post by: V@nо on July 04, 2010, 05:33:00 PM
I still don't see what "freedom" you are talking about, the requested script will have to support all the "allowed" sites, it will have to recognize if the site is allowed or not, it would be exactly not much different then as it is now...
Title: Re: [MOD] Media sites v1.10 (2010-07-04)
Post by: Bogdan on July 04, 2010, 06:15:58 PM
In acp, admin sets some video sites which are allowed for embedding. Then a user is trying to embed something, using the entire embed code generated by the video site.

After user has pressed the submit/save button, the mod only checks if the link from the embed code is allowed (allowed sites from the acp). If yes, save everything to database and publish it, if not return message : try again with embed codes from these sites: youtube, google, etc.

No need to edit the mod's files, each time a user propose another video site.

My php/html knowledge is at beginner level... so if what i'm saying it's wrong or not safe... just ignore it :)).
Title: Re: [MOD] Media sites v1.10 (2010-07-04)
Post by: V@nо on July 04, 2010, 06:26:47 PM
What is in ACP or whatever you see in the browser is only a GUI, there is a code behind it that has to be executed in order to check validity of the input. You cannot just add keywords "youtube" or "google" and magically everything will work by itself, the code must already support such keywords.
It is more complicated that you might think ;)
Title: Re: [MOD] Media sites v1.10 (2010-07-04)
Post by: Sunny C. on July 04, 2010, 06:36:23 PM
I updates Step 1 + Step 4
But "http://www.megaupload.com/?d=UN6NIGRS" don't work!
Title: Re: [MOD] Media sites v1.10 (2010-07-04)
Post by: V@no on July 04, 2010, 08:54:50 PM
Ok, re-do step 1
should work now.
Title: Re: [MOD] Media sites v1.10 (2010-07-04)
Post by: Sunny C. on July 04, 2010, 08:59:07 PM
Best Thanks
Title: Re: [MOD] Media sites v1.10 (2010-07-04)
Post by: Sebas Bonito on July 13, 2010, 10:58:38 AM
To present the thumbnail as a standard picture for the Facebook-Sharing-Function I've add the following meta-tag in the header:

Code: [Select]
<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}">
As you can see, if you share a picture (of the details-page) in Facebook, it will present the original thumbnail; otherwise it will show a standard-picture for all the other pages. BUT the code above might be wrong for videos, cause {media_url} is the whole link to the video instead of the thumbnail-filename. What's the 4images-tag for the video-thumb? Is there a possibility?
Title: Re: [MOD] Media sites v1.10 (2010-07-04)
Post by: V@no on July 13, 2010, 02:07:08 PM
I'm not sure how all that worked for you in the first place. {media_url} by default is supposed to be ./data/media/ nothing else, same as {thumb_url} is ./data/thumbnails/

Anyway, the tag for thumbnail is {thumbnail_file_name}
Title: Re: [MOD] Media sites v1.10 (2010-07-04)
Post by: Sebas Bonito on July 13, 2010, 02:25:48 PM
Actually, I don't know, why {media_url} works for picture  :lol:

But many thanx, the tag {thumbnail_file_name} is what I've searched for.  :D
Title: Re: [MOD] Media sites v1.10 (2010-07-04)
Post by: Sunny C. on July 13, 2010, 08:53:53 PM
[Warning - Google Translate]

Hi Vano,

you can extend the modification for two pages?

I have uploaded a preview to show the url:
http://mp3upload.ca/music/view/26659

and
http://www39.zippyshare.com/v/35219254/file.html / but the url is in the download-button like this: http://www39.zippyshare.com/d/352192541a/1279046970/35219254.mp3

I will offer drums and beats on my new side. Because I have at disposal only one Webspace, I cannot offer the whole files myself and must fall back on external services. It would be really great if you can straighten the modification for it, also with pleasure as an enlargement

Edit: //

This dont work:
  "mp3upload"        => array("#^(http://(www\.)?mp3upload\.ca/music/(view|play)/([0-9]+)\(|.mp3))#",
                              3,
                              null,
                              null,
                              MS_BBCODE_YES,
                              "http://mp3upload.ca",
                              "", //works
                      ),

http://mp3upload.ca/music/view/26659
http://mp3upload.ca/music/play/26659.mp3
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: V@no on July 14, 2010, 06:24:08 AM
Quote from: Changes in v1.11
- CHANGED: thumbnail creation now using create_thumbnail() 4images function, not resize_image()
- ADDED: mp3upload.ca support
- ADDED: zippyshare support (audio only)
- REMOVED: myspacevideo support

To update, re-do Step 1 (http://www.4homepages.de/forum/index.php?topic=24054.msg131716#post_step1) and Step 4 (http://www.4homepages.de/forum/index.php?topic=24054.msg131716#post_step4)
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: zakaria666 on July 30, 2010, 08:41:34 PM
Helo Vano,

Great Mod, I was wondering sir, what does it exactly do, do you mean it lets User's for example put www.youtube.com/test1e3435 and then a video will be uploaded??

Also can certain user groups use this functionality and i can i set permissions? Sorry sir, first off the most important question also is do users upload video material to catergories???

Forgive me if i have not made my self clear, please dont hesititate to ask me if you didnt understand sir,

god bless u  and GREAT MOD
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: V@no on July 31, 2010, 01:25:44 AM
With this mod users will be able submit (not upload) url's to videos from supported by this mod sites. When a video submitted it will be showed by using that sites player. No actual video file being uploaded to your server, only a link to it.
As of user groups, this mod doesn't provide any additional permissions then what 4images already offers by default, meaning there is no way restrict/allow specific user group to specific media types, or specify what media types is allowed in specific category. However, if I recall correctly, such mods are exist and should work fine with media sites mod as well.
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: zakaria666 on July 31, 2010, 05:23:39 PM
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.

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 mentioned

god bless u sir
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: V@no on July 31, 2010, 05:52:00 PM
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 mentioned
Correct. 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)
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: zakaria666 on July 31, 2010, 07:50:27 PM
forgive me,

i just had a question i have never modded 4images before of mine so im a bit cautious,

i just wondered when u say

Find while ($image_row = $site_db->fetch_array($result)) {

and insert below

 /*
  MOD MEDIA SITES
  BEGIN INSERT
*/
      if (empty($image_row['image_download_url']) && $data = media_sites($image_row['image_media_file']))
        continue;
/*
  MOD MEDIA SITES
  END INSERT
*/

do you mean find the cound and inside the parentheses insert the following code and this is the reason u have an opening parenthese right?

Also when u ask us to find a specific code with no parentheses open and ask us to insert ABOVE,  $text = preg_replace($search_array, $replace_array, $text);  you mean find that specific code and hit a few enters to create space and then insert the specific code right above the code u have asked us.

sorry just wanted to make sure, im new at this modding thing.

1 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? thank u sir
god bless u mate
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: V@no on July 31, 2010, 09:37:20 PM
No, it's actually much simplier then you think ;)
You need find a specified line(s) of code, then insert the new code below that line(s) (or above) or replace that line(s) with new code.

For example after step 1 is done the code should look like this:
function check_remote_media($remote_media_file) {
/*
  MOD MEDIA SITES
  BEGIN INSERT
*/
  if (media_sites($remote_media_file))
    return 1;
/*
  MOD MEDIA SITES
  END INSERT
*/


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.
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: zakaria666 on August 20, 2010, 11:30:19 PM
@Vano

hello sir, i would love to know how i could add videos in bbcode for example a user putting [media] [/media] and inbetween the media tags put the video url and when the user submits on the comment it will display a video. That will be amazing, can u please teach me sir??

I hope so

thanks
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: V@no on August 21, 2010, 04:12:07 AM
nothing to teach about...
example:

[media]http://www.youtube.com/watch?v=urNyg1ftMIU[/media]
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: mralanizi on August 21, 2010, 08:57:32 AM
Hello,,

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.C om/Youtube/

i use the mod media sites v1.11 and i do like you'r topic

regards.
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: mralanizi on August 21, 2010, 04:50:31 PM
Hello.

i have some problem in my server when i istall that mood and upload video youtube , the site not work fine and be slow
and i aske my host and they say :
-----------------------------------------
Could you please contact your developer and let us know the necessary modules which are required for the script so that we can made the necessary changes in the server settings and make the script work fine. Or please provide us the server settings or phpinfo page of the server at which the script is working fine so that we can compare the settings and make the alterations
---------------------------------------

pleas nead help for that

Regards
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: mralanizi on August 21, 2010, 07:28:46 PM
aney one please i want the corect php.ini to make the mod work fine
or can i know what the necessary modules or functions

Regards
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: zakaria666 on August 21, 2010, 08:30:59 PM
@ VANO

Thank u sir, but i have 2 queries please if u can answer them, u not have to write long but few words plz sir,

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,

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,

just 2 queries i have,  thank u Vano and i appreciate time u taking out to help me
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: V@no on August 21, 2010, 08:59:08 PM
Hello,,

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.
This is what I get when trying visit your site:
Quote
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.

This is Error 500, which means something wrong on the server. Look in the server's error logs for more information about this error. As of configuration, I don't know what could cause the slowdown, so far you are the first person reporting this problem...

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...
P.S. As I've said before, when you talking about two different mods, it is good idea and extremely helpful when link to second mod is posted and if there is additional discussion involved, then link to it would be helpful as well.
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: mralanizi on August 21, 2010, 09:48:17 PM
Hello.
i aske my host and they say :
-----------------------------------------
Could you please contact your developer and let us know the necessary modules which are required for the script so that we can made the necessary changes in the server settings and make the script work fine. Or please provide us the server settings or phpinfo page of the server at which the script is working fine so that we can compare the settings and make the alterations
---------------------------------------

i just want to some one give me php.ini for his site and the script work fine in his site


regards
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: budduke on August 21, 2010, 10:07:41 PM
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...

Hi V@no, just wanted to give a little more info regarding the above. zakaria666 is using my user category mod
http://www.4homepages.de/forum/index.php?topic=24628.0 (http://www.4homepages.de/forum/index.php?topic=24628.0) and the user_multiupload.php inside it. As far as I can tell it does support remote files.
I entered one on my test site and it came through either by my multiupload or the normal member upload, but neither one creates a thumbnail for the remote files.
Even in the control panel running auto thumbnailer says none found. The only way I could get a thumbnail for a remote file was to link to it on the remote site when adding it, either by my multiupload or the normal member upload.
zakaria666 claims that when entering a remote path, your mediasites retrieves a thumbnail from the remote site. The only place that I see this might be happening is in your step 5.1
http://www.4homepages.de/forum/index.php?topic=24054.0#post_step5-1 (http://www.4homepages.de/forum/index.php?topic=24054.0#post_step5-1)
I looked through my mod and the normal one and I thought by entering that into my multiupload in the same area would fix the problem, but zakaria666 says it still did not work.

I do not have your mod loaded on my test server so I can not troubleshoot it any further. If you get a chance and can tell me if and what needs to be redone on my multiupload file so it will talk to your mod better I would appreciate it.
I am planning on redoing the mod and cleaning a bunch of stuff up on it and would like to get it right this time around.
Thanks for your help and any info you can give me.
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: zakaria6666 on August 22, 2010, 03:18:53 PM
Vano,

Budduke has replied to u asking for some advice but it seems it does not appear on this topic, i accidently stumbled upon buddukes comment when i went to click rpely and scrolled to the bottom and saw that budduke had left a message but when i went back to check it doesnt show buddukes message, here is his message

(http://i37.tinypic.com/ern6nc.jpg)

I have run into this a few times that when someone leaves a message i cannot notice it until i go and click the link 'reply' and fnd out by accident. Maybe there is a bug. Anyway, from the comment budduke kindly left,  i have tried exactly what he has asked me and i want to thank him for his kind help and assistence, however it does not seem to work. Thumbnails do not get created. Any ideas vano?
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: mralanizi on August 22, 2010, 06:50:15 PM
Tehse's what i finde in error log
--------------------------
[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;

---------

Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: budduke on August 23, 2010, 01:01:16 AM
@V@no,
Regarding zakaria6666 and my questions about thumbnails,
I have taken care of the issue. I installed your media site mod on my test server and it is pretty darn cool!
May place it out on my main site.

I placed the update to my mod for any users that need thumbnails using your mod and my user_multiupload.php file from my user categories mod.
http://www.4homepages.de/forum/index.php?topic=24628.msg150241#msg150241 (http://www.4homepages.de/forum/index.php?topic=24628.msg150241#msg150241)
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: zakaria666 on August 23, 2010, 05:52:43 PM
@mralanizi

I have exactly the same problem regarding teh logging out of the admin area. However Budduke did say he will fix this issue soon.

@Budduke,
Thanks again man, u r a genius, everything works perfect.
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: V@no on August 23, 2010, 07:00:22 PM
Tehse's what i finde in error log
--------------------------
[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;

---------


What is in includes/functions.php at line 2092 and between 2080 - 2100?

@budduke: thank you for taking time figure this out.
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: zakaria666 on August 26, 2010, 09:44:39 PM
omg 
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: achraf on August 28, 2010, 02:06:13 PM
Hello,

Thank you very much for any Mr. Vano

I have a small request has you,

I want integrated Rss of the Youtube videos in this form and thank you :

http://gdata.youtube.com/feeds/api/playlists/76F1FFC5F51DD34A
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: V@no on August 28, 2010, 10:23:44 PM
and what is the difference between this rss and playlists? playlists already supported.
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: achraf on August 29, 2010, 01:23:02 PM
thank you for your answer

the difference is in integration of the code in the jwplayer

I want de code . Thinks...
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: x23piracy on October 23, 2010, 06:38:08 PM
Hi,

how can i exclud youtube or other media sites from lightbox,
if i add a youtube to the lightbox and click the download button
the site only refreshs and nothing else happens.

How can turn that off?


Greetz X23
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: praveen on October 24, 2010, 08:26:02 AM
V@no - is it possible to add videos from a different source other than what is mentioned?
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: Sun Zaza on November 05, 2010, 09:15:42 PM
Thanks V@no for this awesome mod. I have a question: Is it possible to have the same width and height of the created thumbs on the media gallery?

Thanks in advance,
Cruxy
Title: Re: [MOD] Media sites v1.11 (2010-07-14)
Post by: bma2004 on December 22, 2010, 10:25:46 AM
Then you V@no!

*ENG*
But I do after installing the MOD as a "clean"4images, and at the ready site having the same problems:

1) YouTube - preview is created only if its size in the settings put 100 pixels (default). for another size - preview is not created: (
2) RuTube - preview is not created ..

how to solve these problems?

*RUS*
Но у меня после установки МОДа как на "чистую" 4images, так и на готовый сайт возникли одинаковые проблемы:

1) YouTube - превью создаётся только если его размер в настройках поставлен 100 (по умолчанию). при другом размере - превью не создаётся :(
2) RuTube - превью не создаётся..

как можно решить данные проблемы?


UPD
RuTube thumbnail FIX:

Open includes/media_sites.php
Find:
patern = array('#image=([a-z0-9%.]+'.preg_quote($match[4], "#").'[^&]+)&#i', '#<link rel="image_src" href="([^"]+)" />#im');

Replace with:
$patern = array('#image=([a-z0-9%.-]+'.preg_quote($match[4], "#").'[^&]+)&#i', '#<link rel="image_src" href="([^"]+)" />#im');
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: V@no on December 23, 2010, 02:23:02 AM
Thank you. Both issues fixed in v1.11.1
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: Sun Zaza on December 23, 2010, 02:26:34 AM
Hi V@no,

How can I change the width and height of the Youtube thumb?
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: V@no on December 23, 2010, 03:36:33 AM
This mod has no control how thumbnails are being created, it's done by 4images' built-in thumbnailer.
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: bma2004 on December 23, 2010, 08:10:29 PM
ENG
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) или увеличивался до размеров заданных в настройках, а для остальных - размеры беруться из настроек?
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: haider512 on December 28, 2010, 12:16:13 AM
very nice idea..
but how it works..
do we need to put media link..like youtube etc and also a thumbnail too??
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: V@no on December 28, 2010, 12:32:02 AM
ENG
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) или увеличивался до размеров заданных в настройках, а для остальных - размеры беруться из настроек?
I'm not quiet understand the question, would you give an example, like what size should change and which shouldn't...


very nice idea..
but how it works..
do we need to put media link..like youtube etc and also a thumbnail too??
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)
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: Sun Zaza on December 28, 2010, 12:49:28 AM
Hi V@no,

I will be very nice if I can have an separate upload page only for media site. How can we do that?

Thanks in advance,
Cruxy
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: V@no on December 28, 2010, 12:56:48 AM
Maybe: How to add a new, custom template page (http://www.4homepages.de/forum/index.php?topic=4996.0) ?
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: Warrior on April 17, 2011, 10:15:11 PM
You have this in the media-sites.php:

"youtube"          => array("#^http://([^.]+\.)?youtube\.com/(watch_private|watch)\\\\?.*[?&]v=([^&]+)#",
3,
"http://www.youtube.com/v/{ID}",
null,
MS_BBCODE_YES,
"http://www.youtube.com",
"http://img.youtube.com/vi/{ID}/default.jpg", //works
),

I have found that
Code: [Select]
http://img.youtube.com/vi/{ID}/hqdefault.jpgwill produce an image much larger than the default thumb youtube provides.

I changed your above code to hqdefault.jpg.
How would I write an IF command in there, if the hqdefault.jpg image doesn't exist, then it can go with the normal default.jpg image?
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: Sleepy on May 21, 2011, 04:50:16 AM
Great MOD for media sites! ^_^
Thank you very much.
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: Sunny C. on May 21, 2011, 02:18:58 PM
Pls add
http://www.videozer.com/
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: Guldstrand on June 16, 2011, 01:32:15 AM
Is there a way to grab/extract images (instead of videos) with this mod?
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: slash0r on July 26, 2011, 05:29:51 PM
Works great.
But my template is wider than default one. How can I make YT video window bigger?
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: Hagen-Roderich on August 02, 2011, 10:04:14 AM
Works great.
But my template is wider than default one. How can I make YT video window bigger?

http://www.4homepages.de/forum/index.php?topic=24054.0#post_tweak3
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: ProrokBDG on August 12, 2011, 06:04:15 PM
Why can not I send links? It shows me that I need to upload a photo. Could someone send me the files modified functions.php and member.php?
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: Tino23 on October 15, 2011, 08:20:51 PM
Gibts denn schon eine neue Version 1.12? Zumindest ist das ja auf der DEMO Seite so http://4images.vano.org/ajaxcomments/categories.php?cat_id=4 (http://4images.vano.org/ajaxcomments/categories.php?cat_id=4) :wink:
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: ASAD on October 16, 2011, 08:16:15 PM
Das Archiv ist beschädigt

Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: V@no on October 16, 2011, 10:11:07 PM
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ädigt
Clear your browser's cache and try re-download. File is fine when I download it with FF7, IE9, Chrome16
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: ASAD on October 16, 2011, 10:48:16 PM
funktioniert, weis nicht warum zeigt ob es beschedigt...
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: Minimaxer on December 26, 2011, 11:31:26 PM
Hallo ist das Mod noch aktuell? Möchte Videos von vimeo einbinden - nur was gebe ich bei Bilder Hinzufügen(im Control Panel) im Feld URL: ein? Die Videos werden doch nur verlinkt oder? Z.B. "xxx: vimeoxxx: /32740964" wird nicht gefunden, der embed code funktioniert auch nicht.
Wer schön wenn jemand ein Idee hat:-)

Vielen Dank
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: V@no on December 27, 2011, 02:40:05 AM
Hello. Welcome to 4images forum.

I just tried on my demo site and url http://www.vimeo.com/32740964 added just fine:
http://4images.vano.org/ajaxcomments/details.php?image_id=155
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: wessidewb on December 30, 2011, 04:17:14 AM
Hello, I am getting
Fatal error: Call to undefined function media_sites() in /home/content/59/8661859/html/media/member.php on line 500

line 500 in regards to step 5:

/*
  MOD MEDIA SITES
  BEGIN INSERT
*/
  if ($media_sites_data = media_sites($remote_media_file))
    $remote_media_file = $media_sites_data[1]['media_src'];
/*
  MOD MEDIA SITES
  END INSERT
*/





Using  1.7.10 , thanks
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: V@no on December 30, 2011, 04:55:11 AM
Welcome to 4images forum.
You've missed Step 2.3 (http://www.4homepages.de/forum/index.php?topic=24054.0#post_step2-3)
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: wessidewb on December 30, 2011, 05:02:15 AM
My mistake, I did not read your instructions fully. User error. thank you it is working
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: anton9000 on March 11, 2012, 04:58:55 PM
Hello
How can I add videos from this site xvideos.com
Help me please. This site contains materials of 18 +
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: Sleepy on May 04, 2012, 01:56:45 PM
Vano, first, thanks for the great MOD.
I remember I've installed the MOD correctly and it worked fine.

I haven't uploaded video (link) for a while and just uploaded one.
However, I found that the system could not create thumbnail file, but gave me the following wrong message:

Warning: getimagesize(http://vimeo.com/41550673&width=480&height=360) [function.getimagesize]: failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found in /home/sleepyi/public_html/album/admin/thumbnailer.php on line 133


Would you please let me know how to fix it?
The only site change I made after the media MOD correctly installed is to upgrade to 1.7.10.
Would that be a reason causing the problem?

Thank you very much.
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: Sunny C. on May 30, 2012, 03:43:49 PM
Zippyshare support for FLV
http://www33.zippyshare.com/v/13498305/file.html
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: limits on November 16, 2012, 06:50:54 PM
hab versucht das ding in die neuste version 1.7.11  einzubauen, weil ichs unter den top 100 mawenzi mods fand.
scheint wohl nichtmehr zu funktionieren, oder hat es jemand geschaft?

ausserdem ist mir bei der fehlersuche was aufgefallen, bei step 2.3 steht:
Quote
At the end, above closing ?> insert:
am ende nach closing ?> einfuegen ?????

verstehe ich da was falsch, oder ist das ein fehler der jahrelang niemand bemerkt hat?
kann ja nicht sein nach dem ende nochwas einzufuegen.

jedenfalls interessiert mich ob der mod noch funktioniert, bevor ich mich weiter damit rumaergere.
bin fuer jeden tip dankbar.
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: Rembrandt on November 16, 2012, 08:04:52 PM
Hi!
...am ende nach closing ?> einfuegen ?????

verstehe ich da was falsch, ....

nicht nach, sondern oberhalb (oben). (...am ende, oberhalb von "?>" )

mfg Andi
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: Jan-Lukas on November 17, 2012, 10:56:43 PM
oder um es noch einfacher zu sagen vor dem "?>"  :wink:

würde dann so aussehen, also kein Fehler übersehen, nur Brille wechseln ;)


/*
  MOD MEDIA SITES
  BEGIN INSERT
*/
include(ROOT_PATH."includes/media_sites.php");
/*
  MOD MEDIA SITES
  END INSERT
*/
?>
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: Sunny C. on June 06, 2013, 07:41:17 PM
Please add http://www.ecostream.tv/

This dont work:

ecostream.html
Code: [Select]
<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&amp;image=http://www.ecostream.tv/assets/img/player-bg.jpg&amp;provider=http&amp;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&amp;image=http://www.ecostream.tv/assets/img/player-bg.jpg&amp;provider=http&amp;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)#",
2,
null,
null,
MS_BBCODE_YES,
"http://www.ecostream.tv",
"", //no thumb//works
),

Video: http://www.ecostream.tv/stream/7f7b3a3419642417b94d38d57d6128fc.html
Video Play: http://www.ecostream.tv/stream/7f7b3a3419642417b94d38d57d6128fc.html?ss=1
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: webpit on September 18, 2014, 11:39:41 AM
pls add https://soundcloud.com/  if it is possible .. thank you..
or if there is any tutorial to add some more media site..

tx
rgds
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: rakesh.2994 on May 09, 2015, 04:12:55 PM
please add gameozo (http://www.gameozo.com) ..
if possible thanks regards
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: Tino23 on June 10, 2015, 07:50:37 PM
Kann man https Unterstützung mit Einbauen? Ich muss immer die Links erst in http umändern damit es geht (Youtube)
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: .Infecto on June 14, 2015, 04:21:08 PM
Das wird offenbar nicht mehr aktuell gehalten :/
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: Tino23 on June 22, 2015, 07:42:10 PM
Na man kann ja mal hoffen, vieleicht gibts die Unterstützung von https in der Version 2.0 von 4images die mal vor längerer Zeit im Gespräch war.... 8)
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: Jan-Lukas on June 24, 2015, 09:19:24 PM
Bin ja auch nicht der große Fachmann, nur ich hätte wenigstens mir mal die Dateien angesehen, und versucht das zu ändern.

z.B. hier ändern, oder https hinzufügen
"youtube"          => array("#^http://([^.]+\.)?youtube\.com/(watch_private|watch)\\\\?.*[?&]v=([^&]+)#",
3,
"http://www.youtube.com/v/{ID}",
null,
MS_BBCODE_YES,
"http://www.youtube.com",
"http://img.youtube.com/vi/{ID}/default.jpg", //works


Code: [Select]
<!-- 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>

Ob das was bringt hätte ich dann bestimmt erfahren  :wink:
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: Warrior on June 25, 2015, 04:05:29 PM
To add the "s" in the https for youtube, I just copied everything for the regular youtube coding, adding the "s". This includes making a new template, etc. Works like a charm :)
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: Jan-Lukas on June 25, 2015, 08:42:12 PM
Sag ich doch, wenn man will klappt es auch ;)
Einfach probieren, solange man ein Backup hat, kann nicht viel passieren.

Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: Tino23 on September 25, 2015, 03:31:39 PM
Das geht soweit schon, bloß mit dem Fehler das danach alle alten Links die schon in der Datenbank sind nicht mehr gehen und ich alle mit der Hand von http auf https Umstellen müsste...
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: darkcurves on December 17, 2016, 06:12:28 AM
Does this MOD work with the latest version of 4images? Thank you.
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: nobby on December 17, 2016, 10:40:22 AM
Does this MOD work with the latest version of 4images? Thank you.

Hi,

use Google Translate, then you know it  :wink:

https://translate.google.com/translate?sl=de&tl=en&lw=on&u=http%3A%2F%2Fwww.4homepages.de%2Fforum%2Findex.php%3Ftopic%3D24054.msg166653%3Btopicseen%23msg166653&a=http%3A%2F%2Fwww.4homepages.de%2Fforum%2Findex.php&from=&to=de (https://translate.google.com/translate?sl=de&tl=en&lw=on&u=http%3A%2F%2Fwww.4homepages.de%2Fforum%2Findex.php%3Ftopic%3D24054.msg166653%3Btopicseen%23msg166653&a=http%3A%2F%2Fwww.4homepages.de%2Fforum%2Findex.php&from=&to=de)

nobby
Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: Tino23 on January 02, 2018, 08:17:26 PM
Da sich ja doch wieder einiges geändert hat und die Videos nur noch im Firefox liefen, hab ich die youtube.html folgendermaßen geändert

Code: [Select]
<!-- 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>

Title: Re: [MOD] Media sites v1.11.1 (2010-12-22)
Post by: Warrior on April 20, 2020, 07:21:45 AM
I know this is a rather old MOD, but believe it or not, it still  works on v.1.8 (which works in this PHP7+ world)!

I did notice something though due to a change I made on the general usage of my Gallery - I normally do NOT allow BB code in the comments, so this issue never showed up before. I turned them on and discovered that this code from this MOD was wiping out the text for Description and Comments -

From includes/Functions:
Find:
Code: [Select]
    $text = preg_replace($search_array, $replace_array, $text);
Insert above:

Code: [Select]
/*
  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.