$Id: MODULE.txt,v 1.1.2.2 2009-10-31 07:15:34 grayside Exp $ # Module Integration for FL3 In addition to the "drop-in" include file approach outlined in PLUGIN.TXT, you may use hook_freelinking to create your own Freelinking module. By packaging your plugin as a module, you may distribute it through Drupal.Org, make use of other modules with proper tracking of requirements, and make use of any Drupal hook functions without worrying about collissions Freelinking's own operations. It also becomes easy for other modules to make use of Freelinking to add an easy linking syntax to their module's feature set. If you create such a module, be sure to post a minor issue in the Freelinking Issue Queue (http://drupal.org/project/issues/freelinking) naming your project so it can be linked off of Freelinking's project page. ## Writing a Freelinking Module Create your module, and implement hook_freelinking() to return your plugin's freelinking definition as described in PLUGIN.TXT. For example, the drupalproject plugin would be transformed like so: function freelinking_drupalproject_freelinking() { $freelinking['drupalproject'] => array( 'indicator' => '/d(rupal)?project/', 'translate' => array(' ' => '_'), 'replacement' => 'http://drupal.org/project/%1', ); return $freelinking; } Be sure to add an extra line to name any settings callback you might have, as freelinking cannot guess the function name as it does with the drop-in plugins. For our example, that would look like this: function freelinking_drupalproject_freelinking() { $freelinking['drupalproject'] => array( 'indicator' => '/d(rupal)?project/', 'translate' => array(' ' => '_'), 'replacement' => 'http://drupal.org/project/%1', 'settings' => 'freelinking_drupalproject_plugin_settings' ); return $freelinking; } Be sure when naming this function to start with your module name as Drupal best practice.