minimus / simple-ads-manager

Advertisement rotation system for Wordpress with a flexible logic of displaying advertisements.
16 stars 15 forks source link

Fix flash overlay image URL #23

Closed untone-survive closed 9 years ago

untone-survive commented 9 years ago

When using ajax, SAM_URL and SAM_URL_IMG constants are not accesible because we're not loading sam.class.php. Also because of SHORTINIT some of WP functions are not accessible too, so we have to load some files expliciltly.

I set all the constants used by plugin_dir_url and also a global var $wp_plugin_paths should be set to prevent PHP warnings and notices.

untone-survive commented 9 years ago

I forgot to mention, that without this fix the URL of overlay image when loading via ajax is like this - SAM_IMG_URLblank.gif

minimus commented 9 years ago

Thanks!