Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
2 registered (Dunny, Ruben), 48 Guests and 14 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 06/05/06
Posts: 709
Top Posters (30 Days)
Ruben 50
DennyP 24
Gizmo 24
Dunny 15
SteveS 13
AllenAyres 12
dbremer 10
SD 10
drkknght00 9
driv 8
Latest Photos
OK Corral Shoot Out
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Topic Options
#221144 - 01/15/09 07:41 AM Selectively hiding custom fields in profile display?
whk Offline
journeyman
Registered: 01/09/09
Posts: 74
Loc: Portsmouth, RI
I'm making "Custom Field 1" the location where I will store the link to an external database record for the user who registers. I'd like to make it so this field is only visible by the individual user who is logged in, and Administrators. The record it links to has personal data that I don't want visible to the world or other users.

I found the file showprofile.tpl and deleted {$CUSTOM_FIELD_1} near the end of the script to prevent it from displaying as a temporary work around. Can somebody tell me what the code is so I can replace this:

{$CUSTOM_FIELD_1}
{$CUSTOM_FIELD_2}
{$CUSTOM_FIELD_3}
{$CUSTOM_FIELD_4}


with code that has this logic:

if (Administrator #or# Log in ID = Profile ID being viewed)
{$CUSTOM_FIELD_1}
end if
{$CUSTOM_FIELD_2}
{$CUSTOM_FIELD_3}
{$CUSTOM_FIELD_4}


I am not a programmer, but I do understand the logic. I don't know what the correct variable names are, or the proper syntax for conditionals.

Also - other than the showprofile.tpl file, is there anywhere else where anyone except that user or the administrator would have Custom Field 1 visibility? I'd like to modify those files too.

Ideally this could be a longer term UBB Thread change to the control panel so the fields can be checked as "private" or "public"

Thanks,
Bill
Top
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#221438 - 01/22/09 06:18 PM Re: Selectively hiding custom fields in profile display? [Re: whk]
whk Offline
journeyman
Registered: 01/09/09
Posts: 74
Loc: Portsmouth, RI
I came up with a more elegant scheme and posted it on the UBBDev forum at this Link

The answer is to modify the /scripts/showprofile.inc.php file with the necessary logic.
Top



Moderator:  AllenAyres, Harold, Ian, Ron M 
Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Temporary Password email not being received
by
05/24/12 10:02 PM
Ability to "like" individual posts (not Facebook "likes)
by doug
05/23/12 09:03 AM
Island Permissions
by ThreadsUser
05/22/12 03:03 PM
streaming video
by prkrgrp
05/20/12 07:02 PM
New Posts Corrupted? Can someone help?
by PianoWorld
05/19/12 09:41 AM
Forum Stats
10492 Members
36 Forums
33842 Topics
181709 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image