Quote:
Originally Posted by oldwillysforum
I'm a total hamb-fist when it comes to coding, but I'd love to change the user-pin color. A step by step tutorial would be great...
|
Sure, it takes two steps:
STEP 1: In the template dbtech_membermap_info, find:
Code:
<div title="{vb:raw user.username}" data-latitude="{vb:raw user.dbtech_membermap_lat}" data-longitude="{vb:raw user.dbtech_membermap_lng}" data-ugid="{vb:raw user.usergroupid}" data-myself="<vb:if condition="$vbulletin->userinfo['userid'] == $user['userid']">1<vb:else />0</vb:if>" data-move="<vb:if condition="$moveable">1<vb:else />0</vb:if>">
and
REPLACE it with this
Code:
<div title="{vb:raw user.username}" data-latitude="{vb:raw user.dbtech_membermap_lat}" data-longitude="{vb:raw user.dbtech_membermap_lng}" <vb:if condition="$vbulletin->userinfo['userid'] == $user['userid']">data-ugid="9999" data-myself="1"<vb:else />data-ugid="{vb:raw user.usergroupid}" data-myself="0"</vb:if>" data-move="<vb:if condition="$moveable">1<vb:else />0</vb:if>">
STEP 2: In membermap.php, find:
Code:
foreach ($vbulletin->usergroupcache AS $ugid => $uginfo)
{ //format the usergroup colors
if (!($uginfo['dbtech_membermap_perms'] & 2))
{ //not excluded
$color = $uginfo['dbtech_membermap_color'];
$groups .= '<option style="color: #' . $color . ';" value="' . $ugid . '">' . $uginfo['title'] . '</option>';
$colors .= ", $ugid: '$color'";
$validugs[] = $ugid;
}
}
and after that
ADD:
Code:
//Add in a special color representing the current user
$colors .= ", 9999: '79604c'";
the 79604c in the line above represents the color that the user's pin will appear as, which is a medium brown, but you can change it to whatever color you want. If you're not familiar with the scheme, just use one of the "hex codes" listed on
this page, but exclude the pound sign.
Since these are manual edits, if you ever update the plugin to a new version, you may have to reapply these changes.