xinha relative image url fix?

Creating and modifying plugins.
Post Reply
Jabrwock
Regular
Posts: 34
Joined: Fri Feb 24, 2006 5:42 pm
Location: Saskatoon, Saskatchewan, Canada
Contact:

xinha relative image url fix?

Post by Jabrwock »

I use mod_rewrite, and xinha was setting urls to the relative image path (instead of /s9y/uploads/image.jpg it was putting uploads/image.jpg which was making the image fail to load on archived entries because it was looking for archives/.../uploads/image.jpg)

so I finally figured out how to modify .htaccess to fix this.

Code: Select all

RewriteRule ^archives/[0-9]+-[0-9]+/[0-9]+/uploads/(.*) uploads/$1 [NC,L,QSA]
RewriteRule ^archives/[0-9]+-[0-9]+/[0-9]+/images/(.*) images/$1 [NC,L,QSA]
This causes the archives/.../article.html's image urls to be properly referred to /s9y/uploads/ and /s9y/images/ as well as any sub-folders.

If I tried to enter absolute paths in xinha's html editor, it would replace it with http://server/uploads/image.jpg.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: xinha relative image url fix?

Post by garvinhicking »

Yes, sadly this is an hard issue of the Xinha plugin, which was already existing in previous HTMLArea versions.

I patched it with a lot and trial and error in the HTMLArea editor that's bundled with serendipity, but had no time to look into Xinha yet.

So it's actually a Xinha bug, or "mis-feature" that needs fixing. Maybe it's even an option that could be turned off, but I'm not experienced very much with the WYSIWYG editors. :(

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Jabrwock
Regular
Posts: 34
Joined: Fri Feb 24, 2006 5:42 pm
Location: Saskatoon, Saskatchewan, Canada
Contact:

Post by Jabrwock »

I suspect it's a "feature", as it was mentioned in their forums that IE has some issues with absolute addresses that are missing the server IP. But I submitted a ticket anyway asking if there was a way to turn that off...
Post Reply