Index: extensions/gvideo/admin/add.php
===================================================================
--- extensions/gvideo/admin/add.php	(revision 28227)
+++ extensions/gvideo/admin/add.php	(revision 28268)
@@ -9,44 +9,62 @@
 {
   $_POST['url'] = trim($_POST['url']);
-  // check inputs
-  if (empty($_POST['url']))
+  $_POST['add_film_frame'] = isset($_POST['add_film_frame']);
+  
+  if ($_POST['mode'] == 'provider')
   {
-    $page['errors'][] = l10n('Please fill the video URL');
+    // check inputs
+    if (empty($_POST['url']))
+    {
+      $page['errors'][] = l10n('Please fill the video URL');
+    }
+    else if ( ($video = parse_video_url($_POST['url'], isset($_POST['safe_mode']))) === false )
+    {
+      if (isset($_POST['safe_mode']))
+      {
+        $page['errors'][] = l10n('an error happened');
+      }
+      else
+      {
+        $page['errors'][] = l10n('Unable to contact host server');
+        $page['errors'][] = l10n('Try in safe-mode');
+      }
+      $_POST['safe_mode'] = true;
+    }
+
+    if (count($page['errors']) == 0)
+    {
+      if ($_POST['size_common'] == 'true')
+      {
+        $_POST['width'] = $_POST['height'] = '';
+      }
+      else if (!preg_match('#^([0-9]+)$#', $_POST['width']) or !preg_match('#^([0-9]+)$#', $_POST['height']))
+      {
+        $page['errors'][] = l10n('Width and height must be integers');
+        $_POST['width'] = $_POST['height'] = '';
+      }
+      if ($_POST['autoplay_common'] == 'true')
+      {
+        $_POST['autoplay'] = '';
+      }
+      
+      $image_id = add_video($video, $_POST);
+    }
   }
-  else if ( ($video = parse_video_url($_POST['url'], isset($_POST['safe_mode']))) === false )
+  else
   {
-    if (isset($_POST['safe_mode']))
+    $_POST['embed_code'] = trim($_POST['embed_code']);
+    
+    if (empty($_POST['embed_code']))
     {
-      $page['errors'][] = l10n('an error happened');
+      $page['errors'][] = l10n('Please fill the embed code');
     }
     else
     {
-      $page['errors'][] = l10n('Unable to contact host server');
-      $page['errors'][] = l10n('Try in safe-mode');
+      $image_id = add_video_embed($_POST);
     }
-    $_POST['safe_mode'] = true;
   }
-
-  if (count($page['errors']) == 0)
+  
+  if (isset($image_id))
   {
-    if ($_POST['size_common'] == 'true')
-    {
-      $_POST['width'] = $_POST['height'] = '';
-    }
-    else if (!preg_match('#^([0-9]+)$#', $_POST['width']) or !preg_match('#^([0-9]+)$#', $_POST['height']))
-    {
-      $page['errors'][] = l10n('Width and height must be integers');
-      $_POST['width'] = $_POST['height'] = '';
-    }
-    if ($_POST['autoplay_common'] == 'true')
-    {
-      $_POST['autoplay'] = '';
-    }
-    $_POST['add_film_frame'] = isset($_POST['add_film_frame']);
-    
-    
-    $image_id = add_video($video, $_POST);
-    
-    
     $query = '
 SELECT id, name, permalink
Index: extensions/gvideo/admin/photo.php
===================================================================
--- extensions/gvideo/admin/photo.php	(revision 28227)
+++ extensions/gvideo/admin/photo.php	(revision 28268)
@@ -45,99 +45,123 @@
 if (isset($_POST['save_properties']))
 {
-  // check inputs
-  if (empty($_POST['url']))
-  {
-    $page['errors'][] = l10n('Please fill the video URL');
-  }
-  else if ($gvideo['url']!=$_POST['url'])
-  {
-    if ( ($video = parse_video_url($_POST['url'], isset($_POST['safe_mode']))) === false )
-    {
-      if (isset($_POST['safe_mode']))
-      {
-        $page['errors'][] = l10n('an error happened');
-      }
-      else
-      {
-        $page['errors'][] = l10n('Unable to contact host server');
-        $page['errors'][] = l10n('Try in safe-mode');
-      }
-    }
-  }
-  else
-  {
-    $video = $gvideo;
-  }
-  
-  if (count($page['errors']) == 0)
-  {
-
-    if ( $gvideo['url'] != $video['url'] )
-    {
-      // download thumbnail
-      $thumb_ext = empty($video['thumbnail']) ? 'jpg' : get_extension($video['thumbnail']);
-      $thumb_name = $video['type'].'-'.$video['video_id'].'-'.uniqid().'.'.$thumb_ext;
-      $thumb_source = $conf['data_location'].$thumb_name;
+  $_POST['url'] = trim($_POST['url']);
+  
+  if ($gvideo['type'] != 'embed')
+  {
+    // check inputs
+    if (empty($_POST['url']))
+    {
+      $page['errors'][] = l10n('Please fill the video URL');
+    }
+    else if ($gvideo['url']!=$_POST['url'])
+    {
+      if ( ($video = parse_video_url($_POST['url'], isset($_POST['safe_mode']))) === false )
+      {
+        if (isset($_POST['safe_mode']))
+        {
+          $page['errors'][] = l10n('an error happened');
+        }
+        else
+        {
+          $page['errors'][] = l10n('Unable to contact host server');
+          $page['errors'][] = l10n('Try in safe-mode');
+        }
+      }
+    }
+    else
+    {
+      $video = $gvideo;
+    }
+    
+    if (count($page['errors']) == 0)
+    {
+
+      if ($gvideo['url'] != $video['url'])
+      {
+        // download thumbnail
+        $thumb_ext = empty($video['thumbnail']) ? 'jpg' : get_extension($video['thumbnail']);
+        $thumb_name = $video['type'].'-'.$video['video_id'].'-'.uniqid().'.'.$thumb_ext;
+        $thumb_source = $conf['data_location'].$thumb_name;
+        
+        if (empty($video['thumbnail']) or gvideo_download_remote_file($video['thumbnail'], $thumb_source) !== true)
+        {
+          $thumb_source = $conf['data_location'].get_filename_wo_extension($thumb_name).'.jpg';
+          copy(GVIDEO_PATH.'mimetypes/'.$video['type'].'.jpg', $thumb_source);
+        }
+        
+        // add image and update infos
+        $image_id = add_uploaded_file($thumb_source, $thumb_name, null, null, $_GET['image_id']);
+        
+        $updates = array(
+          'name' => pwg_db_real_escape_string($video['title']),
+          'author' => pwg_db_real_escape_string($video['author']),
+          'is_gvideo' => 1,
+          );
+          
+        if ($_POST['sync_description'] and !empty($video['description']))
+        {
+          $updates['comment'] = pwg_db_real_escape_string($video['description']);
+        }
+        else
+        {
+          $updates['comment'] = null;
+        }
+        if ($_POST['sync_tags'] and !empty($video['tags']))
+        {
+          set_tags(get_tag_ids(implode(',', $video['tags'])), $image_id);
+        }
+        
+        single_update(
+          IMAGES_TABLE,
+          $updates,
+          array('id' => $_GET['image_id']),
+          true
+          );
+      }
       
-      if (empty($video['thumbnail']) or gvideo_download_remote_file($video['thumbnail'], $thumb_source) !== true)
-      {
-        $thumb_source = $conf['data_location'].get_filename_wo_extension($thumb_name).'.jpg';
-        copy(GVIDEO_PATH.'mimetypes/'.$video['type'].'.jpg', $thumb_source);
-      }
-      
-      // add image and update infos
-      $image_id = add_uploaded_file($thumb_source, $thumb_name, null, null, $_GET['image_id']);
+      // register video
+      if ($_POST['size_common'] == 'true')
+      {
+        $_POST['width'] = $_POST['height'] = '';
+      }
+      else if (!preg_match('#^([0-9]+)$#', $_POST['width']) or !preg_match('#^([0-9]+)$#', $_POST['height']))
+      {
+        $page['errors'][] = l10n('Width and height must be integers');
+        $_POST['width'] = $_POST['height'] = '';
+      }
+      if ($_POST['autoplay_common'] == 'true')
+      {
+        $_POST['autoplay'] = '';
+      }
       
       $updates = array(
-        'name' => pwg_db_real_escape_string($video['title']),
-        'author' => pwg_db_real_escape_string($video['author']),
-        'is_gvideo' => 1,
+        'url' => $video['url'],
+        'type' => $video['type'],
+        'video_id' => $video['video_id'],
+        'width' => $_POST['width'],
+        'height' => $_POST['height'],
+        'autoplay' => $_POST['autoplay'],
         );
-        
-      if ($_POST['sync_description'] and !empty($video['description']))
-      {
-        $updates['comment'] = pwg_db_real_escape_string($video['description']);
-      }
-      else
-      {
-        $updates['comment'] = null;
-      }
-      if ($_POST['sync_tags'] and !empty($video['tags']))
-      {
-        set_tags(get_tag_ids(implode(',', $video['tags'])), $image_id);
-      }
-      
-      single_update(
-        IMAGES_TABLE,
-        $updates,
-        array('id' => $_GET['image_id']),
-        true
+    }
+  }
+  else
+  {
+    $_POST['embed_code'] = trim($_POST['embed_code']);
+    
+    if (empty($_POST['embed_code']))
+    {
+      $page['errors'][] = l10n('Please fill the embed code');
+    }
+    else
+    {
+      $updates = array(
+        'url' => $_POST['url'],
+        'embed' => stripslashes($_POST['embed_code']),
         );
     }
-    
-    // register video
-    if ($_POST['size_common'] == 'true')
-    {
-      $_POST['width'] = $_POST['height'] = '';
-    }
-    else if (!preg_match('#^([0-9]+)$#', $_POST['width']) or !preg_match('#^([0-9]+)$#', $_POST['height']))
-    {
-      $page['errors'][] = l10n('Width and height must be integers');
-      $_POST['width'] = $_POST['height'] = '';
-    }
-    if ($_POST['autoplay_common'] == 'true')
-    {
-      $_POST['autoplay'] = '';
-    }
-    
-    $updates = array(
-      'url' => $video['url'],
-      'type' => $video['type'],
-      'video_id' => $video['video_id'],
-      'width' => $_POST['width'],
-      'height' => $_POST['height'],
-      'autoplay' => $_POST['autoplay'],
-      );
-      
+  }
+  
+  if (isset($updates))
+  {
     single_update(
       GVIDEO_TABLE,
Index: extensions/gvideo/admin/template/add.tpl
===================================================================
--- extensions/gvideo/admin/template/add.tpl	(revision 28227)
+++ extensions/gvideo/admin/template/add.tpl	(revision 28268)
@@ -17,4 +17,12 @@
   $(".providersInfo").toggle();
 });
+jQuery(".radio input").on('change', function() {
+  if (jQuery(this).is(':checked')) {
+    var mode = jQuery(this).val();
+    
+    jQuery('.'+mode+'-hide').hide();
+    jQuery('.'+mode+'-show').show();
+  }
+}).trigger('change');
 {/footer_script}
 
@@ -24,5 +32,14 @@
 </div>
 
-<form method="post" action="" class="properties">
+<form method="post" action="" class="properties" enctype="multipart/form-data">
+  <div class="radio">
+    <input type="radio" name="mode" value="provider" id="mode_provider" {if $POST.mode!="embed"}checked{/if}><label for="mode_provider">{'Add video from hosting platform'|translate}</label><!--
+    --><input type="radio" name="mode" value="embed" id="mode_embed" {if $POST.mode=="embed"}checked{/if}><label for="mode_embed">{'Add video from embed code'|translate}</label>
+  </div>
+  
+  <div class="warnings custom-warn embed-show provider-hide">
+    <ul><li>{'Do not use this form for videos provided by Youtube, Dailymotion, Vimeo, Wat or Wideo.'|translate}</li></ul>
+  </div>
+
 <fieldset>
   <legend>{'Properties'|translate}</legend>
@@ -38,21 +55,34 @@
       {'... or '|translate}<a href="#" class="addAlbumOpen" title="{'create a new album'|translate}">{'create a new album'|translate}</a>
     </li>
+    <li class="embed-show provider-hide">
+      <label>
+        <span class="property">{'Title'|translate}</span>
+        <input type="text"name="title" value="{$POST.title}" style="width:400px;">
+      </label>
+    </li>
     <li>
       <label>
-        <span class="property">{'Video URL'|translate}</span>
+        <span class="property">{'Video URL'|translate} <small class="embed-show provider-hide">({'optional'|translate})</small></span>
         <input type="text" name="url" value="{$POST.url}" style="width:400px;">
       </label>
     </li>
-  {if $gd_available}
-    <li>
-      <span class="property">{'Thumbnail'|translate}</span>
+    <li class="embed-show provider-hide">
+      <label>
+        <span class="property">{'Embed code'|translate}</span>
+        <textarea name="embed_code" style="width:400px;height:80px;">{$POST.embed_code}</textarea>
+      </label>
+    </li>
+    <li class="embed-show {if $gd_available}provider-show{else}provider-hide{/if}">
+      <span class="property">{'Thumbnail'|translate} <small class="embed-show provider-hide">({'optional'|translate})</small></span>
+      <input type="file" size="20" name="thumbnail_file" class="embed-show provider-hide">
+    {if $gd_available}
       <label><input type="checkbox" name="add_film_frame" value="true" {if $POST.add_film_frame}checked="checked"{/if}> {'Add film effect'|translate} </label>
       <a class="icon-info-circled-1 showInfo" title="<img src='{$GVIDEO_PATH}admin/template/example-frame.jpg'>"></a>
+    {/if}
     </li>
-  {/if}
   </ul>  
 </fieldset>
 
-<fieldset>
+<fieldset class="embed-hide provider-show">
   <legend>{'Configuration'|translate}</legend>
   
@@ -94,9 +124,12 @@
 <p style="text-align:left;">
   <input type="submit" name="add_video" value="{'Add'|translate}">
-  <label style="font-weight:bold;"><input type="checkbox" name="safe_mode" {if $POST.safe_mode}checked="checked"{/if}> {'Safe-mode'|translate}</label>
-  <a class="icon-info-circled-1 showInfo" title="{'In safe-mode, the plugin does\'t try to contact the video host, usefull on some websites where remote connections are blocked.'|translate|escape:html}"></a>
+  
+  <span class="embed-hide provider-show">
+    <label style="font-weight:bold;"><input type="checkbox" name="safe_mode" {if $POST.safe_mode}checked="checked"{/if}> {'Safe-mode'|translate}</label>
+    <a class="icon-info-circled-1 showInfo" title="{'In safe-mode, the plugin does\'t try to contact the video host, usefull on some websites where remote connections are blocked.'|translate|escape:html}"></a>
+  </span>
 </p>
 
-<fieldset style="margin-top:40px;">
+<fieldset style="margin-top:40px;" class="embed-hide provider-show">
   <legend>{'Supported services'|translate}</legend>
   
Index: extensions/gvideo/admin/template/photo.tpl
===================================================================
--- extensions/gvideo/admin/template/photo.tpl	(revision 28227)
+++ extensions/gvideo/admin/template/photo.tpl	(revision 28268)
@@ -1,4 +1,5 @@
 {combine_css path=$GVIDEO_PATH|cat:'admin/template/style.css'}
 
+{if $GVIDEO.type != 'embed'}
 {footer_script}
 jQuery("input[data-toggle]").change(function() {
@@ -24,4 +25,5 @@
 });
 {/footer_script}
+{/if}
 
 
@@ -64,4 +66,5 @@
     </p>
     
+    {if $GVIDEO.type != 'embed'}
     <p class="video_update">
       <b>{'Get video description'|translate}</b>
@@ -97,8 +100,14 @@
       </span>
     </p>
-
+    {else}
+    <p>
+      <b>{'Embed code'|translate}</b><br>
+      <textarea name="embed_code" style="width:400px;height:80px;">{$GVIDEO.embed}</textarea>
+    </p>
+    {/if}
+    
     <p style="margin:0;">
-      <label style="font-weight:bold;"><input type="checkbox" name="safe_mode"> {'Safe-mode'|translate}</label>
-      <br>
+      {if $GVIDEO.type != 'embed'}<label style="font-weight:bold;"><input type="checkbox" name="safe_mode"> {'Safe-mode'|translate}</label>
+      <br>{/if}
       <input class="submit" type="submit" value="{'Save Settings'|translate}" name="save_properties">
     </p>
Index: extensions/gvideo/admin/template/style.css
===================================================================
--- extensions/gvideo/admin/template/style.css	(revision 28227)
+++ extensions/gvideo/admin/template/style.css	(revision 28268)
@@ -64,2 +64,43 @@
   font-size:0.9em;
 }
+
+.radio {
+  margin-left:2em;
+}
+.radio input {
+  display:none;
+}
+.radio label {
+  display:inline-block;
+  background:#fff;
+  border:1px solid #ddd;
+  border-left-width:0;
+  padding:5px 10px;
+}
+  .radio label:first-of-type {
+    border-left-width:1px;
+    border-radius:5px 0 0 5px;
+  }
+  .radio label:last-of-type {
+    border-radius:0 5px 5px 0;
+  }
+  .radio input:checked + label {
+    background:#C6FF91;
+    background:linear-gradient(to bottom, #C6FF91, #A5E06D);
+    border-color:#A5E06D;
+    text-shadow:1px 1px 0 white;
+  }
+
+.custom-warn {
+  background-image:none;
+  padding:2px 5px;
+  margin-left:2em;
+  border-radius:5px;
+  min-height:0;
+  display:inline-block;
+}
+  .custom-warn ul li {
+    clear:none;
+    list-style:none;
+    margin:0 !important;
+  }
Index: extensions/gvideo/include/events.inc.php
===================================================================
--- extensions/gvideo/include/events.inc.php	(revision 28227)
+++ extensions/gvideo/include/events.inc.php	(revision 28268)
@@ -23,5 +23,5 @@
       $template->assign(array(
         'GVIDEO_PATH' => GVIDEO_PATH,
-        'U_GVIDEO_EDIT' => GVIDEO_ADMIN.'-photo&amp;image_id='.$picture['current']['id'],
+        'U_GVIDEO_EDIT' => get_root_url().GVIDEO_ADMIN.'-photo&amp;image_id='.$picture['current']['id'],
         ));
 
@@ -105,6 +105,13 @@
   }
 
-  $template->set_filename('gvideo_content', realpath(GVIDEO_PATH . 'template/video_'.$video['type'].'.tpl'));
-  return $template->parse('gvideo_content', true);
+  if ($video['type'] == 'embed')
+  {
+    return $video['embed'];
+  }
+  else
+  {
+    $template->set_filename('gvideo_content', realpath(GVIDEO_PATH . 'template/video_'.$video['type'].'.tpl'));
+    return $template->parse('gvideo_content', true);
+  }
 }
 
@@ -120,2 +127,29 @@
   pwg_query($query);
 }
+
+/**
+ * add a prefilter to the Batch Downloader
+ */
+function gvideo_add_prefilter($prefilters)
+{
+	$prefilters[] = array(
+    'ID' => 'gvideo',
+    'NAME' => l10n('Videos'),
+  );
+  
+	return $prefilters;
+}
+
+/**
+ * perform added prefilter
+ */
+function gvideo_apply_prefilter($filter_sets, $prefilter)
+{
+  if ($prefilter == 'gvideo')
+  {
+    $query = 'SELECT picture_id FROM '.GVIDEO_TABLE.';';
+    $filter_sets[] = query2array($query, null, 'picture_id');
+  }
+  
+	return $filter_sets;
+}
Index: extensions/gvideo/include/functions.inc.php
===================================================================
--- extensions/gvideo/include/functions.inc.php	(revision 28227)
+++ extensions/gvideo/include/functions.inc.php	(revision 28268)
@@ -346,4 +346,98 @@
 
 /**
+ * @params:
+ *  $config :
+ *    - url, string
+ *    - category, integer
+ *    - add_film_frame, boolean
+ *    - title, string
+ *    - embed_code, string
+ */
+function add_video_embed($config)
+{
+  global $page, $conf;
+  
+  $query = '
+SELECT picture_id
+  FROM '.GVIDEO_TABLE.'
+  WHERE url = "'.$config['url'].'"
+;';
+  $result = pwg_query($query);
+  
+  if (pwg_db_num_rows($result))
+  {
+    $page['warnings'][] = l10n('This video was already registered');
+    list($image_id) = pwg_db_fetch_row($result);
+    return $image_id;
+  }
+  
+  include_once(PHPWG_ROOT_PATH . 'admin/include/functions_upload.inc.php');
+  
+  // upload thumbnail
+  if (isset($_FILES['thumbnail_file']) && $_FILES['thumbnail_file']['error'] === UPLOAD_ERR_OK)
+  {
+    $source_filepath = $_FILES['thumbnail_file']['tmp_name'];
+    list(,, $type) = getimagesize($source_filepath);
+    
+    if (IMAGETYPE_PNG == $type || IMAGETYPE_GIF == $type || IMAGETYPE_JPEG == $type)
+    {
+      $thumb_name = $_FILES['thumbnail_file']['name'];
+      $thumb_source = $conf['data_location'].$thumb_name;
+      move_uploaded_file($source_filepath, $thumb_source);
+    }
+  }
+  
+  if (!isset($thumb_source))
+  {
+    $thumb_name = 'embed-'.uniqid().'.jpg';
+    $thumb_source = $conf['data_location'].$thumb_name;
+    copy(GVIDEO_PATH.'mimetypes/any.jpg', $thumb_source);
+  }
+  
+  if ($config['add_film_frame'])
+  {
+    add_film_frame($thumb_source);
+  }
+  
+  // add image and update infos
+  $image_id = add_uploaded_file($thumb_source, $thumb_name, array($config['category']));
+  
+  if (empty($config['title']))
+  {
+    $config['title'] = get_filename_wo_extension($thumb_name);
+  }
+  
+  $updates = array(
+    'name' => pwg_db_real_escape_string($config['title']),
+    'is_gvideo' => 1,
+    );
+  
+  single_update(
+    IMAGES_TABLE,
+    $updates,
+    array('id' => $image_id),
+    true
+    );
+
+  $insert = array(
+    'picture_id' => $image_id,
+    'url' => $config['url'],
+    'type' => 'embed',
+    'video_id' => 'embed',
+    'width' => '',
+    'height' => '',
+    'autoplay' => '',
+    'embed' => $config['embed_code']
+    );
+  var_dump($insert);
+  single_insert(
+    GVIDEO_TABLE,
+    $insert
+    );
+    
+  return $image_id;
+}
+
+/**
  * test if a download method is available
  * @return: bool
Index: extensions/gvideo/language/en_UK/plugin.lang.php
===================================================================
--- extensions/gvideo/language/en_UK/plugin.lang.php	(revision 28227)
+++ extensions/gvideo/language/en_UK/plugin.lang.php	(revision 28268)
@@ -35,4 +35,13 @@
 $lang['Videos can be private if you use the private permalink.'] = 'Videos can be private if you use the private permalink.';
 $lang['No privacy option.'] = 'No privacy option.';
+$lang['Add video from embed code'] = 'Add video from embed code';
+$lang['Add video from hosting platform'] = 'Add video from hosting platform';
+$lang['Embed code'] = 'Embed code';
+$lang['optional'] = 'optional';
+$lang['Please fill the embed code'] = 'Please fill the embed code';
+$lang['This video was already registered'] = 'This video was already registered';
+$lang['Videos'] = 'Videos';
+$lang['Width and height must be integers'] = 'Width and height must be integers';
+$lang['Do not use this form for videos provided by Youtube, Dailymotion, Vimeo, Wat or Wideo.'] = 'Do not use this form for videos provided by Youtube, Dailymotion, Vimeo, Wat or Wideo.';
 
 ?>
Index: extensions/gvideo/language/fr_FR/plugin.lang.php
===================================================================
--- extensions/gvideo/language/fr_FR/plugin.lang.php	(revision 28227)
+++ extensions/gvideo/language/fr_FR/plugin.lang.php	(revision 28268)
@@ -35,4 +35,13 @@
 $lang['Videos can be private if you use the private permalink.'] = 'Les videos peuvent être privées si vous utilisez le permalink privé.';
 $lang['No privacy option.'] = 'Pas d\'option de privacité.';
+$lang['Add video from embed code'] = 'Ajouter un code d\'intégration';
+$lang['Add video from hosting platform'] = 'Ajouter depuis une plateforme d\'hébergement';
+$lang['Embed code'] = 'Code d\'intégration';
+$lang['optional'] = 'optionel';
+$lang['Please fill the embed code'] = 'Veuilles renseigner le code d\'intégration';
+$lang['This video was already registered'] = 'Cette vidéo existe déjà';
+$lang['Videos'] = 'Vidéos';
+$lang['Width and height must be integers'] = 'Hauteur et largeur doivent être des entiers';
+$lang['Do not use this form for videos provided by Youtube, Dailymotion, Vimeo, Wat or Wideo.'] = 'N\'utilisez pas ce formulaire pour les vidéos hébergées par Youtube, Dailymotion, Vimeo, Wat or Wideo.';
 
 ?>
Index: extensions/gvideo/main.inc.php
===================================================================
--- extensions/gvideo/main.inc.php	(revision 28227)
+++ extensions/gvideo/main.inc.php	(revision 28268)
@@ -26,5 +26,8 @@
 {
   add_event_handler('get_admin_plugin_menu_links', 'gvideo_admin_menu');
-  add_event_handler('tabsheet_before_select','gvideo_tab', EVENT_HANDLER_PRIORITY_NEUTRAL+10, 2); 
+  add_event_handler('tabsheet_before_select','gvideo_tab', EVENT_HANDLER_PRIORITY_NEUTRAL+10, 2);
+  
+  add_event_handler('get_batch_manager_prefilters', 'gvideo_add_prefilter');
+  add_event_handler('perform_batch_manager_prefilters', 'gvideo_apply_prefilter');
 }
 
@@ -76,5 +79,11 @@
   if (!pwg_db_num_rows($result)) return $sheets;
   
-  global $gvideo;
+  global $gvideo, $page;
+
+  if ($page['tab'] == 'properties')
+  {
+    $page['infos'][] = 'This element is a video added with "Embedded Video"';
+  }
+  
   $gvideo = pwg_db_fetch_assoc($result);
   
Index: extensions/gvideo/maintain.inc.php
===================================================================
--- extensions/gvideo/maintain.inc.php	(revision 28227)
+++ extensions/gvideo/maintain.inc.php	(revision 28268)
@@ -72,5 +72,6 @@
   `width` smallint(9) DEFAULT NULL,
   `height` smallint(9) DEFAULT NULL,
-  `autoplay` tinyint(1) DEFAULT NULL
+  `autoplay` tinyint(1) DEFAULT NULL,
+  `embed` text DEFAULT NULL
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8
 ;';
@@ -78,6 +79,5 @@
     
     // update video_id lenght
-    $query = 'ALTER TABLE `' . $this->table . '` CHANGE `video_id` `video_id` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;';
-    pwg_query($query);
+    pwg_query('ALTER TABLE `' . $this->table . '` CHANGE `video_id` `video_id` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;');
     
     // new collumn in images table
@@ -95,4 +95,11 @@
 ;';
       pwg_query($query);
+    }
+    
+    // new column "embed"
+    $result = pwg_query('SHOW COLUMNS FROM `' . $this->table . '` LIKE "embed";');
+    if (!pwg_db_num_rows($result))
+    {
+      pwg_query('ALTER TABLE `' . $this->table . '` ADD `embed` text DEFAULT NULL;');
     }
     
