Changeset 32112
- Timestamp:
- Apr 20, 2020, 9:48:16 PM (4 years ago)
- Location:
- extensions/meta_og
- Files:
-
- 3 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/meta_og/admin.php
r32107 r32112 1 1 <?php 2 2 // +-----------------------------------------------------------------------+ 3 // | meta_og plugin for Piwigo by TEMMII 3 // | meta_og plugin for Piwigo by TEMMII | 4 4 // +-----------------------------------------------------------------------+ 5 5 // | Copyright(C) 2008-2020 ddtddt http://temmii.com/piwigo/ | … … 85 85 $metaogpagelistT[]=l10n('contact'); 86 86 $metaogpagelist[]='contact'; 87 } 88 $MPG = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'GuestBook';")); 89 if ($MPG['state'] == 'active'){ 90 $metaogpagelistT[]=l10n('GuestBook'); 91 $metaogpagelist[]='GuestBook'; 87 92 } 88 93 $MAP = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'AdditionalPages';")); … … 135 140 'PHOTOINFO' => $info_photos['id'].' - '.$legend, 136 141 'PHOTOSELECT' => $select, 142 'PHOTOURL' => get_absolute_root_url().PWG_DERIVATIVE_DIR.substr($info_photos['path'], 2, -4)."-th".substr($info_photos['path'],-4), 137 143 ); 138 144 $template->append('info_photos', $items); … … 141 147 if (empty($metaog['metaogimage'])){unset($metaog['metaogimage']);} 142 148 if(isset($metaog['metaogimage'])){ 143 if(isset($_SERVER['HTTPS'])){if($_SERVER['HTTPS'] == 'on'){$protocol="https://";}} 144 else{$protocol="http://";} 145 $metaogpath=PWG_DERIVATIVE_DIR.substr($metaog['path'], 2, -4)."-".$conf['mogsize'].substr($metaog['path'],-4); 146 if (file_exists($metaogpath) AND $conf['mogsize']!='original'){ 147 $metaogpath=get_absolute_root_url().PWG_DERIVATIVE_DIR.substr($metaog['path'], 2, -4)."-".$conf['mogsize'].substr($metaog['path'],-4); 148 }else{ 149 $metaogpath=get_absolute_root_url().substr($metaog['path'],2); 150 } 149 $metaogpath=get_absolute_root_url().PWG_DERIVATIVE_DIR.substr($metaog['path'], 2, -4)."-th".substr($metaog['path'],-4); 151 150 }else{ 152 151 $metaogpath=""; … … 166 165 167 166 if (isset($_POST['submetaogsave'])){ 168 if($_POST['metaogimagesave']==" a" || $_POST['metaogimagesave']=="b"){$_POST['metaogimagesave']='';}167 if($_POST['metaogimagesave']=="-10" || $_POST['metaogimagesave']=="-20"){$_POST['metaogimagesave']='';} 169 168 if(!empty($_POST['metaogid'])){ 170 169 $query = ' … … 181 180 pwg_query($q); 182 181 } 183 184 182 array_push($page['infos'], l10n('Metadata Open Graph updated')); 185 186 187 188 183 } 189 184 … … 191 186 break; 192 187 case 'config': 193 188 194 189 $metaogsizelistT = array( 195 190 '2s : '.l10n('size thumbnails modus'), 196 191 'cu : '.l10n('size thumbnails bootstrap'), 197 192 'th : '.l10n('size thumbnails default'), 193 'sq : '.l10n('size thumbnails square'), 198 194 'me : '.l10n('Size medium'), 195 'la : '.l10n('size thumbnails large'), 199 196 l10n('Original'), 200 197 ); … … 204 201 'cu', 205 202 'th', 203 'sq', 206 204 'me', 205 'la', 207 206 'original', 208 207 ); -
extensions/meta_og/admin.tpl
r32106 r32112 1 {footer_script} 2 jQuery(function($) { 3 4 if($('#metaogimagesaveid').children("option:selected").val()=="-20"){ 5 $('#mognp').show(); 6 } 7 8 $('#metaogimagesaveid').change(function(event){ 9 var idphoto=$(this).children("option:selected").val(); 10 $('#metaogimagesave2id').val(idphoto); 11 if($('#metaogimagesaveid').children("option:selected").val()=="-10" || $('#metaogimagesaveid').children("option:selected").val()=="-20"){ 12 $('#mognp').show(); 13 $('#metaogimagescr').attr("src",''); 14 $('#metaogimagescr').hide(); 15 }else{ 16 var urliog=$('#metaogimagesaveid').children("option:selected").data('url'); 17 $('#metaogimagescr').attr("src",urliog); 18 $('#metaogimagescr').show(); 19 $('#mognp').hide(); 20 } 21 $('#mognpe').hide(); 22 $('#metaogimagesaveid').css('border', 'solid 1px #999'); 23 $('#metaogimagesave2id').css('border', 'solid 1px #999'); 24 $('#submetaogsave').show(); 25 }); 26 27 $('#metaogimagesave2id').change(function(){ 28 var idphoto2=$(this).val(); 29 $('#metaogimagesaveid').val(idphoto2); 30 31 if($('#metaogimagesaveid').children("option:selected").val()==idphoto2){ 32 $('#metaogimagesaveid').css('border', 'solid 1px #999'); 33 $('#metaogimagesave2id').css('border', 'solid 1px #999'); 34 $('#mognpe').hide(); 35 $('#submetaogsave').show(); 36 if($('#metaogimagesaveid').children("option:selected").val()=="-10" || $('#metaogimagesaveid').children("option:selected").val()=="-20"){ 37 $('#mognp').show(); 38 $('#metaogimagescr').attr("src",''); 39 $('#metaogimagescr').hide(); 40 }else{ 41 var urliog=$('#metaogimagesaveid').children("option:selected").data('url'); 42 $('#metaogimagescr').attr("src",urliog); 43 $('#metaogimagescr').show(); 44 $('#mognp').hide(); 45 } 46 }else{ 47 $('#metaogimagesaveid').css('border', 'solid 2px red'); 48 $('#metaogimagesave2id').css('border', 'solid 2px red'); 49 $('#mognpe').show(); 50 $('#mognp').hide(); 51 $('#metaogimagescr').attr("src",''); 52 $('#metaogimagescr').hide(); 53 $('#submetaogsave').hide(); 54 } 55 }); 56 57 }); 58 {/footer_script} 59 1 60 <div class="titrePage"> 2 61 <h2>{'Manage tags metadata Open Graph'|@translate}</h2> … … 37 96 {'Metadata Open Graph link image'|@translate} 38 97 <br> 39 <select name="metaogimagesave"> 40 <option value="a">-----</option> 41 <option value="b">{'no photo'|@translate}</option> 98 <input id="metaogimagesave2id" type="number" name="metaogimagesave2" value="{$metaog_edit.metaogimage}"> {'or'|@translate} 99 <select id="metaogimagesaveid" name="metaogimagesave"> 100 <option value="-20">-----</option> 101 <option value="-10">{'no photo'|@translate}</option> 42 102 {foreach from=$info_photos item=infophoto} 43 <option value="{$infophoto.PHOTOID}" {$infophoto.PHOTOSELECT}>{$infophoto.PHOTOINFO}</option>103 <option data-url="{$infophoto.PHOTOURL}" value="{$infophoto.PHOTOID}" {$infophoto.PHOTOSELECT}>{$infophoto.PHOTOINFO}</option> 44 104 {/foreach} 45 105 </select> 46 106 <br> 47 107 <br> 48 {if empty($metaog_edit.metaogpath)}{'don\'t use photo for this page'|@translate}{/if} 49 <img src="{$metaog_edit.metaogpath}"<br> 108 <span style="display:none;" id="mognp">{'don\'t use photo for this page'|@translate}</span> 109 <span style="display:none;" id="mognpe">{'This ID isn\'t used in your gallery'|@translate}</span> 110 <img id="metaogimagescr" src="{$metaog_edit.metaogpath}"<br> 50 111 <br> 51 112 <br> 52 113 <div style="text-align:center;"> 53 <input class="submit" name="submetaogsave" type="submit" value="{'save Open Graph metadata in the database'|@translate}" {$TAG_INPUT_ENABLED} />114 <input class="submit" id="submetaogsave" name="submetaogsave" type="submit" value="{'save Open Graph metadata in the database'|@translate}" {$TAG_INPUT_ENABLED} /> 54 115 </div> 55 116 </fieldset> -
extensions/meta_og/initadmin.php
r32106 r32112 1 1 <?php 2 2 // +-----------------------------------------------------------------------+ 3 // | Title plugin for piwigo|4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 20 11 - 2016 ddtddthttp://temmii.com/piwigo/ |3 // | meta_og plugin for Piwigo by TEMMII | 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2008-2020 ddtddt http://temmii.com/piwigo/ | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | This program is free software; you can redistribute it and/or modify | … … 33 33 34 34 //add prefiltre photo 35 add_event_handler('loc_begin_admin', 'metaogPadminf',60); 35 add_event_handler('loc_begin_admin_page', 'metaogPadminf',95); 36 37 function metaogPadminf(){ 38 global $template; 39 $template->set_prefilter('picture_modify', 'metaogPadminfT'); 40 $template->set_filename('mog_adminphoto', realpath(metaog_PATH.'mog_adminphoto.tpl')); 41 $template->assign_var_from_handle('MOG_ADMINPHOTO', 'mog_adminphoto'); 42 } 43 44 function metaogPadminfT($content, &$smarty){ 45 $search = '#<p style="margin:40px 0 0 0">#'; 46 return preg_replace($search,'{$MOG_ADMINPHOTO}', $content); 47 } 48 36 49 add_event_handler('loc_begin_admin_page', 'metaogPadminA',60); 37 38 function metaogPadminf()39 {40 global $template;41 $template->set_prefilter('picture_modify', 'metaogPadminfT');42 }43 44 function metaogPadminfT($content, &$smarty)45 {46 $search = '#<p style="margin:40px 0 0 0">#';47 48 $replacement = '49 <p>50 <strong>{\'Metadata Open Graph - Plugin meta og\'|@translate}</strong>51 <br>52 <br>53 <span style="margin: 0 0 0 20px">{\'Metadata Open Graph title\'|@translate}</span>54 <br>55 <input type="hidden" name="metaogidP" value="{$metaog_editP.metaogidid}">56 <input type="hidden" name="metaogidobjP" value="{$metaog_editP.metaogidobj}">57 <span style="margin: 0 0 0 20px"><input type="text" name="metaogtitlesaveP" value="{$metaog_editP.metaogtitle}" size="100" maxlenght="100"></span>58 <br>59 <br>60 <span style="margin: 0 0 0 20px">{\'Metadata Open Graph description\'|@translate}</span>61 <br>62 <span style="margin: 0 0 0 20px"><textarea rows="2" cols="60" name="metaogdescriptionsaveP" id="metaogdescriptionsaveP" class="metaogdescriptionsaveP">{$metaog_editP.metaogdescription}</textarea></span>63 <br>64 <br>65 <span style="margin: 0 0 0 20px">{\'Metadata Open Graph link image\'|@translate}</span>66 <br>67 <span style="margin: 0 0 0 20px">68 <select name="metaogimagesaveP">69 <option value="a">-----</option>70 <option value="b">{\'no photo\'|@translate}</option>71 {foreach from=$info_photos item=infophoto}72 <option value="{$infophoto.PHOTOID}" {$infophoto.PHOTOSELECT}>{$infophoto.PHOTOINFO}</option>73 {/foreach}74 </select>75 </span>76 <br>77 {if empty($metaog_editP.metaogpath)}<span style="margin: 0 0 0 20px">{\'use photo for this page\'|@translate}</span>{/if}78 <br>79 <img src="{$metaog_editP.metaogpath}"><br>80 <br>81 </p>82 <p style="margin:40px 0 0 0">';83 84 return preg_replace($search, $replacement, $content);85 }86 50 87 51 function metaogPadminA(){ … … 106 70 } 107 71 if(empty($info_photos['name'])){$legend=$info_photos['file'];}else{$legend=$info_photos['name'];} 72 $metaoglistphotoT[] = $info_photos['id'].' - '.$legend; 73 $metaoglistphoto[] = $info_photos['id']; 74 $metaoglistphotodataurl[] = get_absolute_root_url().PWG_DERIVATIVE_DIR.substr($info_photos['path'], 2, -4)."-th".substr($info_photos['path'],-4); 108 75 $items = array( 109 76 'PHOTOID' => $info_photos['id'], 110 77 'PHOTOINFO' => $info_photos['id'].' - '.$legend, 111 78 'PHOTOSELECT' => $select, 79 'PHOTOURL' => get_absolute_root_url().PWG_DERIVATIVE_DIR.substr($info_photos['path'], 2, -4)."-th".substr($info_photos['path'],-4), 112 80 ); 113 81 $template->append('info_photos', $items); … … 116 84 if (empty($metaog['metaogimage'])){unset($metaog['metaogimage']);} 117 85 if(isset($metaog['metaogimage'])){ 118 if(isset($_SERVER['HTTPS'])){if($_SERVER['HTTPS'] == 'on'){$protocol="https://";}} 119 else{$protocol="http://";} 120 $metaogpath=PWG_DERIVATIVE_DIR.substr($metaog['path'], 2, -4)."-".$conf['mogsize'].substr($metaog['path'],-4); 121 if (file_exists($metaogpath) AND $conf['mogsize']!='original'){ 122 $metaogpath=get_absolute_root_url().PWG_DERIVATIVE_DIR.substr($metaog['path'], 2, -4)."-".$conf['mogsize'].substr($metaog['path'],-4); 123 }else{ 124 $metaogpath=get_absolute_root_url().substr($metaog['path'],2); 125 } 86 $metaogpath=get_absolute_root_url().PWG_DERIVATIVE_DIR.substr($metaog['path'], 2, -4)."-th".substr($metaog['path'],-4); 126 87 }else{ 127 88 $metaogpath=""; … … 140 101 } 141 102 if(isset($_POST['metaogtitlesaveP']) or isset($_POST['metaogdescriptionsaveP'])or isset($_POST['metaogimagesaveP'])){ 142 if($_POST['metaogimagesaveP']==" a" || $_POST['metaogimagesaveP']=="b" || $_POST['metaogimagesaveP']==$_POST['metaogidobjP']){$_POST['metaogimagesaveP']='';}103 if($_POST['metaogimagesaveP']=="-10" || $_POST['metaogimagesaveP']=="-20" || $_POST['metaogimagesaveP']==$_POST['metaogidobjP']){$_POST['metaogimagesaveP']='';} 143 104 if(!empty($_POST['metaogidP'])){ 144 105 $query = ' … … 154 115 pwg_query($q); 155 116 } 156 $metaog = pwg_db_fetch_assoc(pwg_query("SELECT * FROM " . METAOG_TABLE . " WHERE type = 2 AND idobj = '".$_POST['metaogidobjP']."';")); 157 while ($info_photos = pwg_db_fetch_assoc($tab_picture)) { 158 if($info_photos['id']==$metaog['metaogimage']){ 159 $select="SELECTED"; 160 $metaog['path']=$info_photos['path']; 161 }else{ 162 $select=""; 163 } 164 if(empty($info_photos['name'])){$legend=$info_photos['file'];}else{$legend=$info_photos['name'];} 165 $items = array( 166 'PHOTOID' => $info_photos['id'], 167 'PHOTOINFO' => $info_photos['id'].' - '.$legend, 168 'PHOTOSELECT' => $select, 169 ); 170 $template->append('info_photos', $items); 171 } 172 if (empty($metaog['metaogimage'])){unset($metaog['metaogimage']);} 173 if(isset($metaog['metaogimage'])){ 174 $picturepth = pwg_db_fetch_assoc(pwg_query('SELECT path FROM ' . IMAGES_TABLE . " WHERE id = '".$_POST['metaogidobjP']."';")); 175 $metaog['path']=$picturepth['path']; 176 if(isset($_SERVER['HTTPS'])){if($_SERVER['HTTPS'] == 'on'){$protocol="https://";}} 177 else{$protocol="http://";} 178 $metaogpath=PWG_DERIVATIVE_DIR.substr($metaog['path'], 2, -4)."-".$conf['mogsize'].substr($metaog['path'],-4); 179 if (file_exists($metaogpath) AND $conf['mogsize']!='original'){ 180 $metaogpath=get_absolute_root_url().PWG_DERIVATIVE_DIR.substr($metaog['path'], 2, -4)."-".$conf['mogsize'].substr($metaog['path'],-4); 181 }else{ 182 $metaogpath=get_absolute_root_url().substr($metaog['path'],2); 183 } 184 }else{ 185 $metaogpath=""; 186 $metaog['metaogimage']=""; 187 } 188 $template->assign( 189 'metaog_editP', 190 array( 191 'metaogidid' => $metaog['id'], 192 'metaogidobj' => $pageog, 193 'metaogtitle' => $metaog['metaogtitle'], 194 'metaogdescription' => $metaog['metaogdescription'], 195 'metaogimage' => $metaog['metaogimage'], 196 'metaogpath' => $metaogpath, 197 )); 117 header('Location:'.get_root_url().'admin.php?page=photo-'.$_POST['metaogidobjP'].'-properties'); 198 118 } 199 119 } 200 120 201 121 //add prefiltre album 202 add_event_handler('loc_begin_admin', 'metaogAadminf', 60); 203 add_event_handler('loc_begin_admin_page', 'metaogAadminA', 60); 204 205 function metaogAadminf() 206 { 122 add_event_handler('loc_begin_admin_page', 'metaogAadminf', 95); 123 124 function metaogAadminf(){ 207 125 global $template; 208 126 $template->set_prefilter('album_properties', 'metaogAadminfT'); 209 } 210 211 function metaogAadminfT($content, &$smarty) 212 { 127 $template->set_filename('mog_adminalbum', realpath(metaog_PATH.'mog_adminalbum.tpl')); 128 $template->assign_var_from_handle('MOG_ADMINALBUM', 'mog_adminalbum'); 129 } 130 131 function metaogAadminfT($content, &$smarty){ 213 132 $search = '#<p style="margin:0">#'; 214 215 $replacement = ' 216 <p> 217 <strong>{\'Metadata Open Graph - Plugin meta og\'|@translate}</strong> 218 <br> 219 <br> 220 <span style="margin: 0 0 0 20px">{\'Metadata Open Graph title\'|@translate}</span> 221 <br> 222 <input type="hidden" name="metaogidA" value="{$metaog_editA.metaogidid}"> 223 <input type="hidden" name="metaogidobjA" value="{$metaog_editA.metaogidobj}"> 224 <span style="margin: 0 0 0 20px"><input type="text" name="metaogtitlesaveA" value="{$metaog_editA.metaogtitle}" size="100" maxlenght="100"></span> 225 <br> 226 <br> 227 <span style="margin: 0 0 0 20px">{\'Metadata Open Graph description\'|@translate}</span> 228 <br> 229 <span style="margin: 0 0 0 20px"><textarea rows="2" cols="60" name="metaogdescriptionsaveA" id="metaogdescriptionsaveA" class="metaogdescriptionsaveA">{$metaog_editA.metaogdescription}</textarea></span> 230 <br> 231 <br> 232 <span style="margin: 0 0 0 20px">{\'Metadata Open Graph link image\'|@translate}</span> 233 <br> 234 <span style="margin: 0 0 0 20px"> 235 <select name="metaogimagesaveA"> 236 <option value="a">-----</option> 237 <option value="b">{\'no photo\'|@translate}</option> 238 {foreach from=$info_photos item=infophoto} 239 <option value="{$infophoto.PHOTOID}" {$infophoto.PHOTOSELECT}>{$infophoto.PHOTOINFO}</option> 240 {/foreach} 241 </select> 242 </span> 243 <br> 244 {if empty($metaog_editA.metaogpath)}<span style="margin: 0 0 0 20px">{\'use representative photo for this album\'|@translate}</span>{/if} 245 <br> 246 <img src="{$metaog_editA.metaogpath}"><br> 247 <br> 248 </p> 249 <p style="margin:0">'; 250 251 return preg_replace($search, $replacement, $content); 252 } 253 133 return preg_replace($search, '{$MOG_ADMINALBUM}', $content); 134 } 135 136 add_event_handler('loc_begin_admin_page', 'metaogAadminA', 60); 137 254 138 function metaogAadminA(){ 255 139 if (isset($_GET['cat_id']) and !isset($_GET['image_id'])){ … … 278 162 'PHOTOINFO' => $info_photos['id'].' - '.$legend, 279 163 'PHOTOSELECT' => $select, 164 'PHOTOURL' => get_absolute_root_url().PWG_DERIVATIVE_DIR.substr($info_photos['path'], 2, -4)."-th".substr($info_photos['path'],-4), 280 165 ); 281 166 $template->append('info_photos', $items); … … 284 169 if (empty($metaog['metaogimage'])){unset($metaog['metaogimage']);} 285 170 if(isset($metaog['metaogimage'])){ 286 if(isset($_SERVER['HTTPS'])){if($_SERVER['HTTPS'] == 'on'){$protocol="https://";}} 287 else{$protocol="http://";} 288 $metaogpath=PWG_DERIVATIVE_DIR.substr($metaog['path'], 2, -4)."-".$conf['mogsize'].substr($metaog['path'],-4); 289 if (file_exists($metaogpath) AND $conf['mogsize']!='original'){ 290 $metaogpath=get_absolute_root_url().PWG_DERIVATIVE_DIR.substr($metaog['path'], 2, -4)."-".$conf['mogsize'].substr($metaog['path'],-4); 291 }else{ 292 $metaogpath=get_absolute_root_url().substr($metaog['path'],2); 293 } 171 $metaogpath=get_absolute_root_url().PWG_DERIVATIVE_DIR.substr($metaog['path'], 2, -4)."-th".substr($metaog['path'],-4); 294 172 }else{ 295 173 $metaogpath=""; 296 174 $metaog['metaogimage']=""; 297 175 } 176 $tab_album = pwg_db_fetch_assoc(pwg_query("SELECT id,representative_picture_id FROM " . CATEGORIES_TABLE . " WHERE id = '".$_GET['cat_id']."';")); 298 177 $template->assign( 299 178 'metaog_editA', … … 305 184 'metaogimage' => $metaog['metaogimage'], 306 185 'metaogpath' => $metaogpath, 186 'metaogrealbum' => $tab_album['representative_picture_id'], 307 187 )); 308 188 309 189 } 310 190 if(isset($_POST['metaogtitlesaveA']) or isset($_POST['metaogdescriptionsaveA'])or isset($_POST['metaogimagesaveA'])){ 311 if($_POST['metaogimagesaveA']==" a"){$_POST['metaogimagesaveA']='';}191 if($_POST['metaogimagesaveA']=="-10"|| $_POST['metaogimagesaveA']=="-20" || $_POST['metaogimagesaveA']==$tab_album['representative_picture_id']){$_POST['metaogimagesaveA']='';} 312 192 if(!empty($_POST['metaogidA'])){ 313 193 if($_POST['metaogidobjA'] == $_POST['metaogimagesaveA']){$_POST['metaogimagesaveA']='';} … … 324 204 pwg_query($q); 325 205 } 326 $metaog = pwg_db_fetch_assoc(pwg_query("SELECT * FROM " . METAOG_TABLE . " WHERE type = 3 AND idobj = '".$_POST['metaogidobjA']."';")); 327 $metaog['path']=''; 328 while ($info_photos = pwg_db_fetch_assoc($tab_picture)) { 329 if($info_photos['id']==$metaog['metaogimage']){ 330 $select="SELECTED"; 331 $metaog['path']=$info_photos['path']; 332 }else{ 333 $select=""; 334 } 335 if(empty($info_photos['name'])){$legend=$info_photos['file'];}else{$legend=$info_photos['name'];} 336 $items = array( 337 'PHOTOID' => $info_photos['id'], 338 'PHOTOINFO' => $info_photos['id'].' - '.$legend, 339 'PHOTOSELECT' => $select, 340 ); 341 $template->append('info_photos', $items); 342 } 343 if (empty($metaog['metaogimage'])){unset($metaog['metaogimage']);} 344 if(isset($metaog['metaogimage'])){ 345 $picturepth = pwg_db_fetch_assoc(pwg_query('SELECT path FROM ' . IMAGES_TABLE . " WHERE id = '".$_POST['metaogidobjA']."';")); 346 $metaog['path']=$picturepth['path']; 347 if(isset($_SERVER['HTTPS'])){if($_SERVER['HTTPS'] == 'on'){$protocol="https://";}} 348 else{$protocol="http://";} 349 $metaogpath=PWG_DERIVATIVE_DIR.substr($metaog['path'], 2, -4)."-".$conf['mogsize'].substr($metaog['path'],-4); 350 if (file_exists($metaogpath) AND $conf['mogsize']!='original'){ 351 $metaogpath=get_absolute_root_url().PWG_DERIVATIVE_DIR.substr($metaog['path'], 2, -4)."-".$conf['mogsize'].substr($metaog['path'],-4); 352 }else{ 353 $metaogpath=get_absolute_root_url().substr($metaog['path'],2); 354 } 355 }else{ 356 $metaogpath=""; 357 $metaog['metaogimage']=""; 358 } 359 $template->assign( 360 'metaog_editA', 361 array( 362 'metaogidid' => $metaog['id'], 363 'metaogidobj' => $pageog, 364 'metaogtitle' => $metaog['metaogtitle'], 365 'metaogdescription' => $metaog['metaogdescription'], 366 'metaogimage' => $metaog['metaogimage'], 367 'metaogpath' => $metaogpath, 368 )); 206 header('Location:'.get_root_url().'admin.php?page=album-'.$_POST['metaogidobjP'].'-properties'); 369 207 } 370 208 } -
extensions/meta_og/language/en_UK/index.php
r32069 r32112 1 1 <?php 2 2 // +-----------------------------------------------------------------------+ 3 // | Piwigo - a PHP based picture gallery | 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org | 6 // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | 7 // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | 8 // +-----------------------------------------------------------------------+ 9 // | This program is free software; you can redistribute it and/or modify | 10 // | it under the terms of the GNU General Public License as published by | 11 // | the Free Software Foundation | 3 // | This file is part of Piwigo. | 12 4 // | | 13 // | This program is distributed in the hope that it will be useful, but | 14 // | WITHOUT ANY WARRANTY; without even the implied warranty of | 15 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 16 // | General Public License for more details. | 17 // | | 18 // | You should have received a copy of the GNU General Public License | 19 // | along with this program; if not, write to the Free Software | 20 // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | 21 // | USA. | 5 // | For copyright and license information, please view the COPYING.txt | 6 // | file that was distributed with this source code. | 22 7 // +-----------------------------------------------------------------------+ 23 8 -
extensions/meta_og/language/en_UK/plugin.lang.php
r32106 r32112 1 1 <?php 2 2 // +-----------------------------------------------------------------------+ 3 // | meta_og plugin for Piwigo by TEMMII 3 // | meta_og plugin for Piwigo by TEMMII | 4 4 // +-----------------------------------------------------------------------+ 5 5 // | Copyright(C) 2008-2020 ddtddt http://temmii.com/piwigo/ | … … 28 28 $lang['size thumbnails bootstrap'] = 'size thumbnails bootstrap'; 29 29 $lang['size thumbnails default'] = 'size thumbnails default'; 30 $lang['size thumbnails default'] = 'size thumbnails square'; 31 $lang['size thumbnails default'] = 'size thumbnails large'; 30 32 $lang['Size medium'] = 'Size medium'; 31 33 $lang['Add Open Graph metadata on Piwigo page'] = 'Add Open Graph metadata on Piwigo page'; … … 54 56 $lang['contact'] = 'contact'; 55 57 $lang['Additional Page'] = 'Additional Page'; 58 $lang['This ID isn\'t used in your gallery'] = 'This ID isn\'t used in your gallery'; 59 $lang['or'] = 'or'; -
extensions/meta_og/language/fr_FR/index.php
r32069 r32112 1 1 <?php 2 2 // +-----------------------------------------------------------------------+ 3 // | Piwigo - a PHP based picture gallery | 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org | 6 // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | 7 // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | 8 // +-----------------------------------------------------------------------+ 9 // | This program is free software; you can redistribute it and/or modify | 10 // | it under the terms of the GNU General Public License as published by | 11 // | the Free Software Foundation | 3 // | This file is part of Piwigo. | 12 4 // | | 13 // | This program is distributed in the hope that it will be useful, but | 14 // | WITHOUT ANY WARRANTY; without even the implied warranty of | 15 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 16 // | General Public License for more details. | 17 // | | 18 // | You should have received a copy of the GNU General Public License | 19 // | along with this program; if not, write to the Free Software | 20 // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | 21 // | USA. | 5 // | For copyright and license information, please view the COPYING.txt | 6 // | file that was distributed with this source code. | 22 7 // +-----------------------------------------------------------------------+ 23 8 -
extensions/meta_og/language/fr_FR/plugin.lang.php
r32106 r32112 1 1 <?php 2 2 // +-----------------------------------------------------------------------+ 3 // | meta_og plugin for Piwigo by TEMMII 3 // | meta_og plugin for Piwigo by TEMMII | 4 4 // +-----------------------------------------------------------------------+ 5 5 // | Copyright(C) 2008-2020 ddtddt http://temmii.com/piwigo/ | … … 49 49 $lang['contact'] = 'contact'; 50 50 $lang['Additional Page'] = 'Page additionelle'; 51 $lang['This ID isn\'t used in your gallery'] = 'Cette ID n\'est pas utilisée dans votre galerie'; 52 $lang['or'] = 'ou'; 51 53 ?> -
extensions/meta_og/language/index.php
r32069 r32112 1 1 <?php 2 2 // +-----------------------------------------------------------------------+ 3 // | Piwigo - a PHP based picture gallery | 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org | 6 // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | 7 // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | 8 // +-----------------------------------------------------------------------+ 9 // | This program is free software; you can redistribute it and/or modify | 10 // | it under the terms of the GNU General Public License as published by | 11 // | the Free Software Foundation | 3 // | This file is part of Piwigo. | 12 4 // | | 13 // | This program is distributed in the hope that it will be useful, but | 14 // | WITHOUT ANY WARRANTY; without even the implied warranty of | 15 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 16 // | General Public License for more details. | 17 // | | 18 // | You should have received a copy of the GNU General Public License | 19 // | along with this program; if not, write to the Free Software | 20 // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | 21 // | USA. | 5 // | For copyright and license information, please view the COPYING.txt | 6 // | file that was distributed with this source code. | 22 7 // +-----------------------------------------------------------------------+ 23 8 -
extensions/meta_og/main.inc.php
r32110 r32112 10 10 11 11 // +-----------------------------------------------------------------------+ 12 // | meta_og plugin for Piwigo by TEMMII 12 // | meta_og plugin for Piwigo by TEMMII | 13 13 // +-----------------------------------------------------------------------+ 14 14 // | Copyright(C) 2008-2020 ddtddt http://temmii.com/piwigo/ | … … 213 213 } 214 214 215 215 // og:site_name 216 216 if (!empty($conf['mogsitename'])) { 217 217 $template->append('head_elements', '<meta property="og:site_name" content="' . $conf['mogsitename'] . '">'); 218 218 } 219 219 220 220 // twitter:card 221 221 if (!empty($conf['mogtwcard'])) { 222 222 $template->append('head_elements', '<meta property="twitter:card" content="' . $conf['mogtwcard'] . '">'); 223 223 } 224 224 225 225 // twitter:site 226 226 if (!empty($conf['mogtwsite'])) { 227 227 $template->append('head_elements', '<meta property="twitter:site" content="' . $conf['mogtwsite'] . '">'); 228 228 } 229 230 229 230 // twitter:creator 231 231 if (!empty($conf['mogtwcreator'])) { 232 232 $template->append('head_elements', '<meta property="twitter:creator" content="' . $conf['mogtwcreator'] . '">'); 233 233 } 234 235 236 237 238 } 239 240 234 } 241 235 ?>
Note: See TracChangeset
for help on using the changeset viewer.