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


PHP func::encode方法代码示例

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


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

示例1:

		} else {
			if($accessInfo['controller'] == 'focus') {
				$qSearch = '/focus';
			}
		}

		$add = $service['path'];
		if(!in_array($accessInfo['controller'], array('','read','blog','calling','day','error','export','focus','go','join','login','logout','random','rss','search'))) {
			switch($accessInfo['controller']) {
				case 'feedlist':
					$add .= '/feedlist';
				break;	
				case 'group':
				case 'category':
				default:
					$add .='/'. $accessInfo['controller'] .'/' . func::encode(trim($searchKeyword));
				break;
			}
		}

		$add = func::lastSlashDelete($add);

		$s_paging = $skin->parseTag('prev_page', $event->on('Text.pagingURL',$add.$qSearch.$paging['pageDatas'][$paging['pagePrev']]), $src_paging);
		$s_paging = $skin->parseTag('next_page', $event->on('Text.pagingURL',$add.$qSearch.$paging['pageDatas'][$paging['pageNext']]), $s_paging);

		$s_paging = $skin->parseTag('more_prev_page', ($paging['pagePrev'] == $page ? 'no_more' : 'more'), $s_paging);
		$s_paging = $skin->parseTag('more_next_page', ($paging['pageNext'] == $page ? 'no_more' : 'more'), $s_paging);

		$s_rep_paging = '';
		$src_rep_paging = $skin->cutSkinTag('paging_rep');
		for ($p=$paging['pageStart']; $p < $paging['pageEnd']+1; $p++) { 
开发者ID:ncloud,项目名称:bloglounge,代码行数:31,代码来源:skin.end.php

示例2:

<?php
	define('ROOT', '..');
	include ROOT . '/lib/include.php';

	if(!empty($searchType) && !empty($searchKeyword)) {
		if($accessInfo['controller'] != 'search') {
			header("Location: {$service['path']}/search/{$searchType}/" .func::encode($searchKeyword));
			exit;
		}
	}

	$customQuery = $event->on('Query.feedItems', '');

	include ROOT . '/lib/begin.php';	
	$pageCount = $skinConfig->postList;
	list($posts, $totalFeedItems) = FeedItem::getFeedItems($searchType, $searchKeyword, $searchExtraValue, $page, $pageCount, false, 0, $customQuery);
	$paging = Func::makePaging($page, $pageCount, $totalFeedItems);
	
	include ROOT . '/lib/piece/message.php';
	include ROOT . '/lib/piece/postlist.php';
	include ROOT . '/lib/end.php';	
?>
开发者ID:ncloud,项目名称:bloglounge,代码行数:22,代码来源:index.php

示例3:

	} else {
		$s_category = '';
	}
	$skin->dress('category', $s_category);


	// 그룹

	requireComponent('Bloglounge.Data.Groups');	

	$src_group = $skin->cutSkinTag('group');
	$groups = Group::getList();
	if(count($groups) > 0) {
		$sp_group = "<ul>\n";
			foreach($groups as $group) {
				$sp_group .= "<li><a href=\"{$servicePath}/group/".func::encode($group['name'])."\">{$group['name']}</a><span class=\"count count_class_{$group['count']}\">({$group['count']})</span>\n";
			}
		$sp_group .= "</ul>\n";

		$s_group = $skin->parseTag('group_list',$sp_group, $src_group);
	} else {
		$s_group = '';
	}
	$skin->dress('group', $s_group);

	// ** 피드 목록
	$src_feeds = $skin->cutSkinTag('feed');
	$result = Feed::getRecentFeeds($skinConfig->feedList, $skinConfig->feedOrder);
	if(count($result) > 0) {
		$s_feed_rep = '';
		$src_feed_rep = $skin->cutSkinTag('feed_rep');
开发者ID:ncloud,项目名称:bloglounge,代码行数:31,代码来源:skin.begin.php

示例4:

	$customQuery = $event->on('Query.feedItems', '');

	$pageCount = $skinConfig->postList; // 페이지갯수
	list($posts, $totalFeedItems) = FeedItem::getFeedItems($searchType, $searchKeyword, $searchExtraValue, $page, $pageCount, false, 0, $customQuery);
	$paging = Func::makePaging($page, $pageCount, $totalFeedItems);
	
	$group = Group::getByName($searchKeyword);
	$groupCategories = GroupCategory::getList($group['id']);
	
	if(count($groupCategories)>0) {
		$src_group = $skin->cutSkinTag('group_category');
		$groups = Group::getList();
		if(count($groups) > 0) {
			$sp_group = "<ul>\n";
				foreach($groupCategories as $groupCategory) {
					$sp_group .= "<li><a href=\"{$servicePath}/group/".func::encode($group['name'])."/".func::encode($groupCategory['name'])."\">{$groupCategory['name']}</a>\n";
				}
			$sp_group .= "</ul>\n";

			$s_group = $skin->parseTag('group_category_list',$sp_group, $src_group);
		} else {
			$s_group = '';
		}
		$skin->dress('group_category', $s_group);
	}

	include ROOT . '/lib/piece/message.php';
	include ROOT . '/lib/piece/postlist.php';
	include ROOT . '/lib/end.php';
?>
开发者ID:ncloud,项目名称:bloglounge,代码行数:30,代码来源:group.php

示例5: printCategoryFocusView

function printCategoryFocusView($categories, $index, $config) {
	global $service, $event;
	$pluginURL = $event->pluginURL;

	if($index < 0 || $index >= count($categories)) {
		return false;
	}
	$category = $categories[$index];
	$result = '';

	$entries = FeedItem::getRecentFeedItemsByCategory($category['id'], $config['categoryFeedCount']+1);
?>
	<div class="title">
		<h3><a href="<?php echo $service['path'];?>/category/<?php echo func::encode($category['name']);?>"><?php echo $category['name'];?></a></h3>
		<div class="more">
			<a href="<?php echo $service['path'];?>/category/<?php echo func::encode($category['name']);?>"><img src="<?php echo $pluginURL;?>/images/bt_more.gif" alt="<?php echo _t('더보기');?>" /></a>
		</div>
		<div class="clear"></div>
	</div>
	<ul>
<?php
		if(count($entries)>0) {
			$entry = $entries[0];
?>
		<li class="detail">
<?php
		$thumbnailFile = '';
		if($media = Media::getMedia($entry['thumbnailId'])) {
			$thumbnailFile = Media::getMediaFile($media['thumbnail']);
		}
		
		$link_url = $config->addressType == 'id' ? $service['path'].'/go/'.$entry['id'] : $service['path'].'/go/'.$entry['permalink'];

		if(!empty($thumbnailFile)) {
?>
			<div class="thumbnail">
				<img src="<?php echo $thumbnailFile;?>" alt="<?php echo _t('미리보기 이미지');?>" />
			</div>
			<div class="data">
				<h3><a href="<?php echo $link_url;?>" target="_blank"><?php echo UTF8::lessenAsByte(func::stripHTML($entry['title']),$config['categoryTitleLength']);?></a></h3>
				<div class="desc">
					<?php echo UTF8::lessenAsByte(func::stripHTML($entry['description']),$config['categoryDescLength']);?>
				</div>
			</div>
<?php
		} else {
?>
			<div class="data data_full">
				<h3><a href="<?php echo $link_url;?>" target="_blank"><?php echo UTF8::lessenAsByte(func::stripHTML($entry['title']),$config['categoryTitleLength']);?></a></h3>
				<div class="desc">
					<?php echo UTF8::lessenAsByte(func::stripHTML($entry['description']),$config['categoryDescLength']);?>
				</div>
			</div>
<?php
		}
?>
			<div class="clear"></div>
		</li>
<?php
		}
		for($i=1;$i<count($entries);$i++) {
			$entry = $entries[$i];
			$link_url = $config->addressType == 'id' ? $service['path'].'/go/'.$entry['id'] : $service['path'].'/go/'.$entry['permalink'];

?>
		<li class="list"><a href="<?php echo $link_url;?>" target="_blank"><?php echo UTF8::lessenAsByte(func::stripHTML($entry['title']),$config['categoryTitleLength']);?></a></li>
<?php
		}
?>
	</ul>
<?php
	return $result;
}
开发者ID:ncloud,项目名称:bloglounge,代码行数:73,代码来源:index.php


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