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


PHP Utils_Unicode::lessenAsEm方法代码示例

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


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

示例1: CT_Start_Default

function CT_Start_Default($target)
{
    requireModel("blog.attachment");
    requireComponent("Eolin.PHP.Core");
    requireComponent("Textcube.Function.misc");
    global $blogid, $blogURL, $database, $service;
    $target .= '<ul>';
    $target .= '<li><a href="' . $blogURL . '/owner/entry/post">' . _t('새 글을 씁니다') . '</a></li>' . CRLF;
    $latestEntryId = Setting::getBlogSettingGlobal('LatestEditedEntry_user' . getUserId(), 0);
    if ($latestEntryId !== 0) {
        $latestEntry = CT_Start_Default_getEntry($blogid, $latestEntryId);
        if ($latestEntry != false) {
            $target .= '<li><a href="' . $blogURL . '/owner/entry/edit/' . $latestEntry['id'] . '">' . _f('최근글(%1) 수정', htmlspecialchars(Utils_Unicode::lessenAsEm($latestEntry['title'], 10))) . '</a></li>';
        }
    }
    if (Acl::check('group.administrators')) {
        $target .= '<li><a href="' . $blogURL . '/owner/skin">' . _t('스킨을 변경합니다') . '</a></li>' . CRLF;
        $target .= '<li><a href="' . $blogURL . '/owner/skin/sidebar">' . _t('사이드바 구성을 변경합니다') . '</a></li>' . CRLF;
        $target .= '<li><a href="' . $blogURL . '/owner/skin/setting">' . _t('블로그에 표시되는 값들을 변경합니다') . '</a></li>' . CRLF;
        $target .= '<li><a href="' . $blogURL . '/owner/entry/category">' . _t('카테고리를 변경합니다') . '</a></li>' . CRLF;
        $target .= '<li><a href="' . $blogURL . '/owner/plugin">' . _t('플러그인을 켜거나 끕니다') . '</a></li>' . CRLF;
    }
    if ($service['reader'] != false) {
        $target .= '<li><a href="' . $blogURL . '/owner/network/reader">' . _t('RSS 리더를 봅니다') . '</a></li>' . CRLF;
    }
    $target .= '</ul>';
    return $target;
}
开发者ID:ragi79,项目名称:Textcube,代码行数:28,代码来源:index.php

示例2: CT_Start_Default

function CT_Start_Default($target)
{
    importlib("model.blog.attachment");
    $context = Model_Context::getInstance();
    $blogURL = $context->getProperty('uri.blog');
    $blogid = $context->getProperty('blog.id');
    $target .= '<ul>';
    $target .= '<li><a href="' . $blogURL . '/owner/entry/post">' . _t('새 글을 씁니다') . '</a></li>' . CRLF;
    $latestEntryId = Setting::getBlogSettingGlobal('LatestEditedEntry_user' . getUserId(), 0);
    if ($latestEntryId !== 0) {
        $latestEntry = CT_Start_Default_getEntry($blogid, $latestEntryId);
        if ($latestEntry != false) {
            $target .= '<li><a href="' . $blogURL . '/owner/entry/edit/' . $latestEntry['id'] . '">' . _f('최근글(%1) 수정', htmlspecialchars(Utils_Unicode::lessenAsEm($latestEntry['title'], 10))) . '</a></li>';
        }
    }
    if (Acl::check('group.administrators')) {
        $target .= '<li><a href="' . $blogURL . '/owner/skin">' . _t('스킨을 변경합니다') . '</a></li>' . CRLF;
        $target .= '<li><a href="' . $blogURL . '/owner/skin/sidebar">' . _t('사이드바 구성을 변경합니다') . '</a></li>' . CRLF;
        $target .= '<li><a href="' . $blogURL . '/owner/skin/setting">' . _t('블로그에 표시되는 값들을 변경합니다') . '</a></li>' . CRLF;
        $target .= '<li><a href="' . $blogURL . '/owner/entry/category">' . _t('카테고리를 변경합니다') . '</a></li>' . CRLF;
        $target .= '<li><a href="' . $blogURL . '/owner/plugin">' . _t('플러그인을 켜거나 끕니다') . '</a></li>' . CRLF;
    }
    if ($context->getProperty('service.reader', false) != false) {
        $target .= '<li><a href="' . $blogURL . '/owner/network/reader">' . _t('RSS 리더를 봅니다') . '</a></li>' . CRLF;
    }
    $target .= '</ul>';
    return $target;
}
开发者ID:Avantians,项目名称:Textcube,代码行数:28,代码来源:index.php

示例3: _getRecentEntriesView

