PDA

View Full Version : Hide User Contact Info From Guests


peterska2
01-10-2006, 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
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
01-12-2006, 09:35 PM
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
01-13-2006, 07:51 AM
Hi

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

peterska2
01-13-2006, 10:42 PM
I'll need to see about redoing it. Do you need it to be user selectable, or just hidden from everyone except staff?

almqdad
01-14-2006, 10:28 AM
Hi

thank you peterska2

just hidden from everyone except staff?

that is what I need

great hack

peterska2
01-15-2006, 09:55 PM
ok, I'll get it coded up as soon as I have a free few mins

almqdad
01-16-2006, 05:54 AM
Hello

that is very kind of you peterska2

peterska2
01-18-2006, 09:29 PM
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
04-19-2006, 10:11 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=19689). Support provided in this thread will be on an as and when basis.

Yahookan
05-17-2006, 09:08 PM
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*