Reloadr icon indicating copy to clipboard operation
Reloadr copied to clipboard

Server Side Problems

Open james-nagle opened this issue 13 years ago • 1 comments

Script works fine updating css and javascript files but when trying to watch .php files it doesn't seem to work. Here is what my config options look like. (WordPress theme)

Reloadr.go({
    client: [
        '<?php bloginfo("stylesheet_directory") ?>/js/TSC.jquery.js',
        '<?php bloginfo("stylesheet_directory") ?>/js/TSCadmin.jquery.js',
        '<?php bloginfo("stylesheet_directory") ?>/style.css',
    ],
    server: [
        '<?php bloginfo("stylesheet_directory") ?>/front-page.php',
        '<?php bloginfo("stylesheet_directory") ?>/footer.php',
        '<?php bloginfo("stylesheet_directory") ?>/header.php',
        '<?php bloginfo("stylesheet_directory") ?>/index.php',
        '<?php bloginfo("stylesheet_directory") ?>/page.php',
    ],
    path: '<?php bloginfo("stylesheet_directory") ?>/reloadr.php',
    frequency: 4000
});

Any insights would be greatly appreciated.

james-nagle avatar Jan 31 '13 19:01 james-nagle

I have this working under wordpress, and may release my code at some point. I made a snapin that scans my theme folder for php and css files and adds them to the header calling Reloader.js. I note that under the WAMP server I've got setup that bloginfo() wouldn't serve up the proper path. In the end I had to use this:

$tdir = str_replace(get_bloginfo("url"),'',get_bloginfo("template_directory"));

To get the proper path. (From server root, not server document root.)

Tomcat23 avatar Mar 12 '13 03:03 Tomcat23