Announcement

  •  » Extensions
  •  » normal users delete own images ?

#1 2012-09-04 12:05:02

lukenuke
Guest

normal users delete own images ?

Hi piwigo team,

fantastic software!
I'm trying to set up a community-site for uploading fotos with the latest version of piwigo and the nice theme 'gally-minimalist' and everything works fine, but:
To let normal users manage their own albums, the community-plugin does not let them delete their own images. I am trying to use the 'icy modify pictures'-plugin right now and it does not work well together with this theme.
Now, is there a way for me to get a simple 'delete'-button with the picture instead of the 'modify picture'-button when a user is watching his own images? This would be absolutely enough for my purpose: if somone is not happy with textdetails of a picture, he could simply delete it and upload again.

maybe I can modify the icy-plugin or use some parts of it?

I'm not a coder, so please be patient with me.

Thanks,
nukeluke

 

#2 2012-09-04 14:12:19

icy
Translation Team
Vietnam
2011-06-30
105

Re: normal users delete own images ?

lukenuke wrote:

Hi piwigo team,

fantastic software!
Now, is there a way for me to get a simple 'delete'-button with the picture instead of the 'modify picture'-button when a user is watching his own images? This would be absolutely enough for my purpose: if somone is not happy with textdetails of a picture, he could simply delete it and upload again.

What's version of the plugin that you are using?

The plugin has option to allow user to delete and/or modify their own picture. In general usage, some people can edit an image, but they won't be able to delete that image. So there may be at most two icons: one for "edit", one for "delete".

Do you really want to merge these two icons?

Last edited by icy (2012-09-04 14:12:51)

Offline

 

#3 2012-09-04 15:21:18

lukenuke
Guest

Re: normal users delete own images ?

The version is 2.0.2

to define what a user can do, I used the icy-acl.zml like this:

user1:
  edit_image_of: user1
  delete_image_of: user1
  upload_image_to: sub, 19
  moderate_image: no
  create_gallery_to: 19, sub
  associate_image_to: no
  present_image_to: any

when user1 is logged in and visits one of his own images, he sees a 'change information' icon (maybe the text is a little different, I'm using he german version). this icon could be a 'delete' icon - for my use.
then nobody gets to the 'picture modify page' which looks not so clean with this theme. but the user could simply delete what he does not like.
I know, your plugin is much more sophisticated. I fear -for my limited knowledge of php- I can't make it look like for example the 'upload pictures page'. the nav-location on the upper left only shows 'home' and the rest of the page looks close to but not similar. I removed {combine_css path= 'admin/themes/default/'|@cat:'theme.css'} so its a little better than in the beginning.

I think this could be an acceptable workaround but maybe you have a different approach?

 

#4 2012-09-04 16:18:17

icy
Translation Team
Vietnam
2011-06-30
105

Re: normal users delete own images ?

I understand your problem now :) Let me think if I can implement in the main code.

Thank you.

Offline

 

#5 2012-09-07 15:46:51

Kalle
Member
2012-08-17
89

Re: normal users delete own images ?

Does the  'icy modify pictures'-plugin kill the "upload" feature of the community plugin?

Is it possible, to use the groups combined with the user rights?
By default, i like to control the rights over groups and not a need to define them for each user.
The user ACL can be used for individual rights, overwriting the group rights for an album tree.

Offline

 

#6 2012-09-09 07:13:58

icy
Translation Team
Vietnam
2011-06-30
105

Re: normal users delete own images ?

Kalle wrote:

Does the  'icy modify pictures'-plugin kill the "upload" feature of the community plugin?

yes. To enable "Upload" feature you need to configure in the file 'icy.zaml'

Is it possible, to use the groups combined with the user rights?
By default, i like to control the rights over groups and not a need to define them for each user.
The user ACL can be used for individual rights, overwriting the group rights for an album tree.

I am working on group support. The feature is coming.

Last edited by icy (2012-09-09 10:58:12)

Offline

 

#7 2012-09-09 15:04:11

icy
Translation Team
Vietnam
2011-06-30
105

Re: normal users delete own images ?

Group support has been added in the latest version v2.1.0.

See details in doc/ https://github.com/icy/icy_picture_modi … master/doc

Last edited by icy (2012-09-09 15:04:56)

Offline

 

#8 2012-09-09 15:11:46

