Restricting some categories to Visitors

New home Forums Visitor Generated Markers General queries Restricting some categories to Visitors

This topic contains 4 replies, has 3 voices, and was last updated by  poolec 6 months, 2 weeks ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #48292

    poolec
    Member

    Hi,

    Last year our map allowed users to add sightings of moths and caterpillars so that others could tell when they were in their area and we are going to do the same again this year. I want to be able to show last years data on the map which had three categories, I want to show these as 2018 category data in a different colour to the 2019 categories.

    How do I do this, if I create the same three categories but labelled 2019 the users would still be able to select the original categories, what I think is needed is the ability to restrict which categories users are allowed to pick when submitting a marker, whilst still being able to show all the categories on the map.

    Does this make sense and is it something that could be added?

    Kind regards,

    Chris Poole

    Box Moth & Caterpillar Tracker


    Over 500 markers submitted and data now being used to help as part of a paper to be published on the spread of Box Tree Moth across the UK.

    • This topic was modified 6 months, 3 weeks ago by  poolec.
    #48301

    Perry
    Moderator

    Hi Chris

    I hope this finds you well!

    We don’t record when the marker was created so you would need to use categories or similar.

    What I’d recommend you do is hide the “year” categories completely using CSS, then use jQuery to check the current year. Obviously, this won’t be 100% secure as a would be vandal could use the inspector to get around this, I’m not sure if that would be secure enough for your purposes, but if that would work for you and you need help setting that up, we can provide the code.

    Does that help?

    Kind regards
    – Perry

    #48330

    poolec
    Member

    Hi Perry,

    I would need help with that as I can muddle by with basic CSS, but not much more!

    For the long term it might be something to add to the categories settings in the back end – a tick box against each category “Selectable in VGM” rather than as at present where all categories are either on or off. Should I post this in the feature request thread?

    Kind regards,

    Chris

    #48355

    Hi Chris,

    Thanks for the response and confirmation.

    I would be more than happy to help with this and add this code for you to achieve this.

    Would you perhaps be open to creating a ticket here – https://www.wpgmaps.com/contact-us/ – so that I can contact you to help you achieve this as soon as possible?

    Regarding your suggestion about adding a ‘Selectable in VGM’ checkbox, this is a great idea and I will add it as a suggestion to the feature list, thanks for your feedback.

    I am looking forward to hearing back from you and assisting you further.

    #48472

    poolec
    Member

    Hi,

    Having played around with things I’ve made it work with no CSS required – here’s how.

    Duplicated the map and called labelled it for 2019
    Added three more categories for 2019 sightings and set them to work with the new map
    Changed the old category icons to smaller transparent dots and made them unavailable on the new map (I thought this would mean that the data wasn’t shown as well, but it is).

    Doing this means the old data is visible on the new map having duplicated the map and the new categories are only selectable in the VGM area – which is exactly what I needed.

    The live map ready for users to add their moth and caterpillar sightings can be seen here:

    Box Moth & Caterpillar Tracker

    Kind regards,

    Chris

    • This reply was modified 6 months, 2 weeks ago by  poolec.
    #48491

    Hi Chris,

    Thanks for letting me know and I am really glad to hear that you were able to get it resolved and found a solution and your map is looking great.

    Just to confirm is everything working correctly now?

    Thanks for your time.

    Kind regards,
    Dylan

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.