Log in

View Full Version : How to hide or disable homepage link on userprofile page


SaN-DeeP
11-06-2010, 05:36 AM
How can we disable/hide homepage links on user profile pages ?

Thanks.

Simon Lloyd
11-06-2010, 01:17 PM
You can find it in this template: modifyprofile and use a condtional for your condtion to hide this<fieldset class="fieldset">
<legend><label for="tb_homepage">$vbphrase[home_page_url]</label></legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
<tr>
<td>$vbphrase[let_other_visitors_know_url]</td>
</tr>
<tr>
<td>$vbphrase[home_page_url]<br /><input type="text" class="bginput" name="homepage" id="tb_homepage" value="$bbuserinfo[homepage]" size="50" maxlength="200" dir="ltr" /></td>
</tr>
</table>
</fieldset>
like this<if condition="!is_member_of($bbuserinfo, X, Y, Z)">
<fieldset class="fieldset">
<legend><label for="tb_homepage">$vbphrase[home_page_url]</label></legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
<tr>
<td>$vbphrase[let_other_visitors_know_url]</td>
</tr>
<tr>
<td>$vbphrase[home_page_url]<br /><input type="text" class="bginput" name="homepage" id="tb_homepage" value="$bbuserinfo[homepage]" size="50" maxlength="200" dir="ltr" /></td>
</tr>
</table>
</fieldset>
</if>
Which says if the users are NOT in usergroup X, Y or Z then they cannot see this info.

SaN-DeeP
11-07-2010, 01:43 AM
Hi Simon,
Thank You for your help but, I tried using above code and this is not working.

We require restrict this usergroup to view homepage url in profile field, Unregistered/Guest ( 1 )

Groups allowed to view homepage link are (2,5,6,7,24)

Simon Lloyd
11-07-2010, 05:24 AM
Show me how you used the code.

SaN-DeeP
11-07-2010, 06:22 AM
thank you again simon,
this is code I am using. <if condition="!is_member_of($bbuserinfo, 2,5,6,7,24)">
<fieldset class="fieldset">
<legend><label for="tb_homepage">$vbphrase[home_page_url]</label></legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
<tr>
<td>$vbphrase[let_other_visitors_know_url]</td>
</tr>
<tr>
<td>$vbphrase[home_page_url]<br /><input type="text" class="bginput" name="homepage" id="tb_homepage" value="$bbuserinfo[homepage]" size="50" maxlength="200" dir="ltr" /></td>
</tr>
</table>
</fieldset>
</if>

but the homepage url, is still visible while viewing user profiles.

Simon Lloyd
11-07-2010, 08:17 AM
Right, i assume that you haven't changed your MEMBERINFO>Memberinfo_block_contactinfo template, if thats the case then forget everything i told you to do previously and replace ALL your memberinfo_block_contactinfo with this:<div class="alt1 block_row">
<if condition="$show['messagelinks']">
<fieldset>
<legend><phrase 1="$prepared[username]">$vbphrase[send_message_to_x]</phrase></legend>
<div class="fieldset_padding floatcontainer">
<ul class="list_no_decoration" id="messaging_list">
<if condition="$show['post_visitor_message']">
<li>
<img src="$stylevar[imgdir_button]/sendtofriend.gif" alt="" border="0" class="inlineimg" />
<a href="#" onclick="return goto_post_pm()"><phrase 1="$prepared[username]">$vbphrase[post_a_visitor_message_for_x]</phrase></a>
</li>
</if>
<if condition="$show['pm']">
<li>
<img src="$stylevar[imgdir_button]/sendtofriend.gif" alt="" border="0" class="inlineimg" />
<a href="private.php?$session[sessionurl]do=newpm&amp;u=$prepared[userid]"><phrase 1="$prepared[username]">$vbphrase[send_private_message_to_x]</phrase></a></li>
</if>
<if condition="$show['email']">
<li>
<img src="$stylevar[imgdir_button]/sendtofriend.gif" alt="" border="0" class="inlineimg" />
<a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$prepared[userid]"><phrase 1="$prepared[username]">$vbphrase[send_message_via_email_to_x]</phrase></a>
</li>
</if>
</ul>
</div>
</fieldset>
</if>

