Images in blocks, paths, modules (Yes, I am new ;) )

Homdax - January 30, 2008 - 08:41

What to accomplish:
- a custom block on the left side of the site, showing linked screen shots (200pxx150px) of other related sites.

How to accomplish it...

OMG!

So I reviewed if any Content Type could be placed on left or right, but it seemed not, so I went in to Blocks and created a new one, aligned it to the left and inserted this code:
<h4>Homeworld Access</h4><a href="http://www.hwaccess.net" target="_blank" title="Homeworld Access"><img src="/files/images/hwaccess-net.png" ></img></a><br>
All but the image showed up.

So I messed around with CHMOD and Paths but could not get it to work. Not even an absolute path.
Altered File System setting, back and forth several times. Private to Public to private to Public to Private to Public...etc...

Nothing worked.
Linked the image OFFSITE. That worked! Hokay, so I am supposed to link all images offsite? Dont think so...

So I started to look for Image handling Modules. I now I wish I hadn't, and kept the offsite link.
Reading the CookBook I got "Image". Unable to figure out how to use that in this context. Further digging.
DBFM? Ok DBFM it is. Downloaded - uploaded and installed. Dependencies? WTF?
DBFMGreybox? DAPI? Tabs? More modules? Ok, got those too.
More dependencies?
Javascript Tools! More dependencies? Form Store? Form Filter? Screw it.
(Actually I do have a current Module List with no missing dependencies as I type this...)

I now have a Module list that is well over a meter long, have read up as much as I could find on each and every relevant module even ended up installing WebFM as well, and I have still not figured out how to link that bloody image within Drupals file system.

So, calming down a bit, could someone please explain how to solve the issue at hand?

Correct path?

mcjim - January 30, 2008 - 09:26

Couple of things:
Is that the correct path for the file? If you're Drupal installation is in http://localhost, for example, that's fine. If it's in http://localhost/drupal then the path for the file would be /drupal/files/images.
And are you using an input format that allows the img tag?
Finally, your img tag should be <img src="pathtofile" alt="short description" /> . There's no closing tag.
Hope this helps,
James

Files are located in the

Homdax - January 30, 2008 - 09:57

Files are located in the /files directory
http://www.conram.com/files/images/hwaccess-net.png
or
http://www.conram.com/files/hwaccess-net.png

Placed the all over the place.

BUT...now I suspect a more serious error since those links gives 500.
This might be htaccess related.

Server info: www.one.com
PHP: Just upgraded to 5.2.5

htaccess, I had to comment out two things in order to get the site working on server:

# Don't show directory listings for URLs which map to a directory.
# Options -Indexes

# Follow symbolic links in this directory.
# Options +FollowSymLinks

otherwise its vanilla.

Maybe I should comment out that to in the htaccess that lies in /files...
Well I deleted it, and then the links above work.

So, what functionality did I delete?
That htaccess had this in it:

SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options None
Options +FollowSymLinks

 
 

Drupal is a registered trademark of Dries Buytaert.