Changeset 20407
- Timestamp:
- Jan 26, 2013, 2:50:41 PM (11 years ago)
- Location:
- extensions/url_uploader
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/url_uploader/admin.php
r20064 r20407 83 83 ); 84 84 85 $updates = array(); 85 86 if (!empty($_POST['photo_name'])) 86 87 { 87 single_update( 88 IMAGES_TABLE, 89 array('name'=>$_POST['photo_name']), 90 array('id' => $image_id) 91 ); 88 $updates['name'] = $_POST['photo_name']; 92 89 } 90 if (isset($_POST['url_in_comment'])) 91 { 92 $url = parse_url($_POST['file_url']); 93 $url = $url['scheme'].'://'.$url['host']; 94 $updates['comment'] = '<a href="'. $url . '">'. $url .'</a>'; 95 } 96 97 single_update( 98 IMAGES_TABLE, 99 $updates, 100 array('id' => $image_id) 101 ); 93 102 94 103 $image_ids = array($image_id); -
extensions/url_uploader/include/ws_functions.inc.php
r19804 r20407 18 18 'maxValue' => $conf['available_permission_levels'] 19 19 ), 20 'url_in_comment' => array('default' => true), 20 21 ), 21 22 'Add image from remote URL.' … … 84 85 ); 85 86 87 $updates = array(); 86 88 if (!empty($params['name'])) 87 89 { 88 single_update( 89 IMAGES_TABLE, 90 array('name'=>$params['name']), 91 array('id' => $image_id) 92 ); 90 $updates['name'] = $params['name']; 93 91 } 92 if ($params['url_in_comment']=='true') 93 { 94 $url = parse_url($params['file_url']); 95 $url = $url['scheme'].'://'.$url['host']; 96 $updates['comment'] = '<a href="'. $url . '">'. $url .'</a>'; 97 } 98 99 single_update( 100 IMAGES_TABLE, 101 $updates, 102 array('id' => $image_id) 103 ); 94 104 95 105 -
extensions/url_uploader/language/en_UK/plugin.lang.php
r19804 r20407 12 12 $lang['One link by line, separate photo name and url with a « | ». Photo name is optional.'] = 'One link by line, separate photo name and url with a « | ». Photo name is optional.'; 13 13 $lang['Add links'] = 'Add links'; 14 $lang['Add website URL in photo description'] = 'Add website URL in photo description'; 14 15 15 16 ?> -
extensions/url_uploader/language/fr_FR/plugin.lang.php
r19804 r20407 12 12 $lang['One link by line, separate photo name and url with a « | ». Photo name is optional.'] = 'Un seul lien par ligne, séparez le nom et l\'URL par un « | ». Le nom de la photo est optionel.'; 13 13 $lang['Add links'] = 'Ajouter les liens'; 14 $lang['Add website URL in photo description'] = 'Ajouter l\'URL du site web dans la description de la photo'; 14 15 15 16 ?> -
extensions/url_uploader/template/photos_add.tpl
r19805 r20407 159 159 }); 160 160 161 function performImport(file_url, category, name, level, $target) {161 function performImport(file_url, category, name, level, url_in_comment, $target) { 162 162 queuedManager.add({ 163 163 type: 'GET', 164 164 dataType: 'json', 165 165 url: 'ws.php', 166 data: { method: 'pwg.images.addRemote', file_url: file_url, category: category, name: name, level: level, format: 'json' },166 data: { method: 'pwg.images.addRemote', file_url: file_url, category: category, name: name, level: level, url_in_comment: url_in_comment, format: 'json' }, 167 167 success: function(data) { 168 168 if (data['stat'] == 'ok') { … … 223 223 $(this).data('name'), 224 224 $("select[name=level] option:selected").val(), 225 $("input[name=url_in_comment]").is(":checked"), 225 226 $(this) 226 227 ); … … 392 393 </label> 393 394 </li> 395 <li> 396 <label> 397 <span class="property"><input type="checkbox" name="url_in_comment" checked="checked"></span> 398 {'Add website URL in photo description'|@translate} 399 </label> 400 </li> 394 401 </ul> 395 402 … … 410 417 <tbody> 411 418 </tbody> 419 <tfoot> 420 <tr><th colspan="4"> 421 <label> 422 <input type="checkbox" name="url_in_comment" checked="checked"> 423 {'Add website URL in photo description'|@translate} 424 </label> 425 </th></tr> 426 </tfoot> 412 427 </table> 413 428
Note: See TracChangeset
for help on using the changeset viewer.