本文整理汇总了PHP中UTF8::clear方法的典型用法代码示例。如果您正苦于以下问题:PHP UTF8::clear方法的具体用法?PHP UTF8::clear怎么用?PHP UTF8::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UTF8
的用法示例。
在下文中一共展示了UTF8::clear方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getTagCloud
function getTagCloud($order, $limit) {
global $service, $skin;
if (!$tagCloud = Tag::getTagCloud($order, $limit))
return '';
$s_rep_tagcloud = '';
$src_tagcloud = $skin->cutSkinTag('tagcloud');
$src_rep_tagcloud = $skin->cutSkinTag('tagcloud_rep');
foreach ($tagCloud as $tagCloudItem) {
$sp_rep_tagcloud = $skin->parseTag('tagcloud_url', htmlspecialchars($service['path'].'/search/tag/'.urlencode(trim($tagCloudItem['name']))), $src_rep_tagcloud);
$sp_rep_tagcloud = $skin->parseTag('tagcloud_name', UTF8::clear($tagCloudItem['name']), $sp_rep_tagcloud);
$sp_rep_tagcloud = $skin->parseTag('tagcloud_class', Tag::getFrequencyClass($tagCloudItem['frequency']), $sp_rep_tagcloud);
$s_rep_tagcloud .= $sp_rep_tagcloud;
$sp_rep_tagcloud = '';
}
$s_tagcloud = $skin->dressOn('tagcloud_rep', $src_rep_tagcloud, $s_rep_tagcloud, $src_tagcloud);
return $s_tagcloud;
}
示例2: _t
<dl>
<dt><?php echo _t('블로그명');?></dt>
<dd>
<input type="text" name="title" value="<?php echo UTF8::clear($readFeed['title']);?>" class="input faderInput"/>
</dd>
</dl>
<dl>
<dt><?php echo _t('피드주소');?></dt>
<dd>
<input type="text" name="xmlURL" value="<?php echo UTF8::clear($readFeed['xmlURL']);?>" class="input faderInput"/>
</dd>
</dl>
<dl>
<dt><?php echo _t('글쓴이');?></dt>
<dd>
<input type="text" name="author" value="<?php echo UTF8::clear($readFeed['author']);?>" class="input faderInput"/>
</dd>
</dl>
<dl class="comment">
<dt></dt>
<dd class="hint">
<?php echo _t('설정하지 않으면 피드에 포함된 글쓴이 정보를 사용합니다.');?></span>
</dd>
</dl>
<div class="grayline"></div>
<p class="radio_wrap">
<input type="radio" id="isUnFilter" name="useFilter" value="none" <?php if (empty($filter)) { ?>checked="checked" <?php } ?> /> <label for="isUnFilter"><?php echo _t('모든 글을 수집합니다.');?></label>
</p>
示例3: boom
$skin->replace('boomup_count', $linker_post['boomUp']);
$skin->replace('boomdown_count', $linker_post['boomDown']);
$skin->replace('boomup_onclick', 'javascript: boom(\''.$linker_post['id'].'\',\'up\');');
$skin->replace('boomdown_onclick', 'javascript: boom(\''.$linker_post['id'].'\',\'down\');');
$skin->replace('boomup_id', 'boomUp'.$linker_post['id']);
$skin->replace('boomdown_id', 'boomDown'.$linker_post['id']);
$boomedUp = Boom::isBoomedUp($linker_post['id']);
$boomedDown = Boom::isBoomedDown($linker_post['id']);
$skin->replace('boomup_class', (($boomedUp)?'isBoomedUp':'isntBoomedUp'));
$skin->replace('boomdown_class', (($boomedDown)?'isBoomedDown':'isntBoomedDown'));
$tags = $event->on('Data.linker.tags', func::array_trim(explode(',', $linker_post['tags'])));
if (count($tags) > 1) {
$s_tags = '';
$src_tags = $skin->cutSkinTag('tags_rep');
foreach ($tags as $tag) {
if ($tag == $category) continue;
$sp_tags = $skin->replace('tag_link', htmlspecialchars($service['path'].'/?tag='.urlencode(trim($tag))), $src_tags);
$sp_tags = $skin->replace('tag_name', UTF8::clear($tag), $sp_tags);
$s_tags .= $sp_tags;
$sp_tags = '';
}
$skin->dress('tags_rep', $src_tags, $s_tags);
} else {
}
}
?>
示例4: htmlspecialchars
$s_thumbnail = (!Validator::is_empty($thumbnailFile)) ? $skin->parseTag('boom_thumbnail', $thumbnailFile, $src_thumbnail) : '';
$sp_booms = $skin->dressOn('cond_boom_thumbnail', $src_thumbnail, $s_thumbnail, $src_booms_rep);
$sp_booms = $skin->parseTag('boom_thumbnail_exist', 'boom_thumbnail_exist', $sp_booms);
} else {
$sp_booms = $skin->dressOn('cond_boom_thumbnail', $src_thumbnail, '', $src_booms_rep);
$sp_booms = $skin->parseTag('boom_thumbnail_exist', 'boom_thumbnail_nonexistence', $sp_booms);
}
$link_url = $config->addressType == 'id' ? $service['path'].'/go/'.$item['id'] : $service['path'].'/go/'.$item['permalink'];
$sp_booms = $skin->parseTag('boom_url', htmlspecialchars($item['permalink']), $sp_booms);
$sp_booms = $skin->parseTag('boom_link_url', $link_url , $sp_booms);
$sp_booms = $skin->parseTag('boom_title', UTF8::clear(UTF8::lessenAsByte(func::stripHTML($item['title']), $skinConfig->boomTitleLength)), $sp_booms);
$sp_booms = $skin->parseTag('boom_description', UTF8::clear(UTF8::lessenAsByte(func::htmltrim(func::stripHTML($item['description'])),$skinConfig->boomDescLength)), $sp_booms);
$sp_booms = $skin->parseTag('boom_author', UTF8::clear($item['author']), $sp_booms);
$sp_booms = $skin->parseTag('boom_date', (Validator::is_digit($item['written']) ? date('Y-m-d', $item['written']) : $item['written']), $sp_booms);
$s_booms_rep .= $sp_booms;
$sp_booms = '';
}
$s_booms = $skin->dressOn('boom_rep', $src_booms_rep, $s_booms_rep, $src_booms);
} else {
$s_booms = '';
}
$skin->dress('boom', $s_booms);
// ** 태그 클라우드
$skin->dress('tagcloud', SkinElement::getTagCloud($skinConfig->tagCloudOrder, $skinConfig->tagCloudLimit));
// ** 달력
示例5: htmlspecialchars
} else {
$boomedUp = Boom::isBoomedUp($post['id'], 'ip', $ip);
$boomedDown = Boom::isBoomedDown($post['id'], 'ip', $ip);
}
$sp_post = $skin->parseTag('boomup_class', (($boomedUp)?'isBoomedUp':'isntBoomedUp'), $sp_post);
$sp_post = $skin->parseTag('boomdown_class', (($boomedDown)?'isBoomedDown':'isntBoomedDown'), $sp_post);
$tags = $event->on('Data.postTags', func::array_trim(explode(',', $post['tags'])));
if (count($tags) > 1) {
$s_tags = '';
$src_tags = $skin->cutSkinTag('tags_rep');
foreach ($tags as $tag) {
if ($tag == $post_category) continue;
$sp_tags = $skin->parseTag('tag_link', htmlspecialchars($service['path'].'/?tag='.urlencode(trim($tag))), $src_tags);
$sp_tags = $skin->parseTag('tag_name', UTF8::clear(trim($tag)), $sp_tags);
$s_tags .= $sp_tags;
$sp_tags = '';
}
$sp_post = $skin->dressOn('tags_rep', $src_tags, $s_tags, $sp_post);
$sp_post = str_replace('<s_tags>', '', $sp_post);
$sp_post = str_replace('</s_tags>', '', $sp_post);
} else {
if ($skin->doesScopeExists('tags'))
$sp_post = $skin->dressOn('tags', $skin->cutSkinTag('tags'), '', $sp_post);
}
$skin->dress('post', $event->on('Text.post', $sp_post));
} else {
ob_start();
?>
示例6: str_replace
<script type="text/javascript">
//<![CDATA[
//]]></script></head>';
$skin->output = str_replace('</head>', func::printLinkerHeadHTML(), $skin->output);
$skin->output = str_replace('</head>', $headerScript, $skin->output);
$skin->output = str_replace('</head>', $event->on('Disp.linker.head')."\n</head>\n", $skin->output);
$skin->output = str_replace('<body>', "\n<body>\n".$event->on('Disp.linker.body'), $skin->output);
// 기본
$skin->replace('bloglounge_name', BLOGLOUNGE);
$skin->replace('bloglounge_version', BLOGLOUNGE_NAME);
$skin->replace('meta_url', empty($service['path'])?'/':$service['path']);
$skin->replace('meta_title', $event->on('Text.linker.meta_title', UTF8::clear($config->title)));
$skin->replace('meta_description', $event->on('Text.linker.meta_description', UTF8::clear($config->description)));
// *** 회원 메뉴 영역
if (!isLoggedIn()) { // 로그인 되어있지 않은 비회원(손님)
$s_guest = $skin->cutSkinTag('guest');
$s_guest = $skin->parseTag('join_onclick', 'javascript: return join(this,\'' ._t("회원 가입페이지로 이동하시겠습니까?").'\');', $s_guest);
$s_guest = $skin->parseTag('join_url', $service['path'].'/join/', $s_guest);
$s_guest = $skin->parseTag('login_onclick', 'javascript: return login(this,\'' ._t("로그인 페이지로 이동하시겠습니까?").'\');', $s_guest);
$s_guest = $skin->parseTag('login_url', $service['path'].'/login/', $s_guest);
$skin->dress('guest', $s_guest);
} else { // 로그인 되어있는 회원
$s_member = $skin->cutSkinTag('member');
$s_member = $skin->parseTag('mypage_url', $service['path'].'/mypage/', $s_member);
$s_member = $skin->parseTag('logout_url', $service['path'].'/logout/', $s_member);
$s_member = $skin->parseTag('logout_onclick', 'javascript: return logout(this,\'' ._t("로그아웃 하시겠습니까?").'\');', $s_member);
示例7: exportFunction_iframe
function exportFunction_iframe($params, $exportConfig) {
global $export, $service, $config, $event;
$page = isset($params['get']['page'])?$params['get']['page']:1;
if($page <= 0) $page = 1;
$thumbnail = isset($exportConfig) && isset($exportConfig['thumbnail']) ? Validator::getBool($exportConfig['thumbnail']) : true;
$pageCount = isset($exportConfig) && isset($exportConfig['count']) ? $exportConfig['count'] : 10;
$newWindow = isset($exportConfig) && isset($exportConfig['popup']) ? Validator::getBool($exportConfig['popup']) : true;
$categoryView = isset($exportConfig) && isset($exportConfig['category_view']) ? Validator::getBool($exportConfig['category_view']) : false;
$focusView = isset($exportConfig) && isset($exportConfig['focus_view']) ? ($exportConfig['focus_view'] == 'focus' ? true : false) : false;
if($focusView) {
list($posts, $totalFeedItems) = FeedItem::getFeedItems('focus', 'y', '', $page, $pageCount);
} else {
if($categoryView) {
$categoryValue = isset($exportConfig) && isset($exportConfig['category']) ? $exportConfig['category'] : '';
list($posts, $totalFeedItems) = FeedItem::getFeedItems('category', $categoryValue, '', $page, $pageCount);
} else {
list($posts, $totalFeedItems) = FeedItem::getFeedItems('', '', '', $page, $pageCount);
}
}
$paging = Func::makePaging($page, $pageCount, $totalFeedItems);
requireComponent('LZ.PHP.Media');
ob_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><?php echo $config->title;?></title>
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $export->exportURL;?>/style.css" />
<link rel="shortcut icon" href="<?php echo $service['path'];?>/images/favicon.ico" />
</head>
<body>
<div id="export_iframe_wrap">
<ul>
<?php
foreach($posts as $post) {
$post['thumbnail'] = '';
if($media = Media::getMedia($post['thumbnailId'])) {
$post['thumbnail'] = $media['thumbnail'];
}
$thumbnailFile = $event->on('Text.postThumbnail', Media::getMediaFile($post['thumbnail']));
$post['description'] = func::stripHTML($post['description'].'>');
if (substr($post['description'], -1) == '>') $post['description'] = substr($post['description'], 0, strlen($post['description']) - 1);
$post_description = UTF8::lessenAsByte(func::htmltrim($post['description']), 300);
if (strlen($post_description) == 0) $post_description = '<span class="empty">'._t('(글의 앞부분이 이미지 혹은 HTML 태그만으로 되어있습니다)').'</span>';
$post_description = $event->on('Text.postDescription', $post_description);
?>
<li class="<?php echo empty($thumbnailFile)||!$thumbnail?'thumbnail_nonexistence':'';?>">
<?php
if($thumbnail) {
$link_url = $config->addressType == 'id' ? $service['path'].'/go/'.$post['id'] : $service['path'].'/go/'.$post['permalink'];
if(!empty($post['thumbnail'])) {
?>
<div class="thumbnail">
<a href="<?php echo $link_url;?>" target="<?php echo $newWindow?'_blank':'_parent';?>"><img src="<?php echo $thumbnailFile;?>" alt="thumnail" /></a>
</div>
<?php
}
}
?>
<div class="data">
<h3><a href="<?php echo $link_url;?>" target="<?php echo $newWindow?'_blank':'_parent';?>"><?php echo UTF8::clear($event->on('Text.postTitle', func::stripHTML($post['title'])));?></a></h3>
<p><?php echo $post_description;?></p>
</div>
<div class="clear"></div>
</li>
<?php
}
?>
</ul>
<div class="paging">
<?php echo func::printPaging($paging);?>
</div>
</div>
</body>
</html>
<?php
$content = ob_get_contents();
ob_end_clean();
return $content;
}