当前位置: 首页>>代码示例>>PHP>>正文


PHP Utils_Unicode::lessen方法代码示例

本文整理汇总了PHP中Utils_Unicode::lessen方法的典型用法代码示例。如果您正苦于以下问题:PHP Utils_Unicode::lessen方法的具体用法?PHP Utils_Unicode::lessen怎么用?PHP Utils_Unicode::lessen使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Utils_Unicode的用法示例。


在下文中一共展示了Utils_Unicode::lessen方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: FM_TTML_summary

function FM_TTML_summary($blogid, $id, $content, $keywords = array(), $useAbsolutePath = true)
{
    global $blog;
    $view = FM_TTML_format($blogid, $id, $content, $keywords, $useAbsolutePath, true);
    if (!$blog['publishWholeOnRSS']) {
        $view = Utils_Unicode::lessen(removeAllTags(stripHTML($view)), 255);
    }
    return $view;
}
开发者ID:ragi79,项目名称:Textcube,代码行数:9,代码来源:index.php

示例2: FM_Textile_summary

function FM_Textile_summary($blogid, $id, $content, $keywords = array(), $useAbsolutePath = true)
{
    $context = Model_Context::getInstance();
    $view = FM_Textile_format($blogid, $id, $content, $keywords, $useAbsolutePath, true);
    if (!$context->getProperty("blog.publishWholeOnRSS")) {
        $view = Utils_Unicode::lessen(removeAllTags(stripHTML($view)), 255);
    }
    return $view;
}
开发者ID:Avantians,项目名称:Textcube,代码行数:9,代码来源:index.php

示例3: FM_default_summary

function FM_default_summary($blogid, $id, $content, $keywords = array(), $useAbsolutePath = false)
{
    $context = Model_Context::getInstance();
    if (!$context->getProperty('blog.publishWholeOnRSS')) {
        $content = Utils_Unicode::lessen(removeAllTags(stripHTML($content)), 255);
    }
    return $content;
}
开发者ID:ni5am,项目名称:Textcube,代码行数:8,代码来源:module.php

示例4: changeBlog

 static function changeBlog()
 {
     global $database, $blogURL, $blog, $service;
     $blogid = getBlogId();
     $blogList = User::getBlogs();
     if (count($blogList) == 0) {
         return;
     }
     $changeBlogView = str_repeat(TAB, 6) . "<select id=\"blog-list\" onchange=\"location.href='{$blogURL}/owner/network/teamblog/changeBlog/?blogid='+this.value\">" . CRLF;
     foreach ($blogList as $info) {
         $title = Utils_Unicode::lessen(Setting::getBlogSettingGlobal("title", null, $info, true), 30);
         $title = $title ? $title : _f('%1 님의 블로그', User::getBlogOwnerName($info));
         $changeBlogView .= str_repeat(TAB, 7) . '<option value="' . $info . '"';
         if ($info == $blogid) {
             $changeBlogView .= ' selected="selected"';
         }
         $changeBlogView .= '>' . $title . '</option>' . CRLF;
     }
     $changeBlogView .= str_repeat(TAB, 6) . '</select>' . CRLF;
     return $changeBlogView;
 }
开发者ID:ragi79,项目名称:Textcube,代码行数:21,代码来源:Textcube.Core.php

示例5: FM_default_summary

function FM_default_summary($blogid, $id, $content, $keywords = array(), $useAbsolutePath = false)
{
    if (!$blog['publishWholeOnRSS']) {
        $content = Utils_Unicode::lessen(removeAllTags(stripHTML($content)), 255);
    }
    return $content;
}
开发者ID:ragi79,项目名称:Textcube,代码行数:7,代码来源:common.module.php

示例6: _t

        // Guestbook case
        if (empty($comment['parent'])) {
            echo '<span class="explain">' . _t('방명록') . '</span>';
        } else {
            echo '<span class="explain">' . _f('%1 님의 방명록에 대한 댓글', $comment['parentName']) . '</span>';
        }
    } else {
        echo empty($comment['parent']) ? '' : '<span class="explain">' . _f('%1 님의 댓글에 대한 댓글', $comment['parentName']) . '</span>';
    }
    echo "</a>";
    ?>
												<?php 
    echo !empty($comment['title']) || !empty($comment['parent']) ? '<br />' : '';
    ?>
												<?php 
    echo htmlspecialchars(Utils_Unicode::lessen($comment['comment'], 80));
    ?>
											</td>
											<td class="ip">
