Index: /extensions/gvideo/admin.php
===================================================================
--- /extensions/gvideo/admin.php	(revision 29626)
+++ /extensions/gvideo/admin.php	(revision 29627)
@@ -4,10 +4,10 @@
 global $template, $page, $conf;
 
-load_language('plugin.lang', GVIDEO_PATH);
-
 $page['tab'] = (isset($_GET['tab'])) ? $_GET['tab'] : $page['tab'] = 'add';
 
 if ($page['tab'] != 'photo')
 {
+  load_language('plugin.lang', GVIDEO_PATH);
+  
   // tabsheet
   include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
Index: /extensions/gvideo/admin/add.php
===================================================================
--- /extensions/gvideo/admin/add.php	(revision 29626)
+++ /extensions/gvideo/admin/add.php	(revision 29627)
@@ -18,20 +18,16 @@
       $page['errors'][] = l10n('Please fill the video URL');
     }
-    else if ( ($video = parse_video_url($_POST['url'], isset($_POST['safe_mode']))) === false )
+    else if ( ($video = parse_video_url($_POST['url'], $safe_mode)) === false )
     {
-      if (isset($_POST['safe_mode']))
+      $page['errors'][] = l10n('an error happened');
+    }
+    else
+    {
+      if ($safe_mode === true)
       {
-        $page['errors'][] = l10n('an error happened');
+        $page['warnings'][] = l10n('Unable to contact host server');
+        $page['warnings'][] = l10n('Video data like description and thumbnail might be missing');
       }
-      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')
       {
Index: /extensions/gvideo/admin/photo.php
===================================================================
--- /extensions/gvideo/admin/photo.php	(revision 29626)
+++ /extensions/gvideo/admin/photo.php	(revision 29627)
@@ -56,19 +56,12 @@
     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');
-        }
+      if ( ($video = parse_video_url($_POST['url'], $safe_mode)) === false )
+      {
+        $page['errors'][] = l10n('an error happened');
       }
     }
     else
     {
+      $safe_mode = false;
       $video = $gvideo;
     }
