Announcement

  •  » Miscellaneous
  •  » unofficial mirror; allow users to modify their images

#31 2012-07-10 03:22:24

icy
Translation Team
Vietnam
2011-06-30
105

Re: unofficial mirror; allow users to modify their images

delakut wrote:

That's the only way I found to add a edit link for your plugin for the stripped-galleria theme.

Very nice catch and patches. :)

`icy_modify_plugin` uses the official hooks to provide the links to the themes. I will take a look if the problem can be resolved from my plugin. Otherwise we need to report to the theme's author for helps.

Offline

 

#32 2012-07-10 04:27:55

icy
Translation Team
Vietnam
2011-06-30
105

Re: unofficial mirror; allow users to modify their images

I did take a look. The themes `stripped` and `stripped-galleria` are much different from the default theme. By default, Piwigo disallows user to modify their pictures, so I guess that most themes naturally doesn't support the `edit link`, except for the admin interface.

I've added a link to your post in `KNOWN PROBLEMS` in README. Commit [Github] icy_picture_modify commit 46fc019f .

Thanks again.

Offline

 

#33 2012-07-11 15:31:31

icy
Translation Team
Vietnam
2011-06-30
105

Re: unofficial mirror; allow users to modify their images

I've released new version v2.0.2.

You can download from Management Console in Piwigo or from Github https://github.com/icy/icy_picture_modify/tags

ChangeLOG (excerpt)

2.0.2 2012-07-11

- Fix various bugs
- Beautiful UI for image linking/association form

2.0.1 2012-07-09

- Advance ACL support in local ZAML file
- Upload permission can be specified in new ACL
- Doesn't require any settings from the plugin `community`

Offline

 

#34 2012-08-07 10:19:28

delakut
Member
Munich, Germany
2012-02-14
9

Re: unofficial mirror; allow users to modify their images

I got the following message when I upload images to piwigo.

Notice: Undefined index: prefix_thumbnail in /var/www/html/webxxx/html/gallery/plugins/icy_picture_modify/add_photos.php on line 158

You can find the configuration setting "$conf['prefix_thumbnail']" in line 158 what was removed in piwigo version 2.4.
http://piwigo.org/doc/doku.php?id=dev:changes_in_2.4

Offline

 

#35 2012-08-07 11:52:03

icy
Translation Team
Vietnam
2011-06-30
105

Re: unofficial mirror; allow users to modify their images

delakut wrote:

You can find the configuration setting "$conf['prefix_thumbnail']" in line 158 what was removed in piwigo version 2.4.

Thank you very much. I've fixed in

[Github] icy_picture_modify commit 7c32dc6d

Regards,

Offline

 

#36 2012-08-09 15:45:33

Joergen
Translation Team
Germany
2011-09-30
114

Re: unofficial mirror; allow users to modify their images

Hi  icy,

when I activate your plugin the "Upload Picture" link in the Menu disappears for users.

Is this a matter of the config file?

I want users to upload pictures to their folders edit the pic. data and may be delete the pic. if needed.

Rgs.
Joergen

Offline

 

#37 2012-08-09 16:03:01

icy
Translation Team
Vietnam
2011-06-30
105

Re: unofficial mirror; allow users to modify their images

Hello Joergen,

Joergen wrote:

when I activate your plugin the "Upload Picture" link in the Menu disappears for users.

Is this a matter of the config file?

I want users to upload pictures to their folders edit the pic. data and may be delete the pic. if needed.

