Log in

View Full Version : Hide User Contact Info From Guests


peterska2
11-18-2005, 10:00 PM
What it does: Hides the user contact info part of the profile from guests.

Difficulty: Easy
Templates to Edit: 1 MEMBERINFO (4 edits to same template)
Phrases to add: 2

How to install: Download the attached text file and follow the instructions.

What does it look like?: See attached screenshots. One is for a guest and the other for a member.

I want to see a live demo: Go to www.peterska2.co.uk (http://www.peterska2.co.uk) and take a look at the profiles there.

If you use this please remember to click the install button. It's the only way I know if you like what I do.

There is now an option to make this a user selectable option. To upgrade an existing install download the zip and follow the instructions in the file marked UPGRADE. For a fresh install use the file marked NEWINSTALL

Updated 06 Jan 2006 @ 1855 GMT: Added instructions for user selectable show and hide.

Updated 09 Dec 2005 @ 2320 GMT: Added new text file for 3.5.2 instructions as last edit has changed.


Important information regarding support - 20/04/06
Due to time constraints and the amount of things that are being planned for future modifications, priority support will now be provided here (http://www.peterska2.co.uk/showthread.php?t=19202). Support provided in this thread will be on an as and when basis.

TyleR
11-19-2005, 09:45 PM
Installed and works perfect, thanks :D

* TyleR clicks install

slvr ralliart
11-20-2005, 03:31 AM
anyway to let the guest know that the people's info is private because they are a guest and can't view unless they are a registered member?

Mastar
11-20-2005, 04:43 AM
For some reason I'm getting this error:

The following error occurred when attempting to evaluate this template:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/****/domains/****.com/public_html/includes/adminfunctions_template.php(3532) : eval()'d code on line 206

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

Dsyn11
11-20-2005, 07:29 AM
I'm new to this stuff. Where exactly do I add the "phrases" part?

Yorixz
11-20-2005, 08:42 AM
I'm new to this stuff. Where exactly do I add the "phrases" part?
Go to your AdminCP, click "Languages & Phrases" -> "Phrase Manager" -> "Add New Phrase"

@Topic; thanks, trying it out now.

Dsyn11
11-20-2005, 09:18 AM
Got it! Thanks very much!

peterska2
11-20-2005, 09:55 PM
For some reason I'm getting this error:

The following error occurred when attempting to evaluate this template:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/****/domains/****.com/public_html/includes/adminfunctions_template.php(3532) : eval()'d code on line 206

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

Did you do all 4 edits before attemptiing to save? If you didn't do all four then it will error as you will have unfinished if statements.

anyway to let the guest know that the people's info is private because they are a guest and can't view unless they are a registered member?

You can change the phrases to display different text. You might want to consider something along the lines of "Contact Info is available to members only"

Snake
11-21-2005, 11:27 AM
Great hack!

Snake
12-09-2005, 09:04 AM
And is it going to work on 3.5.2?

Mastar
12-09-2005, 02:56 PM
Did you do all 4 edits before attemptiing to save? If you didn't do all four then it will error as you will have unfinished if statements.



You can change the phrases to display different text. You might want to consider something along the lines of "Contact Info is available to members only"

Installed with no errors, the forth template is alittle off since vb3.52

Boofo
12-09-2005, 05:30 PM
Nice work, Princess. But wouldn't it be better just to not allow guests to see member info? ;)

peterska2
12-09-2005, 09:13 PM
Installed with no errors, the forth template is alittle off since vb3.52

I'll check it out and see about an update

peterska2
12-09-2005, 09:13 PM
Nice work, Princess. But wouldn't it be better just to not allow guests to see member info? ;)

That stops them from viewing the profile. This just hides the email, PM, homepage, and IM stuff on the profile page.

peterska2
12-09-2005, 09:21 PM
Installed with no errors, the forth template is alittle off since vb3.52

I've updated the text file. Thanks for pointing this out.

Snake
12-10-2005, 12:01 PM
Can this be a user-option and edit via the Usercp?

peterska2
12-10-2005, 04:30 PM
Don't see why not. Leave it with me and I'll get it coded when I get chance. ie not tonight as I'm going out to a Christmas party

Snake
12-21-2005, 11:32 AM
Well any luck with it yet?

Snake
01-04-2006, 04:36 PM
Don't see why not. Leave it with me and I'll get it coded when I get chance. ie not tonight as I'm going out to a Christmas party

No news?!

EricaJoy
01-05-2006, 09:29 PM
Yes, it would be nice to see this as a user selectable option.

peterska2
01-06-2006, 02:47 PM
I've just back from my Christmas break. I'm playing catch up then I'll double check the code I threw together and if it works ok then I'll get it released.

Snake
01-06-2006, 04:11 PM
Cool, I'll be waiting... :)

peterska2
01-06-2006, 04:43 PM
Damn, I have a major bug. You'll have to bear with me.

Snake
01-06-2006, 04:48 PM
No worries, I am a patient man.

peterska2
01-06-2006, 04:59 PM
Finally. It just took a couple of massive changes instead of a couple of little ones.

I've uploaded a zip called 'User_Selectable' that contains the upgrade and fresh install instructions.

Snake
01-06-2006, 05:12 PM
Thanks, I'm gonna install it now! :)

EricaJoy
01-07-2006, 03:51 PM
w00t! thank you ma'am!

peterska2
01-07-2006, 03:57 PM
you're both welcome :)

EricaJoy
01-07-2006, 04:36 PM
hrm, the user selectable option didn't quite behave properly. probably because i have modified my memberinfo template so much. no worries though, its doing its ultimate job of hiding members contact info from guests.

peterska2
01-07-2006, 04:59 PM
Yeah it only works with the default layout not with your mega-customized one.

silurius
01-07-2006, 05:16 PM
Been looking for something like this, nice one. Is it possible to control by usergroup? I want contact info to show up for an internal team to that team only.

peterska2
01-07-2006, 05:21 PM
I guess so. I'll have to see about it. Will you want it fixed or user selectable as I'll need to write the code accordingly.

silurius
01-07-2006, 05:22 PM
Beggars can't be choosers, but user-selectable would be cool (I can always set options on the backend).

peterska2
01-07-2006, 05:34 PM
Ok, I'll code it up.

peterska2
01-07-2006, 05:48 PM
Been looking for something like this, nice one. Is it possible to control by usergroup? I want contact info to show up for an internal team to that team only.

OK, here goes.

Instead of <if condition="$show[registerbutton]">use<if condition="$bbuserinfo[usergroupid]!='x'">where x is the usergroupid number of the usergroups that you want to be able to view it. You will need to change both instances of this.

silurius
01-07-2006, 08:08 PM
Thanks again, I'll continue playing around with this!

One issue I'm having with it currently is that I have the "Force Users to Fill in Required Fields" hack installed, which is not very specific when it asks users to go update their profile (they do not think to look in the options for this one, and even if they look there the option does not explicitly state that it is required).

As is, it's a little more than halfway towards meeting an internal team requirement. I'll be playing around with it to see what more I can do. Love it!

Would gladly tip if this could be made into a product, whereby:



Members can define by dropdown which usergroups can view their IM contact info (perhaps could be made more generic so people can add other contact stuff like phone info).
Admins can define which usergroups are visible in said dropdown.
Nice-to-have: Members can define by dropdown which specific IM or other contact options are visible to said usergroups. (This would permit opening up certain types of contact info to the world, and keeping others somewhat private).

rnmcd
01-09-2006, 04:08 AM
How much of a change is needed for this to work with 3.5.3?

peterska2
01-09-2006, 09:48 PM
@ Silurius: I'm not planning on doing any more major development work to this at present.

@ rnmcd: It should work perfectly fine.

Dsyn11
01-12-2006, 04:36 AM
good hack, but there's a hole:

in member list, you can still click on the AIM/MSN/etc icons to get the names. Shouldn't be too hard to fix, but I don't have much time right now. Anyone want to tackle this? :D

peterska2
01-12-2006, 10:28 AM
Ah, now I'd completely forgot about that. I'll get a fixed knocked up later today.

kallelm
01-14-2006, 09:40 PM
I tried installing it and it just hides all the user info from everyone. I revert the template and tried again. Still no luck. I'm running 3.5.3. I know I've goofed up somewhere. Can you tell me if it works for 3.5.3 first before I try again?

peterska2
01-15-2006, 09:53 PM
it should work on 3.5.3, I've not actually got round to upgrading yet though so can't confirm this totally. I'm not aware of any siginificant changes to the templates that would prevent it though.

rnmcd
01-15-2006, 09:59 PM
Ah, now I'd completely forgot about that. I'll get a fixed knocked up later today.

Were you able to do the fix for post #39?

peterska2
02-12-2006, 01:03 AM
Sorry, been mega busy with school and a load of clients all wanting things doing at once so I sorta forgot.

I'll try and get it done sometime this week.

???`S?LV?R???`
03-31-2006, 10:21 PM
Is it working ok on 3.5.4?

peterska2
04-04-2006, 02:17 AM
yes it is.

Chadi
04-18-2006, 03:20 AM
I got a problem here:

The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/chadi/public_html/includes/adminfunctions_template.php(3537) : eval()'d code on line 208

I had inserted below the mentioned code (in instructions)

<if condition="$show[registerbutton]">
<if condition="$userinfo[field18]=No">
<tr>
<td>
$vbphrase[contact_is_private]
</td>
</tr>
</if>
<else />

What is the issue?

peterska2
04-18-2006, 12:28 PM
try
<if condition="$userinfo[field18]==No">instead of
<if condition="$userinfo[field18]=No">

also it is better to use<if condition="$show[member]">instead of <if condition="$show[registerbutton]">

peterska2
04-19-2006, 10:21 PM
Important information regarding support - 20/04/06
Due to time constraints and the amount of things that are being planned for future modifications, priority support will now be provided here (http://www.peterska2.co.uk/showthread.php?t=19202). Support provided in this thread will be on an as and when basis.

Chadi
04-22-2006, 11:54 PM
What about hiding from COPPA users or banned users?

Chadi
04-22-2006, 11:58 PM
Problem..see attached

Why is it suddenly showing the actual full IM (I blotted it out) and the hidden message, when it is not hidden? I was logged in also.

I attached my full MEMBERINFO template.

peterska2
04-23-2006, 08:52 PM
Problem..see attached

Why is it suddenly showing the actual full IM (I blotted it out) and the hidden message, when it is not hidden? I was logged in also.

I attached my full MEMBERINFO template.

ok, you had your end code for the IM section in the wrong place as you have added additional info to that section.

Try the attached file instead.

peterska2
04-23-2006, 08:53 PM
What about hiding from COPPA users or banned users?

A new build is in development. This will use usergroup permissions to set who can and can't view the contact info. It will also fix other known problems with this mod.

COBRAws
05-02-2006, 12:41 AM
A new build is in development. This will use usergroup permissions to set who can and can't view the contact info. It will also fix other known problems with this mod.
maybe a plugin? :D

peterska2
05-02-2006, 12:43 AM
IT will be a product when it is finished. Development has been slow due to a number of personal issues, but is continuing slowly but steadily.

ztempuser
05-28-2006, 12:34 AM
im haveing some trouble im running vb 3.5.1 the skype is not in the sytem yet

i get this line when i go to a profile

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/user/public_html/forum/member.php(652) : eval()'d code on line 327

peterska2
05-28-2006, 12:39 AM
I recommend upgrading to 3.5.4 as there are a number of bugs that have been fixed, and additional functionality such as skype added to it.

If you are unable to upgrade to the latest version for whatever reason, the line to find, instead of the skype one, will be

<if condition="$userinfo['showyahoo']">
<tr>
<td>$userinfo[yahooicon]</td>
<td><a href="#" dir="ltr" onclick="imwindow('yahoo', '$userinfo[userid]', 400, 200); return false;">$userinfo[yahoo]</a></td>
</tr>
</if>

If not, then I will need to redownload 3.5.1 and go through the style xml to find the correct part.

ztempuser
05-28-2006, 12:50 AM
GREAT works:)
ya im not planning on upgradeing, as my forum as a down side, its heavy on the modded side, contless adds and changes
thanks for the fast reply and help *clicks insall*
great hack

peterska2
05-28-2006, 12:52 AM
Glad it worked. :D

I wasn't looking forward to the prospect of having to trawl through a massive style file to find a couple of lines :p Now I can rest easy again.

ztempuser
05-28-2006, 12:54 AM
:knockedout:

SHalliday
06-06-2006, 01:39 AM
Clicks Install

Worked Great. Thanks!

chkdgate
07-08-2006, 08:34 PM
Installed it perfectly. At the moment I have very few members on my forum so I'll knoww soon enough if something's missing but I doubt it. Thanks for this!

*clicks install*

Mikkito
08-13-2006, 10:05 PM
On top of the memberslist, you can still see the contact info in posts done by a user.

peterska2
08-13-2006, 10:12 PM
Yes, there are some known places where the info is still visible in this version.

I rewrote it and fixed all these bugs in the 3.6 version.

Strike3ForumsMH
09-05-2006, 04:24 PM
OK, here goes.

Instead of <if condition="$show[registerbutton]">use<if condition="$bbuserinfo[usergroupid]!='x'">where x is the usergroupid number of the usergroups that you want to be able to view it. You will need to change both instances of this.
Has anyone had any luck with this on 3.54? I've tried this a few times and it's not working for me at all. I haven't tried the default listed method, but I would only need this if I could use it for two usergroups (guests and one registered group.)

Thanks in advance.

peterska2
09-05-2006, 09:02 PM
where are you putting it and what exactly is the code you are using?

Strike3ForumsMH
09-06-2006, 12:28 AM
I am using the hidecontactinfo352 instructions and instead of using:
<if condition="$show[member]">

I've used:
<if condition="$bbuserinfo[usergroupid]!='5,6,7,9,10,11'">

I wasn't for sure on that last part, but I entered in the usergroups that I want to have the ability to view contact info. And I used that in place of the showmember code for both instances of it. And I have the phrases added.

I am sure I goofed on that somewhere as it's not hard for me to do from time to time. Any help you can give when you give the time will be ery much appreciated Kerry-Anne. If you need some other info that I failed to provide, let me know.

Thanks again.

Strike3ForumsMH
09-15-2006, 06:15 PM
I understand that peterska2 might be busy (given all the support they give), so anyone else who has done what I am attempting to do (but did it successfully) could lend a hand, it would be appreciated. I am sure it's some goofy error on my part.

If not, no worries.

peterska2
09-15-2006, 09:15 PM
try<if condition="is_member_of($usergroup, 5,6,7,9,10,11)">instead.

Strike3ForumsMH
09-15-2006, 11:50 PM
No error messages this time like with what I did, but the contact info still shows up. Perhaps it's coming into conflict with another code I have. I will try it again when I upgrade to 3.6 in the future (without the various codes and such added back in yet), as I can't see anything wrong with what you provided to assist me. Thanks for all your help. :)

PoetJA-1975
01-21-2007, 02:32 PM
Nice - works lovely in 3.6.4
Lots of template edits - but worth it for Member privacy
Thanx for sharing!

Jacquii.

pmkb
03-25-2008, 02:04 PM
Does this work with v3.6.8?