1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This area is dedicated to the support of our xF1 add-ons. For xF2, please use the dedicated area: HERE.
Dismiss Notice
We have just posted about our product policy for XF2.
Click HERE to view it.

Support Only show markers for a specific usergroup

Discussion in 'Members Map' started by CazMcI, Feb 8, 2018.

  1. CazMcI

    CazMcI Member

    Joined:
    Jul 1, 2016
    Messages:
    30
    Likes Received:
    0
    Hi,

    How can I modify the code so that the map only renders markers for a specific usergroup?

    I know you can filter by usergroup, but I would like the default to be already filtered.

    Thank for your help :)
     
  2. Fredxd

    Fredxd Administrator
    Staff Member

    Joined:
    Nov 14, 2015
    Messages:
    1,728
    Likes Received:
    399
    Adress:
    France
    Country:
    Location on Map:
    You want have filter by default ?
     
  3. CazMcI

    CazMcI Member

    Joined:
    Jul 1, 2016
    Messages:
    30
    Likes Received:
    0
    Yes!
     
  4. Fredxd

    Fredxd Administrator
    Staff Member

    Joined:
    Nov 14, 2015
    Messages:
    1,728
    Likes Received:
    399
    Adress:
    France
    Country:
    Location on Map:
    In library/XFA/MembersMap/ControllerPublic/Map.php

    find
    PHP:
    if(!$usergroup) {
        
    $usergroup 'all';
    }
    replace "all" by your usergroupid you want display by default
     
  5. CazMcI

    CazMcI Member

    Joined:
    Jul 1, 2016
    Messages:
    30
    Likes Received:
    0
    Thank you very much for your help.

    Would it also be possible to only list members of a specific usergroup on the members-map/country pages?
     
    #5 CazMcI, Feb 12, 2018
    Last edited: Feb 12, 2018
  6. Fredxd

    Fredxd Administrator
    Staff Member

    Joined:
    Nov 14, 2015
    Messages:
    1,728
    Likes Received:
    399
    Adress:
    France
    Country:
    Location on Map:
    Not actually sorry
     
  7. CazMcI

    CazMcI Member

    Joined:
    Jul 1, 2016
    Messages:
    30
    Likes Received:
    0
    ok- not to worry.
     

Share This Page