|
|
Re:User selectable private/public profile- SOLVED!
|
|
Date: 2006/08/22 19:31
|
By: planetkarl.com
|
Status: User
|
|
|
Karma: 0  
|
|
Fresh Joomlapolitan  | Posts: 19 |   | |
|
|
Don't forget to add the cb_publicprofile field to the user profile !
|
|
The topic has been locked. |
|
|
|
Re:User selectable private/public profile- SOLVED!
|
|
Date: 2006/08/23 02:11
|
By: ffaabbss
|
Status: User
|
|
|
Karma: 5  
|
|
Gold Joomlapolitan  | Posts: 290 |   | |
|
Hi there!
Great! So with that code users can actually select themselves whether their profile is visible or not???
Would be so simple! Thx
|
|
The topic has been locked. |
|
|
|
Re:User selectable private/public profile- SOLVED!
|
|
Date: 2006/08/23 04:25
|
By: Phleum
|
Status: User
|
|
|
Karma: 0  
|
|
Junior Joomlapolitan  | Posts: 36 |   | |
|
This is MARVELOUS!
It seems to work for me, and it was a real simple change to make. In mine, I split up the "if" so that I could post another message instead of the access denied message. I also set it up to work with cb_publicprofile as a radio button, because I thought the message at registration was clearer that way.
instead of
| Code: |
if (!allowAccess( $ueConfig['allow_profileviewbyGID'],'RECURSE', userGID($my->id)) || $publicprofile == 0) {
echo _UE_NOT_AUTHORIZED;
return;
}
|
I inserted
| Code: | if (!allowAccess( $ueConfig['allow_profileviewbyGID'],'RECURSE', userGID($my->id)) ) {
echo _UE_NOT_AUTHORIZED;
return;
}
else if ( $publicprofile == "no") {
echo "This user has chosen not to display his or her profile in the directory.";
return;
}
|
As a result, unless the "no" radio button is checked, the profile is viewable. so if you don't set cb_publicprofile to be required, the profiles default to be viewable.
Since it's a hack, I figured it was silly to make another language variable for the new message. If only it could be done as a plug-in so not to hack the core file?
Thanks so much! I've needed this to get around some other more clumsy processes.
Post edited by: Phleum, at: 2006/08/23 04:31
|
|
The topic has been locked. |
|
|
|
Re:User selectable private/public profile- SOLVED!
|
|
Date: 2006/09/02 12:25
|
By: active_innovation
|
Status: User
|
|
|
Karma: 0  
|
|
Fresh Joomlapolitan  | Posts: 7 |   | |
|
not done it for me yet.
As a newbie need to know the absolute basic how to add cb_publicprofile.
so better get searching the forum
|
|
The topic has been locked. |
|
|
|
|
Re:User selectable private/public profile- SOLVED!
|
|
Date: 2006/09/02 12:31
|
By: ptkho
|
Status: User
|
|
|
Karma: 0  
|
|
Junior Joomlapolitan  | Posts: 28 |   | |
|
|
Great to see that it works! However, it's a hack so with the next update we need to hack it in again. Is there someone who can make this hack a plugin? This ease it for all of us. Or is it perhaps possible to make it part of the core of CB as many of us needs this option. Who can take care of this?
|
|
The topic has been locked. |
|
|