Support » Plugins » [Plugin: UMapper] Script insert only on pages where Map is needed

  • Hey,

    Umapper is nice, but needs a lot of javascript to be loaded. since i only use the maps on a contact page, i dont want umapper scripts to slow down my page.

    how can i modify the plugin to only load the scripts when needed on spezific pages? i know how to do it with conditional comments in the header template file, but i doubt they work from within the plugin.

    thousand thanks in advance!

Viewing 11 replies - 1 through 11 (of 11 total)
  • Well, afaik before plug-in shortcode is parsed header is already emitted. As about conditional comments – could you elaborate on this? Maybe I am missing something – if it’s doable, I’d do it from within plug-in.

    I ma no coder, but maybe I can help out a little:

    there are a couple of plugins you could maybe have a look at as they are doing roughly the same or at least dealing with the same issues.
    one is the deko boko plugin, which gives users the option of loading its files only on the contact page as they are not needed anywhere else:

    the second one could also be helpful, its the plugin Javascript Logic by Justin Tadlock: which can include specific javascript files only on target pages.

    Please have a look, maybe it helps you fix/modify umapper too 🙂

    Thanks a lot! Examples you provided are real-time savers. Would review them in details, and incorporate similar behavior into UMapper plugin.

    Now no umapper scripts persist on client side – only <object> code if map is present, but even then, no js – I made sure that client side stays as light as it could be.

    seems good, BUT after upgrading I see a message about: Update UMapper. Please re-validate your API key.. if I click on the link, or go straight to the umapper options page, I get: You do not have sufficient permissions to access this page.

    I have no idea what to do, I already checked file permissions, then I checked my user: I am admin, still can’t access the plugin options 🙁


    That’s quite an awful issue, which makes it even worse – I cannot reproduce it on my WP installation. Can you please contact me via victor ~ at ~ afcomponents dot com, plus provide with details of your WP installation (what I might need is WP version, plugin version, OS, browser type and version). I would try to resolve this issue as the first priority.

    Thanks in advance!

    oh, issue went away with the latest Umapper upgrade from this morning 🙂 all is fine now.

    Good! I have upgraded the plugin with possible fix – and I am really happy that it did the trick! Let me know about any other issues, or possible improvements on how plugin functions.


    just one little thing: if I write a new post and click the umapper icon, it automatically starts creating a new map, wouldn’t it be nice to be asked: do you want to use an existing map or create a new one before that?

    Otherwise a perfect plugin 🙂

    oh, btw. could you please post a changelog somewhere? I hate updateing and not knowing what the improvements are 🙁

    Hi, about new map/editing – you are perfectly right – it’s already in my todo list, so that if you select map embed tag, then hit the U icon, selected map should be loaded (as this is most probably what user would expect).

    Regarding changelog – I would issue one on plugin’s page, but general rule of thumb is versioning: 3.0.1 – first number is a major, you should definitely update, second one – any major fix/feature, you should update if you had any problems with umapper, and the minor numbers are mainly for maintenance (when I recompile language files, fix some typing errors etc), so most probably you do not need that update (again, if everything works as you expect it).

    Would try to wrap that add new / edit map feature till the end of this week. Let me know any other findings!

    Thanks for you help!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: UMapper] Script insert only on pages where Map is needed’ is closed to new replies.