I want, add user profile field in users tabale up to 20 I want, add user profile field in users tabale up to 20
 

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]

Main Menu

I want, add user profile field in users tabale up to 20

Started by mlsbv, September 01, 2007, 08:33:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mlsbv

Hi everyone
I want, add user profile field  in users tabale up to 20 fields. please guide me to do it.

Thanks


Joachim Müller

There is no simple 1,2,3 hack to accomplish this. You'd have to modify coppermine's core code in many places. This is way beyond what you can expect from regular support. Afaik there is a mod that adds some more fields (but not 20 as far as I remember) - search the board for it. Remember that this is not a hotline, so you should review your attitude when bumping. Also, don't expect to be spoon-fed.

chris.h

Looking to do this myself, only need a couple more feilds but searching gives me no help, I can see this thread asking for the same http://forum.coppermine-gallery.net/index.php?topic=40845.0

I have searched several times but am yet to find the mod nor any hint as to which files would need editing - I've gone back to 2004 with searches but haven't found anything yet... 

???

Nibbler

Regular fields are named user1 to user4, so searching for user5 gives you the relevant results.

http://forum.coppermine-gallery.net/index.php?topic=35263.0

chris.h

Many thanks for that. I had been searching for titles like profile, layout, add profile fields, arrays ect...

Looks just the job.  ;D

chris.h

Ah, Actually this all looks familiar now I've read through it. Judging from the list of files...

db_input.php
displayimage.php
editOnePic.php
editpics.php
lang/english.php
lang/french.php
image_processor.php
include/picmgmt.inc.php
include/search.inc.php
thumbnails.php
upload.php
xp_publish.php

This would add fields to the image description and image upload area? Where as what I and the OP's were trying to do was add fields to the profile page.

Can anyone confirm that this edit is for image description and not profile - before I edit my database?
Many thanks.




chris.h

Yeah, just double checked and this is indeed to add fields for image upload, not for the profile page, will see if I can work out how to do that from whats listed on that link...

Any hints much appreciated.  ???

chris.h

#8
Okay, Well, It all seems to be working now. I'll try to give a brief rundown of what worked for me in case it helps someone in the future - especially when they see the 'solved' tag and get all excited...

Files edited:

admin.php
profile.php
register.php
charsetmgr.php
include/init.inc.php
usermgr.php

It was generally quite simple once you find which files have the relevant code. Mostly it was just a matter of finding listings like


'user_profile1' => $user_data['user_profile1'],
'user_profile2' => $user_data['user_profile2'],
'user_profile3' => $user_data['user_profile3'],


and then adding another few after.

Then editing the database and adding appropriate fields in to the cpg1411_users table and the one that caused me a lot of problems to find, the cpg1411_config table.

The only problem I had was in editing the language file. When I add the new names in there the site goes down with an error. Also I was unable to get the new profile areas to show up within the admin page. I don't know why that was, in fact at one point they were there and now they aren't.

However as I set up the field titles in the database while adding them to it, it works for me and I'm claiming a partial victory...
;D




chris.h

I wish there was an edit button so I could fix my spelling  ::)

Nibbler

Done. Thanks for posting what you did and sorry for pointing you at the wrong thing. You don't really need to change the charset manager.

chris.h

No problem, the thread was a good help.

Ah, thanks for that re the charset manager. Must admit I got stuck at one point, before I found the other table of the db to be edited, and did get a bit lost in the files.

I might attempt to get the admin side working at some point and will post in here if I do.

Thanks.