예제 #1
0
            echo _t('별표를 줍니다.');
            ?>
"><span class="text"><?php 
            echo _t('별표');
            ?>
</span></a></span>
<?php 
        }
        ?>
</td>
											<td class="title">
												<?php 
        echo $entry['draft'] ? '<span class="temp-icon bullet" title="' . _t('임시 저장본이 있습니다.') . '"><span>' . _t('[임시]') . '</span></span> ' : '';
        $editmode = 'entry';
        $entryModifyLink = $entry['id'];
        $contentLength = 75 - Utils_Unicode::lengthAsEm(htmlspecialchars($entry['title']));
        ?>
												<a href="<?php 
        echo $context->getProperty('uri.blog');
        ?>
/owner/<?php 
        echo $editmode;
        ?>
/edit/<?php 
        echo $entryModifyLink;
        ?>
" onclick="document.getElementById('list-form').action='<?php 
        echo $context->getProperty('uri.blog');
        ?>
/owner/<?php 
        echo $editmode;
예제 #2
0
파일: Unicode.php 프로젝트: ragi79/Textcube
 static function lessenAsEm($str, $ems, $tail = '...')
 {
     if (function_exists('mb_strimwidth')) {
         return mb_strimwidth($str, 0, $ems - 1, $tail, 'utf-8');
     }
     if (Utils_Unicode::lengthAsEm($str) <= $ems) {
         $tail = '';
     } else {
         $ems -= strlen($tail);
     }
     $len = strlen($str);
     for ($i = $adapted = 0; $i < $len; $adapted = $i) {
         $high = ord($str[$i]);
         if ($high < 0x80) {
             $i += 1;
             $ems -= 1;
         } else {
             if ($high < 0xe0) {
                 $i += 2;
             } else {
                 if ($high < 0xf0) {
                     $i += 3;
                 } else {
                     $i += 4;
                 }
             }
             $ems -= 2;
         }
         if ($ems < 0) {
             break;
         }
     }
     return trim(substr($str, 0, $adapted)) . $tail;
 }