Ask the community

This is a community support forum where you can ask
questions and interact with other PremiumPress Customers.

Activate – Deactivate the home page Google Map from Scrolling & Dragging

  • CodersPress.com
    CodersPress.com
    Elite Member 524 points
    June 29, 2014 at 6:47 pm

    Activate – Deactivate the home page Google Map from Scrolling on PC’s & Dragging on Mobile’s

    In relation to this plugin http://www.premiumpress.com/forums/topic/google-map-disable-scrollwheel-home-page-only/ which disables wheel-mouse scrolling over your home page google map.

    And after reading some of the comments about incorporating a mobile version which uses a dragging effecting on touch screens.

    I decided to combine these two map settings to a button that your website visitors will activate, should they wish to browse around the map.

    With anything I create feel free to edit the file and share you improvements.

    Just upload and Activate

    Attachments:
    You must be logged in to view attached files.
  • CodersPress.com
    CodersPress.com
    Elite Member 524 points
    June 29, 2014 at 7:19 pm

    ๐Ÿ˜ณ forgot to mention this is for Directory Theme which has a map <div called #wlt_childtheme_map should you wish to use this plugin on a different theme, open the file and edit that name around line 87

  • Gavin
    Gavin
    Newbie 13 points
    June 29, 2014 at 7:48 pm

    ๐Ÿ˜€

    Excellent, works like a charm for me. Yet again a very big thanks for this.

    One more request:

    How easy/hard would it be to have the same option for maps on listings, as these maps still annoyingly scroll when using a mouse and mobile device ๐Ÿ˜†

    Thanks Gavin

  • Errol
    Errol
    Super Guru 2,708 points
    June 29, 2014 at 10:54 pm

    :)

  • CodersPress.com
    CodersPress.com
    Elite Member 524 points
    July 3, 2014 at 4:59 pm

    @Gavin

    As requested this newer version includes the Home Page and View All Listings map.

    I’m not a programmer so it took me some time to come up with a solution. This version takes on a new approach by effectively blocking mouse actions over either map, by placing a hidden layer over them.

    Hope that’s what you wanted?

    Deactivate and Delete previous version – upload this one and Activate

    Attachments:
    You must be logged in to view attached files.
  • Laura
    Laura
    Newbie 24 points
    July 8, 2014 at 3:00 pm

    Hey M – I’m so impressed with the plugins that you have been creating.

    Each one, I’ve been trying to break out what exactly you are doing, because I would too love to learn php and the likes.

    Do you have any resources that you are using that are helping you? I was doing http://www.teamtreehouse.com for awhile for web design help. I did some intro PHP courses on there as well.

    Also, any clue how I could get the activate map to pop up just when on a mobile device? Kind of like: http://preview.ait-themes.com/businessfinder/wp1/

    Thanks in advance,
    Laura

  • CodersPress.com
    CodersPress.com
    Elite Member 524 points
    July 8, 2014 at 3:39 pm

    Here is a mobile only version.

    Deactivate the previous version

    Upload and Activate this one, its a different name so it wont clash.

    There are three new lines under function activate_map(){

    Which detect if the browsers user_agent is from a mobile device and if it is the rest of the code runs on the page

    ..and one closing } before php closes ?> to end the mobile detection function.

    Oh I’m just self thought, no expert, I just fix or make things my way and cry later.

    Attachments:
    You must be logged in to view attached files.
  • glendon
    glendon
    Newbie 47 points
    July 22, 2014 at 10:47 pm

    VERY GOOD PLUGIN! Easy to use and works perfectly! THANK-YOU!

  • Saurabh
    Saurabh
    Newbie 7 points
    August 6, 2014 at 9:58 am

    Excellent Plugin M . You are a bond.

  • CodersPress.com
    CodersPress.com
    Elite Member 524 points
    August 24, 2014 at 4:27 pm

    Here I am back again with a update. I’ve added an admin panel, (nothing to fancy) that allows you to style and position the current button as is.

    If you like something else added, by all means post some suggestions.

    Attachments:
    You must be logged in to view attached files.
  • CodersPress.com
    CodersPress.com
    Elite Member 524 points
    August 24, 2014 at 4:37 pm

    opps… double post… to slow editing my posts.

    Attachments:
    You must be logged in to view attached files.

  • Josh
    Super Guru 13,885 points
    August 24, 2014 at 5:27 pm

    Good work M :)

  • CodersPress.com
    CodersPress.com
    Elite Member 524 points
    August 24, 2014 at 6:07 pm

    Opps… some silly spelling mistakes and layout adjustments.

    Small update:

    Attachments:
    You must be logged in to view attached files.
  • CodersPress.com
    CodersPress.com
    Elite Member 524 points
    September 23, 2014 at 10:43 am

    Ive created a new version of this plugin…

    Added button radius styling and a setting for use on Mobiles Only.

    Further support for this plugin and others Ive created will be given at: http://coderspress.com/

    Attachments:
    You must be logged in to view attached files.
  • Marcelo
    Marcelo
    Newbie 15 points
    December 28, 2014 at 7:52 pm

    Excellent, thanks!

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