Arrow Home arrow Forums
larger font smaller font default font Fixed screen resolution Auto adjust screen size

Joomlapolis Forums  


<< Start < Prev 1 2 3 Next > End >>
Re:User selectable private/public profile- SOLVED!
Date: 2006/08/22 19:31 By: planetkarl.com Status: User  
Karma: 0  
Fresh Joomlapolitan

Posts: 19
graphgraph
Don't forget to add the cb_publicprofile field to the user profile !
Click here to see the profile of this user 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
graphgraph
Hi there!

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

Would be so simple!
Thx
Click here to see the profile of this user 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
graphgraph
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
Click here to see the profile of this user 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
graphgraph
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
Click here to see the profile of this user 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
graphgraph
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?
Click here to see the profile of this user The topic has been locked.

<< Start < Prev 1 2 3 Next > End >>

Documentation

Documentation Subscription Service
(updated for CB 1.2 RC2)

What?

Why?

Where?

Just click here for answers!

Click here for a yearly subscription: subscribe now

Download Latest Release

The latest stable Community Builder Release is version 1.1 for Joomla 1.0 and Mambo.
You need to be a registered member of Joomlapolis to download.

The latest release candidate of Community Builder is version 1.2 RC3, native for Joomla 1.0, 1.5 and Mambo.
It is available as "thank you" to all CB documentation subscribers at this time.

CB Login