Wednesday, 22 October 2014 12:15
beggarly

count for IntroText wrong if contains utf-8 characters

count for IntroText wrong if contains utf-8 characters

Postby baijianpeng » Mon Jan 21, 2013 11:52 am

Look at the screen capture of this module on my website:
featcats-first-linked-link.png
featcats-first-linked-link.png (13.14 KiB) Viewed 4269 times


I show only one Leading Article with image and IntroText, and several Linked Articles with only title links.

You can see that there is a problem:

The title link of the first Linked Article is NOT aligned left, but drifted a little right.

Why did this happen? I figured out: Because this module mod_featcats can NOT count the IntroText length correct if there are UTF-8 characters (like Chinese language) in it. And, if the IntroText was not cut off at the right point, then the first Linked Article will drift away.

You know that, it is very difficult to set the correct length limit for IntrText if this module can NOT count that length correctly.

So, I have two suggetstions:

1. Force the first Linked Articles (and all its siblings) align left, no matter where the IntroText of Leading Article was cut off.

2. Force the IntroText of Leading Article shown inside the space where the height equals the height of the thumbnail image, and the width equals the module width minus the thumbnail image width. And, also force the IntroText to fully fill that space, no matter what the length limit is. Maybe you need to use individual DIV element for each Leading Article and use CSS like overflow=hidden to do this.

Why this is important? Because this will ensure that when you publish several instances of this same module in a same line, they will show up in EQUAL HEIGHT, otherwise, if not equal height, they look very ugly.

Thanks.
JoomlaGate - Chinese Joomla! Users\' Portal

http://www.joomlagate.com
User avatar
baijianpeng
Junior Boarder
Junior Boarder
 
Posts: 27
Joined: Thu Nov 08, 2007 2:24 pm

Re: count for IntroText wrong if contains utf-8 characters

Postby chus » Tue Jan 22, 2013 3:34 pm

Hi,

I think the reason it's looking like that is that the image is floating left and there is no clearing after.
So, I have updated the current version with a little css fix for that problem.

Thank you!
User avatar
chus
Administrator
Administrator
 
Posts: 455
Joined: Thu Sep 13, 2007 2:21 am
Location: Costa Rica

Re: count for IntroText wrong if contains utf-8 characters

Postby baijianpeng » Tue Jan 22, 2013 11:17 pm

I installed the latest version, it seems that you use separate UL element for Leading Articles and Linked Articles, but, the first line of Linked Article still drifted a little right.

I checked the source code of that page, there is no extra Tab or WhiteSpace characters before the first Linked Article link, this seems a weird problem.

Could you please try to wrap Leading Article block with a pair of DIV elements, and wrap the Linked Article block with another DIV pairs ? I think this may prevent the Linked Article links drifting.

Thanks.
JoomlaGate - Chinese Joomla! Users\' Portal

http://www.joomlagate.com
User avatar
baijianpeng
Junior Boarder
Junior Boarder
 
Posts: 27
Joined: Thu Nov 08, 2007 2:24 pm


Return to Featured Categories



Who is online

Users browsing this forum: No registered users and 1 guest