PDA

View Full Version : Hide User Contact Info From Guests


peterska2
19 Nov 2005, 23:43
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
19 Nov 2005, 23:45
Installed and works perfect, thanks :D

/me clicks install

slvr ralliart
20 Nov 2005, 05:31
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
20 Nov 2005, 06:43
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
20 Nov 2005, 09:29
I'm new to this stuff. Where exactly do I add the "phrases" part?

Yorixz
20 Nov 2005, 10:42
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
20 Nov 2005, 11:18
Got it! Thanks very much!

peterska2
20 Nov 2005, 23:55
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
21 Nov 2005, 13:27
Great hack!

Snake
09 Dec 2005, 11:04
And is it going to work on 3.5.2?

Mastar
09 Dec 2005, 16:56
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
09 Dec 2005, 19:30
Nice work, Princess. But wouldn't it be better just to not allow guests to see member info? ;)

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

I'll check it out and see about an update

peterska2
09 Dec 2005, 23:13
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
09 Dec 2005, 23:21
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
10 Dec 2005, 14:01
Can this be a user-option and edit via the Usercp?

peterska2
10 Dec 2005, 18:30
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
21 Dec 2005, 13:32
Well any luck with it yet?

Snake
04 Jan 2006, 18:36
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
05 Jan 2006, 23:29
Yes, it would be nice to see this as a user selectable option.

peterska2
06 Jan 2006, 16:47
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
06 Jan 2006, 18:11
Cool, I'll be waiting... :)

peterska2
06 Jan 2006, 18:43
Damn, I have a major bug. You'll have to bear with me.

Snake
06 Jan 2006, 18:48
No worries, I am a patient man.

peterska2
06 Jan 2006, 18:59
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
06 Jan 2006, 19:12
Thanks, I'm gonna install it now! :)

EricaJoy
07 Jan 2006, 17:51
w00t! thank you ma'am!

peterska2
07 Jan 2006, 17:57
you're both welcome :)

EricaJoy
07 Jan 2006, 18:36
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
07 Jan 2006, 18:59
Yeah it only works with the default layout not with your mega-customized one.

silurius
07 Jan 2006, 19:16
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
07 Jan 2006, 19:21
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
07 Jan 2006, 19:22
Beggars can't be choosers, but user-selectable would be cool (I can always set options on the backend).

peterska2
07 Jan 2006, 19:34
Ok, I'll code it up.

peterska2
07 Jan 2006, 19:48
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
07 Jan 2006, 22:08
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
09 Jan 2006, 06:08
How much of a change is needed for this to work with 3.5.3?

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

@ rnmcd: It should work perfectly fine.

Dsyn11
12 Jan 2006, 06:36
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
12 Jan 2006, 12:28
Ah, now I'd completely forgot about that. I'll get a fixed knocked up later today.

kallelm
14 Jan 2006, 23:40
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
15 Jan 2006, 23:53
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
15 Jan 2006, 23:59
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
12 Feb 2006, 03:03
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.

`SLVR`
01 Apr 2006, 00:21
Is it working ok on 3.5.4?

peterska2
04 Apr 2006, 04:17
yes it is.

Chadi
18 Apr 2006, 05:20
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
18 Apr 2006, 14:28
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
20 Apr 2006, 00:21
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
23 Apr 2006, 01:54
What about hiding from COPPA users or banned users?

Chadi
23 Apr 2006, 01:58
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
23 Apr 2006, 22:52
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
23 Apr 2006, 22:53
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
02 May 2006, 02:41
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
02 May 2006, 02:43
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
28 May 2006, 02:34
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
28 May 2006, 02:39
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
28 May 2006, 02:50
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
28 May 2006, 02:52
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
28 May 2006, 02:54
:knockedout:

SHalliday
06 Jun 2006, 03:39
Clicks Install

Worked Great. Thanks!

chkdgate
08 Jul 2006, 22:34
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
14 Aug 2006, 00:05
On top of the memberslist, you can still see the contact info in posts done by a user.

peterska2
14 Aug 2006, 00:12
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
05 Sep 2006, 18:24
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
05 Sep 2006, 23:02
where are you putting it and what exactly is the code you are using?

Strike3ForumsMH
06 Sep 2006, 02:28
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
15 Sep 2006, 20:15
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
15 Sep 2006, 23:15
try<if condition="is_member_of($usergroup, 5,6,7,9,10,11)">instead.

Strike3ForumsMH
16 Sep 2006, 01:50
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
21 Jan 2007, 16:32
Nice - works lovely in 3.6.4
Lots of template edits - but worth it for Member privacy
Thanx for sharing!

Jacquii.

pmkb
25 Mar 2008, 16:04
Does this work with v3.6.8?