<?php 
    if ($isIpFiltered) {
        ?>
												<a id="ipFilter<?php 
        echo $currentIP;
        ?>
-<?php 
        echo $i;
        ?>
" class="block-icon bullet" href="<?php 
        echo $context->getProperty('uri.blog');
        ?>
开发者ID:ragi79,项目名称:Textcube,代码行数:31,代码来源:index.php

示例7: sendTrackback

function sendTrackback($blogid, $entryId, $url)
{
    importlib('model.blog.entry');
    importlib('model.blog.keyword');
    $context = Model_Context::getInstance();
    $entry = getEntry($blogid, $entryId);
    if (is_null($entry)) {
        return false;
    }
    $link = $context->getProperty('uri.default') . "/" . $entryId;
    $title = htmlspecialchars($entry['title']);
    $entry['content'] = getEntryContentView($blogid, $entryId, $entry['content'], $entry['contentformatter'], getKeywordNames($blogid));
    $excerpt = str_tag_on(Utils_Unicode::lessen(removeAllTags(stripHTML($entry['content'])), 255));
    $blogTitle = $context->getProperty('blog.title');
    $isNeedConvert = strpos($url, '/rserver.php?') !== false || strpos($url, 'blog.naver.com/tb') !== false || strpos($url, 'news.naver.com/tb/') !== false || strpos($url, 'blog.empas.com') !== false || strpos($url, 'blog.yahoo.com') !== false || strpos($url, 'www.blogin.com/tb/') !== false || strpos($url, 'cytb.cyworld.nate.com') !== false || strpos($url, 'www.cine21.com/Movies/tb.php') !== false;
    if ($isNeedConvert) {
        $title = Utils_Unicode::convert($title, 'EUC-KR');
        $excerpt = Utils_Unicode::convert($excerpt, 'EUC-KR');
        $blogTitle = Utils_Unicode::convert($blogTitle, 'EUC-KR');
        $content = "url=" . rawurlencode($link) . "&title=" . rawurlencode($title) . "&blog_name=" . rawurlencode($blogTitle) . "&excerpt=" . rawurlencode($excerpt);
        $request = new HTTPRequest('POST', $url);
        $request->contentType = 'application/x-www-form-urlencoded; charset=euc-kr';
        $isSuccess = $request->send($content);
    } else {
        $content = "url=" . rawurlencode($link) . "&title=" . rawurlencode($title) . "&blog_name=" . rawurlencode($blogTitle) . "&excerpt=" . rawurlencode($excerpt);
        $request = new HTTPRequest('POST', $url);
        $request->contentType = 'application/x-www-form-urlencoded; charset=utf-8';
        $isSuccess = $request->send($content);
    }
    if ($isSuccess && checkResponseXML($request->responseText) === 0) {
        $trackbacklog = new TrackbackLog();
        $trackbacklog->entry = $entryId;
        $trackbacklog->url = Utils_Unicode::lessenAsEncoding($url, 255);
        $trackbacklog->add();
        return true;
    }
    return false;
}
开发者ID:webhacking,项目名称:Textcube,代码行数:38,代码来源:remoteresponse.php

示例8: changeBlog

 static function changeBlog()
 {
     $context = Model_Context::getInstance();
     $blogList = User::getBlogs();
     if (count($blogList) == 0) {
         return;
     }
     $changeBlogView = str_repeat(TAB, 6) . "<select id=\"blog-list\" onchange=\"location.href='" . $context->getProperty("uri.blog") . "/owner/network/teamblog/changeBlog/?blogid='+this.value\">" . CRLF;
     foreach ($blogList as $info) {
         $title = Utils_Unicode::lessen(Setting::getBlogSettingGlobal("title", null, $info, true), 30);
         $title = $title ? $title : _f('%1 님의 블로그', User::getBlogOwnerName($info));
         $changeBlogView .= str_repeat(TAB, 7) . '<option value="' . $info . '"';
         if ($info == $context->getProperty('blog.id')) {
             $changeBlogView .= ' selected="selected"';
         }
         $changeBlogView .= '>' . $title . '</option>' . CRLF;
     }
     $changeBlogView .= str_repeat(TAB, 6) . '</select>' . CRLF;
     return $changeBlogView;
 }
开发者ID:Avantians,项目名称:Textcube,代码行数:20,代码来源:Textcube.Core.php

示例9: getCommentFeedTotal

function getCommentFeedTotal($blogid, $rawMode = false, $mode = 'rss')
{
    $context = Model_Context::getInstance();
    $channel = initializeRSSchannel($blogid);
    $channel['title'] = $context->getProperty('blog.title') . ': ' . _text('최근 댓글 목록');
    $result = getRecentComments($blogid, Setting::getBlogSettingGlobal('commentsOnRSS', 20), false, true);
    if (!$result) {
        $result = array();
    }
    $channel['items'] = array();
    foreach ($result as $row) {
        $commentURL = $context->getProperty('uri.default') . "/" . $row['entry'] . "#comment";
        $content = htmlspecialchars($row['comment']);
        $item = array('id' => $row['id'], 'title' => RSSMessage(Utils_Unicode::lessen($row['title'], 30) . ' : ' . _textf('%1님의 댓글', $row['name'])), 'link' => $commentURL . $row['id'], 'categories' => array(), 'description' => RSSMessage($content), 'author' => RSSMessage($row['name']), 'pubDate' => $row['written'], 'comments' => $commentURL, 'guid' => $commentURL . $row['id']);
        if ($row['secret']) {
            $item['title'] = $item['author'] = $item['description'] = _text('비밀 댓글입니다');
        }
        array_push($channel['items'], $item);
    }
    if ($rawMode == true) {
        return $channel['items'];
    }
    $rss = array('channel' => $channel);
    if ($mode == 'rss') {
        return publishRSS($blogid, $rss);
    } else {
        if ($mode == 'atom') {
            return publishATOM($blogid, $rss);
        }
    }
    return false;
}
开发者ID:Avantians,项目名称:Textcube,代码行数:32,代码来源:feed.php

示例10: htmlspecialchars

" class="<?php 
    echo $className;
    ?>
 inactive-class" onmouseover="rolloverClass(this, 'over')" onmouseout="rolloverClass(this, 'out')">
		<td class="xfn-homepage">
			<a href="<?php 
    echo $context->getProperty('uri.blog');
    ?>
/owner/network/link/edit/<?php 
    echo $link['id'];
    ?>
" title="<?php 
    echo htmlspecialchars($link['url']);
    ?>
"><?php 
    echo htmlspecialchars(Utils_Unicode::lessen($link['name'], 12));
    ?>
</a>
			<input type="hidden" name="xfn<?php 
    echo $link['id'];
    ?>
" id="xfn_id_<?php 
    echo $link['id'];
    ?>
" value="<?php 
    echo $xfn;
    ?>
"/>
		</td>

		<td class="xfn-edit">
开发者ID:Avantians,项目名称:Textcube,代码行数:31,代码来源:index.php

示例11: lessenAsEncoding

 static function lessenAsEncoding($str, $length = 255, $tail = '...')
 {
     $context = Model_Context::getInstance();
     if ($context->getProperty('database.utf8') != true) {
         return Utils_Unicode::lessen($str, $length, $tail);
     } else {
         return Utils_Unicode::lessenAsByte($str, $length, $tail);
     }
 }
开发者ID:ragi79,项目名称:Textcube,代码行数:9,代码来源:Unicode.php

示例12: utf8Lessen

function utf8Lessen($str, $length, $tail = '..')
{
    return Utils_Unicode::lessen($str, $length, $tail);
}
开发者ID:ragi79,项目名称:Textcube,代码行数:4,代码来源:Textcube.Core.BackwardCompatibility.php


注:本文中的Utils_Unicode::lessen方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。