Load custom profile fields / Addition I v.0.0.1open
user_weather/user_map.php
find
Code:
if (!function_exists('get_user_avatar'))
{
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
}
after add
Code:
include_once($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
$cp = new custom_profile();
$profile_fields_cache = $cp->generate_profile_fields_template('grab', $user_id_array);
find and delete
Code:
, user_map_location, user_map_location_desc
find
Code:
$row_username = utf8_encode(urlencode($row['username']));
after add
Code:
$cp_row = $cp->generate_profile_fields_template('show', false, $profile_fields_cache[$row['user_id']]);
$full_prof = '';
for ($i = 0, $end = sizeof(@$cp_row['blockrow']); $i < $end; ++$i){
$full_prof .= '<strong>' . $cp_row['blockrow'][$i]["PROFILE_FIELD_NAME"] . ':</strong> ' . $cp_row['blockrow'][$i]["PROFILE_FIELD_VALUE"] . '<br /><br />';}
find
Code:
'UM_LOCATION' => ucwords(str_replace('_', ' ', $row['user_map_location'])),
'UM_LOCATION_DESC' => ($row['user_map_location_desc'] !== 0) ? $row['user_map_location_desc'] : false
replace with
Code:
'UM_CPF_SHOW' => addslashes($full_prof)
open
styles/prosilver/template/user_map.html
find
Code:
<br /><br />
{L_U_M_LOC}:<br />
{user_map.UM_LOCATION}
<!-- IF user_map.UM_LOCATION_DESC -->
<br /><br />
{L_U_M_LOC_DESC}:<br />
{user_map.UM_LOCATION_DESC}
<!-- ENDIF -->
replace with
Code:
<!-- Load custom profile fields / Addition -->
<!--
<br /><br />
{L_U_M_LOC}:<br />
{user_map.UM_LOCATION}
< !-- IF user_map.UM_LOCATION_DESC -- >
<br /><br />
{L_U_M_LOC_DESC}:<br />
{user_map.UM_LOCATION_DESC}
< !-- ENDIF -- >
-->
<br /><br />
{user_map.UM_CPF_SHOW}
<!-- Load custom profile fields / Addition -->
Note: This adds some more SQL to user_map.php