Installing editors out of sites/all/libraries

Events happening in the community are now at Drupal community events on www.drupal.org.
miceno's picture

Hi,

WYSIWYG is a great module that simplifies the edition of HTML. Thanks for it!

I have come into a way to install the libraries in a different standard path than sites/all/libraries due to some issues with my setup. Unfortunately, I had to tweak the source code :(

I attach the code, and I would like to know if there is a better way to change it, apart from patching the module.

AttachmentSize
wysiwyg-configlibraries.patch813 bytes

Comments

Best way involves more extensive path, imho

tnanek's picture

The best way, I think, would be to patch the module to add a configuration screen per each site that's using the module. Save it as a path in the Variables table and then just get the variable when loading a library. This way, you'd be able to use the same patched module to serve a multitude of sites when dealing with a multi-site install - presuming there is no standard of organization between the sites - plus this can always be altered in the future easily enough too.

Now that I look at the patch, you might want to have it check if the sites/all/libraries directory exists first, and if so use that; otherwise use yours. Same with the libraries directory - this way, should you pass your site on at somepoint in the future, the set up could be used as expected by a future maintainer. Just my 2 cents.

Thank you!

miceno's picture

Thank you!

My first approach was dirt'n'quick. I am afraid that my skills on Drupal are limited and it will take me some time to include the config screen.

But the other approach is more suitable for my purposes. Thank you again!

Wysiwyg

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: