Setting Up Wysiwyg and IMCE

WYSIWYG can work with IMCE; other image modules are in the works. IMCE is discussed in this hour because of its widespread use. IMCE lets you upload image files and then use them; along the way you can create thumbnails in addition to the original image file.

To begin, download, install, and enable IMCE, as described in Table 11.3.

TABLE 11.3 IMCE Module Reference

Download from project/imce

Enable in section Other



Set up IMCE profiles as in the following section. Administration

Administer, Site Configuration, IMCE admin/settings/imce)

If you are using IMCE with WYSIWYG and the TinyMCE editor, you also need to download, install, and enable WYSIWYG IMCE API Bridge, as described in Table 11.4.


Download from Enable in section Permissions



None project/imce_wysiwyg User Interface

Like WYSIWYG, IMCE lets you set up profiles; you then assign profiles to specific roles rather than using the permissions structure in User Management.

This is done at Administer, Site Configuration, IMCE (.admin/settings/imce), as shown in Figure 11.17.

FIGURE 11.17

Configure IMCE profiles.

Search this si

IMCE I local host jfeiler

My account

Modules from the book Administer

Content management Site building Site configuration


Clean URLs Date and time Error reporting File system File uploads IMCE

Image toolkit ImageAPI Input formats Logging and alerts Performance Poormanscron Search settings Site information

Configuration profiles

Profile name

Configuration profiles

Profile name

User-1 Edit

Sample profile

Edit Delete

Add new profile

Role-profile assignments

User role

Assigned profile

user #1 User-l


f none ^

authenticated user

" ; 1

anonymous user

Assign profiles to user roles. Common settings anonymous user

Assign profiles to user roles. Common settings

(Save configuration^"1

The common settings in the lower part of this page let you control uploads and thumbnails, as shown in Figure 11.18. More customization is possible in individual profiles.


Image toolkit ImageAPI Input Formats Logging and alerts Performance Poormanscron Search settings Site information Site maintenance Wysiwyg User management Reports Help Log out

IMCE | local host

Common settings Enable inline image/file insertion into plain textareas:

to add your images or it IMCE to te file URLs.

Default behaviourfor existing files during file uploads:

0 Keep the existing file renaming the new one

O Keep the existing file rejecting the new one

O Replace the existing file with the new one

Default method for creating thumbnails:

O Scale the image with respect to the thumbnail dimensions.

0 First scale then crop the image to fit the thumbnail dimensions.

( Save configuration )

FIGURE 11.18

Review common settings.

Because the profiles can allow users to upload image files to your server, you probably want to review the profile settings carefully so that people do not abuse the server. Figure 11.19 shows the sample profile being edited.

FIGURE 11.19

Review profile settings.

FIGURE 11.19

Review profile settings.

Notice that you can import settings from another profile so that you can then change one or two settings. Remember that the profiles will be associated with user roles (not individual users), so your settings must map to a profile such as webmaster.

The most important settings for most people are those shown in Figure 11.19. These are fairly restrictive in terms of the size of files and the numbers of files that can be uploaded. The User-1 profile, which initially applies to the primary user, is much less restrictive.

Figure 11.20 shows where you specify the directories to which your users have access. You can specify three directories, each with different permissions and with the choice

FIGURE 11.20

Set directories and permissions.

Wysiwyg User management Reports

Sample profile [ local host


Directory path sites/derauIt/files/ u%uid O Including subdirectories sites/default/files/ O Including subdirectories sites/default/files/ O Including subdirectories

Drowse Upload Thumbnails Delete Resize is users/userl, usersjuser42, &

ne directory path bl.

as the directory path, resulting in m e Instead of $GLOBALS[ 'user1 ] since je a valid php code that of including subdirectories. If you specify all three directories and save the profile, you will have additional blank rows on the next page.

You can use %uid for the user ID in a directory path. It is common to allow each user to have a directory and for users working together to share an additional directory.

Finally, the thumbnail information shown in Figure 11.21 lets you provide names and dimensions for thumbnails. Users can choose among these but cannot change them.

FIGURE 11.21

Configure thumb-

With IMCE and its profiles configured, you have one last step before you are ready to use images yourself and let your users use images. The Buttons and Plugins section of WYSIWYG profiles has a new check box for IMCE, which is shown at the lower right of Figure 11.22.

My account Create content Modules From the book Administer Log out

FCKeditor profile for Filtered HTML | localhost

Buttons and plu gins

M Bold


□ Underline

g Strike-through

B Align left

□ Align center

□ Align right

B Justify

Bullet list

^ Numbered list

§f Outdent

(g Indent

□ Undo

B Redo

□ Link

B Unlink

□ Anchor

a image

□ Forecolor

B Backcolor

□ Superscript

□ Subscript


O Source code

B Horizontal rule

B Cut

□ Copy

0 Paste

□ Paste Text

□ Paste from Word

□ Show blocks

B Remove format

□ Character map

B About

B HTML block format

□ Font

□ Font size

B Font style

□ Table

B Search

B Replace

□ Select all

B Create DIV container

B Flash

□ Smiley

B FitWindow

B Check spelling

□ Au tog row

B BBCode

B Table drag/resize

□ Table: Cell properties

B Table: Insert row after

B Table: Insert column after

B Table: Insert cell after

B Table: Delete rows

B Table: Delete columns

B Table: Delete cells

B Table: Merge cells

B Table: Horizontal split cell


You need to check both the Image check box and the IMCE check box. The Image check box puts the image button into the toolbar; the IMCE check box enables IMCE itself, as you will see in the following section.

Was this article helpful?

0 0
Article Marketing Knockdown

Article Marketing Knockdown

The lifeblood of any online business is in being able to generate highly targeted, consistent traffic to your websites, landing pages and squeeze pages.

Get My Free Ebook


  • Diann
    How to assign wysiwyg roles in drupal?
    8 years ago

Post a comment