I created a new, own Highslide formatter called hs_news. In the node type edit page I have a image field. In the Insert section I can only activate "highslide_full" or "highslide_thumb"; nothing more.
Before I created my own formatter, I saw the "Highslide Default (Zoom) formatter too.
Where is the problem?

Comments

q0rban’s picture

Hmm, good question. Have you tried out 6.x-1.x-dev to see if the problem you are running into has been fixed in that version?

mawosch’s picture

Even with dev Version there is no custom formatter shown.

q0rban’s picture

Version: 6.x-1.2 » 6.x-1.x-dev
Status: Active » Postponed (maintainer needs more info)

Ok, thanks. I've not run into this yet, so if you can, try digging more into the code to see if you can figure out the problem. Devel's dsm() is your friend. :)

mawosch’s picture

No I played a bit with Highslide.
I have my own Highslide formatter in the Insert section of the node-type only when I activate "Image Description" in "Caption contents: " Field.
As soon as I switch to "Image Title" (what I want) the Highslide formatter is no longer shown in Node-Type area.
Hope that helps you a bit.

q0rban’s picture

Status: Postponed (maintainer needs more info) » Active

Great, thanks for doing the extra work of troubleshooting that!
:)

q0rban’s picture

Status: Active » Fixed

Ok, well, I found where this was stemming from. Basically, when I first wrote the insert implementation, the only field that worked with Insert was the description field, so I required the formatter to have that field if it be used as an Insert formatter. Now, even the description field doesn't work. I think this is something that has changed in Insert or possibly Imagefield.

Either way, I've made it so that Image Description, Title, or Alt text can be used as a caption for an Insert formatter, however, you will have to save the node before these fields will actually get used in the insert, so I'm not sure this is much help. This is due to limitations in Insert, not an issue with Highslide's implementation. If you want that to change, you might search for a related issue on Insert's issue queue, and if there isn't one, open it. If you do end up going that route, please link to that issue in here, if you don't mind. :)

Here's the commit with the fix:
http://drupal.org/cvs?commit=411410

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

astro75’s picture

Status: Closed (fixed) » Needs review

It's not necessary to save node before using insert with Title or Alt text. Here is my new highslide_insert_content() function with two lines inserted

function highslide_insert_content($item, $style, $widget) {
  $element = array(
    '#item' => $item,
    '#widget' => $widget,
    '#formatter' => $style['name'],
  );
  $element['#item']['data']['title'] = '__title__';
  $element['#item']['data']['alt'] = '__alt__';
  return _highslide_formatter($element);
}