Member
Member
vincent3569   2016-04-27, 07:37
#1

hi
if googlemap plugin is enabled, googlemap js scripts are loaded in all pages of zenphoto, even if functions of plugin are not used.
it causes a lot of delay when loading pages.

how to load googlemap js scripts only if functions (as printGoogleMap()) are used?

Administrator
Administrator
acrylian   2016-04-27, 08:19
#2

You would have to modify the the plugin completely. You could rework it so it works like Colorbox plugin or the slideshow plugins currently where you have to enable the script for specific pages.

This is actually something we will eventually drop in the future though because it is bad usability and frequently turns out to cause confusion like "I have enabled the plugin but why it is not working".

The "sideway" openstreetmap" plugin is much more slim regarding scripts loaded. Just to note… It's not googlemaps of course…

Administrator
Administrator
fretzl   2016-04-27, 12:58
#3

On pages where you do not use printGoogleMap() you can add

``

before

``

Member
Member
vincent3569   2016-04-28, 08:18
#4

thanks for this workaround !

no so easy to code, because I have a commom header file included in all my pages (gallery, albums, images, pages, news,...), but I will have a look !!

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.