KBoard 3차 카테고리 url문제

안녕하세요.. 카테고리 3차 url에 문제가 있어 질문 남깁니다..

http://kggagu.co.kr/%E3%84%B9%E3%85%87%E3%85%81%E3%84%B9%E3%85%87%E3%85%81%E3%84%B9/?category1=%EB%B7%B0%EB%A1%9C%EB%A7%A5%EC%8A%A4&mod=list&pageid=1&category2=%ED%8C%8C%ED%8B%B0%EC%85%98&category3=EP45T

이런식으로 카테고리가 나와야하는데

 

현재 카테고리는 클릭시 

http://kggagu.co.kr/%E3%84%B9%E3%85%87%E3%85%81%E3%84%B9%E3%85%87%E3%85%81%E3%84%B9/?mod=list&pageid=1&compare=%3D&category1=%EB%B7%B0%EB%A1%9C%EB%A7%A5%EC%8A%A4&category2=%ED%8C%8C%ED%8B%B0%EC%85%98&keyword=EP45T&target=kboard_option_category3

이렇게 나오고있습니다.

 

소스 첨부하겠습니다....

너무 감사하고 죄송합니다

<div id="kboard-pure-gallery-list">
	
	<div class="kboard-control">
		<div class="kboard-control-search">
			<a href="#" onclick="kboard_pure_gallery_search_toggle();return false;" title="<?php echo __('Search', 'kboard')?>">
			<img src="<?php echo $skin_path?>/images/icon-search.png" alt="<?php echo __('Search', 'kboard')?>"></a>
		</div>
		<?php if($board->isWriter()):?>
		<div class="kboard-control-write">
			<a href="<?php echo $url->set('mod', 'editor')->toString()?>" title="<?php echo __('New', 'kboard')?>"><img src="<?php echo $skin_path?>/images/icon-write.png" alt="<?php echo __('New', 'kboard')?>"></a>
		</div>
		<?php endif?>
	</div>
	
	<!-- 검색폼 시작 -->
	<div class="kboard-pure-gallery-search">
		<form id="kboard-search-form-<?php echo $board->id?>" method="get" action="<?php echo $url->toString()?>">
			<?php echo $url->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->toInput()?>
			<select name="target">
				<option value=""><?php echo __('All', 'kboard')?></option>
				<option value="title"<?php if(kboard_target() == 'title'):?> selected<?php endif?>><?php echo __('Title', 'kboard')?></option>
				<option value="content"<?php if(kboard_target() == 'content'):?> selected<?php endif?>><?php echo __('Content', 'kboard')?></option>
				<option value="member_display"<?php if(kboard_target() == 'member_display'):?> selected<?php endif?>><?php echo __('Author', 'kboard')?></option>
			</select>
			<input type="text" name="keyword" value="<?php echo kboard_keyword()?>" placeholder="<?php echo __('Search', 'kboard')?>...">
			<button type="submit" class="kboard-pure-gallery-button-small"><?php echo __('Search', 'kboard')?></button>
		</form>
	</div>
	<!-- 검색폼 끝 -->
	
	<?php if($board->use_category == 'yes'):?>

<?php
$category2 = array(
	'뷰로맥스' => array('파티션'),
	'일룸' => array('의자2', '의자2-1'),
	'현대리바트' => array('칠판2', '칠판2-1'),
	'카' => array('연필2', '연필2-1'),
);

$category3 = array(
	'파티션' => array('AP66T','RP65T','EP45T'),
	'의자2' => array('AP 66T','RP 65T','EP 45T'),
	'칠판2' => array('칠판3'),
	'연필2' => array('연필3'),
);
?>

<?php if(kboard_keyword()):?>
<?php
	global $wpdb;
	$search_keyword = kboard_keyword();
	$result = $wpdb->get_results("SELECT DISTINCT `category1` FROM `{$wpdb->prefix}kboard_board_content` WHERE `board_id` = '{$board->id}' AND (`title` LIKE '%{$search_keyword}%' OR `content` LIKE '%{$search_keyword}%')");
?>

<?php foreach($result as $value):?>
<!--<span style="display:inline-block; width:200px; height:30px; border:1px solid black; color:blue; text-align:center; line-height:30px;"><?php echo $value->category1?></span>-->
<?php endforeach?>
<?php endif?>

