Log in

View Full Version : Hide Profile Fields


Mellymonster
05-29-2009, 01:18 PM
Hey,

Is there away for member to hide the option to see all profile fields, What I mean is say a member doesn't want to see someone elses mini profile fields, like age, gender, and so on? Is there away that members can choose not to see other peoples stuff?

Does this make since?

Lynne
05-29-2009, 02:51 PM
There is no default vbulletin option to do what you want. But, you could create a new profile field and allow users to say Yes or No to seeing mini profile fields and then put a condition around those things based on the users profile field.

Mellymonster
05-31-2009, 05:28 AM
what do you mean by putting a condition around those things based on the users profile field? It sounds easy, but I'm just not understanding this part.

Lynne
05-31-2009, 06:09 PM
Well, say I create a profile field and it's field x. Then I put a condition around stuff like:
<if condition="$bbuserinfo[fieldx] === 'Yes'"><div>stuff</div></if>It's hard to give specifics on such general questions.

Mellymonster
05-31-2009, 06:39 PM
Ok I'm trying to visual this in my head hehe...

Make a profile field called like "Single - Selection Radio Buttons"

Title: (like) "Hide mini profile"
Options: yes and no

Would I use "Regular ExpressionYou may require the input field to match a regular expression"?

Then in my postbit template, I add that condition, correct?

Lynne
05-31-2009, 06:58 PM
I cannot think of why you would want to use the regular expression field, so no.

Now see what profile field id is assigned to the field.

Then find the template, and put the conditon around it based on the profile field. Or, a plugin may be better. Just play with it and see.

Mellymonster
05-31-2009, 07:05 PM
Ok I think I get it now, thanks I will come back if I fail miserably haha...

Edit: wait erm, where it says "Stuff" what stuff do I add? I get the fieldx but I'm not sure about the "Stuff"...

Lynne
05-31-2009, 07:07 PM
"Stuff" is the stuff you want to show or hide depending on the field option yes or no.

Biker_GA
05-31-2009, 07:11 PM
There IS a much easier way. Under Profile Privacy, just have the user select which items they want viewable and to whom.

Mellymonster
05-31-2009, 07:36 PM
Biker, yes, but some members do not want to see any icons in the mini profiles, on other posts, so not sure if that will work.

Thanks, Lynne, will see if this works :)

Lynne
05-31-2009, 07:39 PM
There IS a much easier way. Under Profile Privacy, just have the user select which items they want viewable and to whom.
This is not about a user hiding info on their own profile. It's about a user going to someone else's profile and choosing to not see certain information.

Biker_GA
05-31-2009, 07:55 PM
Boy did I miss read that one! I need a nap! :D

Mellymonster
05-31-2009, 07:58 PM
Ok this is what I put
<if condition="$bbuserinfo[field18] === 'Yes'"><div>Gender Status Icon</div></if>

should I put a comma between Gender and status Icon? or did I do that bit wrong?

Lynne
05-31-2009, 08:33 PM
Where did you put that code? And, you need to put the actual *code* from the templates between the conditon.

Mellymonster
05-31-2009, 08:38 PM
I put it in my postbit...

So you mean like the field number?

Lynne
05-31-2009, 09:02 PM
Here is an example from my site. I have field 6 which asks users whether they wish to see post count or not:
<if condition="$bbuserinfo[field6] === 'Yes'"><div>$vbphrase[posts]: $post[posts]</div></if>
So, if field 6 says Yes (they do wish to see a users post count), then the post count is shown.

Mellymonster
05-31-2009, 09:15 PM
hmm it is still not working for me..

Field18 asks if members want to show postbit icons like "Gender, and status"

<if condition="$bbuserinfo[field18] === 'no'"><div>$vbphrase[gender]: $gender[gender]</div></if>

I only have it for gender right now, but I set mine to no, and I still see them.

Lynne
05-31-2009, 09:38 PM
Well, your logic says "if it's set to no, show it" which is the opposite of what you want. You want, "if it's set to yes, then show it".

Mellymonster
05-31-2009, 09:46 PM
Ok so I changed it to
<if condition="$bbuserinfo[field18] === 'yes'"><div>$vbphrase[gender]: $gender[gender]</div></if>

but its still not working on my end, and I did switch my answer to yes on my end.

Lynne
05-31-2009, 10:02 PM
Well, if you switched your answer to yes, then it is going to show according to that condition.

Mellymonster
05-31-2009, 10:18 PM
hmm ok now I'm lost, which really doesn't take much for me.

Lynne
05-31-2009, 10:27 PM
OK, maybe the example you are using isn't a good one because vbulletin doesn't have a field $gender[gender] and so it's hard for me to tell if your code is correct or not. Can you try it with a default vbulletin field?

HMBeaty
05-31-2009, 10:34 PM
Try using this:

<if condition="$bbuserinfo['field18'] != 'Yes'"><div>$vbphrase[gender]: $gender[gender]</div></if>


--------------- Added 1243813349 at 1243813349 ---------------

Also, what modification for the gender are you using?

Mellymonster
05-31-2009, 11:03 PM
its a 3.6 modification, https://vborg.vbsupport.ru/showthread.php?t=117973&highlight=Gender thats it...

and no that did not work either :(

HMBeaty
05-31-2009, 11:47 PM
This has been fixed. Thread may be closed now :D

Lynne
05-31-2009, 11:50 PM
No, I refuse to close it!! :D

What code finally worked?

Mellymonster
06-01-2009, 12:00 AM
I'll post it

<!-- Start Gender On/Off Customization -->
<if condition="$bbuserinfo['field18'] != 'Yes'">
<if condition="$post[field5]">$vbphrase[statusicon]: <img src="$stylevar[imgdir_misc]/$post[field5].gif" alt="$post[field5]" /></if>
</if>
<!-- End Gender On/Off Customization -->

This of course the fields of my board... :) works like a charm, thanks again, Red :)