I've can't seem to get my PURL prefix to be recognized alongside the prefix set by Drupal for Facebook. I can get one or the other working but not together. I commented out the code on both modules and pasted it the following to the url_alter code boxes:

PHP code for custom_url_rewrite_inbound():

// OMMITTED FUNCTION DEFENITION THAT WAS IN ORIGINAL FILE -- DRUPAL FOR //FACEBOOK'S fb_url_rewrite.inc FILE
    fb_url_inbound_alter($result, $path, $path_language);

// CODE FOR PURL MODULE
if (module_exists('purl')) {
purl_url_inbound_alter($result, $path, $path_language);
}

PHP code for custom_url_rewrite_outbound():

// CODE FOR PURL MODULE
if (module_exists('purl')) {
    purl_url_outbound_alter($path, $options, $original);
}


// OMMITTED FUNCTION DEFENITION THAT WAS IN ORIGINAL FILE -- DRUPAL FOR //FACEBOOK'S fb_url_rewrite.inc FILE
    if (!isset($options['fb_url_alter']) || $options['fb_url_alter']) {
      if (function_exists('fb_canvas_url_outbound_alter')) {
        fb_canvas_url_outbound_alter($path, $options, $original_path);
      }
      fb_url_outbound_alter($path, $options, $original_path);
    }

I'm fairly new to coding so there's probably something obvious I'm messing up. Any tips would be appreciated. Much thanks.

Comments

YK85’s picture

subscribing

jpstrikesback’s picture

subscribe