Getting InLine with the images and Drupal
Getting images to play nicely is not always easy. A content management system like Drupal has so many advantages, and so many options, and so many ideas. The options around images is no joke. Lots of options, lots of solutions, and benefits to many different choices. This blogthingee is to discuss one of those options, specifically, displaying images inline in Drupal 6.

One of the topics discussed on a recent podcast from geeks and god was their new tutorial section. The issue they had was the ability to include images inline. While I too was unable to find a perfect solution. I have decided to go with inline module. Here is a short walk through of how I got it working here at blogthingee.
- Download Inline Module
- I decided to also install imagecache and the support modules also to simplify my inline module use (I really like the idea of using imagecache as often as I can)
- Copy the modules to your modules directory (i.e. /sites/all/modules)
- I enabled imagecache modules, the imagecache support modules, and unload module that comes with core
- Don't forget to enable our featured module as well :)
- I configured my blog content type to accept uploads
- I created an imagecache preset that would fit my blog size
- Next I configured the lnline Module (admin/settings/inline) to use my imagecache preset, as well as to set the display to link to the full size image
- Next I needed to make the filter available to the blog post (like the php filter works in core). I decided to just add it to the "Filtered HTML" from the input formats screen (admin/settings/filters)
- By selecting the link that says "Configure" I then enabled "Inline filter" as one of the input formats usable by my system, and specifically by that filter.
- Created my post (this one)
- Uploaded an image using the upload module
- The first file I uploaded is considered by the module as "1" as well as its "filename"
- When I wanted to insert the image I had two options for how to type it in
- So for the sample code above you would change all of the characters in - "inline:filename" - to read - inline:sample.jpg - which would be within the brackets [] (sample below)
Gathering the Modules
Start Configurations
Some CSS For My Needs
img.inline {
background:#F4F5DE none repeat scroll 0% 50%;
border:thin solid #CCCCCC;
margin:5px 0px;
padding:12px;
}Now Time To Use It
option 1: ["inline:1"]
option 2: ["inline:filename"]
!!! IMPORTANT NOTE !!!
DON'T USE THE QUOTES, IT'S JUST SO I CAN DISPLAY IT PROPERLY)))Here it is in action
The Proof Is In The Putting
Once I completed this post I proceeded to use it on the previous post, as well as post I am completing for next week. One note... the module comes with some pretty clear documentation and I am very pleased to see the nice work and give kudos the the current maintainer Daniel F. Kudwien (sun)





Comments
How to get imagecache scale to work in this?
Hi,
thanks for the post. I have the inline and imagecache modules installed, but when I attach the image to the node, the default imagecache scale operation - the default 'teaser preset' is not applied. Any ideas on what I'm missing?
as attachments
any files/images you want to use inline have to be uploaded via the upload module, they don't go near the imagecache module. On my blog posts, I have an imagecache field for the main image (the first one you see) then the rest are uploaded via the drupal core upload module, and place inline with the commands. The imagecache settings are within the settings for the inline module.
Great!
Thanks for the very detailed tutorial. I might consider using inline module after reading this post.
slm
asics mexico 66
bridesmaid
air hockey table
air hockey table
air hockey table
Post new comment