Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2005-07-20 05:18:09

steveholt
New member
Registered: 2005-07-20
Posts: 5

ImageManager path

Hi

I am new to Xinha but it looks really good. I am using ImageManager to select images and I have all my config options set up and it all works fine - except that the src URL written to the document has the '/' at the start missing. It is there in the config, and it looks as if ImageManager carries it through, but at some stage it gets dropped. I have done two installs and both have the same issue. If it was a true relative path it would be OK(ish) but it is the full path without the preceeding '/' which seems to make it useless to me.

I can't belive I am the only one to suffer from this, so if this is a simple config option somewhere please be kind to me and point me the right way.

Thanks

Steve

Offline

#2 2005-07-20 06:48:01

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: ImageManager path

Have a play with the stripBaseHref config option, and also the baseHref config option

  xinha_config.baseHref = 'something/here';
  xinha_config.stripBaseHref = true/false;

James Sleeman

Offline

#3 2005-07-20 07:58:37

steveholt
New member
Registered: 2005-07-20
Posts: 5

Re: ImageManager path

Thanks for the quick response. I have tried a few combinations and the only one which seems to work consistently between IE and FireFox is

      xinha_config.baseHref = "http://localhost/xyz/";
      xinha_config.stripBaseHref = true;

where xyz is where you are right now. If you set stripBaseHref to false it all works until you move the image in Firefox. It then decides to give it a fully relative location. So it seems you have to use relative all over to get anything consistent.

Also as a note to others - be careful with the trailing '/' in baseHref. If you include it and say strip, it removes it - and vice versa.

Steve

Offline

#4 2005-07-20 09:42:17

steveholt
New member
Registered: 2005-07-20
Posts: 5

Re: ImageManager path

Aarrgh .. not true. The above only works if /images is inside /xyz. Otherwise the strip does nothing and leaves you with absolute URLs except for the Firefox oddity which does double dots as required.

The strip looks as if it is too blunt an instrument for this job. What is needed is the ability to turn every URL into

a full URL
a domain URL - ie with a '/' at the beginning
a relative URL - with double dots as required

Too complex for a regular expression I would say. I may just have a go at it though.

Steve

PS the title of this post is all wrong - it's not ImageManager's fault at all. I can't see how to change it though.

Offline

#5 2005-08-18 17:59:40

Mul
New member
Registered: 2005-08-18
Posts: 2

Re: ImageManager path

I'm having similar problem as well when the image is started with absolute URL instead of relative URL.

The problem is in the fixRelativeLinks, it added one character too many in document.location.href.  If the document.location.href = "http://localhost/images", it became "http://localhost/"; it should've been "http://localhost" instead.

Offline

Board footer

Powered by FluxBB