@@ -76,5 +69,10 @@
     if (count($page['errors']) == 0)
     {
-
+      if ($safe_mode === true)
+      {
+        $page['warnings'][] = l10n('Unable to contact host server');
+        $page['warnings'][] = l10n('Video data like description and thumbnail might be missing');
+      }
+      
       if ($gvideo['url'] != $video['url'])
       {
Index: /extensions/gvideo/admin/template/add.tpl
===================================================================
--- /extensions/gvideo/admin/template/add.tpl	(revision 29626)
+++ /extensions/gvideo/admin/template/add.tpl	(revision 29627)
@@ -124,9 +124,4 @@
 <p style="text-align:left;">
   <input type="submit" name="add_video" value="{'Add'|translate}">
-  
-  <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>
 
Index: /extensions/gvideo/admin/template/photo.tpl
===================================================================
--- /extensions/gvideo/admin/template/photo.tpl	(revision 29626)
+++ /extensions/gvideo/admin/template/photo.tpl	(revision 29627)
@@ -108,6 +108,4 @@
     
     <p style="margin:0;">
-      {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/include/functions.inc.php
===================================================================
--- /extensions/gvideo/include/functions.inc.php	(revision 29626)
+++ /extensions/gvideo/include/functions.inc.php	(revision 29627)
@@ -2,5 +2,5 @@
 defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
 
-function parse_video_url($source_url, $safe_mode=false)
+function parse_video_url($source_url, &$safe_mode=false)
 {
   $source_url = 'http://'.preg_replace('#^http(s?)://#', null, trim($source_url));
@@ -46,10 +46,13 @@
       $video['title'] = 'YouTube #'.$video['video_id'];
       
-      if (!$safe_mode)
-      {
-        $api_url = 'http://gdata.youtube.com/feeds/api/videos/'.$video['video_id'].'?v=2&alt=json';
-        $json = gvideo_download_remote_file($api_url, true);
-        
-        if ($json===false || $json=='file_error') return false;
+      $api_url = 'http://gdata.youtube.com/feeds/api/videos/'.$video['video_id'].'?v=2&alt=json';
+      $json = gvideo_download_remote_file($api_url, true);
+      
+      if ($json===false || $json=='file_error')
+      {
+        $safe_mode = true;
+      }
+      else
+      {
         if (strip_tags($json) == 'GDataInvalidRequestUriExceptionInvalid id') return false; // unknown video
         if (strip_tags($json) == 'GDataServiceForbiddenExceptionPrivate video') return false; // private video
@@ -82,11 +85,15 @@
       $video['title'] = 'Vimeo #'.$video['video_id'];
       
-      if (!$safe_mode)
-      {
-        // simple API for public videos
-        $api_url_1 = 'http://vimeo.com/api/v2/video/'.$video['video_id'].'.json';
-        $json = gvideo_download_remote_file($api_url_1, true);
-        
-        if ($json!==false && $json!='file_error' && trim($json)!=$video['video_id'].' not found.')
+      // simple API for public videos
+      $api_url_1 = 'http://vimeo.com/api/v2/video/'.$video['video_id'].'.json';
+      $json = gvideo_download_remote_file($api_url_1, true);
+      
+      if ($json===false || $json=='file_error')
+      {
+        $safe_mode = true;
+      }
+      else
+      {
+        if (trim($json)!=$video['video_id'].' not found.')
         {
           $json = json_decode($json, true);
@@ -105,15 +112,21 @@
           $json = gvideo_download_remote_file($api_url_2, true);
           
-          if ($json===false || $json=='file_error') return false;
-          
-          $json = json_decode($json, true);
-          $video = array_merge($video, array(
-            'title' => $json['title'],
-            'description' => $json['description'],
-            'thumbnail' => $json['thumbnail_url'],
-            'author' => $json['author_name'],
-            ));
+          if ($json===false || $json=='file_error')
+          {
+            $safe_mode = true;
+          }
+          else
+          {
+            $json = json_decode($json, true);
+            $video = array_merge($video, array(
+              'title' => $json['title'],
+              'description' => $json['description'],
+              'thumbnail' => $json['thumbnail_url'],
+              'author' => $json['author_name'],
+              ));
+          }
         }
         
+        // default thumbnail has no extension
         if ($video['thumbnail'] == 'http://i.vimeocdn.com/video/default_640')
         {
@@ -146,19 +159,21 @@
       $video['title'] = 'Dailymotion #'.$video['video_id'];
       
-      if (!$safe_mode)
-      {
-        $api_url = 'https://api.dailymotion.com/video/'.$video['video_id'].'?fields=description,thumbnail_large_url,title,owner.username,tags'; // DM doesn't accept non secure connection
-        $json = gvideo_download_remote_file($api_url, true);
-        
-        if ($json===false || $json=='file_error') return false;
-        
+      $api_url = 'https://api.dailymotion.com/video/'.$video['video_id'].'?fields=description,thumbnail_large_url,title,owner.username,tags'; // DM doesn't accept non secure connection
+      $json = gvideo_download_remote_file($api_url, true);
+        
+      if ($json===false || $json=='file_error')
+      {
+        $safe_mode = true;
+      }
+      else
+      {
         $json = json_decode($json, true);
+        
         if (@$json['error']['type'] == 'access_forbidden') return false; // private video
-        $json['thumbnail_large_url'] = preg_replace('#\?([0-9]+)$#', null, $json['thumbnail_large_url']);
         
         $video = array_merge($video, array(
           'title' => $json['title'],
           'description' => $json['description'],
-          'thumbnail' => $json['thumbnail_large_url'],
+          'thumbnail' => preg_replace('#\?([0-9]+)$#', null, $json['thumbnail_large_url']),
           'author' => $json['owner.username'],
           'tags' => implode(',', $json['tags']),
@@ -170,11 +185,13 @@
       
     /* wat */
+    // URL doesn't contain ID... require to contact host
     case 'wat':
     {
-      if ($safe_mode) return false;
-      
       $html = gvideo_download_remote_file($source_url, true);
 
-      if ($html===false || $html=='file_error') return false;
+      if ($json===false || $json=='file_error')
+      {
+        return false;
+      }
       
       $video['type'] = 'wat';
@@ -214,10 +231,12 @@
       $video['title'] = 'Wideo #'.$video['video_id'];
       
-      if (!$safe_mode)
-      {
-        $html = gvideo_download_remote_file($source_url, true);
-        
-        if ($html===false || $html=='file_error') return false;
-        
+      $html = gvideo_download_remote_file($source_url, true);
+        
+      if ($json===false || $json=='file_error')
+      {
+        $safe_mode = true;
+      }
+      else
+      {
         preg_match('#<meta property="og:title" content="([^">]*)" />#', $html, $matches);
         $video['title'] = $matches[1];
Index: /extensions/gvideo/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/gvideo/language/en_UK/plugin.lang.php	(revision 29626)
+++ /extensions/gvideo/language/en_UK/plugin.lang.php	(revision 29627)
@@ -26,7 +26,4 @@
 $lang['Vimeo player'] = 'Vimeo player';
 $lang['Dailymotion player'] = 'Dailymotion player';
-$lang['Try in safe-mode'] = 'Try in safe-mode';
-$lang['Safe-mode'] = 'Safe-mode';
-$lang['In safe-mode, the plugin does\'t try to contact the video host, usefull on some websites where remote connections are blocked.'] = 'In safe-mode, the plugin does\'t try to contact the video host, usefull on some websites where remote connections are blocked.';
 $lang['Video properties'] = 'Video properties';
 $lang['Show privacy details'] = 'Show privacy details';
@@ -44,4 +41,4 @@
 $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.';
-
+$lang['Video data like description and thumbnail might be missing'] = 'Video data like description and thumbnail might be missing';
 ?>
Index: /extensions/gvideo/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/gvideo/language/fr_FR/plugin.lang.php	(revision 29626)
+++ /extensions/gvideo/language/fr_FR/plugin.lang.php	(revision 29627)
@@ -26,7 +26,4 @@
 $lang['Vimeo player'] = 'Lecteur Vimeo';
 $lang['Dailymotion player'] = 'Lecteur Dailymotion';
-$lang['Try in safe-mode'] = 'Essayez en mode sans échec';
-$lang['Safe-mode'] = 'Mode sans échec';
-$lang['In safe-mode, the plugin does\'t try to contact the video host, usefull on some websites where remote connections are blocked.'] = 'En mode sans échec, le plugin n\'essaye pas de contacter l\'hébergeur de la vidéo, utile sur certains sites où les connexions externes sont bloquées.';
 $lang['Video properties'] = 'Propriétés vidéo';
 $lang['Show privacy details'] = 'A propos des vidéos privées';
@@ -44,4 +41,4 @@
 $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.';
-
+$lang['Video data like description and thumbnail might be missing'] = 'Des données de la vidéo comme sa description ou sa miniature peuvent manquer';
 ?>
Index: /extensions/gvideo/main.inc.php
===================================================================
--- /extensions/gvideo/main.inc.php	(revision 29626)
+++ /extensions/gvideo/main.inc.php	(revision 29627)
@@ -67,8 +67,10 @@
   
   global $gvideo, $page;
+  
+  load_language('plugin.lang', GVIDEO_PATH);
 
   if ($page['tab'] == 'properties')
   {
-    $page['infos'][] = 'This element is a video added with "Embedded Video"';
+    $page['infos'][] = l10n('This element is a video added with "Embedded Video"');
   }
   
