PDA

View Full Version : Hide User Contact Info From Guests


peterska2
11 Jan 2006, 23:36
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
Profile Fields to add: 1 (for userselectable version only)

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. It's running 3.5.x but it works exactly the same.

There are two text files attached.
always_hide_from_guests.txt is a fixed thing were it hides it and that is the end of the story.
userselectable_hide_from_guests.txt gives an option in the userCP to show or hide contact info from guests.
If you use this please remember to click the install button. It's the only way I know if you like what I do.

If there are any bugs please let me know. I've coded this directly from the style.xml file for 3.0.x without a site running it. I'm confident it will work, but if there are any bugs I'll get them fixed. Thanks.


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=19689). Support provided in this thread will be on an as and when basis.

apfparadise
12 Jan 2006, 23:35
Great stuff, excellent. Installed.

I did one thing differently. I want to drive registrations, and since this allows the members to see it, saying it's "private" is not really accurate.

I made my Phrases like this:


Please <a href="http://your-forum.url/forum/register.php">REGISTER</a> to see this info.

almqdad
13 Jan 2006, 09:51
Hi

what about hiding user info from members too and just allow morderator

peterska2
14 Jan 2006, 00:42
I'll need to see about redoing it. Do you need it to be user selectable, or just hidden from everyone except staff?

almqdad
14 Jan 2006, 12:28
Hi

thank you peterska2

just hidden from everyone except staff?

that is what I need

great hack

peterska2
15 Jan 2006, 23:55
ok, I'll get it coded up as soon as I have a free few mins

almqdad
16 Jan 2006, 07:54
Hello

that is very kind of you peterska2

peterska2
18 Jan 2006, 23:29
Ok, sorry for the delay there.

Use the always_hide_from_guests instructions but replace <if condition="$show[member]">with<if condition="$show[modcplink]">

This needs to be done in steps one and three.

Any problems let me know.

peterska2
20 Apr 2006, 00:11
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=19689). Support provided in this thread will be on an as and when basis.

Yahookan
17 May 2006, 23:08
I haven't played with the user selectable one yet but the first works fine. I used the register htmlin my phrase too as it seemsmore appropriate.

I have also stripped the messenger contacts from the postbit/postbit_legacy by replacing:

<if condition="$post[icqicon]">$post[icqicon]</if> <if condition="$post[aimicon]">$post[aimicon]</if> <if condition="$post[msnicon]">$post[msnicon]</if> <if condition="$post[yahooicon]">$post[yahooicon]</if></div>

With:

<if condition="$show[member]"><if condition="$post[icqicon]">$post[icqicon]</if> <if condition="$post[aimicon]">$post[aimicon]</if> <if condition="$post[msnicon]">$post[msnicon]</if> <if condition="$post[yahooicon]">$post[yahooicon]</if><else />
&nbsp;<br>
$vbphrase[contact_is_private]
</if></div>

Thanks!

*clicks install*