<!-- 카테고리 시작 -->
<!--
<div class="kboard-category category-mobile">
	<form id="kboard-category-form-<?php echo $board->id?>" method="get" action="<?php echo $url->toString()?>">
		<?php echo $url->set('pageid', '1')->set('category1', '')->set('category2', '')->set('target', '')->set('keyword', '')->set('mod', 'list')->toInput()?>
		
		<?php if($board->initCategory1()):?>
			<select name="category1" onchange="jQuery('#kboard-category-form-<?php echo $board->id?>').submit();">
				<option value=""><?php echo __('All', 'kboard')?></option>
				<?php while($board->hasNextCategory()):?>
				<option value="<?php echo $board->currentCategory()?>"<?php if(kboard_category1() == $board->currentCategory()):?> selected<?php endif?>><?php echo $board->currentCategory()?></option>
				<?php endwhile?>
			</select>
		<?php endif?>
		
		<?php if(kboard_category1() && $category2):?>
			<select name="category2" onchange="jQuery('#kboard-category-form-<?php echo $board->id?>').submit();">
				<option value=""><?php echo __('All', 'kboard')?></option>
				<?php foreach($category2[kboard_category1()] as $category2_name):?>
				<option value="<?php echo $category2_name?>"<?php if(kboard_category2() == $category2_name):?> selected<?php endif?>><?php echo $category2_name?></option>
				<?php endforeach?>
			</select>
		<?php endif?>
	</form>
</div>
-->

<div class="kboard-category category-pc">
<?php if(kboard_keyword()):?>
<ul class="kboard-category-list">
	<li<?php if(!kboard_category1()):?> class="kboard-category-selected"<?php endif?>><a href="<?php echo $url->set('category1', '')->set('category2', '')->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->tostring()?>"><?php echo __('All', 'kboard')?></a></li>
	<?php foreach($result as $value):?>
	<li<?php if($value->category1 == $_GET['category1']):?> class="kboard-category-selected"<?php endif?>>
		<a href="<?php echo $url->set('category1', $board->currentCategory())->set('category1', $value->category1)->set('pageid', '1')->set('target', '')->set('keyword', kboard_keyword())->set('mod', 'list')->set('compare', '')->toString()?>"><?php echo $value->category1?></a>
	</li>
	<?php endforeach?>
</ul>
<?php else:?>
	<?php if($board->initCategory1()):?>
		<ul class="kboard-category-list">
			<li<?php if(!kboard_category1()):?> class="kboard-category-selected"<?php endif?>><a href="<?php echo $url->set('category1', '')->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->tostring()?>"><?php echo __('All', 'kboard')?></a></li>
			<?php while($board->hasNextCategory()):?>
			<li<?php if(kboard_category1() == $board->currentCategory()):?> class="kboard-category-selected"<?php endif?>>
				<a href="<?php echo $url->set('category1', $board->currentCategory())->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->toString()?>"><?php echo $board->currentCategory()?></a>
			</li>
			<?php endwhile?>
		</ul>
	<?php endif?>
<?php endif?>
	
	<?php if(kboard_category1() && $category2 && isset($category2[kboard_category1()]) && $category2[kboard_category1()]):?>
		<ul class="kboard-category-list">
			<li<?php if(!kboard_category2()):?> class="kboard-category-selected"<?php endif?>><a href="<?php echo $url->set('category2', '')->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->tostring()?>"><?php echo __('All', 'kboard')?></a></li>
			<?php foreach($category2[kboard_category1()] as $category2_name):?>
			<li<?php if(kboard_category2() == $category2_name):?> class="kboard-category-selected"<?php endif?>>
				<a href="<?php echo $url->set('category2', $category2_name)->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->toString()?>"><?php echo $category2_name?></a>
			</li>
			<?php endforeach?>
		</ul>
	<?php endif?>
	
	<?php if(kboard_category2() && $category3 && isset($category3[kboard_category2()]) && $category3[kboard_category2()]):?>
		<ul class="kboard-category-list">
			<li<?php if(!kboard_keyword()):?> class="kboard-category-selected"<?php endif?>><a href="<?php echo $url->set('category3', '')->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->tostring()?>"><?php echo __('All', 'kboard')?></a></li>
			<?php foreach($category3[kboard_category2()] as $category3_name):?>
			<li<?php if(kboard_target() == 'kboard_option_category3' && kboard_keyword() == $category3_name):?> class="kboard-category-selected"<?php endif?>>
				<a href="<?php echo $url->set('target', 'kboard_option_category3')->set('keyword', $category3_name)->set('pageid', '1')->set('compare', '=')->set('mod', 'list')->toString()?>"><?php echo $category3_name?></a>
			</li>
			<?php endforeach?>
		</ul>
	<?php endif?>