function _getRecentEntriesView($entries, $template)
{
    $context = Model_Context::getInstance();
    ob_start();
    foreach ($entries as $entry) {
        $view = $template;
        Utils_Misc::dress('rctps_rep_link', $context->getProperty('uri.blog') . "/" . $entry['id'], $view);
        Utils_Misc::dress('rctps_rep_edit_link', $context->getProperty('uri.blog') . "/owner/entry/edit/" . $entry['id'], $view);
        Utils_Misc::dress('rctps_rep_title', htmlspecialchars(Utils_Unicode::lessenAsEm($entry['title'], 30)), $view);
        Utils_Misc::dress('rctps_rep_rp_cnt', "<span id=\"commentCountOnRecentEntries{$entry['id']}\">" . ($entry['comments'] > 0 ? "({$entry['comments']})" : '') . '</span>', $view);
        print $view;
    }
    $view = ob_get_contents();
    ob_end_clean();
    return $view;
}
开发者ID:Avantians,项目名称:Textcube,代码行数:16,代码来源:index.php

示例4: RecentRP_getRecentCommentsView

function RecentRP_getRecentCommentsView($comments, $template)
{
    global $contentContainer;
    $context = Model_Context::getInstance();
    ob_start();
    foreach ($comments as $comment) {
        $view = "{$template}";
        Utils_Misc::dress('rctrp_rep_link', $context->getProperty('uri.blog') . "/{$comment['entry']}#comment{$comment['id']}", $view);
        $contentContainer["recent_comment_{$comment['id']}"] = htmlspecialchars(Utils_Unicode::lessenAsEm(strip_tags($comment['comment']), 30));
        Utils_Misc::dress('rctrp_rep_desc', setTempTag("recent_comment_{$comment['id']}"), $view);
        Utils_Misc::dress('rctrp_rep_desc', htmlspecialchars(Utils_Unicode::lessenAsEm(strip_tags($comment['comment']), 30)), $view);
        Utils_Misc::dress('rctrp_rep_time', fireEvent('ViewRecentCommentDate', Timestamp::format3($comment['written'])), $view);
        Utils_Misc::dress('rctrp_rep_name', htmlspecialchars(Utils_Unicode::lessenAsEm(strip_tags($comment['name']), 10)) . $comment['secret'] . $comment['replier'], $view);
        print $view;
    }
    $view = ob_get_contents();
    ob_end_clean();
    return $view;
}
开发者ID:Avantians,项目名称:Textcube,代码行数:19,代码来源:index.php

示例5: printFilterBox

function printFilterBox($mode, $title)
{
    global $service;
    $filter = new Filter();
    $filtersList = array();
    if ($filter->open($mode, 'pattern')) {
        do {
            $filtersList[] = array(0 => $filter->id, 1 => $filter->pattern);
        } while ($filter->shift());
        $filter->close();
    }
    ?>
									<h3><?php 
    echo $title;
    ?>
</h3>
									
									<div class="filtering-words">
										<table cellpadding="0" cellspacing="0">
											<tbody id="filterbox-<?php 
    echo $mode;
    ?>
"<?php 
    echo empty($filtersList) ? ' class="empty"' : '';
    ?>
>
<?php 
    if ($filtersList) {
        $id = 0;
        $count = 0;
        foreach ($filtersList as $key => $value) {
            $entity = $value[1];
            $className = $count % 2 == 1 ? 'even-line' : 'odd-line';
            $className .= $id == sizeof($filtersList) - 1 ? ' last-line' : '';
            ?>
												<tr class="<?php 
            echo $className;
            ?>
 inactive-class" onmouseover="rolloverClass(this, 'over')" onmouseout="rolloverClass(this, 'out')">
			<td class="content"><span title="<?php 
            echo htmlspecialchars($entity);
            ?>
"><?php 
            echo htmlspecialchars(Utils_Unicode::lessenAsEm($entity, 26));
            ?>
</span></td>
													<td class="delete"><a class="delete-button button" href="#void" onclick="deleteFilter(parentNode.parentNode,'<?php 
            echo $mode;
            ?>
', '<?php 
            echo urlencode($entity);
            ?>
',<?php 
            echo $value[0];
            ?>
); return false;" title="<?php 
            echo _t('이 필터링을 제거합니다.');
            ?>
"><span class="text"><?php 
            echo _t('삭제');
            ?>
</span></a></td>
												</tr>
<?php 
            $id++;
            $count++;
        }
    } else {
        ?>
												<tr <?php 
        echo empty($filtersList) ? 'id="explainbox-' . $mode . '" ' : '';
        ?>
class="odd-line inactive-class" onmouseover="rolloverClass(this, 'over')" onmouseout="rolloverClass(this, 'out')">
													<td class="empty"><?php 
        echo _t('등록된 내용이 없습니다.');
        ?>
</td>
												</tr>
<?php 
    }
    ?>
											</tbody>
										</table>
									</div>
									
									<div class="input-field">
<input type="text" class="input-text" name="<?php 
    echo $mode;
    ?>
