Getting InLine with the images and Drupal

28 Dec in build, css, drupal, how to, module

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.
inspiration.jpg
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.

    Gathering the Modules

  • 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 :)
  • modulescreen.jpg

    Start Configurations

  • 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
  • linkconfig.jpg

  • 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)
  • inputformats.jpg

  • 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.
  • filteredbox.jpg

    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

  • 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
  • option 1: ["inline:1"]
    option 2: ["inline:filename"]

    !!! IMPORTANT NOTE !!!
    DON'T USE THE QUOTES, IT'S JUST SO I CAN DISPLAY IT PROPERLY)))

  • 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)
  • Here it is in action

    somecode.jpg

    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

very nice adidas buy >thanks,puma ferrari very nice adidas shoes >,thank you

asics mexico 66

Like the asics onitsuka tiger australia range, these boots are used in a variety of asics onitsuka tiger mexico 66 yellow black colors including Dusty Rose asics onitsuka tiger shoes australia and indigo, with black and gray oatmeal asics tiger mexico 66 available. What makes these shoes so different than other shoes in the range of onitsuka tiger mexico 66 yellow black make 3 large wooden buttons you some onitsuka tiger mexico 66 by asics really good looks and different styles with them.

bridesmaid

bridesmaid dresses [url=http://www.vpbridal.com/]bridesmaid dresses[/url]

air hockey table

Farming is not that bad. That's one of a good habit, because we can have a good interaction between us and earth.

air hockey table

Farming is not that bad. That's one of a good habit, because we can have a good interaction between us and earth. air hockey table

air hockey table

Farming is not that bad. That's one of a good habit, because we can have a good interaction between us and earth. air hockey table

Post new comment