• Resolved greatsmurf

    (@greatsmurf)


    Hi,

    I just want to tell I was not able to use CDN Enabler with DropBox because a case like this one with the plugin All-in-One Event Calendar by Time.ly :

    <script type=’text/javascript’ src=’http://cdn.yourdomain/?ai1ec_render_js=common_frontend&is_backend=false&ver=2.3.8′></script&gt;

    Just because a php script is called to create dynamicaly the js code. And same thing with some css files.

    I decided to modify the php script called cdn_enabler_rewriter.class.php and added one line :

    if (strstr($asset[0], ‘/?’)) return $asset[0];

    in the following function to make it work :

    protected function rewrite_url($asset) {
    $blog_url = $this->blog_url;

    if ($this->exclude_asset($asset[0])) return $asset[0];
    if (strstr($asset[0], ‘/?’)) return $asset[0];

    // check if not a relative path
    if (!$this->relative || strstr($asset[0], $blog_url)) return str_replace($blog_url, $this->cdn_url, $asset[0]);

    return $this->cdn_url . $asset[0];
    }

    https://wordpress.org/plugins/cdn-enabler/

The topic ‘js script and css file rendered dynamicaly’ is closed to new replies.