Jump to content


Xinha ImageManager - now with valid css floats instead of img align


  • You cannot reply to this topic
10 replies to this topic

#1 cathode

    Loves Etomite Forums!

  • Staff
  • 648 posts
  • Gender:Male

Posted 22 June 2009 - 03:51 PM

I finally solved this problem... I have modified the image manager to insert class="imgleft" or class="imgright" into the img tag instead of the old, depreciated align="right" or align="left".

Etomite 1.1 Xinha ImageManager plugin modification:

This modification makes ImageManage use valid css for alignment like class="imgright" instead of align="right".
Also removes padding, border, and other depreciated controls from ImageManager popup.
Also contains the "what you see is what you mean" CSS that makes xinha show you the block-level elements, as well as the proper image floating CSS that updates the image position right in the editor.

This mod only includes the files needed for the update and assumes you aleready have Etomite 1.1 or greater and are using the latest release of Xinha for Etomite.

To install:
Extract contents of zip file into /manager/media/xinha

To activate:
1) Assuming xinha is already enabled, enable "Stylist" in the main Etomite configuration's "Interface & editor settings" tab, and change the stylist css file to /manager/media/xinha/xinha.css
2) Save the Etomite config.
3) Next, go back into the Etomite config and turn off stylist. (You need to do this because you don't want the actual stylist "addon" as it's worthless, you just want to tell xinha to use the css file in it's display.)
4) Save the Etomite config again.
5)In your website's main CSS, you'll need to add a couple of styles, here's what I use and recommend:

img.imgright{float: right; clear: both; margin:0 0 .5em .5em}
img.imgleft{float: left; clear: both; margin:0 .5em .5em 0}

Mod created by Ian Smith of n-vent.com

Attached Files


Edited by cathode, 02 July 2009 - 06:48 PM.


#2 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,507 posts
  • Gender:Male

Posted 22 June 2009 - 06:19 PM

Yeah, even in XHTML mode Xinha uses lax XHTML standards... Very few WYSIWYG editors do XHTML Strict... <_<

#3 cathode

    Loves Etomite Forums!

  • Staff
  • 648 posts
  • Gender:Male

Posted 22 June 2009 - 10:11 PM

View PostRalph, on Jun 22 2009, 02:19 PM, said:

Yeah, even in XHTML mode Xinha uses lax XHTML standards... Very few WYSIWYG editors do XHTML Strict... <_<

This one has been bugging me for a long time. Now with classes, you can add padding, clear the floats, etc. based on the image class... it's so nice. I no longer have to force images over to one side to make it easier on my clients, they can choose to float it to either side and I can provide the CSS to make it look good either way. I've also updated my "WYSIWYM" xinha css to match.

I also made the Width and Height tags go away, and removed the border, padding, color, etc controls that were all depreciated.

#4 darren

    Likes Etomite Forums!

  • Member
  • PipPip
  • 251 posts

Posted 23 June 2009 - 05:32 PM

View Postcathode, on Jun 22 2009, 03:11 PM, said:

This one has been bugging me for a long time. Now with classes, you can add padding, clear the floats, etc. based on the image class... it's so nice. I no longer have to force images over to one side to make it easier on my clients, they can choose to float it to either side and I can provide the CSS to make it look good either way. I've also updated my "WYSIWYM" xinha css to match.

I also made the Width and Height tags go away, and removed the border, padding, color, etc controls that were all depreciated.

I'll try it out - it's bugged me too.

#5 cathode

    Loves Etomite Forums!

  • Staff
  • 648 posts
  • Gender:Male

Posted 24 June 2009 - 04:06 PM

View Postdarren, on Jun 23 2009, 01:32 PM, said:

I'll try it out - it's bugged me too.

Darren, I've updated the original post with the info and files...

#6 darren

    Likes Etomite Forums!

  • Member
  • PipPip
  • 251 posts

Posted 24 June 2009 - 07:51 PM

thanks,
i'll try it on a new install later tonight.

#7 cathode

    Loves Etomite Forums!

  • Staff
  • 648 posts
  • Gender:Male

Posted 25 June 2009 - 04:13 AM

View Postdarren, on Jun 24 2009, 03:51 PM, said:

thanks,
i'll try it on a new install later tonight.

Darren,
I just ran into a case where the xinha editor wouldn't load in IE7/8 - let me sort it out before you have a go at it... :)

#8 cathode

    Loves Etomite Forums!

  • Staff
  • 648 posts
  • Gender:Male

Posted 25 June 2009 - 02:15 PM

View Postcathode, on Jun 25 2009, 12:13 AM, said:

Darren,
I just ran into a case where the xinha editor wouldn't load in IE7/8 - let me sort it out before you have a go at it... :)

I fixed this last night- will post update today...

#9 cathode

    Loves Etomite Forums!

  • Staff
  • 648 posts
  • Gender:Male

Posted 02 July 2009 - 06:45 PM

Original post has been updated to include all working files and instruction.

Edited by cathode, 02 July 2009 - 06:49 PM.


#10 darren

    Likes Etomite Forums!

  • Member
  • PipPip
  • 251 posts

Posted 21 July 2009 - 11:29 PM

Ian,
do you still have thumbnails of the images with this mod? For images uploaded with ImageManager and the file manager, my thumbnails show:

src="backend.php?__plugin=ImageManager&__function=thumbs&img=%2Fboats%2F1b.jpg"

for the image assets/images/boats/1b.jpg. Is this correct? on my personal server those sources are more like:

src="/assets/images/boats/.thumbs/.1b.jpg"



uhhhmmm hold on this is the same server i'm having multiple issues with and don't think it has GD.. which is probably required to create the thumbnails..... which explains why all my .thumbs directories are empty. :angry: another email to send. could you confirm for me, though, that backend.php is trying to use GD? I'm not getting any visible errors, even poking around in the rendered source.

#11 cathode

    Loves Etomite Forums!

  • Staff
  • 648 posts
  • Gender:Male

Posted 23 July 2009 - 06:33 PM

View Postdarren, on 21 July 2009 - 11:29 PM, said:

Ian,
do you still have thumbnails of the images with this mod? For images uploaded with ImageManager and the file manager, my thumbnails show:

src="backend.php?__plugin=ImageManager&__function=thumbs&img=%2Fboats%2F1b.jpg"

for the image assets/images/boats/1b.jpg. Is this correct? on my personal server those sources are more like:

src="/assets/images/boats/.thumbs/.1b.jpg"

uhhhmmm hold on this is the same server i'm having multiple issues with and don't think it has GD.. which is probably required to create the thumbnails..... which explains why all my .thumbs directories are empty. :angry: another email to send. could you confirm for me, though, that backend.php is trying to use GD? I'm not getting any visible errors, even poking around in the rendered source.

I still get thumbnails with this mod and no errors (on a server set up properly, of course!)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users