|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
Howdy, I'm looking to show a custom profile field (#2) in the control panel's 'view user profile' screen and I need to edit/save it. Anyone else looked into something like this before I go digging myself? 
|
|
|
|
Joined: Jan 2000
Posts: 5,834 Likes: 20
UBBDev Owner Time Lord
|
UBBDev Owner Time Lord
Joined: Jan 2000
Posts: 5,834 Likes: 20 |
I was wondering why these weren't available lol... I mean, everything else is  ... Maybe we can have SD squeeze it in for 7.3...
|
|
|
|
Joined: Jan 2000
Posts: 5,834 Likes: 20
UBBDev Owner Time Lord
|
UBBDev Owner Time Lord
Joined: Jan 2000
Posts: 5,834 Likes: 20 |
Odd, looks like so long as the custom field's name is set (as in not being blank in the member settings) it shows in the fields section of the user profile edit screen in the admin cp.
|
|
|
|
Joined: Nov 2003
Posts: 482
Enthusiast
|
Enthusiast
Joined: Nov 2003
Posts: 482 |
I was wondering why these weren't available lol... I mean, everything else is  ... Maybe we can have SD squeeze it in for 7.3... ..er it just checks for not NULL... so fill it in and *poof* it shows.. this is how it's worked all along.. 
|
|
|
|
Joined: Feb 2007
Posts: 329
Yarp™
|
Yarp™
Joined: Feb 2007
Posts: 329 |
I can edit those custom fields fine from here. if ($config['CUSTOM_FIELD_1']) { That peace of code decides if you can edit it or not I think, just set it, and you'll be able to edit it in the membermanage section.
Last edited by blaaskaak; 10/17/2007 2:15 AM.
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
OK, thank you - I need it to remain hidden from the public/user too. I'll see what happens when I select 'hidden' on the reg screen and make it editable in the cp
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
That works, set the info above to "1" in the correct profile field and voila! ex: $extra2text = "1";
(for those following along it's in the /admin/showuser.php file around line #350)
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
bah, that shows it to the public in the public profile page... not going to be as easy. I'll just remove reference to that in the public profile template
|
|
|
|
Joined: Nov 2003
Posts: 482
Enthusiast
|
Enthusiast
Joined: Nov 2003
Posts: 482 |
yah, i did the same thing with a special field we used for 'alcatraz visits' it was a counter for the number of times we put a user in 'jail' for being bad. just an fyi, you have the admin notes field that is by design hidden.. 
|
|
|
|
Joined: Feb 2007
Posts: 329
Yarp™
|
Yarp™
Joined: Feb 2007
Posts: 329 |
Could be very easey to do... Just empty the name of whatever custom field you want to use, and add before if ($config['CUSTOM_FIELD_1']) { in /admin/showuser.php $config['CUSTOM_FIELD_1']="yabayabayaba"; That way it's empty everywhere else, only when you view that profile from a user from within control panel, the field would be shown.
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 254
Joined: January 2000
|
|
Forums63
Topics37,575
Posts293,931
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|