User selectable private/public profile

15 years 4 weeks ago #19418 by planetkarl.com
Replied by planetkarl.com on topic Re:User selectable private/public profile- SOLVED!
Don't forget to add the cb_publicprofile field to the user profile !

Please Log in to join the conversation.

15 years 4 weeks 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

Please Log in to join the conversation.

15 years 4 weeks 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

Please Log in to join the conversation.

15 years 2 weeks ago #20070 by active_innovation
Replied by active_innovation on topic Re:User selectable private/public profile- SOLVED!
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

Please Log in to join the conversation.

15 years 2 weeks 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?

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.169 seconds

Facebook Twitter LinkedIn