Value" onkeyup="if(event.keyCode=='13') {add('filterbox-<?php 
    echo $mode;
    ?>
','<?php 
    echo $mode;
    ?>
'); return false;}" />
									</div>
									
									<div class="button-box">
										<input type="submit" class="add-button input-button" value="<?php 
//.........这里部分代码省略.........
开发者ID:webhacking,项目名称:Textcube,代码行数:101,代码来源:index.php

示例6: PN_Referer_Default


//.........这里部分代码省略.........
							<h2 class="caption"><span class="main-text"><?php 
    echo _t("리퍼러 로그");
    ?>
</span></h2>
							
							<table class="data-inbox" cellspacing="0" cellpadding="0">
								<thead>
									<tr>
										<th class="number"><span class="text">날짜</span></th>
										<th class="site"><span class="text">주소</span></th>
									</tr>
								</thead>
								<tbody>
<?php 
    $more = false;
    list($referers, $paging) = Statistics::getRefererLogsWithPage($_GET['page'], $perPage);
    for ($i = 0; $i < count($referers); $i++) {
        $record = $referers[$i];
        $className = $i % 2 == 1 ? 'even-line' : 'odd-line';
        $className .= $i == sizeof($referers) - 1 ? ' last-line' : '';
        ?>
									<tr class="<?php 
        echo $className;
        ?>
 inactive-class" onmouseover="rolloverClass(this, 'over')" onmouseout="rolloverClass(this, 'out')">
										<td class="date"><?php 
        echo Timestamp::formatDate($record['referred']);
        ?>
</td>
										<td class="address"><a href="<?php 
        echo Utils_Misc::escapeJSInAttribute($record['url']);
        ?>
" onclick="window.open(this.href); return false;" title="<?php 
        echo htmlspecialchars($record['url']);
        ?>
"><?php 
        echo fireEvent('ViewRefererURL', htmlspecialchars(Utils_Unicode::lessenAsEm($record['url'], 70)), $record);
        ?>
</a></td>
									</tr>
<?php 
    }
    ?>
								</tbody>
							</table>
							
							<div class="data-subbox">
								<div id="page-section" class="section">
									<div id="page-navigation">
										<span id="page-list">
<?php 
    $paging['prefix'] = $pluginSelfParam . '&page=';
    $pagingTemplate = '[##_paging_rep_##]';
    $pagingItemTemplate = '<a [##_paging_rep_link_##]>[[##_paging_rep_link_num_##]]</a>';
    echo str_repeat("\t", 8) . Paging::getPagingView($paging, $pagingTemplate, $pagingItemTemplate) . CRLF;
    ?>
										</span>
									</div>
									<div class="page-count">
										<?php 
    echo Utils_Misc::getArrayValue(explode('%1', '한 페이지에 목록 %1건 표시'), 0);
    ?>
										<select name="perPage" onchange="document.getElementById('part-statistics-log').submit()">					
<?php 
    for ($i = 10; $i <= 30; $i += 5) {
        if ($i == $perPage) {
            ?>
											<option value="<?php 
            echo $i;
            ?>
" selected="selected"><?php 
            echo $i;
            ?>
</option>
<?php 
        } else {
            ?>
											<option value="<?php 
            echo $i;
            ?>
"><?php 
            echo $i;
            ?>
</option>
<?php 
        }
    }
    ?>
										</select>
										<?php 
    echo Utils_Misc::getArrayValue(explode('%1', '한 페이지에 목록 %1건 표시'), 1);
    ?>
									</div>
								</div>
							</div>
						</form>
						
						<div class="clear"></div>
<?php 
}
开发者ID:Avantians,项目名称:Textcube,代码行数:101,代码来源:index.php

示例7: getDefaultCenterPanel


//.........这里部分代码省略.........
            }
        }
        if (!empty($sort_array)) {
            array_multisort($sort_array['date'], SORT_DESC, $recents);
        }
        $recents = array_slice($recents, 0, 14);
        ?>
										<div id="shortcut-collection">
											<h4 class="caption"><span><?php 
        echo _t('바로가기');
        ?>
</span></h4>

											<ul>
												<li class="newPost"><a class="newPost" href="<?php 
        echo $ctx->getProperty('uri.blog');
        ?>
/owner/entry/post"><span><?php 
        echo _t('새 글 쓰기');
        ?>
