I'm interested in the possibility of domain access integration for this module. Are there any plans to make this happen? An option to configure settings per-domain would be fantastic.

If this isn't on the radar, do you have any suggestions for how to go about turning lexicon on and off for specific sites in custom code?

Many thanks!

Comments

Marty2081’s picture

No, there are no plans to develop support for domain access. I have no experience with the domain access module, but you might come a long way with just the ability to set the variables that contain the configuration settings on a per-domain basis?

eric.chenchao’s picture

Issue summary: View changes

Yes have different configuration per domain is a great idea.

Here is a quick example for lexion and domain access modules integration in case anyone who is interested in. It requires domain_variable module to set different variable per domain.

Put the following code in mymodule.variable.inc of your module


/**
 * Implements hook_variable_group_info().
 */
function mymodule_variable_group_info() {
  $groups['lexicon_settings'] = array(
    'title' => t('Lexicon Settings'),
    'description' => t('Configure the Lexicon module settings.'),
    'access' => 'administer lexicon',
    'path' => array('admin/config/system/lexicon'),
  );

  return $groups;
}

/**
 * Implements hook_variable_info().
 */
function mymodule_variable_info($options) {
  $variables['lexicon_mark_terms'] = array(
    'type' => 'boolean',
    'title' => t('Mark terms in content.', array(), $options),
    'default' => 0,
    'description' => t('Determines whether or not to mark terms in the content.', array(), $options),
    'group' => 'lexicon_settings', // show in the lexicon_settings group
    'multidomain' => TRUE, // make it available in domain_variable settings
  );

  // More variables goes here

  return $variables;
}

This example allows you to enable or disable lexicon filter per domain. You can put more configuration as you like.

How to use it
Make sure you have enabled domain variable, so go to its settings page and enable lexicon_mark_terms and other lexicon variables if you have defined in above mymodule_variable_info function. Go the variable settings page per domain and you will see the configuration page.