From 1f871950d8bbefe59e18c00ea3238591c0b73807 Mon Sep 17 00:00:00 2001 From: Henry Sudhof Date: Mon, 3 Aug 2009 15:46:56 +0000 Subject: #48985 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9916 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 52bae414df..fc96f0c901 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1179,7 +1179,22 @@ if ($config['load_cpf_viewtopic']) $cp = new custom_profile(); // Grab all profile fields from users in id cache for later use - similar to the poster cache - $profile_fields_cache = $cp->generate_profile_fields_template('grab', $id_cache); + $profile_fields_tmp = $cp->generate_profile_fields_template('grab', $id_cache); + + // filter out fields not to be displayed on viewtopic. Yes, it's a hack, but this shouldn't break any MODs. + $profile_fields_cache = array(); + foreach ($profile_fields_tmp as $profile_user_id => $profile_fields) + { + $profile_fields_cache[$profile_user_id] = array(); + foreach ($profile_fields as $used_ident => $profile_field) + { + if ($profile_field['data']['field_show_on_vt']) + { + $profile_fields_cache[$profile_user_id][$used_ident] = $profile_field; + } + } + } + unset($profile_fields_tmp); } // Generate online information for user -- cgit v1.2.1