How to have images with absolute path?

pramudya81 - August 20, 2008 - 14:55

Yes, Im using tinymce and imce to upload image into a content.

But if I burn the content using feedburner this is the link http://feedproxy.google.com/rss/dakiunta all the images are gone due to relative path.

How to have default absolute path when I uploading images into a content?

Regards

> How to have default

-Anti- - August 20, 2008 - 15:20

> How to have default absolute path when I uploading images into a content?

In IMCE for D6, it is an option in the IMCE settings page.

However, I don't think this is just a wysiwyg or imce problem.

I think it pertains to anyone who wants to use internal links like: /sites/default/files/image.jpg
This kind of internal link is very desirable for portability reasons, and in my mind there should
be no reason at all to use full absolute url internal references within a website.

So IMO it is feed technology which is causing the problem.

I will certainly never use full absolute urls in my internal links, even if it means I have to ingore
feed technology entirely. Besides, all it does is create mostly irrelevent 'spam' in your reader,
and adds to your 'information overload'.

Overall, I agree with you.

pramudya81 - August 21, 2008 - 02:57

Overall, I agree with you. Your statement above is in sense.

So any workaround or kind of cheats to have relative path but excellent looking feed at the same time?

Regards

> So any workaround or kind

-Anti- - August 21, 2008 - 16:06

> So any workaround or kind of cheats to have relative path
> but excellent looking feed at the same time?

http://drupalmodules.com/module/pathologic

It actually says something about rss feeds and relative links on its project page.
It is a filter which corrects urls in the rendering to the user (or feed).
So your content textareas will still have relative links, but the rendered source won't.

Post back if it solves the problem (or if you solve it with another method).

Cheers.

Pathologic seems the perfect

pramudya81 - August 22, 2008 - 08:08

Pathologic seems the perfect solution but it does not work. I dont know what's wrong.

Is it because of "/" that TinyMCE uses?
e.g. /files/image.jpg thus pathologic consider it absolute path?

How to tell TinyMCE not to have the first "/"?

Regards

> Is it because of "/" that

-Anti- - August 22, 2008 - 09:45

> Is it because of "/" that TinyMCE uses?
> e.g. /files/image.jpg thus pathologic consider it absolute path?

Yes, /sites/all/default/files/image.jpg is considered an absolute path.
To the browser, the leading stroke means 'begin after: domain.net/' or
'begin after: domain.net/drupal/' if installed in a subfolder.

You might want to submit a bug/feature request to pathalogic.
It is actively developed, and my queries a few weeks ago were answered quickly.

In the meantime here is something else you can try:
http://drupal.org/project/wordfilter

It changes text strings when rendering output to the user. So...

If links in the text-area source are: /sites/all/default/files/image.jpg

You might be able to specify /sites/all/ as a string to be replaced with:

http://domain.net/sites/all/

making the rendered html:

http://domain.net/sites/all/default/files/image.jpg

but leaving the source as: /sites/all/default/files/image.jpg

I've no idea if this will work or not (or how efficient the filter is!)
Logically it should, but then the world is sometimes not as logical as you think it is.

If you try it, and it works, can you post back with the results?

Cheers.

Hmm it's scary.. I wont go

pramudya81 - August 22, 2008 - 10:24

Hmm it's scary.. I wont go forward. Too risky in my mind.

I will wait pathologic to work (wait for some patches maybe) or let my feed wont work for this moment. Or I'll try url replace filter module. Or perhaps must find a way to disable image on a feed. Problems solved...

Regards

> Or I'll try url replace

-Anti- - August 22, 2008 - 10:56

> Or I'll try url replace filter module

Ah... yes, you're on D5.
There might be better filters then - I only looked at the D6 list.

> will wait pathologic to work (wait for some patches maybe)

Make sure you explain clearly that it is to fix external rss feed services.

You never know: if you're alerting Garrett to a problem with feeds that
he didn't know about, and that his module has potential to fix it for a
wide user-base, he *might* try to implement a solution.

 
 

Drupal is a registered trademark of Dries Buytaert.