<if condition="$prepared['hasimdetails']">
<fieldset>
<legend>$vbphrase[instant_messaging]</legend>
<div class="fieldset_padding floatcontainer">
<div><phrase 1="$prepared[username]">$vbphrase[send_instant_message_to_x_using]</phrase></div>
<ul class="list_no_decoration" id="instant_messaging_list">
$block_data[imbits]
</ul>
</div>
</fieldset>
</if>

<dl class="list_no_decoration" id="additional_contact_details">
<if condition="$prepared['displayemail']">
<dt class="shade">$vbphrase[email_address]</dt>
<dd><a href="mailto:$prepared[displayemail]">$prepared[displayemail]</a></dd>
</if>
<!-- ADDED CONDITION HERE -->
<if condition="is_member_of($bbuserinfo,2,5,6,7,24)">
<if condition="$prepared['homepage']">
<dt class="shade">$vbphrase[home_page]</dt>
<dd><a href="$prepared[homepage]" target="_blank">$prepared[homepage]</a></dd>
</if>
<else />
</if>
<!-- END ADDED CONDITION HERE -->
<dt class="shade">$vbphrase[this_page]</dt>
<dd><a href="$prepared[profileurl]">$prepared[profileurl]</a></dd>
<if condition="$show['vcard']">
<dt class="shade">$vbphrase[vcard]</dt>
<dd><a href="member.php?$session[sessionurl]do=vcard&amp;u=$prepared[userid]" rel="nofollow">$vbphrase[download_vcard]</a></dd>
</if>
</dl>
</div>

SaN-DeeP
11-08-2010, 01:43 PM
Hi Simon,
Thank You very much for helping so far..
I am unable to find following template memberinfo_block_contactinfo in my template manager, I am using vb 3.6.x

Simon Lloyd
11-08-2010, 03:24 PM
I dont have 3.6.x so cant help much more but what you can do is in vbulletin options turn on template headers, go to the profile page, right click, view source and search for home page or homepage and then see which template is started just before where you find homepage.

FreshPrince
04-23-2011, 07:18 PM
Hi Simon,

I am using V-Bulletin Version 4.

Should I be looking in the template: modify user option templates -> modifyprofile?

I'm not able to find anything like the code above. I found this:

<div class="blockrow">
<label for="tb_homepage">{vb:rawphrase home_page_url}:</label>
<input type="text" class="primary textbox" name="homepage" id="tb_homepage" value="{vb:raw bbuserinfo.homepage}" maxlength="200" dir="ltr" tabindex="1" />
<p class="description">
{vb:rawphrase let_other_visitors_know_url}
</p>

</div>



modified it to this:

<if condition="!is_member_of($bbuserinfo, 5, 6)">
<div class="blockrow">
<label for="tb_homepage">{vb:rawphrase home_page_url}:</label>
<input type="text" class="primary textbox" name="homepage" id="tb_homepage" value="{vb:raw bbuserinfo.homepage}" maxlength="200" dir="ltr" tabindex="1" />
<p class="description">
{vb:rawphrase let_other_visitors_know_url}
</p>


</div>
</if>


Then I get this message:

The following error occurred when attempting to evaluate this template:
%1$s
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.

Then this message:

This template was changed by someone else while you were editing it. Your changes have not been saved. Please merge your changes from the lower editor into the current version in the upper editor. When you save this page, only what is in the upper editor will be saved.


----------------

There's no one else making changes while I'm editing it. I have logged out, waited, logged in, saved other changes and then tried making the first changes and it says the exact same thing.

Help please. :( Thank you very much.