Setting up WYSIWYG image upload using drush

For all using drush, this is how to set up all dependencies quickly (even jquery ui library and ckeditor library).

If you are testing or developing, be sure to uncomment the github version in the make file, instead of the current drupal.org release, so you test the most recent version.

Make file

api=2
core=6.x

;the current release of wui
projects[]=wysiwyg_imageupload

; or the current development master for testing / development (uncomment to use)
;projects[wysiwyg_imageupload][type] = module
;projects[wysiwyg_imageupload][download][type] = git
;projects[wysiwyg_imageupload][download][url] = git://github.com/EugenMayer/wysiwyg_imageupload

;drupal
projects[]=drupal

projects[jquery_update][version] = 2.0-alpha1
projects[]=imagecache
projects[]=imageapi 
projects[]=wysiwyg
projects[]=jquery_ui
projects[]=jquery_ui_dialog

; Some extra sauce (optional modules)
projects[] = admin_menu
projects[] = views
projects[] = lightbox2

libraries[jquery.ui][download][type]="get"
libraries[jquery.ui][download][url]="http://jquery-ui.googlecode.com/files/jquery-ui-1.7.3.zip"
libraries[jquery.ui][destination]="modules/jquery_ui/"

libraries[ckeditor][download][type]="get"
libraries[ckeditor][download][url]="http://download.cksource.com/CKEditor/CKEditor/CKEditor%203.4.1/ckeditor_3.4.1.tar.gz"

; Having a second wysiwyg editor is a good idea for testing!
libraries[tinymce][download][type] = "get"
libraries[tinymce][download][url] = "http://downloads.sourceforge.net/project/tinymce/TinyMCE/3.2.6/tinymce_3_2_6.zip"

Make file:You can skip all steps in here when you use drush make and the wui.make file in the module. This will install all modules, dependencies and liberaries you need. A single-command complete setup.

drush --prepare-install make wui.make wui

Drush

Download all dependencies

drush dl jquery_update-6.x-2.0-alpha1 imagecache imageapi wysiwyg wysiwyg_imageupload jquery_ui jquery_ui_dialog lightbox2 views

Optional: Installation CKeditor ( if needed )

cd sites/all && mkdir libraries && cd libraries && wget http://download.cksource.com/CKEditor/CKEditor/CKEditor%203.3.1/ckeditor_3.3.1.tar.gz
tar xf ckeditor_3.3.1.tar.gz 

Install jquery_ui. just be in the sites/all/libraries when you start.

cd ../modules/jquery_ui && wget http://jqueryui.com/download/jquery-ui-1.7.3.custom.zip && unzip jquery-ui-1.7.3.custom.zip && mv development-bundle jquery.ui

Finally enable all modules

drush en wysiwyg_imageupload imageapi_gd jquery_update jquery_ui imageapi_gd wysiwyg_imageupload_lightbox wysiwyg_imageupload_browser

- Now setup the CKeditor (or TinyMCE, if the makefile method was used) as the WYSWIYG editor
- enable the imageupload button there
- configure the input filter "Drupal Wiki inline images" and you are set to go

Comments

boftx’s picture

I strongly urge people to investigate other modules for inline image content. This module does NOT work and the author does not seem to realize that when users have a problem they need an answer other than RTFM.

EugenMayer’s picture

Well,

due to your comment here http://drupal.org/node/860430#comment-3729004 i dont have to add anything here.

Not that i would in any way want to convince you, but 1699 websites currenly use this module.
Anyway people might want to look at http://drupal.org/node/692070 and make up their minds themself`s

sammyg’s picture

On the contrary, this is an excellent module and I had it working first time and quickly, due mostly to the great CLI/Drush instructions (thank you for these Eugen!). The rest of the documentation is also detailed and well written. I've not played with it much yet, but I felt the need to 'correct' this thread couldn't wait.

blueprint’s picture

The drush method makes it easy, but for those who don't do the cli, the insructions work well. After using imce and the bridge for 2 years, I finally became weary of hacking the javascript and templates ...

This is also a more easily used widget for the normals.

decibel.places’s picture

Corrections for Quick Setup commands:

incorrect: tar xf ckeditor_3.3.1.tar.gz

since the archive is gzipped we need the gzip option "z" (I safely used "xzvf") also this version of CKeditor adds markup for spellcheck (scayt tags) so a later version is desirable http://ckeditor.com/download I am currently using 3.6.1

correct: tar xzvf ckeditor_3.6.1.tar.gz

-------------------------------------------------------

incorrect: Install jquery_ui. just be in the sites/all/libraries when you start.
cd ../modules/jquery_ui && wget http://jqueryui.com/download/jquery-ui-1.7.3.custom.zip && unzip jquery-ui-1.7.3.custom.zip && mv development-bundle jquery.ui

"unzip" is not a BASH command, use "gzip" - also the "mv" command requires a destination to move to

correct: cd ../modules/contrib/jquery_ui && wget http://jqueryui.com/download/jquery-ui-1.7.3.custom.zip && gzip -d jquery-ui-1.7.3.custom.zip && mv development-bundle jquery.ui cd ../../../libraries

-------------------------------------------------------

also, the current directory may be different if you have installed the CK library or not, and whether the filesystem has sites/all/modules/contrib - the instruction "just be in the sites/all/libraries when you start" does not really make that crystal clear

in addition, some of these commands (mv) will not work when installing on Windows from the command line (yes I run Drush on Windows) #justsaying

blueprint’s picture

unzip, like gzip is a program. neither are Bash commands (internal to Bash). The unzip program is available on most distros (ie, debian derivatives apt-get install unzip).

But gzip will do just fine.

In an aegir / profile context, you may also have other paths. In many cases I'm installing into /platform-root/profile/profile-name/libraries ... By which I mean to say, it's obvious that the quick install instructions will vary if you have special needs or preferences.