Index: INSTALL.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linktocontent/INSTALL.txt,v
retrieving revision 1.2.2.4
diff -u -p -r1.2.2.4 INSTALL.txt
--- INSTALL.txt	5 Jul 2007 19:40:48 -0000	1.2.2.4
+++ INSTALL.txt	12 Sep 2007 18:21:12 -0000
@@ -3,48 +3,45 @@
 Requirements
 ------------
 
-This module and its plugins require at least version 5.0 of Drupal and
-tinymce.module installed and enabled.
-linktocontent_node.module requires additionally taxonomy.module.
-linktocontent_category requires category.module installed.
+- This module and its plugins require at least Drupal 5.x and tinymce.module
+  installed and enabled.
+- linktocontent_node.module requires additionally taxonomy.module.
+- linktocontent_category requires category.module installed.
 
 Installation
 ------------
 
-1. Copy the folder named 'linktocontent' and its contents to the modules directory
-   of your Drupal installation (for example 'sites/all/modules/'.
+1. Copy the folder named 'linktocontent' and its contents to the modules
+   directory of your Drupal installation, for example:
+   sites/all/modules/
+
+2. Copy the contents of the folder 'tinymce_plugins' to the TinyMCE plugin
+   folder, for example:
+   sites/all/modules/tinymce/tinymce/jscripts/tiny_mce/plugins/
 
-2. Copy the contents of the tinymce_plugins folder to the tinyMCE plugin
-   folder (for example sites/all/modules/tinymce/tinymce/jscripts/tiny_mce/plugins)
-
-3. Go to 'admin/build/modules' and enable linktocontent. There are three plugins
-   (for example Linktocontent_Node). You can enable any or all of these. 
-   The Description column describes dependencies. 
-   For example, to enable Linktocontent_Category you must enable Linktocontent_Node. 
+3. Go to 'admin/build/modules', enable "Linktocontent" and at least one or more
+   of Linktocontent plugins (for example: "Linktocontent Node").
 
 4. Go to 'admin/settings/tinymce' and edit the profile you want to enable the
-   new plugins (for example "linktonode") for.
-   In section "buttons and plugins" check linktonode and save the profile.
-
-   NOTE: If you would like to do a multi-site installation, the file plugin_reg.php is 
-   not writable or the plugin-buttons do not appear in the tinymce Buttons and Plugins section, 
-   you have to manually include the following lines into tinymce/plugin_reg.php:
-   <code>
-   // linktocontent.module: linktonode
-   if (is_dir(drupal_get_path('module', 'tinymce') . '/tinymce/jscripts/tiny_mce/plugins/linktonode/')) {
-     $plugins['linktonode'] = array();
-     $plugins['linktonode']['theme_advanced_buttons3'] = array('linktonode');
-   }
-   </code>
-   NOTE: The preceding example is for "linktonode".
-   For linktomenu use the same text, but replace every "linktonode" with "linktomenu". 
-
-   Insert the text near the end of the file before the last two lines:
+   new plugins for.
+   In section "Buttons and plugins", for example check "Link to Node" and save
+   the profile.
+   Linktocontent tries to automatically register its plugins for TinyMCE, if
+   sites/all/modules/tinymce/plugin_reg.php is writable.
+
+   Note:
+   If plugin_reg.php is not writable, you are running a multi-site installation
+   or the TinyMCE plugin buttons do not appear in the "Buttons and plugins"
+   section, you have to manually insert the lines from
+   linktocontent_plugin_reg.php
+   near the end of tinymce/plugin_reg.php before these last lines:
    <code>
      return $plugins;
    }
    </code>
 
-5. Go to 'admin/settings/linktocontent' and enable every sub-module you would like to use.
-   After enabling a module check its settings page for more specific settings (for example 
-   which node types to display or which menus to use).
+5. Go to 'admin/settings/linktocontent' and enable every Linktocontent plugin
+   you would like to use.
+   After enabling a module check its settings page for more specific settings
+   (for example which node types to display or which menus to use).
+
Index: linktocontent_plugin_reg.php
===================================================================
RCS file: linktocontent_plugin_reg.php
diff -N linktocontent_plugin_reg.php
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linktocontent_plugin_reg.php	12 Sep 2007 18:02:27 -0000
@@ -0,0 +1,13 @@
+<?php
+
+// linktocontent.module: linktonode
+if (is_dir(drupal_get_path('module', 'tinymce') . '/tinymce/jscripts/tiny_mce/plugins/linktonode/')) {
+  $plugins['linktonode'] = array();
+  $plugins['linktonode']['theme_advanced_buttons3'] = array('linktonode');
+}
+// linktocontent.module: linktomenu
+if (is_dir(drupal_get_path('module', 'tinymce') . '/tinymce/jscripts/tiny_mce/plugins/linktomenu/')) {
+  $plugins['linktomenu'] = array();
+  $plugins['linktomenu']['theme_advanced_buttons3'] = array('linktomenu');
+}
+
Index: contrib/linktocontent_menu/linktocontent_menu.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linktocontent/contrib/linktocontent_menu/linktocontent_menu.module,v
retrieving revision 1.1.2.4
diff -u -p -r1.1.2.4 linktocontent_menu.module
--- contrib/linktocontent_menu/linktocontent_menu.module	7 Jul 2007 16:58:02 -0000	1.1.2.4
+++ contrib/linktocontent_menu/linktocontent_menu.module	12 Sep 2007 17:59:49 -0000
@@ -134,15 +134,19 @@ function linktocontent_menu_get_data($ar
 
 function _linktocontent_menu_get_menus($mid = 0) {
   $menu = menu_get_menu();
+  $result = array();
   if (!isset($menu['items'][$mid])) {
-    return array();
+    return $result;
   }
   $items = $menu['items'][$mid]['children'];
-  $result = array();
+  $enabled_root_menus = variable_get('linktocontent_menu_menus', array());
   foreach ($items as $item) {
     if (!(MENU_VISIBLE_IN_TREE & $menu['items'][$item]['type'])) {
       continue;
     }
+    if ($mid == 0 && (!empty($enabled_root_menus) && !in_array($item, $enabled_root_menus))) {
+      continue;
+    }
     $obj = new StdClass;
     $obj->root = ($mid == 0);
     $obj->mid = $item;
