WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: UMapper] Script insert only on pages where Map is needed (12 posts)

  1. c-bass
    Member
    Posted 5 years ago #

    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!

  2. umapper
    Member
    Posted 5 years ago #

    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.

  3. Ovidiu
    Member
    Posted 5 years ago #

    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: http://wordpress.org/extend/plugins/deko-boko-a-recaptcha-contact-form-plugin/

    the second one could also be helpful, its the plugin Javascript Logic by Justin Tadlock: http://justintadlock.com/archives/2008/12/12/javascript-logic-wordpress-plugin which can include specific javascript files only on target pages.

    Please have a look, maybe it helps you fix/modify umapper too :-)

  4. umapper
    Member
    Posted 5 years ago #

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

  5. umapper
    Member
    Posted 5 years ago #

    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.

  6. Ovidiu
    Member
    Posted 5 years ago #

    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 :-(

    HELP

  7. umapper
    Member
    Posted 5 years ago #

    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!

  8. Ovidiu
    Member
    Posted 5 years ago #

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

  9. umapper
    Member
    Posted 5 years ago #

    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.

    Thanks!

  10. Ovidiu
    Member
    Posted 5 years ago #

    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 :-)

  11. Ovidiu
    Member
    Posted 5 years ago #

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

  12. umapper
    Member
    Posted 5 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags