In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
1089 [In-Portal CMS] Front End bug report always 2011-08-08 10:06 2011-09-19 16:08
alex  
alex  
normal  
closed 5.1.3-RC1  
fixed  
 
none 5.1.3  
https://groups.google.com/d/topic/in-portal-bugs/0Z7lsjwK7ok/discussion
Fixed text shortening algorithm when first_chars/cut_first parameter is used in Field tag
0
0001089: Long text is clipped in the middle of the word
I have no any URL to give an example, but In-Portal has text clipping function, that allows any db field value to be clipped to a given length. For example not to break page layout by inserting very long text.

Here is how to use it:

<inp2:prefix_Field name="FieldName" cut_first="145"/>

This will return first 145 symbols of given field value. In case, when there is a middle of a word at 145th symbol, then word would be broken, e.g. "this is example of broken spl ...".

I'm attaching a patch, that would do same, but also will keep word integrity, like this: "this is example of broken ...".
patch wordbreak_safe_text_stripping.patch (611) 2011-08-08 10:06
http://tracker.in-portal.org/file_download.php?file_id=1089&type=bug
Issue History
2011-09-19 16:08 alex Note Added: 0003781
2011-09-19 16:08 alex Status resolved => closed
2011-09-16 09:22 alex Note Added: 0003742
2011-09-16 09:22 alex Status reviewed and tested => resolved
2011-09-16 09:22 alex Fixed in Version => 5.1.3
2011-09-16 09:22 alex Resolution open => fixed
2011-09-16 09:22 alex Assigned To !COMMUNITY => alex
2011-09-16 09:22 alex Changeset attached 5.1.x r14520
2011-09-07 18:07 Dmitry Note Added: 0003724
2011-09-07 18:07 Dmitry Status needs testing => reviewed and tested
2011-09-07 18:07 Dmitry Target Version Icebox => 5.1.3
2011-08-08 10:06 alex Assigned To => !COMMUNITY
2011-08-08 10:06 alex Developer => alex
2011-08-08 10:06 alex Status active => needs testing
2011-08-08 10:06 alex New Issue
2011-08-08 10:06 alex File Added: wordbreak_safe_text_stripping.patch
2011-08-08 10:06 alex Reference => https://groups.google.com/d/topic/in-portal-bugs/0Z7lsjwK7ok/discussion
2011-08-08 10:06 alex Change Log Message => Fixed text shortening algorithm when first_chars/cut_first parameter is used in Field tag

Notes
(0003724)
Dmitry   
2011-09-07 18:07   
Moved to 5.1.3.

Patch tested good, please commit.
(0003742)
alex   
2011-09-16 09:22   
Fix committed to 5.1.x branch. Commit Message:

Fixes 0001089: Long text is clipped in the middle of the word
(0003781)
alex   
2011-09-19 16:08   
Closing, since 5.1.3 release has been released.