Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 11-06-2010, 05:36 AM
SaN-DeeP's Avatar
SaN-DeeP SaN-DeeP is offline
 
Join Date: Jun 2002
Location: Mumbai, India
Posts: 1,195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How to hide or disable homepage link on userprofile page

How can we disable/hide homepage links on user profile pages ?

Thanks.
Reply With Quote
  #2  
Old 11-06-2010, 01:17 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can find it in this template: modifyprofile and use a condtional for your condtion to hide this
HTML Code:
<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
HTML Code:
<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.
Reply With Quote
  #3  
Old 11-07-2010, 01:43 AM
SaN-DeeP's Avatar
SaN-DeeP SaN-DeeP is offline
 
Join Date: Jun 2002
Location: Mumbai, India
Posts: 1,195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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)
Reply With Quote
  #4  
Old 11-07-2010, 05:24 AM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Show me how you used the code.
Reply With Quote
  #5  
Old 11-07-2010, 06:22 AM
SaN-DeeP's Avatar
SaN-DeeP SaN-DeeP is offline
 
Join Date: Jun 2002
Location: Mumbai, India
Posts: 1,195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you again simon,
this is code I am using.
Code:
<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.
Reply With Quote
  #6  
Old 11-07-2010, 08:17 AM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
HTML Code:
<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>
Reply With Quote
  #7  
Old 11-08-2010, 01:43 PM
SaN-DeeP's Avatar
SaN-DeeP SaN-DeeP is offline
 
Join Date: Jun 2002
Location: Mumbai, India
Posts: 1,195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 11-08-2010, 03:24 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 04-23-2011, 07:18 PM
FreshPrince FreshPrince is offline
 
Join Date: Oct 2006
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
Code:
<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:
Code:
<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:
Quote:
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:
Quote:
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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:21 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05202 seconds
  • Memory Usage 2,266KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (3)bbcode_html
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete