vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to hide or disable homepage link on userprofile page (https://vborg.vbsupport.ru/showthread.php?t=253240)

SaN-DeeP 11-06-2010 05:36 AM

How to hide or disable homepage link on userprofile page
 
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
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.

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.
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.

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:
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>


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:
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.


All times are GMT. The time now is 06:22 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01148 seconds
  • Memory Usage 1,781KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (3)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete