Changeset 12818
- Timestamp:
- Jan 1, 2012, 11:52:20 AM (12 years ago)
- Location:
- extensions/Icy_Picture_Modify
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Icy_Picture_Modify/README
r11934 r12818 13 13 USAGE 14 14 15 1. Install and enable the plugin "community" which allows users to upload pictures 16 2. Install and enable this extension 15 1. Install and enable the plugin "community" which allows users to 16 upload pictures to some albums. Please configure the plugin before 17 you install "icy_picture_modify". 18 19 2. Install and enable this plugin 20 17 21 3. When users view a picture they uploaded, they will be provided a link 18 22 to modify that picture's information. … … 20 24 FEATURES 21 25 22 Users can modify the following information of a picture 23 * Author 24 * Description 25 * Picture's date 26 * Tags 27 * ACL 28 * Synchronize meta data 29 * Delete picture 30 * Associcate/Dissociated image to/from uploadable category 31 * Use image to represent for uploadable category 26 Users can delete image or modify image's properties (author, date, tags, 27 description, metada, associcate/aissociated/represented categories). 32 28 33 29 KNOWN PROBLEMS 34 30 31 * If an image is replaced by other version (using plugin 'Photo update') 32 the author of (new) image will be owned by administrator, not the 33 current user. Hence the image won't be editable anymore 35 34 * This plugin doesn't support all known templates 36 * This plugin may not work smoothly without plugin 'community'35 * This plugin may not work smoothly without the plugin 'community' 37 36 * User can delete an image which is associated to some albums to which 38 the user doesn't have permission to write/access. When the plugin 39 'community' isn't installed, user can create image's link and/or 40 represents for any visible albums in the gallery. 37 the user doesn't have permission to write/access. This is true as the 38 plugin only checks owner of the image. 41 39 42 40 AUTHOR … … 51 49 52 50 At Github.com: https://github.com/icy/icy_picture_modify 53 At Piwigo.com: 54 SVN repository: 51 At Piwigo.com: http://piwigo.org/ext/extension_view.php?eid=563 52 SVN repository: http://piwigo.org/svn/extensions/Icy_Picture_Modify/ -
extensions/Icy_Picture_Modify/icy_picture_modify.php
r12034 r12818 95 95 96 96 // * Purpose: Find all categories that are reachable for the current user. 97 // * FIXME: This query will include all readable categories, those ones98 // usecan't write to them.97 // * FIXME: This query will include all readable categories, included 98 // the ones user can't write to them. 99 99 100 100 $my_categories = array(); 101 101 $my_permissions = null; 102 $has_plugin_community = false; 102 103 103 104 // <community support> … … 105 106 { 106 107 include_once(PHPWG_PLUGINS_PATH.'community/include/functions_community.inc.php'); 108 $has_plugin_community = true; 109 107 110 $user_permissions = community_get_user_permissions($user['id']); 108 111 $my_categories = $user_permissions['upload_categories']; … … 110 113 // </community support> 111 114 112 // FIXME: what happens if both of the following conditions are true 113 // FIXME: * true == $user_permissions['create_whole_gallery'] 114 // FIXME: * 0 < count($my_categories) 115 if (empty($user_permissions) or $user_permissions['create_whole_gallery']) 115 if (($has_plugin_community == false) or $user_permissions['create_whole_gallery']) 116 116 { 117 117 $query = ' … … 120 120 ;'; 121 121 122 // list of categories to which the user can access122 // list of categories to which the user can read 123 123 $my_categories = array_diff( 124 124 array_from_query($query, 'category_id'), … … 270 270 // 271 271 if (isset($_POST['associate']) 272 and ($has_plugin_community == true) 272 273 and isset($_POST['cat_dissociated']) 273 274 and count($_POST['cat_dissociated']) > 0 … … 283 284 // dissociate the element from categories (but not from its storage category) 284 285 if (isset($_POST['dissociate']) 286 and ($has_plugin_community == true) 285 287 and isset($_POST['cat_associated']) 286 288 and count($_POST['cat_associated']) > 0 … … 297 299 update_category($arr_dissociate); 298 300 } 301 302 // +-----------------------------------------------------------------------+ 303 // | representation | 304 // +-----------------------------------------------------------------------+ 305 299 306 // select the element to represent the given categories 300 307 if (isset($_POST['elect']) 308 and ($has_plugin_community == true) 301 309 and isset($_POST['cat_dismissed']) 302 310 and count($_POST['cat_dismissed']) > 0 … … 318 326 } 319 327 } 328 320 329 // dismiss the element as representant of the given categories 321 330 if (isset($_POST['dismiss']) 331 and ($has_plugin_community == true) 322 332 and isset($_POST['cat_elected']) 323 333 and count($_POST['cat_elected']) > 0 … … 331 341 } 332 342 333 // tags 343 // +-----------------------------------------------------------------------+ 344 // | tagging support | 345 // +-----------------------------------------------------------------------+ 346 334 347 if (version_compare(PHPWG_VERSION, '2.2.5', '<')) { 335 348 $q_tag_selection = "tag_id, name AS tag_name"; … … 594 607 display_select_cat_wrapper($query, array(), 'dissociated_options'); 595 608 596 // representing609 // display list of categories for representing 597 610 $query = ' 598 611 SELECT id,name,uppercats,global_rank
Note: See TracChangeset
for help on using the changeset viewer.