svnno****@sourc*****
svnno****@sourc*****
2009年 1月 5日 (月) 23:36:48 JST
Revision: 148 http://svn.sourceforge.jp/view?root=cinemaru&view=rev&rev=148 Author: asben Date: 2009-01-05 23:36:48 +0900 (Mon, 05 Jan 2009) Log Message: ----------- サムネイル表示ブロックでスマイリーアイコンが表示されないのを修正。 更にサムネイル表示ブロックでは改行は無視する様にする。 Modified Paths: -------------- trunk/cinemaru/include/misc.php trunk/cinemaru/templates/list_part.html trunk/cinemaru/templates/thumb_part.html Modified: trunk/cinemaru/include/misc.php =================================================================== --- trunk/cinemaru/include/misc.php 2009-01-05 11:14:06 UTC (rev 147) +++ trunk/cinemaru/include/misc.php 2009-01-05 14:36:48 UTC (rev 148) @@ -113,16 +113,18 @@ $constpref = strtoupper( $mydirname ) ; foreach ($movie_list as $key => $val) { - if (20 < strlen($val['title'])) { - $movie_list[$key]['title_trunc'] = cinemaru_mb_truncate($val['title'], constant($constpref.'_THUMB_TITLE_LENGTH')) . '...'; - } else { - $movie_list[$key]['title_trunc'] = $val['title']; - } - if (30 < strlen($val['desc'])) { - $movie_list[$key]['desc_trunc'] = cinemaru_mb_truncate($val['desc'], constant($constpref.'_THUMB_DESC_LENGTH')) . '...'; - } else { - $movie_list[$key]['desc_trunc'] = $val['desc']; - } + if (constant($constpref.'_THUMB_TITLE_LENGTH') < strlen($val['title'])) { + $movie_list[$key]['title_trunc'] = cinemaru_mb_truncate($val['title'], constant($constpref.'_THUMB_TITLE_LENGTH')) . '...'; + } else { + $movie_list[$key]['title_trunc'] = $val['title']; + } + + $myts =& MyTextSanitizer::getInstance(); + if (constant($constpref.'_THUMB_DESC_LENGTH') < strlen($val['desc'])) { + $movie_list[$key]['desc_trunc'] = cinemaru_mb_truncate($myts->displayTarea($val['desc'], 0, 0, 1, 1, 0 ), constant($constpref.'_THUMB_DESC_LENGTH')) . '...'; + } else { + $movie_list[$key]['desc_trunc'] = $myts->displayTarea($val['desc'], 0, 1, 1, 1, 0 ); + } } return $movie_list; Modified: trunk/cinemaru/templates/list_part.html =================================================================== --- trunk/cinemaru/templates/list_part.html 2009-01-05 11:14:06 UTC (rev 147) +++ trunk/cinemaru/templates/list_part.html 2009-01-05 14:36:48 UTC (rev 148) @@ -7,5 +7,5 @@ 0}><font color='red'><b>(<{$smarty.const._MD_CINEMARU_MOVIE_NO_VALID2}>)</b></font><{/if}><br> <{$smarty.const._MD_CINEMARU_COUNT}>:<{$movie.counter}> <{$smarty.const._MD_CINEMARU_COMMENT}><{$movie.comment}><br> -<font style="font-size: 9px;"><{$movie.desc|escape:"html"}></font> +<font style="font-size: 9px;"><{$movie.desc_trunc}></font> <br style="clear: both;"> Modified: trunk/cinemaru/templates/thumb_part.html =================================================================== --- trunk/cinemaru/templates/thumb_part.html 2009-01-05 11:14:06 UTC (rev 147) +++ trunk/cinemaru/templates/thumb_part.html 2009-01-05 14:36:48 UTC (rev 148) @@ -7,4 +7,4 @@ 0}><font color='red'><b>(<{$smarty.const._MD_CINEMARU_MOVIE_NO_VALID2}>)</b></font><{/if}><br> <{$smarty.const._MD_CINEMARU_COUNT}>:<{$movie.counter}> <{$smarty.const._MD_CINEMARU_COMMENT}><{$movie.comment}><br> -<font style="font-size: 9px;"><{$movie.desc_trunc|escape:"html"}></font><br> +<font style="font-size: 9px;"><{$movie.desc_trunc}></font><br>