Ejemplo n.º 1
0
		} 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++) { 
Ejemplo n.º 2
0
<?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';	
?>
Ejemplo n.º 3
0
	} 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');
Ejemplo n.º 4
0
	$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';
?>
Ejemplo n.º 5
0
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;
}