While linktomenu successfully defines an array of available/selectable root menus in the module settings, this information is never retrieved. Each user is able to select a menu item from any menu that is setup.

Attached patch fixes this bug by adding a check to _linktocontent_menu_get_menus().

I've additionally completed the installation instructions in README.txt, so users working on *nix are able to just copy'n'paste that snippet into their tinymce plugin_reg.php.

Comments

sun’s picture

StatusFileSize
new2.16 KB

Added missing check for empty variable linktocontent_menu_menus.

stborchert’s picture

Hi.
Thanks for the patch, the linktomenu-part looks good. I will resume my work on linktocontent within the next weeks so hopefully all issues will be fixed and a new (bug fix) version will be released.

The part I don't really agree with (or partly understand :-)) is you're modification to INSTALL.txt.
Why this is affected to *nix users?

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

is an example for all available sub-modules (there will be some other sub-modules in version 6.x). And I don't want to have them all listet in INSTALL.txt.
And if the installer works fine, you don't even need to edit tinymce's plugin_reg.php.

But again: thanks for the patch. I will integrate it a.s.a.p.

greetings,

Stefan

sun’s picture

StatusFileSize
new5.97 KB

While you might have write permissions in /sites/all/modules on Windows, you usually won't find write permissions there on *nix. This means that users need to insert the code manually into tinymce's plugin_reg.php. With the current example code, users need to distinguish what they actually need to insert there, without knowing exactly what needs to be duplicated and what else needs to be altered. Supplying the actual code that just needs to be copied and pasted is much more user-friendly and much less error-prone.

If there will be more plugins, be it. Simply supply the necessary code to get the modules working without making headaches for users that are not familiar with module development.

If you think that the code snippet is getting too large, commit the attached patch alternatively. I've additionally fixed line length and wording.

stborchert’s picture

Status: Needs review » Fixed

Hi.
I've checked in the changes (5.x-1.7).
Menus and menu items are now limited to the ones selected in settings. Furthermore I added an INSTALL.txt to each tinymce plugin which contains the string to add to plugin_reg.php.

greetings,

Stefan

sun’s picture

Thanks!

FYI: It would be cool if you would vote on this one: http://drupal.org/node/152046

stborchert’s picture

Status: Fixed » Closed (fixed)

http://drupal.org/node/152046

Whoa, this is awesome. It would solve a lot of my problems :-)

Thanks!