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: Edit Username/Owner in edit picture?  (Read 11966 times)

0 Members and 1 Guest are viewing this topic.

alfisti.net

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
    • http://alfisti.net
Edit Username/Owner in edit picture?
« on: January 16, 2004, 11:27:36 am »

Hello Community,

coppermine is very great, runs perfect and there is no problem with the vbulletin bridge :) thanks a lot! great work!!!
I want to switch my gallery from 4images to coppermine, there is no import script so I decided to import by hand (there are "only" <500 pics to import).

I want to ftp all pictures in coppermine and run the batch. But I don´t want lost the user/owner of the picture because I need the "profile.php?uid" function.

Is there a (easy) way to add the field user/owner to the edit page of the album/pic? I use vbulletin V3 RC2. I don´t need a sequrity request if the user is existing, I make no mistakes ;)

This option can be very helpfull if a user want to upload a lot of pictures, so he can send all the files to a admin, he make a ftp-upload and run the batch (with username) or edit after import all usernames of the new pictures.

Or is there a other way to import the pictures incl. the user/owner name/ID?

Thanks a lot!
André
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Edit Username/Owner in edit picture?
« Reply #1 on: January 16, 2004, 05:04:19 pm »

this will require some database manipulation, but don't despair - help is on the way.

Some pre-requisites:
  • you need a tool like phpMyAdmin
  • do not put the pics into "albums/userpics" !
  • do not put the pics into one single folder within "albums", but choose a folder structure that somehow reflects your gallery's structure (with the pics inside one special folder "belonging" to only user as owner[/list:u]That being said, just go to your phpMyAdmin page, select the db you installed coppermine in (in the left frame, may not be necessary if you only have one db). Click on "SQL" in the top navigation of the right frame, so a box will apear where you can enter queries. Click into the box and paste something like
    Code: [Select]
    UPDATE `cpg11d_pictures` SET `owner_id` = '12345678' WHERE `filepath ` = 'folder1/subfolder1/';into it, whith "12345678" being the owner_id you want to assign and "folder1/subfolder1" being the relative path (within albums) where the pics of this users are stored in. Hit "OK", so the query will be run.
    This should be about it.... Enjoy

    GauGau

    P.S. As always, when manipulating your database: do backup your database first, so you could go back if disaster should strike!
Logged

alfisti.net

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
    • http://alfisti.net
Edit Username/Owner in edit picture?
« Reply #2 on: January 16, 2004, 08:13:15 pm »

Thank you! :)

this will work for the mass-uploaded pics :) fine!

but for the single uploader I need also a single switch.
I´am not a (php) programmer! So I will try to explain:

a addition in editpic.php
find in table "_pictures" field "owner_name" and display it so that the admin can overwrite it.
if there is a new value get the "owner_id" for the new value of "owner_name" and write the value back in "owner_name" and "owner_id". verständlich?

Is this possible and easy or can I forget it?

ok, I just think about a other way :) I can copy the 4images table, change the field names to the coppermine field names and then I can change the vars. I only need to know if (and how) I can use your example for more than 1 changeing a time. for example
if var1=1 set var1=9
else
if var=2 set var1=1
else    ...etc.

so that I can change the album completely. That must work...

Thank you very much!
André
Logged

Servaas

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Edit Username/Owner in edit picture?
« Reply #3 on: February 14, 2006, 07:35:07 pm »

Hello, sorry for bumping this old topic.

Is it possible to do this GUI-based through a mod of some sorts? I've done a search already but I only found some code for cpg1.2, I'm using 1.4. (most of the 'find this' is missing from the files specified)

edit: Oh I'm in 1.2 support forum. Didn't notice. Well it's about the same subject, kind of.
« Last Edit: February 14, 2006, 07:44:14 pm by Servaas »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Edit Username/Owner in edit picture?
« Reply #4 on: February 16, 2006, 08:49:08 am »

as you already have found out, you're on the wrong board, it deals with another version, so your posting here goes ignored and un-answered. If you have a cpg1.4.x-question, then post it on the appropriate board. Thread locked.
Logged
Pages: [1]   Go Up
 

Page created in 0.028 seconds with 19 queries.