Support » Plugin: Rezgo Online Booking » Using Rezgo Plugin 2.1.1 in MultiSite

  • MultiSite doesn’t work in Rezgo due to pathing issues. This needs to be fixed in the Rezgo plugin, but for now I made the following changes.

    First, don’t install it as a Network plugin, but rather on individual sites.

    Then before activation, make the following change in config.rezgo.php from:

    define("REZGO_DIR", strstr(preg_replace('/(https?\:\/\/)/', '', WP_PLUGIN_URL), '/') . "/$plugin_dir/rezgo");
    // The web root you want to precede links, the default is "" (empty) for root
    // to change to your own custom directory, add it like /my_directory or /my/directory
    define("REZGO_URL_BASE", strstr(preg_replace('/(https?\:\/\/)/', '', WP_PLUGIN_URL), '/') . "/$plugin_dir");

    to:

    if ( is_multisite() ) { 
    
        $new_plugin_url = str_replace(get_home_url().'/', network_home_url(), WP_PLUGIN_URL);
        define("REZGO_DIR", strstr(preg_replace('/(https?\:\/\/)/', '', $new_plugin_url), '/') . "/$plugin_dir/rezgo");
        // The web root you want to precede links, the default is "" (empty) for root
        // to change to your own custom directory, add it like /my_directory or /my/directory
        define("REZGO_URL_BASE", strstr(preg_replace('/(https?\:\/\/)/', '', $new_plugin_url), '/') . "/$plugin_dir");
        
    } else {
    
        define("REZGO_DIR", strstr(preg_replace('/(https?\:\/\/)/', '', WP_PLUGIN_URL), '/') . "/$plugin_dir/rezgo");
        // The web root you want to precede links, the default is "" (empty) for root
        // to change to your own custom directory, add it like /my_directory or /my/directory
        define("REZGO_URL_BASE", strstr(preg_replace('/(https?\:\/\/)/', '', WP_PLUGIN_URL), '/') . "/$plugin_dir");
    
    }
Viewing 4 replies - 1 through 4 (of 4 total)
  • Revised for 2.2.5:

    /* START MULTISITE CHANGES */
    $full_path = realpath(__DIR__. ‘/../../’);
    $plugin_dir = str_replace(WP_PLUGIN_DIR . ‘/’, ”, $full_path);
    $plugin_path = plugins_url().’/’.$plugin_dir;
    if ( is_multisite() ) {
    $new_plugin_url = str_replace(get_home_url().’/’, network_home_url(), WP_PLUGIN_URL);
    define(“REZGO_DIR”, strstr(preg_replace(‘/(https?\:\/\/)/’, ”, $new_plugin_url), ‘/’) . “/$plugin_dir/rezgo”);
    define(“REZGO_URL_BASE”, strstr(preg_replace(‘/(https?\:\/\/)/’, ”, $new_plugin_url), ‘/’) . “/$plugin_dir”);
    } else {
    define(“REZGO_DIR”, strstr(preg_replace(‘/(https?\:\/\/)/’, ”, WP_PLUGIN_URL), ‘/’) . “/$plugin_dir/rezgo”);
    define(“REZGO_URL_BASE”, strstr(preg_replace(‘/(https?\:\/\/)/’, ”, WP_PLUGIN_URL), ‘/’) . “/$plugin_dir”);
    }
    /* END MULTISITE MODIFICATIONS */

    Plugin Author rezgo

    (@rezgo)

    Thanks for the feedback @vensonkuchipudi

    We will have a look at your suggested code and release a fix for multisite issues in an upcoming version.

    Plugin Author rezgo

    (@rezgo)

    Hi @vensonkuchipudi,

    Can you describe the issue that initially caused you to submit this report?

    In our testing with the latest WordPress (4.7) and the latest Rezgo plugin (2.2.5), we have not found any pathing issues.

    JM

    vensonkuchipudi

    (@vensonkuchipudi)

    Using WordPress 4.7 and Rezgo 2.2.5. Installed on a Multisite WordPress installation with the plugin loaded on the individual sites and not as a Network plugin.

    I tried with the previous version to install as a Network plugin, but that didn’t work. So instead I installed it on the individual sites, but had to make the pathing changes to get it to work. REZGO_DIR and REZGO_URL_BASE were wrong otherwise.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Using Rezgo Plugin 2.1.1 in MultiSite’ is closed to new replies.