I am updating this Mod "Custom Profile Fields" to 1.2.0 in my Plus 1.53a because the version that comes with the Plus (1.1.1) have a little errors, but I didn't find this little parts in my two files, help me please.
Code: Alles auswählen
#
#-----[ OPEN ]-------------------
#
viewtopic.php
#
#-----[ FIND ]---------------------
#
if($location == AUTHOR)
#
#-----[ BEFORE, ADD ]--------------------
#
if (($profile_names[$name] != '') || (!$board_config['collapse_fields'])) {
#
#-----[ FIND ]---------------------
#
$belows[] = $name . ': ' . $profile_names[$name];
#
#-----[ AFTER, ADD ]--------------------
#
}Code: Alles auswählen
//
// Custom Profile Fields MOD
//
if ( $poster_id != ANONYMOUS && $profile_data_sql != '' )
{
$cp_data = array();
$cp_data = get_topic_udata($postrow[$i], $profile_data);
if ( $cp_data['aboves'] )
foreach($cp_data['aboves'] as $above_val)
$template->assign_block_vars('postrow.above_sig',array('ABOVE_VAL' => $above_val));
if ( $cp_data['belows'] )
foreach($cp_data['belows'] as $below_val)
$template->assign_block_vars('postrow.below_sig',array('BELOW_VAL' => $below_val));
if ( $cp_data['author'] )
foreach($cp_data['author'] as $author_val)
$template->assign_block_vars('postrow.author_profile',array('AUTHOR_VAL' => $author_val));
}
//
// END Custom Profile Fields MOD
//And
Code: Alles auswählen
#
#-----[ OPEN ]-------------------
#
includes/usercp_viewprofile.php
#
#-----[ FIND ]---------------------
#
<td> <b><span class="gen">' . $profile_names[$name] . '</span></b></td>';
#
#-----[ AFTER, ADD ]--------------------
#
}Code: Alles auswählen
//
// Custom Profile Fields MOD
//
include_once($phpbb_root_path . 'includes/functions_profile_fields.'.$phpEx);
$profile_data = get_fields('WHERE view_in_profile = ' . VIEW_IN_PROFILE . ' AND users_can_view = ' . ALLOW_VIEW);
$profile_names = array();
$abouts = array();
$contacts = array();
foreach($profile_data as $field)
{
$name = $field['field_name'];
$col_name = text_to_column($field['field_name']);
$id = $profiledata['user_id'];
$type = $field['field_type'];
$location = $field['profile_location'];
$profile_names[$name] = displayable_field_data($profiledata[$col_name],$field['field_type']);
if (($profile_names[$name] != '') || (!$board_config['collapse_fields'])) {
if($location == 1) {
$contacts[$name]['name'] = $name;
$contacts[$name]['data'] = $profile_names[$name];
} else {
$abouts[$name]['name'] = $name;
$abouts[$name]['data'] = $profile_names[$name];
}
}
foreach($abouts as $about_field)
$template->assign_block_vars('custom_about',array('ABOUT_N' => $about_field['name'],'ABOUT_D' => $about_field['data']));
foreach($contacts as $contact_field)
$template->assign_block_vars('custom_contact',array('CONTACT_N' => $contact_field['name'],'CONTACT_D' => $contact_field['data']));
//
// END Custom Profile Fields MOD
//Thank you my friend!
Mario