</div>
<!-- 카테고리 끝 -->
<?php endif?>
	
	<!-- 리스트 시작 -->
	<ul class="kboard-pure-gallery-list">
		<?php while($content = $list->hasNextNotice()):?>
		<li class="kboard-list-item<?php if($content->uid == kboard_uid()):?> kboard-list-selected<?php endif?>">
			<a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'document')->toString()?>#kboard-document">
				<div class="kboard-list-thumbnail">
					<?php if($content->getThumbnail(500, 500)):?>
					<div class="kboard-list-thumbnail-child" style="background-image:url(<?php echo $content->getThumbnail(500, 500)?>)"></div>
					<?php endif?>
					<?php if(isset($content->attach->over_image)):?>
					<div class="kboard-list-thumbnail-over-background"></div>
					<div class="kboard-list-thumbnail-over-image"><img src="<?php echo site_url($content->attach->over_image[0])?>" alt=""></div>
					<?php endif?>
				</div>
				<div class="kboard-list-notice"><span class="kboard-oneticon-new-notify"><?php echo __('Notice', 'kboard')?></span></div>
				<div class="kboard-list-title"><div class="kboard-oneticon-cut-strings">
					<?php if($content->secret):?><img src="<?php echo $skin_path?>/images/icon-lock.png" class="kboard-icon-lock" alt="<?php echo __('Secret', 'kboard')?>"><?php endif?>
					<?php echo $content->title?>
				</div></div>

				<!--<div class="kboard-list-user"><?php echo apply_filters('kboard_user_display', $content->member_display, $content->member_uid, $content->member_display, 'kboard', $boardBuilder)?></div>-->
			</a>
		</li>
		<?php endwhile?>
		<?php while($content = $list->hasNext()):?>
		<li class="kboard-list-item<?php if($content->uid == kboard_uid()):?> kboard-list-selected<?php endif?>">
			<a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'document')->toString()?>#kboard-document">
				<div class="kboard-list-thumbnail">
					<?php if($content->getThumbnail(500, 500)):?>
					<div class="kboard-list-thumbnail-child" style="background-image:url(<?php echo $content->getThumbnail(500, 500)?>)"></div>
					<?php endif?>
					<?php if(isset($content->attach->over_image)):?>
					<div class="kboard-list-thumbnail-over-background"></div>
					<div class="kboard-list-thumbnail-over-image"><img src="<?php echo site_url($content->attach->over_image[0])?>" alt=""></div>
					<?php endif?>
				</div>
				<!--<div class="kboard-list-new"><?php if($content->isNew()):?><span class="kboard-oneticon-new-notify">New</span><?php endif?></div>-->
				<div class="kboard-list-title"><div class="kboard-oneticon-cut-strings">
					<?php if($content->secret):?><img src="<?php echo $skin_path?>/images/icon-lock.png" class="kboard-icon-lock" alt="<?php echo __('Secret', 'kboard')?>"><?php endif?>
					<?php echo $content->title?>
				</div></div>
				<div class="kboard-list-title kboard-list-user" style="color:blue;"><div class="kboard-oneticon-cut-strings">
					<?php echo $content->option->{tablespac3}?>
				</div></div>
				

				<!--<div class="kboard-list-user"><?php echo apply_filters('kboard_user_display', $content->member_display, $content->member_uid, $content->member_display, 'kboard', $boardBuilder)?></div>-->
			</a>
		</li>
		<?php endwhile?>
	</ul>
	<!-- 리스트 끝 -->
	
	<!-- 페이징 시작 -->
	<div class="kboard-pagination">
		<ul class="kboard-pagination-pages">
			<?php echo kboard_pagination($list->page, $list->total, $list->rpp)?>
		</ul>
	</div>
	<!-- 페이징 끝 -->
	
	<div class="kboard-pure-gallery-poweredby">
		<a href="http://www.cosmosfarm.com/products/kboard" onclick="window.open(this.href);return false;" title="<?php echo __('KBoard is the best community software available for WordPress', 'kboard')?>">Powered by KBoard</a>
	</div>
</div>




