User selectable private/public profile

13 years 2 months ago #19418 by planetkarl.com
Don't forget to add the cb_publicprofile field to the user profile !
13 years 2 months ago #19445 by ffaabbss
Hi there!

Great! So with that code users can actually select themselves whether their profile is visible or not???

Would be so simple!
Thx
13 years 2 months ago #19450 by Phleum
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:1]
if (!allowAccess( $ueConfig,'RECURSE', userGID($my->id)) || $publicprofile == 0) {
echo _UE_NOT_AUTHORIZED;
return;
}
[/code:1]
I inserted

[code:1] if (!allowAccess( $ueConfig,'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;
}[/code:1]

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
13 years 2 months ago #20070 by active_innovation
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
13 years 2 months ago #20072 by ptkho
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?
Moderators: beatnantkrileon
Time to create page: 1.322 seconds
Facebook Twitter Google LinkedIn