</span></a></li>
<?php 
        if ($latestEntryId !== 0) {
            $latestEntry = getEntry($blogid, $latestEntryId);
            if (!is_null($latestEntry)) {
                ?>
												<li class="modifyPost"><a href="<?php 
                echo $ctx->getProperty('uri.blog');
                ?>
/owner/entry/edit/<?php 
                echo $latestEntry['id'];
                ?>
"><?php 
                echo _f('최근글(%1) 수정', htmlspecialchars(Utils_Unicode::lessenAsEm($latestEntry['title'], 10)));
                ?>
</a></li>
<?php 
            }
        }
        if ($ctx->getProperty('service.reader') == true) {
            ?>
												<li class="rssReader"><a href="<?php 
            echo $ctx->getProperty('uri.blog');
            ?>
/owner/network/reader"><?php 
            echo _t('RSS로 등록한 이웃 글 보기');
            ?>
</a></li>
<?php 
        }
        if (Acl::check("group.administrators")) {
            ?>
												<li class="deleteCache"><a href="<?php 
            echo $ctx->getProperty('uri.blog');
            ?>
/owner/center/dashboard/cleanup" onclick="cleanupCache();return false;"><?php 
            echo _t('캐시 지우기');
            ?>
</a></li>
<?php 
            if (Acl::check("group.creators")) {
                ?>
												<li class="optimizeStorage"><a href="<?php 
                echo $ctx->getProperty('uri.blog');
                ?>
/owner/data" onclick="optimizeData();return false;"><?php 
开发者ID:webhacking,项目名称:Textcube,代码行数:67,代码来源:index.php

示例8: define

/// Copyright (c) 2004-2012, Needlworks  / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
define('__TEXTCUBE_IPHONE__', true);
require ROOT . '/library/preprocessor.php';
requireView('iphoneView');
if (empty($suri['id'])) {
    printMobileHTMLHeader();
    ?>
	
	<div data-role="page">
<?php 
    printMobileHTMLMenu('', 'list');
    ?>
	<ul data-role="listview" id="home" title="<?php 
    echo htmlspecialchars(Utils_Unicode::lessenAsEm($context->getProperty('blog.title'), 30));
    ?>
" selected="true">
	<?php 
    $blogAuthor = User::getBlogOwnerName($blogid);
    $blogLogo = !is_null($context->getProperty('blog.logo')) && $context->getProperty('blog.logo') != "" ? printMobileImageResizer($blogid, $context->getProperty('blog.logo'), 80) : $context->getProperty('service.path') . "/resources/style/iphone/images/textcube_logo.png";
    $itemsView = '<li class="blog_info">' . CRLF;
    $itemsView .= '	<div class="logo"><img src="' . $blogLogo . '" /></div>' . CRLF;
    $itemsView .= '	<div class="blog_container">' . CRLF;
    $itemsView .= '		<span class="title">' . htmlspecialchars($context->getProperty('blog.title')) . '</span>' . CRLF;
    $itemsView .= '		<span class="author">by ' . $blogAuthor . '</span>' . CRLF;
    $itemsView .= '		<span class="description">' . htmlspecialchars($context->getProperty('blog.description')) . '</span>' . CRLF;
    $itemsView .= '	</div>' . CRLF;
    $itemsView .= '</li>' . CRLF;
    print $itemsView;
    // Recent posts
开发者ID:ragi79,项目名称:Textcube,代码行数:31,代码来源:index.php

示例9: MT_Cover_getRecentEntries


//.........这里部分代码省略.........
        @chmod(__TEXTCUBE_CACHE_DIR__ . "/thumbnail/" . $context->getProperty('blog.id') . "/coverPostThumbnail/", 0777);
    }
    $page = $data['paging'] == '1' && !empty($_GET['page']) ? intval($_GET['page']) : 1;
    $cache = new PageCache();
    $cache->name = 'MT_Cover_RecentPS';
    if ($cache->load()) {
        //If successful loads
        $cache->contents = unserialize($cache->contents);
        // If coverpage is single mode OR coverpage is coverblog and cache is not expired, return cache contents.
        if (($data['coverMode'] == 1 || $data['coverMode'] == 2) && array_key_exists($page, $cache->contents) && Timestamp::getUNIXtime() - $cache->dbContents < 300) {
            return $cache->contents[$page];
        }
    }
    $pool = DBModel::getInstance();
    $pool->reset("BlogSettings");
    $pool->setQualifier("name", "eq", 'visibility', true);
    $pool->setQualifier("value", "<", 2);
    $privateBlogId = $pool->getCell("blogid");
    $pool->reset("Entries");
    $pool->join("Categories", "left", array(array("e.blogid", "eq", "c.blogid"), array("e.category", "eq", "c.id")));
    $pool->setQualifier("e.draft", "eq", 0);
    $pool->setQualifier("e.category", "beq", 0);
    if ($privateBlogId) {
        $pool->setQualifier("e.blogid", "hasnoneof", $privateBlogId);
    }
    if (Utils_Misc::isMetaBlog() == true && doesHaveOwnership() && $context->getProperty('service.type', 'single') != 'single') {
        $pool->setQualifier("e.visibility", ">", 1);
        $pool->setQualifierSet(array("c.visibility", ">", 1), "OR", array("e.category", "eq", 0));
    } else {
        if (!doesHaveOwnership()) {
            $pool->setQualifier("e.visibility", ">", 1);
            $pool->setQualifierSet(array("c.visibility", ">", 1), "OR", array("e.category", "eq", 0));
        }
    }
    if ($data['coverMode'] != 2) {
        $pool->setQualifier("e.blogid", "eq", $context->getProperty("blog.id"));
    }
    list($entries, $paging) = Paging::fetch($pool, $page, $entryLength);
    $html = '';
    foreach ((array) $entries as $entry) {
        $tagLabelView = "";
        $blogid = $data['coverMode'] == 2 ? $entry['blogid'] : $context->getProperty('blog.id');
        $entryTags = getTags($blogid, $entry['id']);
        $defaultURL = getDefaultURL($blogid);
        if (sizeof($entryTags) > 0) {
            $tags = array();
            foreach ($entryTags as $entryTag) {
                $tags[$entryTag['name']] = "<a href=\"{$defaultURL}/tag/" . (Setting::getBlogSettingGlobal('useSloganOnTag', true) ? URL::encode($entryTag['name'], $service['useEncodedURL']) : $entryTag['id']) . '">' . htmlspecialchars($entryTag['name']) . '</a>';
            }
            $tagLabelView = "<div class=\"post_tags\"><span>TAG : </span>" . implode(",\r\n", array_values($tags)) . "</div>";
        }
        if (empty($entry['category'])) {
            $entry['label'] = _text('분류없음');
            $entry['link'] = "{$defaultURL}/category";
        } else {
            $entry['link'] = "{$defaultURL}/category/" . (Setting::getBlogSettingGlobal('useSloganOnCategory', true) ? URL::encode($entry['label'], $service['useEncodedURL']) : $entry['category']);
        }
        $permalink = "{$defaultURL}/" . (Setting::getBlogSettingGlobal('useSloganOnPost', true) ? "entry/" . URL::encode($entry['slogan'], $context->getProperty('service.useEncodedURL', false)) : $entry['id']);
        $html .= '<div class="coverpost">' . CRLF;
        if ($imageName = MT_Cover_getAttachmentExtract($entry['content'])) {
            if (($tempImageSrc = MT_Cover_getImageResizer($blogid, $imageName, $data['screenshotSize'])) && $data['screenshot'] == 1) {
                $html .= '<div class="img_preview"><a href="' . $permalink . '"><img src="' . $tempImageSrc . '" alt="" /></a></div>' . CRLF;
            }
        }
        $html .= '	<div class="content_box">';
        $html .= '		<h2><a href="' . $permalink . '">' . htmlspecialchars($entry['title']) . '</a></h2>' . CRLF;
        $html .= '		<div class="post_info">' . CRLF;
        $html .= '			<span class="category"><a href="' . htmlspecialchars($entry['link']) . '">' . htmlspecialchars($entry['label']) . '</a></span>' . CRLF;
        $html .= '			<span class="date">' . Timestamp::format5($entry['published']) . '</span>' . CRLF;
        $html .= '			<span class="author"><span class="preposition">by </span>' . User::getName($entry['userid']) . '</span>' . CRLF;
        $html .= '		</div>' . CRLF;
        $html .= '		<div class="post_content">' . htmlspecialchars(Utils_Unicode::lessenAsEm(removeAllTags(stripHTML($entry['content'])), $data['contentLength'])) . '</div>' . CRLF;
        $html .= $tagLabelView;
        $html .= '		<div class="clear"></div>' . CRLF;
        $html .= '	</div>';
        $html .= '</div>' . CRLF;
    }
    if ($data['paging'] == '1') {
        $paging['page'] = $page;
        $paging['total'] = POD::queryCell("SELECT COUNT(*) FROM {$database['prefix']}Entries e WHERE {$multiple} e.draft = 0 {$visibility} AND e.category >= 0");
        $html .= Paging::getPagingView($paging, $skin->paging, $skin->pagingItem) . CRLF;
        $html .= '<script type="text/javascript">' . CRLF;
        $html .= '//<![CDATA[' . CRLF;
        if ($paging['page'] > 1) {
            $html .= 'var prevURL = "' . $paging['url'] . '?page=' . ($paging['page'] - 1) . '"' . CRLF;
        }
        if ($paging['page'] < $paging['total']) {
            $html .= 'var nextURL = "' . $paging['url'] . '?page=' . ($paging['page'] + 1) . '"' . CRLF;
        }
        $html .= '//]]>' . CRLF;
        $html .= '</script>';
    }
    $target = $html;
    $cache->contents[$page] = $target;
    $cache->contents = serialize($cache->contents);
    $cache->dbContents = Timestamp::getUNIXtime();
    $cache->update();
    unset($cache);
    return $target;
}
开发者ID:Avantians,项目名称:Textcube,代码行数:101,代码来源:index.php

示例10: MT_Cover_getRecentEntries

function MT_Cover_getRecentEntries($parameters)
{
    global $database, $blog, $service, $serviceURL, $suri, $configVal, $defaultURL, $skin;
    requireModel("blog.entry");
    requireModel("blog.tag");
    $data = Setting::fetchConfigVal($configVal);
    $data['coverMode'] = !isset($data['coverMode']) ? 1 : $data['coverMode'];
    if (Misc::isMetaBlog() != true) {
        $data['coverMode'] = 1;
    }
    $data['screenshot'] = !isset($data['screenshot']) ? 1 : $data['screenshot'];
    $data['screenshotSize'] = !isset($data['screenshotSize']) ? 90 : $data['screenshotSize'];
    $data['paging'] = !isset($data['paging']) ? '2' : $data['paging'];
    $data['contentLength'] = !isset($data['contentLength']) ? 250 : $data['contentLength'];
    if (isset($parameters['preview'])) {
        // preview mode
        $retval = '표지에 최신 글 목록을 추가합니다.';
        return htmlspecialchars($retval);
    }
    $entryLength = isset($parameters['entryLength']) ? $parameters['entryLength'] : 10;
    if (!is_dir(__TEXTCUBE_CACHE_DIR__ . "/thumbnail")) {
        @mkdir(__TEXTCUBE_CACHE_DIR__ . "/thumbnail");
        @chmod(__TEXTCUBE_CACHE_DIR__ . "/thumbnail", 0777);
    }
    if (!is_dir(__TEXTCUBE_CACHE_DIR__ . "/thumbnail/" . getBlogId())) {
        @mkdir(__TEXTCUBE_CACHE_DIR__ . "/thumbnail/" . getBlogId());
        @chmod(__TEXTCUBE_CACHE_DIR__ . "/thumbnail/" . getBlogId(), 0777);
    }
    if (!is_dir(__TEXTCUBE_CACHE_DIR__ . "/thumbnail/" . getBlogId() . "/coverPostThumbnail/")) {
        @mkdir(__TEXTCUBE_CACHE_DIR__ . "/thumbnail/" . getBlogId() . "/coverPostThumbnail/");
        @chmod(__TEXTCUBE_CACHE_DIR__ . "/thumbnail/" . getBlogId() . "/coverPostThumbnail/", 0777);
    }
    $page = $data['paging'] == '1' && !empty($_GET['page']) ? intval($_GET['page']) : 1;
    $cache = new PageCache();
    $cache->name = 'MT_Cover_RecentPS';
    if ($cache->load()) {
        //If successful loads
        $cache->contents = unserialize($cache->contents);
        // If coverpage is single mode OR coverpage is coverblog and cache is not expired, return cache contents.
        if (($data['coverMode'] == 1 || $data['coverMode'] == 2) && array_key_exists($page, $cache->contents) && Timestamp::getUNIXtime() - $cache->dbContents < 300) {
            return $cache->contents[$page];
        }
    }
    if (Misc::isMetaBlog() == true && doesHaveOwnership() && $service['type'] != 'single') {
        $visibility = 'AND e.visibility > 1 AND (c.visibility > 1 OR e.category = 0)';
    } else {
        $visibility = doesHaveOwnership() ? '' : 'AND e.visibility > 1 AND (c.visibility > 1 OR e.category = 0)';
    }
    $multiple = $data['coverMode'] == 2 ? '' : 'e.blogid = ' . getBlogId() . ' AND';
    $privateBlogId = POD::queryColumn("SELECT blogid \n\t\tFROM {$database['prefix']}BlogSettings\n\t\tWHERE name = 'visibility'\n\t\tAND value < 2");
    if (!empty($privateBlogId)) {
        $privateBlogs = ' AND e.blogid NOT IN (' . implode(',', $privateBlogId) . ')';
    } else {
        $privateBlogs = '';
    }
    list($entries, $paging) = Paging::fetch("SELECT e.blogid, e.id, e.userid, e.title, e.content, e.slogan, e.category, e.published, e.contentformatter, c.label\n\t\tFROM {$database['prefix']}Entries e\n\t\tLEFT JOIN {$database['prefix']}Categories c ON e.blogid = c.blogid AND e.category = c.id\n\t\tWHERE {$multiple} e.draft = 0 {$visibility} AND e.category >= 0 {$privateBlogs}\n\t\tORDER BY published DESC", $page, $entryLength);
    $html = '';
    foreach ((array) $entries as $entry) {
        $tagLabelView = "";
        $blogid = $data['coverMode'] == 2 ? $entry['blogid'] : getBlogId();
        $entryTags = getTags($blogid, $entry['id']);
        $defaultURL = getDefaultURL($blogid);
        if (sizeof($entryTags) > 0) {
            $tags = array();
            foreach ($entryTags as $entryTag) {
                $tags[$entryTag['name']] = "<a href=\"{$defaultURL}/tag/" . (Setting::getBlogSettingGlobal('useSloganOnTag', true) ? URL::encode($entryTag['name'], $service['useEncodedURL']) : $entryTag['id']) . '">' . htmlspecialchars($entryTag['name']) . '</a>';
            }
            $tagLabelView = "<div class=\"post_tags\"><span>TAG : </span>" . implode(",\r\n", array_values($tags)) . "</div>";
        }
        if (empty($entry['category'])) {
            $entry['label'] = _text('분류없음');
            $entry['link'] = "{$defaultURL}/category";
        } else {
            $entry['link'] = "{$defaultURL}/category/" . (Setting::getBlogSettingGlobal('useSloganOnCategory', true) ? URL::encode($entry['label'], $service['useEncodedURL']) : $entry['category']);
        }
        $permalink = "{$defaultURL}/" . (Setting::getBlogSettingGlobal('useSloganOnPost', true) ? "entry/" . URL::encode($entry['slogan'], $service['useEncodedURL']) : $entry['id']);
        $html .= '<div class="coverpost">' . CRLF;
        if ($imageName = MT_Cover_getAttachmentExtract($entry['content'])) {
            if (($tempImageSrc = MT_Cover_getImageResizer($blogid, $imageName, $data['screenshotSize'])) && $data['screenshot'] == 1) {
                $html .= '<div class="img_preview"><a href="' . $permalink . '"><img src="' . $tempImageSrc . '" alt="" /></a></div>' . CRLF;
            }
        }
        $html .= '	<div class="content_box">';
        $html .= '		<h2><a href="' . $permalink . '">' . htmlspecialchars($entry['title']) . '</a></h2>' . CRLF;
        $html .= '		<div class="post_info">' . CRLF;
        $html .= '			<span class="category"><a href="' . htmlspecialchars($entry['link']) . '">' . htmlspecialchars($entry['label']) . '</a></span>' . CRLF;
        $html .= '			<span class="date">' . Timestamp::format5($entry['published']) . '</span>' . CRLF;
        $html .= '			<span class="author"><span class="preposition">by </span>' . User::getName($entry['userid']) . '</span>' . CRLF;
        $html .= '		</div>' . CRLF;
        $html .= '		<div class="post_content">' . htmlspecialchars(Utils_Unicode::lessenAsEm(removeAllTags(stripHTML($entry['content'])), $data['contentLength'])) . '</div>' . CRLF;
        $html .= $tagLabelView;
        $html .= '		<div class="clear"></div>' . CRLF;
        $html .= '	</div>';
        $html .= '</div>' . CRLF;
    }
    if ($data['paging'] == '1') {
        $paging['page'] = $page;
        $paging['total'] = POD::queryCell("SELECT COUNT(*) FROM {$database['prefix']}Entries e WHERE {$multiple} e.draft = 0 {$visibility} AND e.category >= 0");
        $html .= getPagingView($paging, $skin->paging, $skin->pagingItem) . CRLF;
        $html .= '<script type="text/javascript">' . CRLF;
//.........这里部分代码省略.........
开发者ID:ragi79,项目名称:Textcube,代码行数:101,代码来源:index.php

示例11: foreach

<?php

/// Copyright (c) 2004-2012, Needlworks  / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
$commentListView = $skin->commentList;
$itemsView = '';
foreach ($commentList['items'] as $item) {
    $itemView = $skin->commentListItem;
    dress('rplist_rep_regdate', fireEvent('ViewCommentListDate', Timestamp::format3($item['written']), $item['written']), $itemView);
    dress('rplist_rep_link', $context->getProperty('uri.blog') . "/" . ($context->getProperty('blog.useSloganOnPost') ? "entry/" . URL::encode($item['slogan'], $service['useEncodedURL']) : $item['entry']) . "#comment{$item['id']}", $itemView);
    dress('rplist_rep_name', htmlspecialchars($item['name']), $itemView);
    dress('rplist_rep_body', htmlspecialchars(fireEvent('ViewCommentListTitle', Utils_Unicode::lessenAsEm($item['comment'], 70))), $itemView);
    $itemsView .= $itemView;
}
dress('rplist_rep', $itemsView, $commentListView);
dress('rplist_conform', htmlspecialchars(fireEvent('ViewCommentListHeadTitle', $commentList['title'])), $commentListView);
dress('rplist_count', count($commentList['items']), $commentListView);
dress('rplist', $commentListView, $view);
开发者ID:ragi79,项目名称:Textcube,代码行数:19,代码来源:commentList.php

示例12: _t

        } else {
            ?>
												<input type="checkbox" class="input-checkbox" name="plugin" value="<?php 
            echo $pluginDir;
            ?>
" title="<?php 
            echo _t('이 플러그인은 사용 중지 상태입니다. 클릭하시면 사용을 시작합니다.');
            ?>
" />
<?php 
        }
    }
    if ($link) {
        echo sprintf('<a href="%s" title="%s - %s">%s</a>', htmlspecialchars($link), htmlspecialchars($title), _t('판번호') . ' ' . $version, $listType == 'listview' ? $title : htmlspecialchars(Utils_Unicode::lessenAsEm($title, 20)));
    } else {
        echo sprintf('<span title="%s - %s">%s</span>', htmlspecialchars($title), _t('판번호') . ' ' . $version, $listType == 'listview' ? $title : htmlspecialchars(Utils_Unicode::lessenAsEm($title, 20)));
    }
    ?>
											</div>
											<ul class="plugin-description">
												<li class="author"><span class="label"><?php 
    echo _t('제작자');
    ?>
 : </span><a href="<?php 
    echo htmlspecialchars($authorLink);
    ?>
" title="<?php 
    echo htmlspecialchars($author);
    ?>
"><?php 
    echo htmlspecialchars($author);
开发者ID:Avantians,项目名称:Textcube,代码行数:31,代码来源:index.php

示例13: _t

" width="150" height="150" alt="<?php 
        echo _t('스킨 미리보기');
        ?>
" />
<?php 
    }
    ?>
									</div>
									<div class="information">
										<div id="info_<?php 
    echo $skin['name'];
    ?>
