Hello Icy
Re-uploaded the plugin as you suggested, yes its working
>>Icy modify picture is showing as needing to be restored but wont restore ???
Looking in the plugins/manage 'Icy modify picture' border is highlighted, seems to be mealy in indicator that the plugin is not supported by this version of Piwigo - but still works
OK so I set Settings for individual users
Can I do this (below) to set once for multiple users
$ICY_ACL['test','test2''test3'] = array(
In (below) is the array referring to the actual Album names, I have an album called 1990's, sticking 1990's in doesn't let my user upload to that album - is the Apostrophe a problem
'can_upload_image_to' => array(12, 123, 312),
'can_upload_image_to' => array(1990's),
Offline
IGraham wrote:
Hello Icy
Re-uploaded the plugin as you suggested, yes its working
>>Icy modify picture is showing as needing to be restored but wont restore ???
Looking in the plugins/manage 'Icy modify picture' border is highlighted, seems to be mealy in indicator that the plugin is not supported by this version of Piwigo - but still works
This is due to the fact that Piwigo doesn't record the latest development version you're using :)
OK so I set Settings for individual users
Can I do this (below) to set once for multiple users
$ICY_ACL['test','test2''test3'] = array(
No,due to support of PHP language. but you can do this
$ICY_ACL['test'] = array(); $ICY_ACL['test2'] = $ICY_ACL['test']; $ICY_ACL['test3'] = $ICY_ACL['test'];
In (below) is the array referring to the actual Album names, I have an album called 1990's, sticking 1990's in doesn't let my user upload to that album - is the Apostrophe a problem
'can_upload_image_to' => array(12, 123, 312),
'can_upload_image_to' => array(1990's),
Please note that the *upload* function doesn't work at the moment. There are some conflicts with the plugin "community" that I am trying to fix. The feature will come soon! Hold on :)
You must use the album's identity, not album's name (as the album's names aren't unique in Piwigo, and they can be changed quickly at any time.)
If you don't list an album in the array, user can't upload image to that one.
Offline
Is the album's identity found within piwigo/upload and is it the final folder containing folders 'pwg_high' 'thumbnails' & .jpg(s)
For instance '29' '03' '08'
Almost seems random, but probably is not
I'm trying your plugin in a test installation of Piwigo so don't think your answers or work is in anyway of importance - no pressure
Would seem that Icy Modify Picture and Community plugin are natural partners
thanks for all the effort your putting in
Offline
IGraham wrote:
Is the album's identity found within piwigo/upload and is it the final folder containing folders 'pwg_high' 'thumbnails' & .jpg(s)
For instance '29' '03' '08'
Almost seems random, but probably is not
No, those numbers are used to specify the timestamp. The identity is generated by database back-end. When you visit an album, for example,
http://vonhudieu.net/zen/index.php?/category/15
you can see the number "15" in the URL. So the album's identity is 15. It seems it's the only way to get the album identity :)
I'm trying your plugin in a test installation of Piwigo so don't think your answers or work is in anyway of importance - no pressure
Thank you very much. That would help the development process :)
Would seem that Icy Modify Picture and Community plugin are natural partners
Yes I try to keep this smooth status :)
Last edited by icy (2012-01-10 01:35:53)
Offline
Hi Icy,
I have tested version 1.2.0. 2 issues :
1) don't hardcode _data directory :
Index: include/functions_icy_picture_modify.inc.php =================================================================== --- include/functions_icy_picture_modify.inc.php (revision 987) +++ include/functions_icy_picture_modify.inc.php (working copy) @@ -256,7 +256,9 @@ * @author icy */ function icy_log($st) { - $_f_log = PHPWG_ROOT_PATH.'_data/icy.log'; + global $conf; + + $_f_log = $conf['local_data_dir'].'/icy.log'; $_f_handle = fopen($_f_log, 'a'); if ($_f_handle) { fwrite($_f_handle, $st . "\n");
2) by default, user can not delete his own photos, but the delete icon is displayed... so I changed :
Index: include/icy_acl_default.php =================================================================== --- include/icy_acl_default.php (revision 987) +++ include/icy_acl_default.php (revision 988) @@ -15,7 +15,7 @@ array( /* image */ 'can_edit_image_of' => 'owner', - 'can_delete_image_of' => FALSE, + 'can_delete_image_of' => true, /* categories */ 'can_upload_image_to' => FALSE, 'can_upload_image_to_sub_album' => TRUE,
Offline
For those who are looking for the compatibility with new Piwigo 2.4, please stay tune. I will release a new version of the plugin soon.
Thank you for your patience!
Offline
Good news, thanks for your efforts
Offline
I've updated the plugin (branch 1.1) to make it compatible with the latest Piwigo. New revision is 1.1.2
http://piwigo.org/ext/extension_view.ph … 37#rev3537
The new branch 2.0 with advance ACL and batch support isn't available though. I hope to fix the design and release it soon.
Any feedback and suggestions are welcome.
Regards,
Last edited by icy (2012-07-04 18:07:29)
Offline
icy wrote:
I've updated the plugin (branch 1.1) to make it compatible with the latest Piwigo. New revision is 1.1.2
http://piwigo.org/ext/extension_view.ph … 37#rev3537
The new branch 2.0 with advance ACL and batch support isn't available though. I hope to fix the design and release it soon.
Any feedback and suggestions are welcome.
Regards,
Would be great if you finish branch 2.0. I'm already using it in Piwigo 2.3 for a while and it works fine. Hope you will release it soon or maybe bring a Piwigo 2.4 update.
Offline
delakut wrote:
Would be great if you finish branch 2.0. I'm already using it in Piwigo 2.3 for a while and it works fine. Hope you will release it soon or maybe bring a Piwigo 2.4 update.
The batch support is not ready though. They requires more testing and works. I decide to release the first version `2.0.0` with advance and clean ACL . ChangeLOG
* Advance ACL support in local ZAML file
* Upload permission can be specified in new ACL
* Doesn't require any settings from the plugin `community`
Before the plugin is released, could you please take a look and give it some testings? In this version, the ACL is described in a ZAML file, and it's more readable than the old style (.php file). And if you are using a development version of the plugin, you need to port some old files to new syntax and then remove them.
Necessary documents
* The document: https://github.com/icy/icy_picture_modi … /README.md
* ZAML format: https://github.com/icy/icy_picture_modi … oc/zaml.md
* Sample config file: [Github] icy_picture_modify file README.md">https://github.com/icy/icy_picture_modi … /README.md
* ZAML format: https://github.com/icy/icy_picture_modi … oc/zaml.md
* Sample config file: Last edited by icy (2012-07-08 02:31:45)
Offline
plg wrote:
Hi Icy,
I have tested version 1.2.0. 2 issues :
1) don't hardcode _data directory :
The directory will be not used in new version. Anyway I will remeber this way.
Is there any way to get path for `local/config`? Currently I use PHPWG_ROOT_PATH.PWG_LOCAL_DIR.'config/ but I don't think this is good.
2) by default, user can not delete his own photos, but the delete icon is displayed... so I changed :
Thank you. I've fixed in [Github] icy_picture_modify commit 41afd364
Offline
I did some testings. I used the the icy_acl.zml config file and changed the settings. It works quite good. I couldn't find any bigger problems.
There are two things on the 'Edit photo information' page:
-I only see the 'jump to photo' icon. The 'synchronize metadata' and 'delete photo' icons are missing equal what setting I use in the icy_acl.zml config file.
-The arrows under the field 'Is thumbnails for' and 'Is not thumbnails for' are not displayed on my page.
Some improvement suggestions:
- If you click the submit button under the 'edit photo information' page you don't get any feedback if the action was successful. That's a bit irritating.
- At the moment it's only possible to restrict or allow pictures and folders for users and not for groups? It would be a nice feature if this could be implemented too.
- I guess it's not possible to edit album information too if you created it? I couldn't find any information in the database which user created which album.
Offline
Hello,
Thank you for your testing and feedback.
delakut wrote:
I did some testings. I used the the icy_acl.zml config file and changed the settings. It works quite good. I couldn't find any bigger problems.
There are two things on the 'Edit photo information' page:
-I only see the 'jump to photo' icon. The 'synchronize metadata' and 'delete photo' icons are missing equal what setting I use in the icy_acl.zml config file.
For some reasons, the old code of "synchroize metadata" doesn't work on Piwigo 2.4.
Thanks for the nice catch. I've fixed them (See my next post.)
-The arrows under the field 'Is thumbnails for' and 'Is not thumbnails for' are not displayed on my page.
Some improvement suggestions:
- If you click the submit button under the 'edit photo information' page you don't get any feedback if the action was successful. That's a bit irritating.
What's your themes? This is often due to themes settings.
- At the moment it's only possible to restrict or allow pictures and folders for users and not for groups? It would be a nice feature if this could be implemented too.
the plugin provides another kind of ACL, and this ACL has nothing to do with group settings in Piwigo. In the mean time you can use the `reference` support in the file `icy_acl.zml`. For example
my_group: delete_image_of: owner edit_image_of: sub, 12, 123 group_user1: @my_group group_user2: @my_group group_user3: @my_group
(this is really tedious if the group has a long list of members though.)
there are many cool features that can be implemented with icy_acl, but I just want to keep thing simple. I will take a look at the group setting in Piwigo in the next releases.
- I guess it's not possible to edit album information too if you created it? I couldn't find any information in the database which user created which album.
I created plugin `icy_category_modify` though I haven't had any commit to it yet =) I will put it in the TODO.
I've put all latest changes into new tag 2.0.1 as you can see in https://github.com/icy/icy_picture_modify/tags . I haven't put it on Piwigo release system yet. Some more testings would help to kill some bugs.
If you know how to use git, you can test the plugin (esp. the development branch) easily. Here are commands on the Linux machine
$ cd /path/to/your/piwigo/ $ cd plugins/ $ rm -rf icy_picture_modify $ git clone git://github.com/icy/icy_picture_modify.git $ chmod 700 icy_picture_modify/.git # protect the folder from public accesses
To fetch the latest update from the github
$ git pull
Actually this is the way I am using the plugin in my production site ;)
Last edited by icy (2012-07-09 14:25:30)
Offline
delakut wrote:
The 'synchronize metadata' and 'delete photo' icons are missing equal what setting I use in the icy_acl.zml config file.
Fixed in [Github] icy_picture_modify commit 39a733bb
(and [Github] icy_picture_modify commit ed8e51b7 , for the "delete" icon issue.)
Last edited by icy (2012-07-09 14:29:35)
Offline
icy wrote:
-The arrows under the field 'Is thumbnails for' and 'Is not thumbnails for' are not displayed on my page.
What's your themes? This is often due to themes settings.
stripped + stripped-galleria (stripped-galleria is based on stripped theme and needs stripped 2.x.)
http://piwigo.org/ext/extension_view.ph … 27#rev3527
http://piwigo.org/ext/extension_view.ph … 34#rev3534
I thought I also checked other themes. I guess I did not doublecheck that:(
The stripped + stripped-galleria theme is not working with your plugin. The edit link is not showing up. I needed to make some changes to the stripped-galleria/template/thumbnails.tpl.
That's what I changed (stripped-galleria/template/thumbnails.tpl):
add: owner: '{/literal}{$thumbnail.FILE_OWNER}{literal}', user_id: '{/literal}{$user_id}{literal}', catid: '{/literal}{$catid}{literal}', after: thumb: '{/literal}{$derivative->get_url()}{literal}', image: '{/literal}{$my->get_url()}{literal}',
add: var owner = this.getData(gid).owner; var user_id = this.getData(gid).user_id; var catid = this.getData(gid).catid; after: var hashd = this.getData(gid).piwigo_hashd;
replace: jQuery("#downloadlink").hide(); with: if (user_id == owner) { jQuery("#downloadlink").html('edit').attr('title', 'edit photo'); jQuery("#downloadlink").prop("href","index.php?/icy_picture_modify&cat_id="+catid+"&image_id="+pid); jQuery("#downloadlink").show(); } else { jQuery("#downloadlink").hide(); }
That's the only way I found to add a edit link for your plugin for the stripped-galleria theme.
Offline