Change NickName on View Profile page

I am using this as a business networking site, and I would like to change the NickName field to a field I made called BusName. Which file contains NickName on the view profile page? It is displayed directly above the view profile link, and where it says NickName Photos

 

Thanks in advance,

Travis

Quote · 25 Sep 2009

All in the language file.

Kids first
Quote · 25 Sep 2009

I see in the language file where it has "{0} Photos" but how do I find out what to replace the {0} with for a field that I made?

Quote · 26 Sep 2009

Hold up there killer... He wants to do something that is going to be a blast to see happen... Of course the end results of this little task will be really interesting.

 

1.  There is no file that contains "Nickname" it is the results of a language Key. 

 

2.  He has "created" a field called business name and now wants to reference that instead of the "Nickname"

 

3.  What he's missing is that "Nickname" is tied directly to $ProfileID and not the field he has created. 

 

If you change this to the field you have created, your going to cause a lot more issues, as your site will not longer build the profiles correctly.  Everything on the site is tied into the screenname/profileID and it needs to remain.  You definitely do not want to hop into the files and start changing it to the field you created.  That will require reworking the DB Tables, .htaccess file and just about every other php file on your site.  This is a DB item that is reference through the site starting with the Join page all the way to the end.  What your talking about is changing how the site is written before it's even installed on your server.  You appear to not be at the level needed to do this yet.

 

Now, as Killerhaii advised you, the Language Keys are the place to make your change.  You can leave the screennames of the profile page by simply removing the block to inactive (do not delete it though) and instead place your Bus name field in the active area.  Then add bus name to the search criteria.  However, keep in mind the Screenname/Nickname will still appear on certain sections of the site regardless of what you do.

Quote · 26 Sep 2009

I guess I am confused on how this would effect the system so greatly. Maybe I wasn't clear enough on my explination. I still want to use the NickName field as is. I only want to change what is displayed on a few pages. I would think that the I could change what is displayed by opening a page and changing which variable is called. I just don't know which file contains the information that is currently called the NickName Field.

 

For example: on my main page I was able to change what is displayed under the user picture in the profile section by opening "inc/members.inc.php" and changing the NickName variable found in

 

$nick = '<a href="' . getProfileLink( $p_arr['ID'] ) . '">' . $p_arr['NickName'] . '</a>';

to:

$nick = '<a href="' . getProfileLink( $p_arr['ID'] ) . '">' . $p_arr['BusName'] . '</a>';

and now it displays the BusName instead of NickName. My user can still have a private login name (NickName) but display their business name. This shouldn't effect the system unless there is some coding that I am not aware of. I could probablly find the file and the line of code I am looking for, but it would take many, many hours, and I was just hoping someone might be able to give me some insight on which files to look in. 

 

The places I am trying to make the change is when a user is viewing a profile it displays the NickName field directly above the view profile link, and where it says "NickName" Photos.

 

I hope this might have cleared it up a little. Like I said I am only trying to change which variable is being displayed.

Quote · 28 Sep 2009

$nick = '<a href="' . getProfileLink( $p_arr['ID'] ) . '">' . $p_arr['NickName'] . '</a>';

to:

$nick = '<a href="' . getProfileLink( $p_arr['ID'] ) . '">' . $p_arr['BusName'] . '</a>';


That right there is your problem.  If you change 'NickName' to 'BusName' in the coding files you will error out the software.  To do that little change will require changes throughout the entire sites source files and the Databe base Tables.  You don't want to open this can of worms and you need to listen very closely to us.  We have been where you are and know what we are talking about.

If you want to just change what appears on the screen, then follow these instructions:

 

 


 

  1. Open your sites admin panel
  2. Go to Settings -> Language Settings
  3. Do a search for NickName
  4. You will see a list appear, click edit
  5. In the bottom of the box that opens, change Nickname to Business Name
  6. Click Save

 

That is the quick and easy way to do it.  Now, if your going to do a business networking site, then you will need to still looking at adding Dependent Values unless you want lists that run forever on your join.php or pedit.php or search.php pages.  This will enable you to set up the fields so when someone chooses the business they are in the next field will only display the items that apply.

For example: 

   Manufacturing would list Auto, Steel, Plastics, Alloys, Engine Parts

   Finance would list banking, mortgages, financial planning, insurance and so on.

I hope this is making sense to you.

Quote · 28 Sep 2009

Ok. So I think I get it. My only question now I guess is if I want to change what is being displayed when viewing a profile where is says "NickName Photos" I go to the Language settings, and search for NickName. I found one that says "_PROFILE Photos" so I click on edit and this is what I see:

 


 

Key: _PROFILE Photos
String: {0} Photos
Parameters: Available string parameters (click on a parameter to insert it at the end of the string):
{0} - member's nickname
Category: Action messages
Language: English
Recompile corresponding language file to apply changes.


 

I know that {0} stands for the NickName, but what do I change it to so it will display the BusName field instead of NickName? Or can it not be done to this field?

 

Quote · 28 Sep 2009

Ok. So I think I get it. My only question now I guess is if I want to change what is being displayed when viewing a profile where is says "NickName Photos" I go to the Language settings, and search for NickName. I found one that says "_PROFILE Photos" so I click on edit and this is what I see:


Key: _PROFILE Photos
String: {0} Photos
Parameters: Available string parameters (click on a parameter to insert it at the end of the string):
{0} - member's nickname
Category: Action messages
Language: English
Recompile corresponding language file to apply changes.


I know that {0} stands for the NickName, but what do I change it to so it will display the BusName field instead of NickName? Or can it not be done to this field?

You can do it here: templates/base/scripts/BxBaseProfileView.php


function showBlockPhoto( $iCol, $bNoDB = false )
{
$iPID = 0;
if( $iCol == 1 ) {
$iPID = $this -> _iProfileID;
$sNickName = $this -> _aProfile['BusName'];
} elseif( $iCol == 2 ) {
if( !$this -> _aProfile['Couple'] )
return;

$iPID = $this -> _iProfileID;
//$iPID = (int)$this -> _aProfile['Couple'];
$sNickName = $this -> _aProfile['BusName'] . '(2)';
}

if ($iPID > 0) {
$oPhotos = new ProfilePhotos( $iPID );
$oPhotos -> getActiveMediaArray();

if( $this -> _aProfile['Couple'] && $iCol != 1 ) {
$aCoupleInfo = getProfileInfo($this->_aProfile['Couple']);
if ($aCoupleInfo['Picture']==0) {
$oPhotos = new ProfilePhotos( $this->_aProfile['Couple'] );
$oPhotos -> getActiveMediaArray();
}
$ret = $oPhotos -> getMediaBlock($aCoupleInfo['PrimPhoto'], true);
} else {
$ret = $oPhotos -> getMediaBlock(0);
}

if ($bNoDB) {
return DesignBoxContent( _t( '_PROFILE Photos', $sNickName ), $ret, 1 );
} else {
echo DesignBoxContent( _t( '_PROFILE Photos', $sNickName ), $ret, 1 );
}
}
}

Quote · 28 Sep 2009
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.