Ingenious
Well-known member
On my basic but functional member map which is created from custom user fields for long/lat, and is a standalone PHP file and not a plugin (although is prettied up by using an embed PHP plugin), I used to have different coloured pointers on vB for different user groups, using this probably quite long winded PHP to sort the additional usergroups out (which were taken directly from the database, and where separated by commas, such as 10,12 if member of group 10 and 12):
On XenForo though, I cannot make sense of the additional usergroup data.
Someone in additional usergroup 7 has the data:
37
Someone in groups 7 and 13 has the data
372c3133
It seems to be 3 + group id + 2c3 + 3 if the group ends in 3
Groups 6, 7 and 13:
362c372c3133
Groups 6 and 7:
362c37
Any help please on how to explode/sort that so that an array contains just the usergrpoup IDs like the code above?
I had hoped I could use the xen code to check if a member "is member of" but they don't seem to work in a PHP file that is itself embedded in another which is being wrapped in the forum header and footer.
Just to be clear, I don't want to make this into a plugin etc I just want to be able to process the raw usergroup data shown above
Code:
$pieces = explode(",", $membergroupids);
if (in_array("10", $pieces)) {
$pointericon=", adifferentmapIcon";
$pointertext="</br><b>In usergroup 10</b>";
}
(and so on, for each usergroup I wanted to show)
On XenForo though, I cannot make sense of the additional usergroup data.
Someone in additional usergroup 7 has the data:
37
Someone in groups 7 and 13 has the data
372c3133
It seems to be 3 + group id + 2c3 + 3 if the group ends in 3
Groups 6, 7 and 13:
362c372c3133
Groups 6 and 7:
362c37
Any help please on how to explode/sort that so that an array contains just the usergrpoup IDs like the code above?
I had hoped I could use the xen code to check if a member "is member of" but they don't seem to work in a PHP file that is itself embedded in another which is being wrapped in the forum header and footer.
Just to be clear, I don't want to make this into a plugin etc I just want to be able to process the raw usergroup data shown above