">
<?php 
    if (isset($skin['skinName'])) {
        writeValue('<span class="skin-name">' . ($listType == 'iconview' ? Utils_Unicode::lessenAsEm($skin['skinName'], 15) : $skin['skinName']) . '</span> <span class="version">' . ($listType == 'iconview' ? Utils_Unicode::lessenAsEm($skin['version'], 5, '') : $skin['version']) . '</span>', _t('제목'), "title");
        writeValue($skin['license'], _t('저작권'), "license");
        writeValue($skin['maker'], _t('만든이'), "maker");
        writeValue($skin['homepage'], _t('홈페이지'), "homepage");
        writeValue($skin['email'], _t('e-mail'), "email");
        writeValue($skin['description'], _t('설명'), "explain");
    } else {
        writeValue($skin['name'], _t('제목'));
    }
    ?>
										</div>
										<div id="button_<?php 
    echo $skin['name'];
    ?>
" class="button-box">
											<a class="preview-button button" href="<?php 
开发者ID:webhacking,项目名称:Textcube,代码行数:31,代码来源:index.php

示例14: getLinkListView

function getLinkListView($links)
{
    $context = Model_Context::getInstance();
    if (rtrim($context->getProperty('suri.url'), '/') == $context->getProperty('uri.path')) {
        $home = true;
    } else {
        $home = false;
    }
    $categoryName = null;
    $buffer = '<ul>' . CRLF;
    $showXfn = Setting::getBlogSettingGlobal('useMicroformat', 3) > 1;
    foreach ($links as $link) {
        if (!doesHaveOwnership() && $link['visibility'] == 0 || !doesHaveMembership() && $link['visibility'] < 2) {
            continue;
        }
        if ($categoryName != $link['categoryName']) {
            if (!empty($categoryName)) {
                $buffer .= '</ul>' . CRLF . '</li>' . CRLF;
            }
            $categoryName = $link['categoryName'];
            $buffer .= '<li><span class="link_ct">' . htmlspecialchars($link['categoryName']) . '</span>' . CRLF . '<ul>' . CRLF;
        }
        if ($showXfn && $home && $link['xfn']) {
            addXfnAttrs(htmlspecialchars($link['url']), htmlspecialchars($link['xfn']), $link['url']);
        }
        $buffer .= '<li><a href="' . htmlspecialchars($link['url']) . '">' . fireEvent('ViewLink', htmlspecialchars(Utils_Unicode::lessenAsEm($link['name'], $context->getProperty('skin.linkLength')))) . '</a></li>' . CRLF;
    }
    if (!empty($categoryName)) {
        $buffer .= '</ul>' . CRLF . '</li>' . CRLF;
    }
    $buffer .= '</ul>' . CRLF;
    return $buffer;
}
开发者ID:Avantians,项目名称:Textcube,代码行数:33,代码来源:view.php

示例15: _t

											<td class="title">
												<a href="<?php 
        echo $trackback['url'];
        ?>
" onclick="window.open(this.href); return false;" title="<?php 
        echo _t('글을 건 글을 보여줍니다.');
        ?>
"><?php 
        echo htmlspecialchars($trackback['subject']);
        ?>
</a>
<?php 
        if (isset($tabsClass['received'])) {
            ?>
												<span class="excerpt"><?php 
            echo Utils_Unicode::lessenAsEm(htmlspecialchars($trackback['excerpt']), 40);
            ?>
</span>
<?php 
        }
        ?>
											</td>
<?php 
        if (isset($tabsClass['received'])) {
            ?>
											<td class="ip">
<?php 
            if ($isIpFiltered) {
                ?>
												<a id="ipFilter<?php 
                echo urlencode($trackback['ip']);
开发者ID:Avantians,项目名称:Textcube,代码行数:31,代码来源:index.php


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