User map [Deleted]

I know - the secondary groups thing is a pain. They store it in a way that is pretty slow to get all the users in group x.

I'll have a scratch around and see if there is something I have not spotted yet to get it out.
 
Yes, I think secondary groups or better optional both (primary or secondary) would be perfekt to work in most cases. :)
 
I had some ad code inserted into my Crispin_UserMap_Index template, to show an ad below the map. I reverted the template after upgrading to 3.5.1 and haven't yet found a safe way to put it back manually. When I do, the map index page displays a javascript error that includes "cant load map data".

I've left the ad code out for now.
 
You should not edit the templates. Each update will destroy your changes.
You should be able to copy the style and put edits in the copy. Set the copy as the default style.

If you open the map in Chrome, after it says there's an error, press F12 to open the console. Ensure the COnsole tab up top is selected.
What's the red error message there. Screen print.

C
 
It seems like I missed that there is a new privacy setting where users can select if they want to be shown or hidden on the user map. Right now all existing users have no entry but they are still shown on the main map fortunately. How can I mass update the existing users to have a setting in the database and how can I preselect a default option for future registering users...? I think there should be something like that.

show_usermap.webp
 
CrispinP updated User map with a new update entry:

Small additions, bug fixes.

Some small bug fixes :-
  1. Map not loading properly in User Profile page - FIXED
  2. Invalid SQL when doing a Mass-Update - FIXED

Some improvements:
  1. Map button to toggle menu now a phrase so can be changed by the user.
  2. CSS is also templated so can be changed by the user
  3. Added an ACP option to have the Maps options open by default (defaulted open by default)
  4. Changed the Groups to look at all groups not only titled groups.
As always, thanks for the...

Read the rest of this update entry...
 
It seems like I missed that there is a new privacy setting where users can select if they want to be shown or hidden on the user map. Right now all existing users have no entry but they are still shown on the main map fortunately. How can I mass update the existing users to have a setting in the database and how can I preselect a default option for future registering users...? I think there should be something like that.

View attachment 148618

Indeed, users can now opt out of the map. That default for that setting is "opt-in" so if not selected it will be show-me-on-the-map.

If you wanted to back-fill the users to "Show" then run the following.
Code:
insert into xf_user_field_value
select 
    p.user_id,
    "map_show_me",
    'show'
From 
    xf_user as p
    left outer join xf_user_field_value as fv on fv.user_id = p.user_id and fv.field_id = "map_show_me"
where 
    fv.user_id is null;

I'll change the box to a checkbox actually. It's not great the way it is.
 
You can edit the code template to tweak it.
Search fur crispin_usermap_index and it includes the cost template.

C
 
I add some css to Crispin_UserMap_profile.css and that did a trick (y)

Code:
.maptoggled_button{
    cursor:pointer;
    background-color: #1e5426;
    width:45px;
    height:20px;
    text-align:center;
    color: #fff;
    padding-top: 3px;
}
 
You should not edit the templates. Each update will destroy your changes.
You should be able to copy the style and put edits in the copy. Set the copy as the default style.

If you open the map in Chrome, after it says there's an error, press F12 to open the console. Ensure the COnsole tab up top is selected.
What's the red error message there. Screen print.

C

I re-positioned my ad code above the last closing div in your index template, it works again.
 
It seems like I missed that there is a new privacy setting where users can select if they want to be shown or hidden on the user map.
And why is this within a user's Account Preferences ( /account/preferences ) in the 'Style Options' section ?? It belongs in Account Privacy ( /account/privacy )
@CrispinP surely it's a mistake?
 
CrispinP updated User map with a new update entry:
  • Show groups on the map, hide groups etc.
Trying to understand this a little better ....

If I have a user group called ABC123, and this user group is selected @ /admin.php?options/list/crispin_usermaps does that mean anyone with permission to 'View User Map' can then select this user group and only show on the map members of this user group? If so, that is a very risky thing. I'd like to see it such that only if you are a member of that user group, can you select that user group on the map.
 
If I have a user group called ABC123, and this user group is selected @ /admin.php?options/list/crispin_usermaps does that mean anyone with permission to 'View User Map' can then select this user group and only show on the map members of this user group? If so, that is a very risky thing. I'd like to see it such that only if you are a member of that user group, can you select that user group on the map.

At the moment - yes.

What are the best options?
  1. To have a user group which allows/disallows the showing of all the group options
  2. To allow you to view all/view only groups you are also a member of
  3. To somehow enable the selected groups to "feed in" to the group permissions which allows it to be pretty finely controlled.
  4. Other?

1 and 2 can be added with ease. 3 might be a bit hacky against the XF group membership way of working. Will investigate though.

Other options?
 
Top Bottom