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 Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
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 Offline

Wizard

Registered: 01/10/00
Posts: 5354
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 & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

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

Wizard

Registered: 01/10/00
Posts: 5354
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 & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

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

Registered: 11/08/03
Posts: 490
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: 329
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 Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
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 Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
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 Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
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 Offline
Enthusiast

Registered: 11/08/03
Posts: 490
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: 329
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 
Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks