hi all,
I have to convert several hundreds of old HTML files to Drupal, and prefer to do this offline, then FTP the files to the "/sites/default/files/images" directory or a sub-directory there-of.
I do not want to have to use the front end to place images in the content, by using IMCE or what have you. It would be brutal to have to do that, considering the thousands of images I have to deal with.
Can't I FTP images to the folder above, then use the relative path in my content? I'm using Dreamweaver now for the conversion of old content, since it has a "find and replace" feature and I can specify it to change the old "img src=" to whatever it needs to be for Drupal.
What would be that relative path, for a typical Drupal host (let's say, Siteground for instance)?
Would it be "/sites/default/files/images", or "/drupal/sites/default/files/images", or something else?
If I create a sub-directory for images, they would be in the "images" directory, yes?
I set up a localhost test site for myself (using Xampp in WinXP), and thought the relative path for Drupal would be "/drupal/sites/default/files/images" but then realized that was only because I set it up in a folder called Drupal, so this might not be the case on an actual production server. I'd hate to change all these old HTML files only to realize I screwed up using the wrong relative path.
And yes, I searched for this topic, the answers I found only confused me even more!
Thanks.
Comments
Path filter or Pathologic
The above two modules may help. We use path filter a lot. The URL would be
href="files:PATH_TO_IMAGE"and is independent of the base installation directory. You need to make sure that you enable the input filter (think of these as output filters as they modify the output rather than the input.) Then you can switch between the test URL and live URL without needing to change the content.Alan Davison
_
Just subscribing for reference and ...
... I like to add - there are no stupid Qs - only stupid As - the one above are not - so thanks for the useful advice in both - the question and the answer.
.....
Totally agree :) PS: One
Totally agree :)
PS: One other reason for not using relative URL's is clean URL's
For example, http://www.example.com/?q=node/34 would become http://www.example.com/node/34. The base URL that the browser sees would be http://www.example.com/ without clean URL's and http://www.example.com/node/ with clean URL's!
You can always add the base URL HTML metatag into the template, but for some reason that escapes me at the moment, (something to do with Search Engine caching), this approach was dropped in favor of the current way - full paths
Alan Davison
Thanks for the replies I'll
Thanks for the replies
I'll try the Pathologic Module. Although I'm not too keen on using yet another module, as I'm having PHP Memory issues with my server.
Do you have lightbox2
Do you have lightbox2 installed? It can have really bad performance issues - related to the way CCK works in Drupal 6, not lightbox
Alan Davison