This section addresses the integration of third party applications with Drupal. Some tips may be unique to a third party application, and some may be reusable by several applications. The most frequent asked questions relate to:

Comments

mducharme’s picture

I'd like to see "Module Integration" added to this list but would like feedback on this problem:

There is a discussion about how best to handle Node.js multi-site management for node.js configuration files. What is the best way to handle flat-file configurations that have different values per-site?

nodejs/nodejs.config.js <- stores site-specific configuration variables read by nodejs.

This structure blocks us from having the module in /sites/all/modules since each site must have a unique configuration. The only option is to place the module with the site-specific modules folder.

The other issue is that we have to modify the files in the module folder which could be considered a hack. Is there a best practice for managing this scenario?

Some ideas:

  1. place the configuration file in the root of each multi-site (where settings.php is) and have the third-party app load from there.
  2. create a protected folder in the /files/ directory and load from there. (cache style)
  3. move parts of the module code and configuration file to /libraries/ where code changes are not considered a hack.
  4. The current practice is fine?:
    sites/mysite1/modules/nodejs/[config 1]
    sites/mysite2/modules/nodejs/[config 2]
    sites/mysite3/modules/nodejs/[config 3]