<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
	<channel>
				<title><![CDATA[이전글 다음글 관련 문의]]></title>
		<link>https://www.cosmosfarm.com/threads/rss/document/48078</link>
		<description><![CDATA[<p>https://www.cosmosfarm.com/threads/document/13325</p>

<p> </p>

<p>이 글을 참고하여 이전글 다음글을 update 기준값으로 설정해놓고 쓰고 있었는데요, 케이보드 업데이트 이후에 이전글 다음글이 이상하게 뜨는 상황입니다ㅠㅠ</p>

<p>오른쪽에 표시되는 다음글은 현재 읽고 있는 글 다음글이 제대로 표시됩니다.</p>

<p>문제는 왼쪽에 표시되는 이전글인데요......무조건 게시판 제일 첫글이 표시되어 뜨네요;;;</p>

<p>어떻게 고치는지 도와주세요ㅠㅠㅠㅠ</p>]]></description>
		<copyright>Copyright 2026, 코스모스팜</copyright>
				<item>
			<title><![CDATA[문제 해결했습니당!!

감사해요♡♡♡♡♡]]></title>
			<link>https://www.cosmosfarm.com/threads/document/48174</link>
			<description><![CDATA[<p>문제 해결했습니당!!</p>

<p>감사해요♡♡♡♡♡</p>]]></description>
			<author>pp0101</author>
			<pubDate>Tue, 24 Nov 2020 06:38:09 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[안녕하세요.

KBContent 클래스의 getNextUID() 메소드 적용 시 다음 글에 항상 최신 게시글만 표시된다...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/48171</link>
			<description><![CDATA[<p>안녕하세요.</p>

<p>KBContent 클래스의 getNextUID() 메소드 적용 시 다음 글에 항상 최신 게시글만 표시된다면</p>

<p>FTP로 접속해서 /wp-content/plugins/kboard/class/KBContent.class.php 파일에</p>

<p>아래의 코드를 찾아서</p>

<pre>
<code class="language-php">$uid = $wpdb-&gt;get_var(apply_filters('kboard_content_next_uid_query', "SELECT `uid` FROM `{$wpdb-&gt;prefix}kboard_board_content` WHERE {$where} ORDER BY `{$order_by_sort}` DESC LIMIT 1", $this, $where, $sorting, $order_by_sort, $category1, $category2));</code></pre>

<p>아래의 코드로 교체해보세요.</p>

<pre>
<code class="language-php">$uid = $wpdb-&gt;get_var(apply_filters('kboard_content_next_uid_query', "SELECT `uid` FROM `{$wpdb-&gt;prefix}kboard_board_content` WHERE {$where} ORDER BY `{$order_by_sort}` ASC LIMIT 1", $this, $where, $sorting, $order_by_sort, $category1, $category2));</code></pre>

<p>해당 버그는 업데이트에 반영하도록 하겠습니다.</p>

<p>고맙습니다.</p>]]></description>
			<author>스레드봇</author>
			<pubDate>Tue, 24 Nov 2020 05:57:56 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[제가 예전에 이전글 다음글 순서에 대한 질문을 해서 답변을 받고 코드를 적용시킨 것이 있는데요....

...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/48157</link>
			<description><![CDATA[<p>제가 예전에 이전글 다음글 순서에 대한 질문을 해서 답변을 받고 코드를 적용시킨 것이 있는데요....</p>

<p>https://www.cosmosfarm.com/threads/document/44594</p>

<p>위에 있는 코드가 문제없다면 혹시 이것과 관련이 있을까요??ㅠㅠ</p>]]></description>
			<author>pp0101</author>
			<pubDate>Tue, 24 Nov 2020 03:43:19 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[안녕하세요.

코드 상에는 별문제 없는 듯합니다.

저희 쪽 테스트 서버에서는 이전 글도 업데이트순으...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/48136</link>
			<description><![CDATA[<p>안녕하세요.</p>

<p>코드 상에는 별문제 없는 듯합니다.</p>

<p>저희 쪽 테스트 서버에서는 이전 글도 업데이트순으로 정상적으로 표시되고 있습니다.</p>

<p>저희 <a href="https://www.cosmosfarm.com/support" target="_blank">고객지원</a> 쪽 이메일로 워드프레스 관리자 계정과 FTP 접속 정보를 보내주시면 점검해드리겠습니다.</p>

<p>고맙습니다.</p>]]></description>
			<author>스레드봇</author>
			<pubDate>Tue, 24 Nov 2020 00:04:02 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[
function get_next_content_uid($board_id, $current_uid, $key, $value){
    global $wpdb;
     
  ...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/48121</link>
			<description><![CDATA[<pre>
<code>function get_next_content_uid($board_id, $current_uid, $key, $value){
    global $wpdb;
     
    $board_id = intval($board_id);
    $current_uid = intval($current_uid);
    $key = esc_sql(sanitize_key($key));
    $value = esc_sql(sanitize_text_field($value));
     
    $where[] = "`board_id`='{$board_id}'";
    $where[] = "`uid`!='{$current_uid}'";
    $where[] = "`$key`&gt;='{$value}'";
     
    // 휴지통에 없는 게시글만 불러온다.
    $where[] = "(`status`='' OR `status` IS NULL OR `status`='pending_approval')";
     
    $category1 = kboard_category1();
    $category2 = kboard_category2();
     
    if($category1){
        $category1 = esc_sql($category1);
        $where[] = "`category1`='{$category1}'";
    }
    if($category2){
        $category2 = esc_sql($category2);
        $where[] = "`category2`='{$category2}'";
    }
     
    $where = implode(' AND ', $where);
    $uid = $wpdb-&gt;get_var("SELECT `uid` FROM `{$wpdb-&gt;prefix}kboard_board_content` WHERE {$where} ORDER BY `{$key}` ASC LIMIT 1");
     
    return intval($uid);
}
 
function get_prev_content_uid($board_id, $current_uid, $key, $value){
    global $wpdb;
     
    $board_id = intval($board_id);
    $current_uid = intval($current_uid);
    $key = esc_sql(sanitize_key($key));
    $value = esc_sql(sanitize_text_field($value));
     
    $where[] = "`board_id`='{$board_id}'";
    $where[] = "`uid`!='{$current_uid}'";
    $where[] = "`$key`&lt;='{$value}'";
     
    // 휴지통에 없는 게시글만 불러온다.
    $where[] = "(`status`='' OR `status` IS NULL OR `status`='pending_approval')";
     
    $category1 = kboard_category1();
    $category2 = kboard_category2();
     
    if($category1){
        $category1 = esc_sql($category1);
        $where[] = "`category1`='{$category1}'";
    }
    if($category2){
        $category2 = esc_sql($category2);
        $where[] = "`category2`='{$category2}'";
    }
     
    $where = implode(' AND ', $where);
    $uid = $wpdb-&gt;get_var("SELECT `uid` FROM `{$wpdb-&gt;prefix}kboard_board_content` WHERE {$where} ORDER BY `{$key}` DESC LIMIT 1");
     
    return intval($uid);
}</code></pre>

<p>위의 코드를 function.php에 넣고</p>

<p>/wp-content/plugins/kboard/skin/사용중인스킨/document.php 파일에</p>

<pre>
<code>$bottom_content_uid = $content-&gt;getPrevUID(); </code></pre>

<p>를 찾아서 </p>

<pre>
<code>$bottom_content_uid = get_prev_content_uid($board-&gt;id, $content-&gt;uid, 'update', $content-&gt;update); </code></pre>

<p>로 바꿨습니다.</p>

<pre>
<code>$top_content_uid = $content-&gt;getNextUID(); </code></pre>

<p>이것도 </p>

<pre>
<code>$top_content_uid = get_next_content_uid($board-&gt;id, $content-&gt;uid, 'update', $content-&gt;update);</code></pre>

<p>이렇게 바꿨습니다</p>]]></description>
			<author>pp0101</author>
			<pubDate>Mon, 23 Nov 2020 06:51:20 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[안녕하세요~^^

KBoard 플러그인 업데이트 시 기본 스킨의 경우 복사해서 작업하지 않으시면

수정하신 ...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/48102</link>
			<description><![CDATA[<p>안녕하세요~^^</p>

<p>KBoard 플러그인 업데이트 시 기본 스킨의 경우 복사해서 작업하지 않으시면</p>

<p>수정하신 코드가 지워질 수 있기 때문에 코드를 다시 적용해주셔야 합니다.</p>

<p> </p>

<p>올려주신 링크의 코드가 저희 쪽 테스트 서버에서는</p>

<p>정상적으로 동작하는 것을 확인했습니다.</p>

<p>실제 적용한 코드를 에디터의 <a href="https://imgur.com/a/SgTSN1g" target="_blank">코드 스니펫 삽입</a> 기능을 사용해서 올려주시겠어요?</p>

<p>고맙습니다.</p>]]></description>
			<author>스레드봇</author>
			<pubDate>Mon, 23 Nov 2020 01:19:11 +0000</pubDate>
			<category>KBoard</category>
		</item>
			</channel>
</rss>