Changeset 20809
- Timestamp:
- Feb 18, 2013, 2:45:55 PM (11 years ago)
- Location:
- extensions/gvideo
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/gvideo/admin/template/add.tpl
r20804 r20809 13 13 maxWidth: '300px', 14 14 defaultPosition: 'right' 15 }); 16 jQuery(".showProvidersInfo").click(function() { 17 $(".providersInfo").toggle(); 15 18 }); 16 19 {/literal}{/footer_script} … … 101 104 <img class="icon" src="{$GVIDEO_PATH}admin/template/icons/youtube.png"> 102 105 <a href="http://www.youtube.com" target="_blank">YouTube</a> 106 <span class="providersInfo">{'Videos can be unlisted but not private.'|@translate}<br></span> 103 107 </li> 104 108 <li> 105 109 <img class="icon" src="{$GVIDEO_PATH}admin/template/icons/vimeo.png"> 106 110 <a href="http://www.vimeo.com" target="_blank">Vimeo</a> 111 <span class="providersInfo">{'Videos can be unlisted and private if the gallery website is within the authorized domains (PRO).'|@translate}<br></span> 107 112 </li> 108 113 <li> 109 114 <img class="icon" src="{$GVIDEO_PATH}admin/template/icons/dailymotion.png"> 110 115 <a href="http://www.dailymotion.com" target="_blank">Dailymotion</a> 116 <span class="providersInfo">{'Videos can be private if you use the private permalink.'|@translate}<br></span> 111 117 </li> 112 118 <li> 113 119 <img class="icon" src="{$GVIDEO_PATH}admin/template/icons/wat.png"> 114 120 <a href="http://www.wat.tv" target="_blank">Wat</a> 121 <span class="providersInfo" style="font-style:italic;">{'No privacy option.'|@translate}<br></span> 115 122 </li> 116 123 <li> 117 124 <img class="icon" src="{$GVIDEO_PATH}admin/template/icons/wideo.png"> 118 125 <a href="http://www.wideo.fr" target="_blank">Wideo</a> 126 <span class="providersInfo" style="font-style:italic;">{'No privacy option.'|@translate}<br></span> 127 </li> 128 <li> 129 <a class="showProvidersInfo">{'Show privacy details'|@translate}</a> 119 130 </li> 120 131 </ul> -
extensions/gvideo/admin/template/style.css
r19056 r20809 66 66 font-weight:bold; 67 67 } 68 69 .providersInfo { 70 display:none; 71 } 72 .showProvidersInfo { 73 font-style:italic; 74 font-size:0.9em; 75 } -
extensions/gvideo/include/functions.inc.php
r20804 r20809 43 43 44 44 $video['url'] = 'http://youtube.com/watch?v='.$video['video_id']; 45 $video['title'] = 'YouTube #'.$video['video_id']; 45 46 46 47 if (!$safe_mode) 47 48 { 48 $fields = 'entry(id,author,media:group(media:title(text()),media:description(text()),media:thumbnail(@url),media:keywords))'; 49 $api_url = 'http://gdata.youtube.com/feeds/api/videos/'.$video['video_id'].'?v=2&alt=json&fields='.$fields; 49 $api_url = 'http://gdata.youtube.com/feeds/api/videos/'.$video['video_id'].'?v=2&alt=json'; 50 50 $json = gvideo_download_remote_file($api_url, true); 51 51 52 52 if ($json===false || $json=='file_error') return false; 53 if (strip_tags($json) == 'GDataInvalidRequestUriExceptionInvalid id') return false; // unknown video 54 if (strip_tags($json) == 'GDataServiceForbiddenExceptionPrivate video') return false; // private video 53 55 54 56 $json = json_decode($json, true); … … 56 58 'title' => $json['entry']['media$group']['media$title']['$t'], 57 59 'description' => $json['entry']['media$group']['media$description']['$t'], 58 'thumbnail' => $json['entry']['media$group']['media$thumbnail'][ 0]['url'],60 'thumbnail' => $json['entry']['media$group']['media$thumbnail'][2]['url'], 59 61 'author' => $json['entry']['author'][0]['name']['$t'], 60 62 )); … … 64 66 } 65 67 } 66 else67 {68 $video['title'] = 'YouTube #'.$video['video_id'];69 }70 68 71 69 break; … … 81 79 82 80 $video['url'] = 'http://vimeo.com/'.$video['video_id']; 81 $video['title'] = 'Vimeo #'.$video['video_id']; 83 82 84 83 if (!$safe_mode) … … 116 115 } 117 116 } 118 else119 {120 $video['title'] = 'Vimeo #'.$video['video_id'];121 }122 117 123 118 break; … … 134 129 135 130 $video['url'] = 'http://dailymotion.com/video/'.$video['video_id']; 131 $video['title'] = $video['video_id']; 136 132 137 133 if (!$safe_mode) … … 143 139 144 140 $json = json_decode($json, true); 141 if (@$json['error']['type'] == 'access_forbidden') return false; // private video 145 142 $json['thumbnail_large_url'] = preg_replace('#\?([0-9]+)$#', null, $json['thumbnail_large_url']); 146 143 … … 153 150 )); 154 151 } 155 else156 {157 $video['title'] = $video['video_id'];158 }159 152 160 153 break; … … 164 157 case 'wat': 165 158 { 159 if (!$safe_mode) return false; // no safe_mode for wat.tv, must connect to get the video id 160 166 161 $video['type'] = 'wat'; 167 162 168 // no safe_mode for wat.tv169 163 $html = gvideo_download_remote_file($source_url, true); 170 164 … … 202 196 203 197 $video['url'] = 'http://wideo.fr/video/'.$video['video_id'].'.html'; 198 $video['title'] = $video['video_id']; 204 199 205 200 if (!$safe_mode) … … 223 218 preg_match('#<meta name="keywords" content="([^">]+)" />#', $html, $matches); 224 219 $video['tags'] = $matches[1]; 225 }226 else227 {228 $video['title'] = $video['video_id'];229 220 } 230 221 -
extensions/gvideo/language/en_UK/plugin.lang.php
r19213 r20809 30 30 $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.'; 31 31 $lang['Video properties'] = 'Video properties'; 32 $lang['Show privacy details' = 'Show privacy details'; 33 $lang['Videos can be unlisted but not private.' = 'Videos can be unlisted but not private.'; 34 $lang['Videos can be unlisted and private if the gallery website is within the authorized domains (PRO).' = 'Videos can be unlisted and private if the gallery website is within the authorized domains (PRO).'; 35 $lang['Videos can be private if you use the private permalink.' = 'Videos can be private if you use the private permalink.'; 36 $lang['No privacy option.' = 'No privacy option.'; 37 $lang[''] = ''; 32 38 33 39 ?> -
extensions/gvideo/language/fr_FR/plugin.lang.php
r19213 r20809 30 30 $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.'; 31 31 $lang['Video properties'] = 'Propriétés vidéo'; 32 $lang['Show privacy details'] = 'A propos des vidéos privées'; 33 $lang['Videos can be unlisted but not private.'] = 'Les vidéos peuvent être hors listing mais pas privées.'; 34 $lang['Videos can be unlisted and private if the gallery website is within the authorized domains (PRO).'] = 'Les vidéos peuvent être hors-listing et privées si le domaine de la galerie fait partie des domaines autorisés (PRO).'; 35 $lang['Videos can be private if you use the private permalink.'] = 'Les videos peuvent être privées si vous utilisez le permalink privé.'; 36 $lang['No privacy option.'] = 'Pas d\'option de privacité.'; 32 37 33 38 ?>
Note: See TracChangeset
for help on using the changeset viewer.