I guess that is config file problem. In the new version, you need to edit the file local/config/icy_acl.zml (the format and the example can be found at https://github.com/icy/icy_picture_modi … master/doc). For example, the configuration

Code:

default:
  upload_image_to: sub, 179

xyz:
  upload_image_to: sub

will allow
* all users to upload images to the category whose identity is 179, and to sub categories of that one.
* the user xyz to upload images to any categories

Hope this helps,

PS: I am sorry that I haven't had time and enough research to add GUI for the plugin. I will take a look at it in the future.

Offline

 

#38 2012-08-09 17:19:49

IGraham
Member
UK
2011-09-28
193

Re: unofficial mirror; allow users to modify their images

Hello ICY
I to have the missing upload photos link for registered users, the main man has gone silent on sorting this so I'm hoping you can help
Your saying I'm to find the file local/config/icy_acl.zml - local/config does not contain such a file
Do you mean in piwigo/local/config where the only ICY file is icy_acl.php (contents of below), if so which bit would I alter to bring back the upload photos link

-------------------------
Icy_acl.php
--------------------------
<?php

// ICY_ACL for plugin 'icy_picture_modify'

// WARNING | This is a PHP file. Wrong editting will break your
// WARNING | Piwigo installation. All lines started by // are comments.

// WARNING | Your Piwigon installation MUST NOT have a user whose
// WARNING | login identity is "owner". See below for a reason.

// When the plugin is working, it will first local default settings from
//
//  PIWIGO_ROOT/plugins/icy_picture_modify/include/icy_acl_default.php
//
// This file is written by plugin's author, which allows any users to
// change properties of their image (for example). You shouldn't modify
// that file, as it is overwritten when the plugin is updated/upgraded.

// After that, the plugin tries to load ACL from the file
//
//        PIWIGO_ROOT / PWG_LOCAL_DIR / config / icy_acl_default.php
//
// (for a normal installation, the PWG_LOCAL_DIR is ./local/). In this
// file you can change default behaviors of the plugin, and/or permissions
// for any users in your installation.

if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');

$ICY_ACL_DEFAULT =  // Default rules for logged in users
  array(
    // Images user can edit. Please note that 'owner' is a special keywords
    // to specify owner of an image. To support this purpose, your Piwigo
    // system shouldn't have any user whose login is "owner"
    'can_edit_image_of'    => 'owner',  // edit image of their own
    'can_delete_image_of'  => FALSE,    // can't delete image after uploading
    /* categories */
    'can_upload_image_to' => FALSE,             // no place for uploading
    'can_upload_image_to_sub_album' => TRUE,
    'can_associate_image_to' => FALSE,
    'can_associate_image_to_sub_album' => TRUE,
    'can_present_image_to' => FALSE,
    'can_present_image_to_sub_album' => TRUE,

    /* other properties */
    // The plugin can work with or without the plugin 'community'. List
    // of categories to which user can upload will be used by ICY_ACL.
    // Other settings of 'community' are ignored. To completely ignore
    // the plugin 'community', you may used "FALSE" instead of "TRUE"
    // Please note this setting may be overwritten by per-user settings.
    'load_plugin_community' => TRUE
  );

///// PER-USER SETTINGS ////////////////////////////////////////////////

// Settings for user 'ruby'

$ICY_ACL['ruby'] = array(
    /* list of galleries to which they can upload */
    'can_upload_image_to'    => array(12, 123, 312),

    // List of authors whose images are editable by this user
    // To allow user to edit all images, use
    //  'can_edit_image_of'  => "any",
    'can_edit_image_of'      => array('ruby','foobar'),
    'can_associate_image_to' => array(29, 26, 15, 16, 11),

    // list of categories user can change their presentation image
    // The keywords "any" means "all categories"
    'can_present_image_to'   => "any",

    /* 'ruby' can't delete their own images in these galleries */
    'can_delete_image_of' => FALSE,
  );

// Settings for user = 'python'

$ICY_ACL['khoalong'] =  array(
    'can_edit_image_of' => FALSE,
    'load_plugin_community' => FALSE,
  );

///// YOUR SETTINGS ARE ABOVE THIS LINE ////////////////////////////////
?>

Offline

 

Notice: Undefined offset: 5 in /var/www/piwigo.org/forum/include/parser.php on line 551

#39 2012-08-09 17:47:45

icy
Translation Team
Vietnam
2011-06-30
105

Re: unofficial mirror; allow users to modify their images

IGraham wrote:

Hello ICY
I to have the missing upload photos link for registered users, the main man has gone silent on sorting this so I'm hoping you can help
Your saying I'm to find the file local/config/icy_acl.zml - local/config does not contain such a file
Do you mean in piwigo/local/config where the only ICY file is icy_acl.php (contents of below), if so which bit would I alter to bring back the upload photos link

What's the version of the plugin that you are using? For the latest one (the plugin version 2.*.*), you can create that file if it is missing:

1/ create that file if it is missing
2/ put your configuration there in the file local/config/icy_acl.zml (please check example in [Github] icy_picture_modify file doc/icy_acl.zml.sample )
3/ If you are using the plugin "community" to set up the permission , you need to migrate to my plugin, as all settings in the plugin "community" are ignored by my plugin (this is due to different way used to set up permissions in two plugins.)

Hope this helps. And I am sorry if there is trouble that new plugin would cause at your side.

Last edited by icy (2012-08-09 17:48:36)

Offline

 

#40 2012-08-10 09:51:03

Joergen
Translation Team
Germany
2011-09-30
114

Re: unofficial mirror; allow users to modify their images

Hi icy,

I am trying to understand the config file. I want all my users to upload pictures to the folder I assign to them.
They should have the possibility to add sub folders in this and delete pictures.
They should not edit other folders or pictures.

default:
  edit_image_of: owner
  delete_image_of: no
  upload_image_to: sub
  moderate_image: no
  create_gallery_to: sub
  associate_image_to:
  present_image_to:

Is this possible with this config? (of course in a icy_acl.zml file)

Offline

 

#41 2012-08-10 11:20:46

icy
Translation Team
Vietnam
2011-06-30
105

Re: unofficial mirror; allow users to modify their images

Joergen wrote:

Hi icy,

I am trying to understand the config file. I want all my users to upload pictures to the folder I assign to them.
They should have the possibility to add sub folders in this and delete pictures.
They should not edit other folders or pictures.

default:
  edit_image_of: owner
  delete_image_of: no
  upload_image_to: sub
  moderate_image: no
  create_gallery_to: sub
  associate_image_to:
  present_image_to:

Is this possible with this config? (of course in a icy_acl.zml file)

This isn't work. Could you describe your problem here (or via email: my email is kyanh at viettug dot org). I'd like to know

* What's folder you want your users to upload files to?
* What do you mean "assign to them"? I don't see that assigment in the above configuration

If possible, could you please give me an example with some sample users, category id and images. If such information is so private, you may send it to my email instead.

Regards,

Offline

 

#42 2012-08-10 12:55:11

IGraham
Member
UK
2011-09-28
193

Re: unofficial mirror; allow users to modify their images

Hello ICY

I think Joergen wants the same as me.
A registered user can see the 'upload photos' link in the left side menu and upload to whatever folders the user has been permissions to view (given elsewhere in Piwigo)
At the moment for a registered user if 'Icy Modify Picture' is installed this link can not be seen, nor can the cross tools icon on the photo page - making Icy Modify Picture unusable
I've had to uninstall Icy Modify Picture to allow a user to upload - the up loader does give the user folder options and limited text input options

Last edited by IGraham (2012-08-10 12:56:04)

Offline

 

#43 2012-08-10 20:27:25

icy
Translation Team
Vietnam
2011-06-30
105

Re: unofficial mirror; allow users to modify their images

IGraham wrote:

Hello ICY

I think Joergen wants the same as me.
A registered user can see the 'upload photos' link in the left side menu and upload to whatever folders the user has been permissions to view (given elsewhere in Piwigo)
At the moment for a registered user if 'Icy Modify Picture' is installed this link can not be seen, nor can the cross tools icon on the photo page - making Icy Modify Picture unusable
I've had to uninstall Icy Modify Picture to allow a user to upload - the up loader does give the user folder options and limited text input options

I understand.

If you are using the plugin "community" to allow user to upload images to some directory, please note that my plugin will ignore all settings of that plugin. To allow some user to upload images to some directories, you need to edit the file icy_acl.zml as decribed above. My plugin doesn't have management console. If you dont' think that would be an issue, my plugin would help.

This is true for version 2.*.* of my plugin. The previous version 1.*.* wont' overwirte "Community"'s settings, though.

Offline

 

#44 2012-08-11 10:57:36

IGraham
Member
UK
2011-09-28
193

Re: unofficial mirror; allow users to modify their images

Hi ICY
As I quite like your plugin (I know some of my users were using the functionality it gives) do you think that you could update it to work as was with the Community plugin. No rush of course (glances at watch) when ever you're the time and inclination   :))

Offline

 

#45 2012-08-11 11:30:33

icy
Translation Team
Vietnam
2011-06-30
105

Re: unofficial mirror; allow users to modify their images

IGraham wrote:

Hi ICY
As I quite like your plugin (I know some of my users were using the functionality it gives) do you think that you could update it to work as was with the Community plugin. No rush of course (glances at watch) when ever you're the time and inclination   :))

Thank you:)

