This is a work in progress, to try this add a CCK select box to the image contenttype named 'imagecachepreset' and use the following code for the select (php):

  $presets = array();
  $result = db_query('SELECT presetid, presetname FROM {imagecache_preset} ORDER BY presetname');
  while ($row = db_fetch_array($result)) {
    $presets[$row['presetname']] = $row['presetname'];
  }
  return $presets;

1/ while adding a new image you can select the imagecache preset
2/ while selecting an image you can select the imagecache preset

the preset only works in TinyMce (probably add some support later for plain textfields as well?)
In tinyMCE you'll see an inline tag: [AM|nid=32|title=test|imagecachepreset=am_preview], only nid is mandatory, if title isn't specified, the system uses the node title, if imagecachepreset isn't specified it uses am_preview by default.

Don't forget to activate the inline filter!

For changed code files see below

CommentFileSizeAuthor
#2 am_loader.js_.txt6.76 KBattiks
#1 am.module.txt22.42 KBattiks

Comments

attiks’s picture

StatusFileSize
new22.42 KB

adapted am.module

attiks’s picture

StatusFileSize
new6.76 KB

adapted am_loader.js

attiks’s picture

Note: the plugin for TinyMce doesn't display the image for the moment, just the inline tag.