You are not logged in.
Pages: 1
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
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
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
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
Pages: 1