My plugin can work with community, as long as you don't use settings from "community" and you configure all permissions by using the new format icy_acl.zaml. The current version of "community" can't allow a users to upload to multiple categories, that's why I have to write this format for my plugin.

I don't have much time to work on the management console and/or to overwite the webUI of "community". I will take a look but I can't promise "when".

I provide an example of my real working configuration that I used for my site http://vonhudieu.net/ . Hope this helps.

Code:

# Default settings is to allow users to edit their own images
default:
  edit_image_of: owner
  delete_image_of:
  upload_image_to: sub
  moderate_image: no
  create_gallery_to: sub
  associate_image_to:
  present_image_to:

# Icy is a power user, he can upload images to any categories,
# can edit any images uploaded by ruby and khoalong. But he
# can only make presententation and associate images for/to
# the category 10 and its subs categories. This user can only be
# able to delete images of his own and of the account 'ruby'
icy:
  upload_image_to: any
  edit_image_of: any, khoalong, ruby
  associate_image_to: 10, sub
  present_image_to: 10, sub
  delete_image_of: owner, ruby
  moderate_image: no
  create_gallery_to: 10, sub

# Ruby is similar to 'icy'. I use the account 'icy' at home with strong
# password protected by PC. The account 'ruby' has a weaker password
# and I can use that account from my office. To reduce the risk,
# this account is not allowed to delete any images
ruby: @icy
  delete_image_of:

# 'khoalong' is a another active user on the system.
# He can do anything with his categories 32 32 34 and 35.
# He can edit and delete his own images.
khoalong:
  delete_image_of: owner
  moderate_image: no
  upload_image_to: sub, 31, 32, 34, 45
  present_image_to: sub, 31, 32, 34, 45
  create_gallery_to: sub, 31, 32, 34, 45

Last edited by icy (2012-08-11 11:32:15)

Offline

 
  •  » Miscellaneous
  •  » unofficial mirror; allow users to modify their images

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact