https://www.icyphoenix.com/viewtopic.php?f=35&t=5444&p=36646#p36646
-----------------------------------
DWho
Sat 14 Feb, 2009 17:40

Re: User Block Mod
-----------------------------------
Well for example in memberlist.php you have this code..

[code linenumbers=false]	// Custom Profile Fields MOD - BEGIN
	include_once($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
	$profile_data = get_fields('WHERE view_in_memberlist = ' . VIEW_IN_MEMBERLIST . ' AND users_can_view = ' . ALLOW_VIEW);

	foreach($profile_data as $field)
	{
		$template->assign_block_vars('custom_field_names', array('FIELD_NAME' => $field['field_name']));
	}

	$template->assign_var('NUMCOLS', count($profile_data) + 12);
	// Custom Profile Fields MOD - END[/code]

and

[code linenumbers=false]		// Custom Profile Fields MOD - BEGIN
		foreach($profile_data as $field)
		{
			$name = text_to_column($field['field_name']);
			$sql2 = "SELECT $name FROM " . USERS_TABLE . "
				WHERE user_id = $user_id";
			if(!($result2 = $db->sql_query($sql2)))
				message_die(GENERAL_ERROR,'Could not get custom profile data','',__LINE__,__FILE__,$sql2);

			$val = $db->sql_fetchrow($result2);
			$val = displayable_field_data($val[$name],$field['field_type']);

			$template->assign_block_vars('memberrow.custom_fields',array('CUSTOM_FIELD' => $val));
		}
		// Custom Profile Fields MOD - END[/code]

this  pulls the info from your database and the template code you used above will then show the correct ode in the block...

you then need to find the code out of the above that fits the user_block.php file to show correctly...

hope the gives you a few hints..

 :mrgreen:  :mrgreen:


