Changeset 12333 for extensions
- Timestamp:
- Oct 3, 2011, 2:18:46 PM (13 years ago)
- Location:
- extensions/community
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/community/add_photos.php
r10756 r12333 32 32 define('PHOTOS_ADD_BASE_URL', make_index_url(array('section' => 'add_photos'))); 33 33 34 prepare_upload_configuration();35 36 34 $user_permissions = community_get_user_permissions($user['id']); 37 35 … … 47 45 $page['errors'] = array(); 48 46 $page['infos'] = array(); 47 48 // this is for "browser uploader", for Flash Uploader the problem is solved 49 // with function community_uploadify_privacy_level (see main.inc.php) 49 50 $_POST['level'] = 16; 50 51 … … 53 54 $hacking_attempt = false; 54 55 55 if ('existing' == $_POST['category_type']) 56 { 57 // is the user authorized to upload in this album? 58 if (!in_array($_POST['category'], $user_permissions['upload_categories'])) 59 { 60 echo 'Hacking attempt, you have no permission to upload in this album'; 61 $hacking_attempt = true; 62 } 63 } 64 elseif ('new' == $_POST['category_type']) 65 { 66 if (!in_array($_POST['category_parent'], $user_permissions['create_categories'])) 67 { 68 echo 'Hacking attempt, you have no permission to create this album'; 69 $hacking_attempt = true; 70 } 56 // is the user authorized to upload in this album? 57 if (!in_array($_POST['category'], $user_permissions['upload_categories'])) 58 { 59 echo 'Hacking attempt, you have no permission to upload in this album'; 60 $hacking_attempt = true; 71 61 } 72 62 … … 88 78 $page['infos'] = array(); 89 79 90 if (isset($ conf['community_ask_for_properties']) and $conf['community_ask_for_properties'])80 if (isset($_POST['name'])) 91 81 { 92 82 $data = array(); -
extensions/community/add_photos.tpl
r10756 r12333 1 {if $upload_mode eq 'multiple'} 1 2 {combine_script id='jquery.jgrowl' load='footer' require='jquery' path='themes/default/js/plugins/jquery.jgrowl_minimized.js' } 2 3 { if $upload_mode eq 'multiple'}4 {combine_ script id='swfobject' load='footer' path='admin/include/uploadify/swfobject.js'}5 {combine_ script id='jquery.uploadify' load='footer' require='jquery' path='admin/include/uploadify/jquery.uploadify.v2.1.0.min.js'}3 {combine_script id='jquery.uploadify' load='footer' require='jquery' path='admin/include/uploadify/jquery.uploadify.v3.0.0.min.js' } 4 {combine_script id='jquery.ui.progressbar' load='footer'} 5 {combine_css path="admin/themes/default/uploadify.jGrowl.css"} 6 {combine_css path="admin/include/uploadify/uploadify.css"} 6 7 {/if} 7 8 8 {combine_css path="admin/include/uploadify/uploadify.css"} 9 {combine_css path="admin/themes/default/uploadify.jGrowl.css"} 10 9 {combine_script id='jquery.colorbox' load='footer' require='jquery' path='themes/default/js/plugins/jquery.colorbox.min.js'} 10 {combine_css path="themes/default/js/plugins/colorbox/style2/colorbox.css"} 11 11 12 12 {footer_script}{literal} … … 17 17 jQuery("#formErrors li").hide(); 18 18 19 if (jQuery(" input[name=category_type]:checked").val() == "new" && jQuery("input[name=category_name]").val() == "") {20 jQuery("#formErrors # emptyCategoryName").show();19 if (jQuery("#albumSelect option:selected").length == 0) { 20 jQuery("#formErrors #noAlbum").show(); 21 21 nbErrors++; 22 22 } … … 69 69 } 70 70 71 if (jQuery("select[name=category] option").length == 0) { 72 jQuery('input[name=category_type][value=existing]').attr('disabled', true); 73 jQuery('input[name=category_type]').attr('checked', false); 74 jQuery('input[name=category_type][value=new]').attr('checked', true); 71 function fillCategoryListbox(selectId, selectedValue) { 72 jQuery.getJSON( 73 "ws.php?format=json&method=pwg.categories.getList", 74 { 75 recursive: true, 76 fullname: true, 77 format: "json", 78 }, 79 function(data) { 80 jQuery.each( 81 data.result.categories, 82 function(i,category) { 83 var selected = null; 84 if (category.id == selectedValue) { 85 selected = "selected"; 86 } 87 88 jQuery("<option/>") 89 .attr("value", category.id) 90 .attr("selected", selected) 91 .text(category.name) 92 .appendTo("#"+selectId) 93 ; 94 } 95 ); 96 } 97 ); 75 98 } 76 99 77 jQuery("input[name=category_type]").click(function () { 78 jQuery("[id^=category_type_]").hide(); 79 jQuery("#category_type_"+jQuery(this).attr("value")).show(); 100 jQuery(".addAlbumOpen").colorbox({ 101 inline:true, 102 href:"#addAlbumForm", 103 onComplete:function(){ 104 jQuery("input[name=category_name]").focus(); 105 } 106 }); 107 108 jQuery("#addAlbumForm form").submit(function(){ 109 jQuery("#categoryNameError").text(""); 110 111 jQuery.ajax({ 112 url: "ws.php?format=json&method=pwg.categories.add", 113 data: { 114 parent: jQuery("select[name=category_parent] option:selected").val(), 115 name: jQuery("input[name=category_name]").val(), 116 }, 117 beforeSend: function() { 118 jQuery("#albumCreationLoading").show(); 119 }, 120 success:function(html) { 121 jQuery("#albumCreationLoading").hide(); 122 123 var newAlbum = jQuery.parseJSON(html).result.id; 124 jQuery(".addAlbumOpen").colorbox.close(); 125 126 jQuery("#albumSelect").find("option").remove(); 127 fillCategoryListbox("albumSelect", newAlbum); 128 129 jQuery(".albumSelection").show(); 130 131 /* we hide the ability to create another album, this is different from the admin upload form */ 132 /* in Community, it's complicated to refresh the list of parent albums */ 133 jQuery("#linkToCreate").hide(); 134 135 return true; 136 }, 137 error:function(XMLHttpRequest, textStatus, errorThrows) { 138 jQuery("#albumCreationLoading").hide(); 139 jQuery("#categoryNameError").text(errorThrows).css("color", "red"); 140 } 141 }); 142 143 return false; 80 144 }); 81 145 … … 85 149 }); 86 150 87 jQuery("a.externalLink").click(function() { 88 window.open(jQuery(this).attr("href")); 89 return false; 151 jQuery("#uploadWarningsSummary a.showInfo").click(function() { 152 jQuery("#uploadWarningsSummary").hide(); 153 jQuery("#uploadWarnings").show(); 154 }); 155 156 jQuery("#showPermissions").click(function() { 157 jQuery(this).parent(".showFieldset").hide(); 158 jQuery("#permissions").show(); 159 }); 160 161 jQuery("#showPhotoProperties").click(function() { 162 jQuery(this).parent(".showFieldset").hide(); 163 jQuery("#photoProperties").show(); 90 164 }); 91 165 … … 114 188 var session_id = '{$session_id}'; 115 189 var pwg_token = '{$pwg_token}'; 116 var buttonText = 'Browse';117 var sizeLimit = {$upload_max_filesize};190 var buttonText = "{'Select files'|@translate}"; 191 var sizeLimit = Math.round({$upload_max_filesize} / 1024); /* in KBytes */ 118 192 119 193 {literal} 120 194 jQuery("#uploadify").uploadify({ 121 'uploader' : uploadify_path + '/uploadify. swf',122 ' script' : uploadify_path + '/uploadify.php',123 's criptData' : {124 'upload_id' : upload_id, 125 'session_id' : session_id,126 'pwg_token' : pwg_token,127 },128 'cancelIm g': uploadify_path + '/cancel.png',195 'uploader' : uploadify_path + '/uploadify.php', 196 'langFile' : uploadify_path + '/uploadifyLang_en.js', 197 'swf' : uploadify_path + '/uploadify.swf', 198 199 buttonCursor : 'pointer', 200 'buttonText' : buttonText, 201 'width' : 300, 202 'cancelImage' : uploadify_path + '/cancel.png', 129 203 'queueID' : 'fileQueue', 130 204 'auto' : false, 131 'displayData' : 'speed',132 'buttonText' : buttonText,133 205 'multi' : true, 134 'fileDesc' : 'Photo files (*.jpg,*.jpeg,*.png)', 135 'fileExt' : '*.jpg;*.JPG;*.jpeg;*.JPEG;*.png;*.PNG', 136 'sizeLimit' : sizeLimit, 137 'onAllComplete' : function(event, data) { 138 if (data.errors) { 206 'fileTypeDesc' : 'Photo files', 207 'fileTypeExts' : '*.jpg;*.JPG;*.jpeg;*.JPEG;*.png;*.PNG;*.gif;*.GIF', 208 'fileSizeLimit' : sizeLimit, 209 'progressData' : 'percentage', 210 requeueErrors : false, 211 'onSelect' : function(event,ID,fileObj) { 212 jQuery("#fileQueue").show(); 213 }, 214 'onQueueComplete' : function(stats) { 215 jQuery("input[name=submit_upload]").click(); 216 }, 217 onUploadError: function (file,errorCode,errorMsg,errorString,swfuploadifyQueue) { 218 /* uploadify calls the onUploadError trigger when the user cancels a file! */ 219 /* There no error so we skip it to avoid panic. */ 220 if ("Cancelled" == errorString) { 139 221 return false; 140 222 } 141 else { 142 jQuery("input[name=submit_upload]").click(); 143 } 144 }, 145 onError: function (event, queueID ,fileObj, errorObj) { 146 var msg; 147 148 if (errorObj.type === "HTTP") { 149 if (errorObj.info === 404) { 150 alert('Could not find upload script.'); 151 msg = 'Could not find upload script.'; 152 } 153 else { 154 msg = errorObj.type+": "+errorObj.info; 155 } 156 } 157 else if (errorObj.type ==="File Size") { 158 msg = "File too big"; 159 msg = msg + '<br>'+fileObj.name+': '+humanReadableFileSize(fileObj.size); 160 msg = msg + '<br>Limit: '+humanReadableFileSize(sizeLimit); 161 } 162 else { 163 msg = errorObj.type+": "+errorObj.info; 164 } 223 224 var msg = file.name+', '+errorString; 225 226 /* Let's put the error message in the form to display once the form is */ 227 /* performed, it makes support easier when user can copy/paste the error */ 228 /* thrown. */ 229 jQuery("#uploadForm").append('<input type="hidden" name="onUploadError[]" value="'+msg+'">'); 165 230 166 231 jQuery.jGrowl( 167 '<p></p> '+msg,232 '<p></p>onUploadError '+msg, 168 233 { 169 234 theme: 'error', 170 235 header: 'ERROR', 171 sticky: true172 }173 );174 175 jQuery("#fileUploadgrowl" + queueID).fadeOut(176 250,177 function() {178 jQuery("#fileUploadgrowl" + queueID).remove()179 }180 );181 return false;182 },183 onCancel: function (a, b, c, d) {184 var msg = "Cancelled uploading: "+c.name;185 jQuery.jGrowl(186 '<p></p>'+msg,187 {188 theme: 'warning',189 header: 'Cancelled Upload',190 236 life: 4000, 191 237 sticky: false 192 238 } 193 239 ); 240 241 return false; 194 242 }, 195 onClearQueue: function (a, b) { 196 var msg = "Cleared "+b.fileCount+" files from queue"; 197 jQuery.jGrowl( 198 '<p></p>'+msg, 199 { 200 theme: 'warning', 201 header: 'Cleared Queue', 202 life: 4000, 203 sticky: false 204 } 205 ); 243 onUploadSuccess: function (file,data,response) { 244 var data = jQuery.parseJSON(data); 245 jQuery("#uploadedPhotos").parent("fieldset").show(); 246 247 /* Let's display the thumbnail of the uploaded photo, no need to wait the */ 248 /* end of the queue */ 249 jQuery("#uploadedPhotos").prepend('<img src="'+data.thumbnail_url+'" class="thumbnail"> '); 206 250 }, 207 onComplete: function (a, b ,c, d, e) { 208 var size = Math.round(c.size/1024); 209 jQuery.jGrowl( 210 '<p></p>'+c.name+' - '+size+'KB', 211 { 212 theme: 'success', 213 header: 'Upload Complete', 214 life: 4000, 215 sticky: false 216 } 217 ); 251 onUploadComplete: function(file,swfuploadifyQueue) { 252 var max = parseInt(jQuery("#progressMax").text()); 253 var next = parseInt(jQuery("#progressCurrent").text())+1; 254 var addToProgressBar = 2; 255 if (next <= max) { 256 jQuery("#progressCurrent").text(next); 257 } 258 else { 259 addToProgressBar = 1; 260 } 261 262 jQuery("#progressbar").progressbar({ 263 value: jQuery("#progressbar").progressbar("option", "value") + addToProgressBar 264 }); 218 265 } 219 266 }); … … 223 270 return false; 224 271 } 272 273 jQuery("#uploadify").uploadifySettings( 274 'postData', 275 { 276 'category_id' : jQuery("select[name=category] option:selected").val(), 277 'level' : jQuery("select[name=level] option:selected").val(), 278 'upload_id' : upload_id, 279 'session_id' : session_id, 280 'pwg_token' : pwg_token, 281 } 282 ); 283 284 nb_files = jQuery(".uploadifyQueueItem").size(); 285 jQuery("#progressMax").text(nb_files); 286 jQuery("#progressbar").progressbar({max: nb_files*2, value:1}); 287 jQuery("#progressCurrent").text(1); 288 289 jQuery("#uploadProgress").show(); 225 290 226 291 jQuery("#uploadify").uploadifyUpload(); … … 233 298 234 299 {literal} 235 <style> 300 <style type="text/css"> 301 /* 302 #photosAddContent form p { 303 text-align:left; 304 } 305 */ 306 236 307 #photosAddContent FIELDSET { 237 308 width:650px; … … 245 316 246 317 #photosAddContent P { 247 /* margin:0; */318 margin:0; 248 319 } 249 320 … … 254 325 } 255 326 256 #batchLink { 257 text-align:center; 258 } 259 260 .category_selection { 261 min-height:50px; 262 margin-top:5px; 263 } 264 265 .category_selection TABLE { 266 margin:0; 267 } 327 #uploadBoxes .file {margin-bottom:5px;text-align:left;} 328 #uploadBoxes {margin-top:20px;} 329 #addUploadBox {margin-bottom:2em;} 330 331 p#uploadWarningsSummary {text-align:left;margin-bottom:1em;font-size:90%;color:#999;} 332 p#uploadWarningsSummary .showInfo {position:static;display:inline;padding:1px 6px;margin-left:3px;} 333 p#uploadWarnings {display:none;text-align:left;margin-bottom:1em;font-size:90%;color:#999;} 334 p#uploadModeInfos {text-align:left;margin-top:1em;font-size:90%;color:#999;} 335 336 #photosAddContent p.showFieldset {text-align:left;margin: 0 auto 10px auto;width: 650px;} 337 338 #uploadProgress {width:650px; margin:10px auto;font-size:90%;} 339 #progressbar {border:1px solid #ccc; background-color:#eee;} 340 .ui-progressbar-value { background-image: url(admin/themes/default/images/pbar-ani.gif); height:10px;margin:-1px;border:1px solid #E78F08;} 341 342 .showInfo {display:block;position:absolute;top:0;right:5px;width:15px;font-style:italic;font-family:"Georgia",serif;background-color:#464646;font-size:0.9em;border-radius:10px;-moz-border-radius:10px;} 343 .showInfo:hover {cursor:pointer} 344 .showInfo {color:#fff;background-color:#999; } 345 .showInfo:hover {color:#fff;border:none;background-color:#333} 268 346 </style> 269 347 {/literal} 270 348 271 349 <div id="photosAddContent"> 272 273 {if isset($errors)}274 <div class="errors">275 <ul>276 {foreach from=$errors item=error}277 <li>{$error}</li>278 {/foreach}279 </ul>280 </div>281 {/if}282 283 {if isset($infos)}284 <div class="infos">285 <ul>286 {foreach from=$infos item=info}287 <li>{$info}</li>288 {/foreach}289 </ul>290 </div>291 {/if}292 293 350 294 351 {if count($setup_errors) > 0} … … 325 382 </div> 326 383 </fieldset> 327 <p ><a href="{$another_upload_link}">{'Add another set of photos'|@translate}</a></p>384 <p style="margin:10px"><a href="{$another_upload_link}">{'Add another set of photos'|@translate}</a></p> 328 385 {else} 329 386 330 387 <div id="formErrors" class="errors" style="display:none"> 331 388 <ul> 332 <li id=" emptyCategoryName">{'The name of an album must not be empty'|@translate}</li>389 <li id="noAlbum">{'Select an album'|@translate}</li> 333 390 <li id="noPhoto">{'Select at least one photo'|@translate}</li> 334 391 </ul> … … 336 393 </div> 337 394 395 <div style="display:none"> 396 <div id="addAlbumForm" style="text-align:left;padding:1em;"> 397 <form> 398 {'Parent album'|@translate}<br> 399 <select id ="category_parent" name="category_parent"> 400 <option value="0">------------</option> 401 {html_options options=$category_parent_options selected=$category_parent_options_selected} 402 </select> 403 404 <br><br>{'Album name'|@translate}<br><input name="category_name" type="text"> <span id="categoryNameError"></span> 405 <br><br><br><input type="submit" value="{'Create'|@translate}"> <span id="albumCreationLoading" style="display:none"><img src="themes/default/images/ajax-loader-small.gif"></span> 406 </form> 407 </div> 408 </div> 409 338 410 <form id="uploadForm" enctype="multipart/form-data" method="post" action="{$form_action}" class="properties"> 411 {if $upload_mode eq 'multiple'} 412 <input name="upload_id" value="{$upload_id}" type="hidden"> 413 {/if} 414 339 415 <fieldset> 340 416 <legend>{'Drop into album'|@translate}</legend> 341 {if $upload_mode eq 'multiple'} 342 <input name="upload_id" value="{$upload_id}" type="hidden"> 343 {/if} 344 417 418 <span class="albumSelection"{if count($category_options) == 0} style="display:none"{/if}> 419 <select id="albumSelect" name="category"> 420 {html_options options=$category_options selected=$category_options_selected} 421 </select> 422 </span> 345 423 {if $create_subcategories} 346 <label><input type="radio" name="category_type" value="existing"> {'existing album'|@translate}</label> 347 <label><input type="radio" name="category_type" value="new" checked="checked"> {'create a new album'|@translate}</label> 348 {else} 349 <input name="category_type" value="existing" type="hidden"> 350 {/if} 351 352 <div id="category_type_existing" {if $create_subcategories}style="display:none" class="category_selection"{/if}> 353 <select class="categoryDropDown" name="category"> 354 {html_options options=$category_options selected=$category_options_selected} 355 </select> 424 <div id="linkToCreate"> 425 <span class="albumSelection">{'... or '|@translate}</span><a href="#" class="addAlbumOpen" title="{'create a new album'|@translate}">{'create a new album'|@translate}</a> 356 426 </div> 357 358 {if $create_subcategories} 359 <div id="category_type_new" class="category_selection"> 360 <table> 361 <tr> 362 <td>{'Parent album'|@translate}</td> 363 <td> 364 <select class="categoryDropDown" name="category_parent"> 365 {if $create_whole_gallery} 366 <option value="0">------------</option> 367 {/if} 368 {html_options options=$category_parent_options selected=$category_parent_options_selected} 369 </select> 370 </td> 371 </tr> 372 <tr> 373 <td>{'Album name'|@translate}</td> 374 <td> 375 <input type="text" name="category_name" value="{$F_CATEGORY_NAME}" style="width:400px"> 376 </td> 377 </tr> 378 </table> 427 {/if} 428 </fieldset> 429 430 <fieldset> 431 <legend>{'Select files'|@translate}</legend> 432 433 <p id="uploadWarningsSummary">{$upload_max_filesize_shorthand}B. {$upload_file_types}. {if isset($max_upload_resolution)}{$max_upload_resolution}Mpx{/if} <a class="showInfo" title="{'Learn more'|@translate}">i</a></p> 434 435 <p id="uploadWarnings"> 436 {'Maximum file size: %sB.'|@translate|@sprintf:$upload_max_filesize_shorthand} 437 {'Allowed file types: %s.'|@translate|@sprintf:$upload_file_types} 438 {if isset($max_upload_resolution)} 439 {'Approximate maximum resolution: %dM pixels (that\'s %dx%d pixels).'|@translate|@sprintf:$max_upload_resolution:$max_upload_width:$max_upload_height} 440 {/if} 441 </p> 442 443 {if $upload_mode eq 'html'} 444 <div id="uploadBoxes"></div> 445 <div id="addUploadBox"> 446 <a href="javascript:">{'+ Add an upload box'|@translate}</a> 379 447 </div> 448 449 <p id="uploadModeInfos">{'You are using the Browser uploader. Try the <a href="%s">Flash uploader</a> instead.'|@translate|@sprintf:$switch_url}</p> 450 451 {elseif $upload_mode eq 'multiple'} 452 <div id="uploadify">You've got a problem with your JavaScript</div> 453 454 <div id="fileQueue" style="display:none"></div> 455 456 <p id="uploadModeInfos">{'You are using the Flash uploader. Problems? Try the <a href="%s">Browser uploader</a> instead.'|@translate|@sprintf:$switch_url}</p> 457 380 458 {/if} 381 459 </fieldset> 382 460 383 {if $community_ask_for_properties} 384 <fieldset id="photoProperties"> 461 <p class="showFieldset"><a id="showPhotoProperties" href="#">{'Set Photo Properties'|@translate}</a></p> 462 463 <fieldset id="photoProperties" style="display:none"> 385 464 <legend>{'Photo Properties'|@translate}</legend> 386 465 … … 401 480 402 481 </fieldset> 482 483 {if $enable_permissions} 484 <p class="showFieldset"><a id="showPermissions" href="#">{'Manage Permissions'|@translate}</a></p> 485 486 <fieldset id="permissions" style="display:none"> 487 <legend>{'Who can see these photos?'|@translate}</legend> 488 489 <select name="level" size="1"> 490 {html_options options=$level_options selected=$level_options_selected} 491 </select> 492 </fieldset> 403 493 {/if} 404 494 405 <fieldset>406 <legend>{'Select files'|@translate}</legend>407 408 495 {if $upload_mode eq 'html'} 409 <p><a href="{$switch_url}">{'... or switch to the multiple files form'|@translate}</a></p>410 411 <p>{'JPEG files or ZIP archives with JPEG files inside please.'|@translate}</p>412 413 <div id="uploadBoxes"></div>414 <div id="addUploadBox">415 <a href="javascript:">{'+ Add an upload box'|@translate}</a>416 </div>417 418 </fieldset>419 420 496 <p> 421 <input class="submit" type="submit" name="submit_upload" value="{' Upload'|@translate}">497 <input class="submit" type="submit" name="submit_upload" value="{'Start Upload'|@translate}"> 422 498 </p> 423 499 {elseif $upload_mode eq 'multiple'} 424 <p> 425 <input type="file" name="uploadify" id="uploadify"> 426 </p> 427 428 <p><a href="{$switch_url}">{'... or switch to the old style form'|@translate}</a></p> 429 430 <div id="fileQueue"></div> 431 432 </fieldset> 433 <p> 434 <input class="submit" type="button" value="{'Upload'|@translate}"> 500 <p style="margin-bottom:1em"> 501 <input class="submit" type="button" value="{'Start Upload'|@translate}"> 435 502 <input type="submit" name="submit_upload" style="display:none"> 436 503 </p> 437 504 {/if} 438 505 </form> 506 507 <div id="uploadProgress" style="display:none"> 508 {'Photo %s of %s'|@translate|@sprintf:'<span id="progressCurrent">1</span>':'<span id="progressMax">10</span>'} 509 <br> 510 <div id="progressbar"></div> 511 </div> 512 513 <fieldset style="display:none"> 514 <legend>{'Uploaded Photos'|@translate}</legend> 515 <div id="uploadedPhotos"></div> 516 </fieldset> 517 439 518 {/if} {* empty($thumbnails) *} 440 519 {/if} {* $setup_errors *} -
extensions/community/language/en_UK/plugin.lang.php
r10652 r12333 61 61 $lang['Edit a permission'] = 'Edit a permission'; 62 62 $lang['Your photos are waiting for validation, administrators have been notified'] = 'Your photos are waiting for validation, administrators have been notified'; 63 64 $lang['Set Photo Properties'] = 'Set Photo Properties'; 63 65 ?> -
extensions/community/language/fr_FR/plugin.lang.php
r10771 r12333 63 63 $lang['Edit a permission'] = 'Editer une permission'; 64 64 $lang['Your photos are waiting for validation, administrators have been notified'] = 'Vos photos sont en attente de validation, les administrateurs sont prévenus'; 65 66 $lang['Set Photo Properties'] = 'Définir les proriétés de la photo'; 65 67 ?> -
extensions/community/main.inc.php
r11726 r12333 336 336 } 337 337 338 $row['name'] = strip_tags( 339 trigger_event( 340 'render_category_name', 341 $row['name'], 342 'ws_categories_getList' 343 ) 344 ); 338 if ($params['fullname']) 339 { 340 $row['name'] = strip_tags(get_cat_display_name_cache($row['uppercats'], null, false)); 341 } 342 else 343 { 344 $row['name'] = strip_tags( 345 trigger_event( 346 'render_category_name', 347 $row['name'], 348 'ws_categories_getList' 349 ) 350 ); 351 } 345 352 346 353 $row['comment'] = strip_tags( … … 564 571 community_update_cache_key(); 565 572 } 573 574 add_event_handler('init', 'community_uploadify_privacy_level'); 575 function community_uploadify_privacy_level() 576 { 577 if (script_basename() == 'uploadify' and !is_admin()) 578 { 579 $_POST['level'] = 16; 580 } 581 } 566 582 ?>
Note: See TracChangeset
for help on using the changeset viewer.