Page Index Toggle Pages: 1
Topic Tools
Normal Topic Hide Contact Information (Read 3,638 times)
ayjayef
Junior Member
**
Offline



Posts: 82
Hide Contact Information
Feb 20th, 2011 at 4:09am
Post Tools
I would like to remove websites, facebook etc from the user options.  It would be nice to do it per usergroup but I would be happy with all.

Can someone please tell me which files determine what [Profile Contact Information] gets displayed so I can have a play with perl?
Cool
  
Back to top
 
IP Logged
 
Derek Barnstorm
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline



Posts: 1,269
Location: United Kingdom

None
Re: Hide Contact Information
Reply #1 - Feb 20th, 2011 at 5:14am
Post Tools
Hi,

The profile form fields are here in Sources/Profile.pl:

Code (Perl)
Select All
	$showProfile .= qq~
	<tr class="windowbg">
		<td width="320" align="left"><label for="icq"><b>$profile_txt{'513'}: </b><br /><span class="small">$profile_txt{'600'}</span></label></td>
		<td align="left"><input type="text" maxlength="10" name="icq" id="icq" size="40" value="${$uid.$user}{'icq'}" /></td>
	</tr>
	<tr class="windowbg">
		<td width="320" align="left"><label for="aim"><b>$profile_txt{'603'}: </b><br /><span class="small">$profile_txt{'601'}</span></label></td>
		<td align="left"><input type="text" maxlength="30" name="aim" id="aim" size="40" value="${$uid.$user}{'aim'}" /></td>
	</tr>
	<tr class="windowbg">
		<td width="320" align="left"><label for="yim"><b>$profile_txt{'604'}: </b><br /><span class="small">$profile_txt{'602'}</span></label></td>
		<td align="left"><input type="text" maxlength="30" name="yim" id="yim" size="40" value="${$uid.$user}{'yim'}" /></td>
	</tr>
	<tr class="windowbg">
		<td width="320" align="left"><label for="msn"><b>$profile_txt{'823'}: </b><br /><span class="small">$profile_txt{'824'}</span></label></td>
		<td align="left"><input type="text" maxlength="50" name="msn" id="msn" size="40" value="${$uid.$user}{'msn'}" /></td>
	</tr>
	<tr class="windowbg">
		<td width="320" align="left"><label for="gtalk"><b>$profile_txt{'825'}: </b><br /><span class="small">$profile_txt{'826'}</span></label></td>
		<td align="left"><input type="text" maxlength="50" name="gtalk" id="gtalk" size="40" value="${$uid.$user}{'gtalk'}" /></td>
	</tr>
	<tr class="windowbg">
		<td width="320" align="left"><label for="skype"><b>$profile_txt{'827'}: </b><br /><span class="small">$profile_txt{'828'}</span></label></td>
		<td align="left"><input type="text" maxlength="50" name="skype" id="skype" size="40" value="${$uid.$user}{'skype'}" /></td>
	</tr>
	<tr class="windowbg">
		<td width="320"><label for="myspace"><b>$profile_txt{'570'}:</b><br /><span class="small">$profile_txt{'571'}</span></label></td>
		<td align="left"><label for="myspace"><span class="small">$profile_txt{'572'}</span></label><br /><input type="text" maxlength="50" name="myspace" id="myspace" size="40" value="${$uid.$user}{'myspace'}" /></td>
	</tr>
	<tr class="windowbg">
		<td width="320"><label for="facebook"><b>$profile_txt{'573'}:</b><br /><span class="small">$profile_txt{'574'}</span></label></td>
		<td align="left"><label for="facebook"><span class="small">$profile_txt{'575'}</span></label><br /><input type="text" maxlength="50" name="facebook" id="facebook" size="40" value="${$uid.$user}{'facebook'}" /></td>
	</tr>
	<tr class="windowbg">
		<td width="320" align="left"><label for="webtitle"><b>$profile_txt{'83'}: </b><br /><span class="small">$profile_txt{'598'}</span></label></td>
		<td align="left"><input type="text" maxlength="30" name="webtitle" id="webtitle" size="40" value="${$uid.$user}{'webtitle'}" /></td>
	</tr>
	<tr class="windowbg">
		<td width="320" align="left"><label for="weburl"><b>$profile_txt{'84'}: </b><br /><span class="small">$profile_txt{'599'}</span></label></td>
		<td align="left"><input type="text" name="weburl" id="weburl" size="40" value="${$uid.$user}{'weburl'}" /></td>
	</tr>~; 


Then they are displayed in the profile here (Facebook as an example):

Code (Perl)
Select All
    if (${$uid.$user}{'facebook'}) {
        $row_facebook = qq~
            <div style="float: left; clear: left; width: 30%; padding-top: 5px;  padding-bottom: 5px;">
            <b>$profile_txt{'573'}: </b>
            </div>
            <div style="float: left; width: 70%; padding-top: 5px; padding-bottom: 5px;">
            <img src="$imagesdir/facebook.gif" alt="" border="0" style="vertical-align: middle;" />
            <a href="http://www.facebook.com/~ . (${$uid.$user}{'facebook'} !~ /\D/ ? "profile.php?id=" : "") . qq~${$uid.$user}{'facebook'}" target="_blank"> ${$uid.$user}{'facebook'}</a>
            </div>~;
    } 


And here:

Code (Perl)
Select All
    $showProfile .= qq~
            $row_email
            $row_website
            $row_aim
            $row_msn
            $row_skype
            $row_yim
            $row_gtalk
            $row_myspace
            $row_facebook
            $row_icq
        </td>
    </tr>~; 


So you can alter or remove what you want there.

For the post view look in Sources/Load.pl:

Code (Perl)
Select All
    ${$uid.$user}{'facebook'} = ${$uid.$user}{'facebook'} ? qq~<a href="http://www.facebook.com/~ . (${$uid.$user}{'facebook'} !~ /\D/ ? "profile.php?id=" : "") . qq~${$uid.$user}{'facebook'}" target="_blank">$facebookimg</a>~ : ''; 


And then in the template file - Display.template

Code (Perl)
Select All
$contactlist = qq~
    {yabb profile}{yabb email}{yabb pm}{yabb www}{yabb msn}{yabb gtalk}{yabb skype}{yabb myspace}{yabb facebook}{yabb icq}{yabb yim}{yabb aim}{yabb addbuddy}
~; 


Hope that helps...
  
Back to top
 
IP Logged
 
ayjayef
Junior Member
**
Offline



Posts: 82
Re: Hide Contact Information
Reply #2 - Feb 20th, 2011 at 3:47pm
Post Tools
Derek Barnstorm wrote on Feb 20th, 2011 at 5:14am:
Hope that helps...


WOW, helps more than I could have hoped for!

Thank-you very much for the detailed reply, I'm going to have some fun getting that to where I need it.

Thanks again Derek.
  
Back to top
 
IP Logged
 
Derek Barnstorm
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline



Posts: 1,269
Location: United Kingdom

None
Re: Hide Contact Information
Reply #3 - Feb 20th, 2011 at 5:13pm
Post Tools
You're welcome.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Topic Tools
 
  « Board Index ‹ Board  ^Top