php forum
php mysql forum
php mysql smarty
 
Topic Options
#316022 - 10/17/07 01:11 AM Show/edit Custom Profile Field in CP
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25452
Loc: Texas
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?

smile
_________________________
- Allen wavey
- What Drives You?

Top
#316025 - 10/17/07 02:06 AM Re: Show/edit Custom Profile Field in CP [Re: AllenAyres]
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5134
Loc: Portland, OR, USA
I was wondering why these weren't available lol... I mean, everything else is smirk... Maybe we can have SD squeeze it in for 7.3...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#316026 - 10/17/07 02:10 AM Re: Show/edit Custom Profile Field in CP [Re: Gizmo]
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5134
Loc: Portland, OR, USA
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.
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#316027 - 10/17/07 02:10 AM Re: Show/edit Custom Profile Field in CP [Re: Gizmo]
sirdude Moderator Offline
Enthusiast

Registered: 11/08/03
Posts: 442
Loc: SoCal
Originally Posted By: Gizmo
I was wondering why these weren't available lol... I mean, everything else is smirk... 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.. wink
_________________________

Top
#316029 - 10/17/07 02:12 AM Re: Show/edit Custom Profile Field in CP [Re: Gizmo]
blaaskaak Offline
Enthusiast

Registered: 02/25/07
Posts: 304
Loc: The Netherlands
I can edit those custom fields fine from here.

Code:
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.


Edited by blaaskaak (10/17/07 02:15 AM)
_________________________

Top
#316032 - 10/17/07 11:38 AM Re: Show/edit Custom Profile Field in CP [Re: blaaskaak]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25452
Loc: Texas
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
_________________________
- Allen wavey
- What Drives You?

Top
#316033 - 10/17/07 11:47 AM Re: Show/edit Custom Profile Field in CP [Re: AllenAyres]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25452
Loc: Texas
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)
_________________________
- Allen wavey
- What Drives You?

Top
#316034 - 10/17/07 11:53 AM Re: Show/edit Custom Profile Field in CP [Re: AllenAyres]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25452
Loc: Texas
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
_________________________
- Allen wavey
- What Drives You?

Top
#316040 - 10/18/07 09:53 AM Re: Show/edit Custom Profile Field in CP [Re: AllenAyres]
sirdude Moderator Offline
Enthusiast

Registered: 11/08/03
Posts: 442
Loc: SoCal
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.. wink
_________________________

Top
#316041 - 10/18/07 10:44 AM Re: Show/edit Custom Profile Field in CP [Re: AllenAyres]
blaaskaak Offline
Enthusiast

Registered: 02/25/07
Posts: 304
Loc: The Netherlands
Could be very easey to do... Just empty the name of whatever custom field you want to use, and add before

Code:
if ($config['CUSTOM_FIELD_1']) {


in /admin/showuser.php

Code:
$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.
_________________________

Top


Moderator:  sirdude 
Who's Online
0 registered (), 23 Guests and 12 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Wisdom needed
by Gizmo
Today at 10:54 AM
How to hide sub forums from summary page
by blaaskaak
Yesterday at 09:54 AM
Spell Check [beta]
by Bill B
12/01/08 09:16 PM
PhotoPost BB Code Popup
by AllenAyres
12/01/08 09:41 AM
Problems reading a lot of old posts here
by AllenAyres
12/01/08 09:35 AM
Forum 'Trader Ratings'.
by AllenAyres
12/01/08 09:33 AM
Customization needed
by Gizmo
11/12/08 12:28 PM
New Mods
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Spell Check [beta]
by
10/17/06 09:24 PM
Newest Members
Truth, David DelMonte, nick1, Begbie, cenk
13364 Registered Users
Top Posters
AllenAyres 25452
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks