is there any way to enable thickbox for inline images.
-------
Sharique

Comments

wim leers’s picture

It works out of the box for images displayed by imagefields (CCK field) and for the img_assist module.

sharique’s picture

I'm talking abt inline images in story or page type node.

------
Sharique uddin Ahmed Farooqui
IT head, Managefolio.com

Sharique Ahmed Farooqui

lazyman’s picture

I am having the same problem. I recall Lightbox having a filter to enable. Thickbox has no such filter. Is that the problem or is it something else? I was reading that the core jQuery was also out of date. Does that have anything to do with it?

jhebel’s picture

Hello, I'm trying the same thing but can't figure it out. I've searched everywhere but just can't find out how to use Thickbox for my inline images. I don't want to use imagefield in CCK or others, i need TB for inline.

I hope someone can help up.

mad-admin’s picture

http://drupal.org/project/img_filter
It's a replacement for the inline module that lets you select thickbox to display images.

czarphanguye’s picture

I've also been messing around with thickbox and inline images. It seems if the image/thumbnail is styled "class="image image-thumbnail"" then thickbox does it's magic. So by hand, you should be able to display thickbox inline.

See Thickbox_auto.js

function TB_drupal_rewrite(context, group) {
  // Process only images, that have not been rewritten (.thickbox) and that are not categories.
  $("a[img.image.image-thumbnail]", context).not(".thickbox").not(".category").each(function(i) {
    var img = $(this).children("img");
    var title = $(this).attr("title") || img.attr("title") || img.attr("alt") || null;

Now, Image_assist is what I use to display inline and the module always styles the images w/ "image thumbnail" and not "image image-thumbnail", so if some-how we can add "image thumbnail" to TB OR change image_assist to output "image image-thumbnail" life would be just peachy.

Also.. Have you see http://drupal.org/project/image_filter which states: "2) Works with thickbox. (Even if the setting page says that it doesn't work with craqbox yet)." as a replacement to inline?

jhebel’s picture

Thanks allot guys!
I'll try out these options and report my results.

It's funny but the main reason I like inline is because of the ajax uploading. It makes it fast and smooth to upload a bunch of images for photo galleries.

----------------------------------
If it's important, do it now!
–Swami

tassoman’s picture

So is it working jQuery Lightbox chained to inline images into nodes? What module shall we use to enable it?
Do we need some code hack?
___________
by tassoman

geek, net addicted user

ElGringo’s picture

I created a button in BUEditor to replace the class text of the inline image placed by Image Assist so Thickbox will be activated properly. Here is the code.

js: 
var tmpTxt = E.getContent();
re = /class=\"image thumbnail\"/gi;
var newTxt=tmpTxt.replace(re, "class=\"image image-thumbnail\"");
E.setContent(newTxt);
avolve’s picture

anyone come across a work-around/add-on for thickbox and FCKEditor/IMCE

IMCE can be set to generate thumbnails - can thickbox be set to pick these up as you can do with CCK image fields??

I specifically ask for inline images in contrast to a CCK image field...

I noted this as a 'won't fix" for IMCE - http://drupal.org/node/118018

any ideas??

thx
c.

avolve designs | ethical by design

milksamsa’s picture

It would be great to make this available to TinyMCE...
Please someone with coding abilities...

e.

lebisol’s picture

Hey gang,
Understand this is an old post but was wondering if anyone has this implemented with TinyMCE?...whitout traning non-techie users to manually (HTML) add classes.
Many thanks!

mwpeters’s picture

Although it gets you dangerously close to just using HTML coding....
Here's what I've done.

  • Insert a reduced image inline using FCKeditor and IMCE and make it a link to the full size image.
  • Go back and edit that image with the link took in FCKEditor and assign it the stylesheet class "thickbox".

I suspect this will also work in TinyMCE and with that editor also gives you the ability to set the REL and tabindex attributes for the link and thus allow Thickbox to treat the related set as a ordered slide-show. I don't use TinyMCE regularly, but I see the demo offers a menu pick for applying a Lightbox class to the link.

I suspect someone interested in writing an editor plug-in could automate the attribute setting in either of the editors and perhaps combine operations so all this could be set from a single button. As far as getting the images on the server, you could either perform the resizing manually or through settings in the configuration of IMCE or the IMAGE module.

Mark

dcuartielles’s picture

fckeditor/fckeditor/editor/dialog/fck_image.js --> THIS IS THE IMPORTANT ADD

add:

SetAttribute( oLink, '_fcksavedurl', sLnkUrl ) ;

SetAttribute( oLink, 'target', GetE('cmbLnkTarget').value ) ;

SetAttribute( oLink, 'class', 'thickbox' ) ; //<-- THIS IS THE NEW LINE

-------------

Thanks to this you will be able of using the img field as the thumbnail and the link field as the high res picture. From now on thickbox will have perfect integration to fckeditor ;-)

NEXT STEP: writing a new dialog for fckeditor

/d