When I download the 3/16 release, I get
contrib/linktocontent_category, linktocontent_menu, linktocontent_node
BUT
tinymce_plugins/linktomenu and linktonode, with no linktocategory.

When I install and run I get an error that link to category is not installed - check to see if I copied everything.
I did copy everything, but it looks like something is missing.

Comments

stborchert’s picture

Assigned: Unassigned » stborchert

You don't forget anything. linktocontent_category doesn't need a tinymce-plugin because it extends linktocontent_node (linktonode).
But the error message shouldn't appear because the specific function looks like this:

function linktocontent_category_check_files() {
  return true;
}

If it returns false, the message appears.
I've checked the archive and tried the files on a new installation: everything worked fine.
Which php-version do you use?
Can you check the result of linktocontent_category_check_files().
Insert the following code in linktocontent.module, line 109:

error_log(print_r($plugin_name, 1));
error_log(var_export(module_invoke($plugin_name, 'check_files'), 1));

and check your error log.
It should return

linktocontent_node 
true
linktocontent_category true
jsgammato’s picture

I should mention that we had a database crash last week and everything was restored from an earlier backup. It all seems to be working OK now, but for a few things.
I had added the status update module to help me keep things up to current versions and maybe some wires got crossed if anything was updated between the crash and the restore.
After messing around with the plugin_reg.php for a few attempts, I disabled and then uninstalled the module and then reinstalled it from a frsh download.
Now the module seems to install OK, but the buttons do not appear in the tinymce Buttons and Plugins.
I notice that unlike al the other tinymce plugins, linktonode and linktomenu do not include a editor_plugin_src.js, and I wonder if that is why I cannot see the buttons?

stborchert’s picture

Hi.
The entres for linktonode and linktomenu should look like this (in plugin_reg.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');
}

With this code in plugin_reg.php the buttons shall appear in the profiles settings.

editor_plugin_src.js isn't needed because its just the uncompressed source file of the plugins.

jsgammato’s picture

StatusFileSize
new4.87 KB

I still get no buttons - at least not that I can see. There are many there, but the linktonode button I used to get is no longer there.
I am no code jockey, so I might have miscopied something, but I think I got it right. I attached the plugin_reg file, renamed as .txt just in case the .php might be disallowed.

stborchert’s picture

Ha, got it:
Your plugin_reg.php:

return $plugins;
}
// 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');
}

The plugin definitions have to be a few lines above:

  // 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');
  }

return $plugins;
}

Otherwise they aren't attached to $plugins and don't appear in "Buttons and Plugins".
Hope this was the solution :-)

greetings,

Stefan

jsgammato’s picture

StatusFileSize
new2.22 KB

That was it - thank you again!
If it would not be too presumptuous on my part, I did a little editing on the Install.txt to clear up where I (and maybe others) got confused. It is attached to do with as you will.
Thanks again!

stborchert’s picture

If it would not be too presumptuous on my part, I did a little editing on the Install.txt to clear up where I (and maybe others) got confused.

Thank you! I will check this into cvs.

greetings,

Stefan

stborchert’s picture

Status: Active » Fixed

forget to set it to "fixed"

stborchert’s picture

Status: Fixed » Closed (fixed)