<?php wp_enqueue_script('pure-gallery-list', "{$skin_path}/list.js", array(), KBOARD_VERSION, true)?>
워드프레스 에러 기술지원 서비스 전문가에게 맡기세요
워드프레스 에러 기술지원 서비스 전문가에게 맡기세요
  • 안녕하세요.

    두번째 주소를 확인해보면

    검색어 "EP45T" 가 있습니다.

    즉 검색된 결과이기 때문에 카테고리1에 아무것도 나오지 않고 있는걸로 판단됩니다.

    이전 질문에서 검색 결과에 따라서 카테고리1이 동적으로 변경되도록 코드를 요청하셨습니다.

     

    우선 아래 코드를 찾아서

    <?php if(kboard_keyword()):?>
    <ul class="kboard-category-list">
    	<li<?php if(!kboard_category1()):?> class="kboard-category-selected"<?php endif?>><a href="<?php echo $url->set('category1', '')->set('category2', '')->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->tostring()?>"><?php echo __('All', 'kboard')?></a></li>
    	<?php foreach($result as $value):?>
    	<li<?php if($value->category1 == $_GET['category1']):?> class="kboard-category-selected"<?php endif?>>
    		<a href="<?php echo $url->set('category1', $board->currentCategory())->set('category1', $value->category1)->set('pageid', '1')->set('target', '')->set('keyword', kboard_keyword())->set('mod', 'list')->set('compare', '')->toString()?>"><?php echo $value->category1?></a>
    	</li>
    	<?php endforeach?>
    </ul>
    <?php else:?>
    	<?php if($board->initCategory1()):?>
    		<ul class="kboard-category-list">
    			<li<?php if(!kboard_category1()):?> class="kboard-category-selected"<?php endif?>><a href="<?php echo $url->set('category1', '')->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->tostring()?>"><?php echo __('All', 'kboard')?></a></li>
    			<?php while($board->hasNextCategory()):?>
    			<li<?php if(kboard_category1() == $board->currentCategory()):?> class="kboard-category-selected"<?php endif?>>
    				<a href="<?php echo $url->set('category1', $board->currentCategory())->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->toString()?>"><?php echo $board->currentCategory()?></a>
    			</li>
    			<?php endwhile?>
    		</ul>
    	<?php endif?>
    <?php endif?>

     

    아래 코드로 교체해보시겠어요?

    <?php if(kboard_keyword() && isset($result) && $result):?>
    	<ul class="kboard-category-list">
    		<li<?php if(!kboard_category1()):?> class="kboard-category-selected"<?php endif?>><a href="<?php echo $url->set('category1', '')->set('category2', '')->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->tostring()?>"><?php echo __('All', 'kboard')?></a></li>
    		<?php foreach($result as $value):?>
    		<li<?php if($value->category1 == kboard_category1()):?> class="kboard-category-selected"<?php endif?>>
    			<a href="<?php echo $url->set('category1', $board->currentCategory())->set('category1', $value->category1)->set('pageid', '1')->set('target', '')->set('keyword', kboard_keyword())->set('mod', 'list')->set('compare', '')->toString()?>"><?php echo $value->category1?></a>
    		</li>
    		<?php endforeach?>
    	</ul>
    <?php else:?>
    	<?php if($board->initCategory1()):?>
    		<ul class="kboard-category-list">
    			<li<?php if(!kboard_category1()):?> class="kboard-category-selected"<?php endif?>><a href="<?php echo $url->set('category1', '')->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->tostring()?>"><?php echo __('All', 'kboard')?></a></li>
    			<?php while($board->hasNextCategory()):?>
    			<li<?php if(kboard_category1() == $board->currentCategory()):?> class="kboard-category-selected"<?php endif?>>
    				<a href="<?php echo $url->set('category1', $board->currentCategory())->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->toString()?>"><?php echo $board->currentCategory()?></a>
    			</li>
    			<?php endwhile?>
    		</ul>
    	<?php endif?>
    <?php endif?>

    카테고리1 검색 결과가 없을 경우에는 모든 카테고리1이 표시되도록 합니다.

     

    이와 같이 질문내용이 방대하다면 유료 기술지원을 요청해주시는게 좋을 듯합니다~^^

    저희가 답변 남기다 보면 실제 연구 개발할 시간이 많이 부족해지거든요.

    그럼 KBoard 업데이트를 기다리시는 다른 분들께도 피해가 갈지도 모르겠습니다.

    최선을 다해서 좋은 기능 제공해드리겠습니다.

    고맙습니다.

  • 에고 죄송합니다 ㅠㅠ

    위코드가 되지않아 개인적으로 공부하여 해결하였습니다!

    감사합니다.

워드프레스 에러 기술지원 서비스 전문가에게 맡기세요