Thumb not displayed when docroot drupal

bertboerland@ww... - November 27, 2004 - 13:13
Project:Image filter
Component:Code
Category:bug report
Priority:normal
Assigned:mrowe
Status:closed
Description

I looked at all the usual and unusiual places and I cant fix this bugger, so I hope it is a generic bug and people can help me out here.

I have my drupal setup in a subdir of my site (http://willy.boerland.com/myblog"), am running 4.5 and image filter.

The old image module (including filter) made it possible to have [image:nodeid] inline links so I have a lot of post with this syntax. Some more info: image_filter is the first filter in order, chmod 766 all image dirs, all path are setup okay (according to me and database) yet thumb images are not displayed. The base url is set to http://willy.boerland.com/myblog (without tailing slash). The source of a node with an image links reveals that the image is linked to like /image/etc where it should have been image/etc (without leading slash)

I looked at the code, at the database and all other places on the web but I cant find the place where this leading slash is added.

For an example posting, look here. Could someone please help me out because I am in the dark here.

#1

bertboerland@ww... - November 27, 2004 - 13:16

note:
image_default_thumb_path s:14:"images/thumbs/";

#2

bertboerland@ww... - November 27, 2004 - 13:19

filters configured / order:
Image filter
Smileys filter
HTML filter
HTML Corrector
Title filter
Weblink filter
Line break converter
Quote filter
Legacy filter
Textile

In case someone needs more info to help me out, just drop a line.

#3

tag - December 10, 2004 - 02:58

I'm not sure how to properly submit this, but I found and fixed this bug (for my limited testing at least): $base_url is out of scope in the default theme_image_inline_img function. Patch pasted below (order of files: original, modified). I don't think my files were clean enough to attach a patch file...

--- _mods/image_filter/image_filter.module      Sun Nov 21 10:00:06 2004
+++ modules/image_filter.module Thu Dec  9 21:51:33 2004
@@ -147,6 +147,7 @@
  * Displays a thumbnail with a link to the image.
  */
function theme_image_inline_img($img) {
+  global $base_url;
   return l('<img src="' . ($img->width || $img->height ? url("image/view/$img->nid", 'res=' . $img->width . "x$img->height") : "$base_url/$img->thumb_path") . '"' . ($img->width ? " width=\"$img->width\"" : '') . ($img->height ? " height=\"$img->height\"" : NULL) . ($img->align ? " align=\"$img->align\"" : '') . ($img->border ? " border=\"$img->border\"" : '') . ($img->hspace ? " hspace=\"$img->hspace\"" : '') . ($img->vspace ? " vspace=\"$img->vspace\"" : '') . " alt=\"$img->title\" />", "node/$img->nid");
}

#4

mrowe - December 13, 2004 - 22:40
Assigned to:Anonymous» mrowe

Committed to HEAD and DRUPAL-4-5, thanks.

#5

mrowe - December 13, 2004 - 22:44

Tag, the diff you posted would have made a perfectly acceptable patch, by the way. :)

#6

Anonymous - December 27, 2004 - 23:15
 
 

Drupal is a registered trademark of Dries Buytaert.