__id__ is a template key. Keys are replaced when the template is parsed. So adding keys that have not been defined in the code that parses the template will not work. So the needed keys need to be defined in code with data extracted from the database.
So in addition to the template changes to add the key where you want it to appear such as __sex__
You would need to define it.
I will cover one function. This is for the geeky member display.
administration/profiles.php at around line 425 is this function.
function getMembersGeeky($aProfiles, $sPaginate) {
$iEmailLength = 20;
$aItems = array();
foreach($aProfiles as $aProfile){
$sEmail = ( mb_strlen($aProfile['email']) > $iEmailLength ) ? mb_substr($aProfile['email'], 0, $iEmailLength) . '...' : $aProfile['email'];
$aItems[$aProfile['id']] = array(
'id' => $aProfile['id'],
'username' => $aProfile['username'],
'email' => $sEmail,
'full_email' => $aProfile['email'],
'edit_link' => $GLOBALS['site']['url'] . 'pedit.php?ID=' . $aProfile['id'],
'edit_class' => (int)$aProfile['banned'] == 1 ? 'adm-mp-banned' : ($aProfile['status'] != 'Active' ? 'adm-mp-inactive' : 'adm-mp-active'),
'registration' => $aProfile['registration'],
'last_login' => $aProfile['last_login'],
'status' => $aProfile['status'],
'ml_id' => !empty($aProfile['ml_id']) ? (int)$aProfile['ml_id'] : 2,
'ml_name' => !empty($aProfile['ml_name']) ? $aProfile['ml_name'] : 'Standard'
);
}
This is where all the keys that are passed to the template are defined.
You would need to add the one you want like so.
function getMembersGeeky($aProfiles, $sPaginate) {
$iEmailLength = 20;
$aItems = array();
foreach($aProfiles as $aProfile){
$sEmail = ( mb_strlen($aProfile['email']) > $iEmailLength ) ? mb_substr($aProfile['email'], 0, $iEmailLength) . '...' : $aProfile['email'];
$aItems[$aProfile['id']] = array(
'id' => $aProfile['id'],
'username' => $aProfile['username'],
'email' => $sEmail,
'full_email' => $aProfile['email'],
'edit_link' => $GLOBALS['site']['url'] . 'pedit.php?ID=' . $aProfile['id'],
'edit_class' => (int)$aProfile['banned'] == 1 ? 'adm-mp-banned' : ($aProfile['status'] != 'Active' ? 'adm-mp-inactive' : 'adm-mp-active'),
'registration' => $aProfile['registration'],
'last_login' => $aProfile['last_login'],
'sex' => $aProfile['sex'],
'status' => $aProfile['status'],
'ml_id' => !empty($aProfile['ml_id']) ? (int)$aProfile['ml_id'] : 2,
'ml_name' => !empty($aProfile['ml_name']) ? $aProfile['ml_name'] : 'Standard'
);
}
Then above that query that obtains the data from the database. At about line 390 is this.
$sQuery = "
SELECT
`tp`.`ID` as `id`,
`tp`.`NickName` AS `username`,
`tp`.`Headline` AS `headline`,
`tp`.`Sex` AS `sex`,
`tp`.`DateOfBirth` AS `date_of_birth`,
`tp`.`Country` AS `country`,
`tp`.`City` AS `city`,
`tp`.`DescriptionMe` AS `description`,
`tp`.`Email` AS `email`,
DATE_FORMAT(`tp`.`DateReg`, '" . $sDateFormat . "' ) AS `registration`,
DATE_FORMAT(`tp`.`DateLastLogin`, '" . $sDateFormat . "' ) AS `last_login`,
`tp`.`Status` AS `status`,
IF(`tbl`.`Time`='0' OR DATE_ADD(`tbl`.`DateTime`, INTERVAL `tbl`.`Time` HOUR)>NOW(), 1, 0) AS `banned`,
`tl`.`ID` AS `ml_id`,
IF(ISNULL(`tl`.`Name`),'', `tl`.`Name`) AS `ml_name`
" . $sSelectClause . "
FROM `Profiles` AS `tp`
LEFT JOIN `sys_admin_ban_list` AS `tbl` ON `tp`.`ID`=`tbl`.`ProfID`
LEFT JOIN `sys_acl_levels_members` AS `tlm` ON `tp`.`ID`=`tlm`.`IDMember` AND `tlm`.`DateStarts` < NOW() AND (`tlm`.`DateExpires`>NOW() || ISNULL(`tlm`.`DateExpires`))
LEFT JOIN `sys_acl_levels` AS `tl` ON `tlm`.`IDLevel`=`tl`.`ID`
" . $sJoinClause . "
WHERE
1 AND (`tp`.`Couple`=0 OR `tp`.`Couple`>`tp`.`ID`)" . $sWhereClause . "
" . $sGroupClause . "
ORDER BY `tp`.`" . $aParams['view_order'] . "` " . $aParams['view_order_way'] . "
LIMIT " . $aParams['view_start'] . ", " . $aParams['view_per_page'];
$aProfiles = $GLOBALS['MySQL']->getAll($sQuery);
You need to make sure the field you want is in the query.
For the case of sex, it already is as shown above. But if you needed to include a field that is not in the query then it would need to be added to make the data available to the functions that need it.
Unfortunatly this is not as easy as you might like it to be.