icy
Translation Team
Vietnam
2011-06-30
105

Re: normal users delete own images ?

@lukenuke

Today I've taken a look at your issue. Unfortunately there isn't a simple way to resolve it. That's due to the fact that Piwigo only provides hook to provide a link to modify the picture, not to delete the picture. (You need to modify the template, and add some PHP code in Piwigo system. It isn't really easy.) If you really need to add a link to "delete" your image, you need to do two things

* Add a CSS class for "delete" button (the button image, the button class,... for your theme gally/minimalist.)
* Add some custom PHP code in my plugin (I can provide some helps.)

About the theme issue: In the latest version v2.1.0, I clean up most css tricks, and I also remove the date-picker. Now the image's edit form is now clean, and most of its style now rely on theme settings. You are now free to modify it to fit in your purpose.

Hope this helps

Last edited by icy (2012-09-10 01:22:58)

Offline

 

#9 2012-09-10 09:33:19

Kalle
Member
2012-08-17
89

Re: normal users delete own images ?

icy wrote:

Group support has been added in the latest version v2.1.0.

See details in doc/ https://github.com/icy/icy_picture_modi … master/doc

Thank you, but the limitations for the group name could be a big problem if users can register a new account with the same name of an existing group.

Offline

 

#10 2012-09-10 09:53:38

icy
Translation Team
Vietnam
2011-06-30
105

Re: normal users delete own images ?

Kalle wrote:

icy wrote:

Group support has been added in the latest version v2.1.0.

See details in doc/ https://github.com/icy/icy_picture_modi … master/doc

Thank you, but the limitations for the group name could be a big problem if users can register a new account with the same name of an existing group.

I see. To keep the code clean and fast, I have no other way so far. (Note, a single user can be considered as a special group with only one member)

You may try the plugin "UserAdvManager" that helps you to disallow some special characters in the user name. Then you may use those special characers in all of your groups. This is only a work-around, though.

Last edited by icy (2012-09-10 09:54:12)

Offline

 

#11 2012-09-11 09:42:47

lukenuke
Guest

Re: normal users delete own images ?

Ok, with my coding knowledge the modifacation of the 'modify picture' button do get a 'delete button' on the picture page seems obsolete.

Maybe I can get the 'modify picture' page right with your help - I'm using the stripped them now.

1. The browse path on the top left points to 'home', how can I make it point to the actual album or photo?

2. How can I replace the 'delete icon' by a simple text with a check box. I don't need a 'are you shure?' then as well.

3. The description field is very small, where can I find the css to change that?

Thanks for the patience!

 

#12 2012-09-11 21:12:39

lukenuke
Guest

Re: normal users delete own images ?

fixed most but this is still an issue:

The browse path on the top left points to 'home', how can I make it point to the actual album or photo?

 

#13 2012-09-11 22:49:36

icy
Translation Team
Vietnam
2011-06-30
105

Re: normal users delete own images ?

lukenuke wrote:

fixed most but this is still an issue:

The browse path on the top left points to 'home', how can I make it point to the actual album or photo?

I am sorry for my belated response. I intended to reply you this morning (7:00 ICT).

It's nice to hear that you've fixed most issues. For the remained,, I am a bit confused. Could you give me a screenshot?

Thanks,

Offline

 

#14 2012-09-12 09:23:42

lukenuke
Guest

Re: normal users delete own images ?

ok, I'll try:
album:
http://www.target-design.com/pix/album.JPG
picture:
http://www.target-design.com/pix/picture.JPG
modify:
http://www.target-design.com/pix/modify.JPG

If this works, you should see that the browse path on the top left shows (menu)+home
instead of (menu)+home+album+name of picture

thanks!

 

#15 2012-09-12 09:38:32

icy
Translation Team
Vietnam
2011-06-30
105

Re: normal users delete own images ?

lukenuke wrote:

If this works, you should see that the browse path on the top left shows (menu)+home
instead of (menu)+home+album+name of picture

I understand now.

I am afraid that the problem comes from your theme (What's its name?). My plugin doesn't modify the menu system (you can check in the template file *icy_picture_modify.tpl*.) I did a check the page on some themes, and I have no similar issues.

Please let me know if I can help.

Offline

 
  •  » Extensions
  •  » normal users delete own images ?

Board footer

Powered by FluxBB

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