Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: How can i add a "edit my pictures" button for the users to edit only their files  (Read 4879 times)

0 Members and 1 Guest are viewing this topic.

stan85in

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20

I need to add a sub_menu button which will allow each registered users to "edit/display all their own pictures" they have uploaded themselves into the public albums, without displaying the pictures uploaded by other users? Assuming that the registered users only uploads their pictures into the public albums created by the administrator, and the users should be able to view/edit their uploaded pictures just by clicking on the newly added sub-menu button. Currently coppermine doesn't have this feature yet. Is there a way to do that?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760

You can use the 'lastupby' meta album to display all pictures uploaded by a particular user. So you could create your menu item and link to that meta album imo.
Logged

stan85in

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20

I tried to use 'lastupby' by creating a sub menu button and then pointing the link to http:/mysite.com/thumbnails.php?album=lastupby&uid=1&cat=-5 so that when a user is logged on, he can click this sub menu button to view all pictures uploaded by him, in all of the albums he choosed but unfortunately it didn't work. Any suggestion to modify the link? Thanks.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760

What exactly doesn't work? Afaik the cat parameter is ignored for that meta album.
Logged

stan85in

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20

Do you mind giving me an example of how i can use 'lastupby' meta album to display all pictures uploaded by a particular user. how i do link to that meta album imo. (what is imo) Thanks Again.
Logged

stan85in

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20

I used the link as pointing to http:/mysite.com/thumbnails.php?album=lastupby&uid=2 which seemed to work fine for User ID=2 only, but i need to make it this way that only the user logged in at the time will see his uploads. This "uid=2" points to user with ID=2, but if user with ID=3 or ID=4 uses the same link i created for the Sub Menu Button, they will be directed to the pictures uploaded by User ID=2. I would like the User ID=3 or ID=4 to access their own last uploads, just by clicking on the Sub Menu Button link. Thanks.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760

You need to create a placeholder and replace it with the link (including the correct user id, which is stored in the constant USER_ID) if the user is logged in. Attach your complete theme to your next reply if cannot figure it out yourself.
Logged

stan85in

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20

I have attached my theme.txt file for your review since the attachment does not allow upload of .php file. I will need help with this feature. Do i need to provide link to my website?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760

Please attach your theme folder as zip file (which resides in 'themes/') and not the file include/themes.inc.php.
Logged

stan85in

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20

I have attached theme.zip
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760

I cannot find your button in that file.
Logged

stan85in

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20

Thank a lot Andre, for your hints and clues. I finally found out where i was going wrong. Much Appreciated.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760

Don't just post "I have found the answer", but tell others what you actually did to solve your issues. Posting a link to the page where you found the answer might help. Describing what you did might help as well.
Logged

stan85in

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20

I Created a Sub Menu Button called "My Pictures" by editing my theme/theme.php file and then i pointed the Sub Menu button link to http:/mysite.com/thumbnails.php?album=lastupby&uid=2. So that when a user uploaded several files, the users can click on the sub menu button "My Pictures" anytime while browsing and can view all the uploads they have ever created. Check it out here at: www.ifoundasale.com     Register a username first, upload any pictures, enter details and then try it to see if it works. It worked for me, so i hope it works for others too.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760

i pointed the Sub Menu button link to http:/mysite.com/thumbnails.php?album=lastupby&uid=2
I doubt that this solution will work for different users. You have to create a token like thumbnails.php?album=lastupby&uid={USER_ID} and replace that token later with the appropriate USER_ID.
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.