<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
	<channel>
				<title><![CDATA[KBoard 미디어 추가 업로드 에러]]></title>
		<link>https://www.cosmosfarm.com/threads/rss/document/56908</link>
		<description><![CDATA[<p>안녕하세요.<br />
KBoard 미디어 추가로 업로드 할 경우 아래와 같은 경고창이 나오면서 업로드가 안됩니다.<br />
'sample-img.jpg 파일은 업로드 가능한 파일 형식이 아닙니다.'<br />
<br />
대시보드에서 '첨부파일의 종류를 제한합니다.' 부분에서 jpg, png, gif 등 이미지 확장자는 제외시킨 상태입니다.<br />
워드프레스 '미디어 추가'로는 업로드 및 본문 첨부 모두 정상적으로 작동됩니다.<br />
<br />
KBoard 버전<br />
현재 설치된 게시판 플러그인 버전은 6.1 입니다.<br />
현재 설치된 댓글 플러그인 버전은 5.1 입니다.</p>

<p>그럼 답변 부탁드립니다.<br />
감사합니다.</p>]]></description>
		<copyright>Copyright 2026, 코스모스팜</copyright>
				<item>
			<title><![CDATA[알려주신 대로 코드 적용하니 정상적으로 이메일이 잘 들어옵니다.
감사합니다^^]]></title>
			<link>https://www.cosmosfarm.com/threads/document/56940</link>
			<description><![CDATA[<p>알려주신 대로 코드 적용하니 정상적으로 이메일이 잘 들어옵니다.<br />
감사합니다^^</p>]]></description>
			<author>MasterK</author>
			<pubDate>Thu, 16 Dec 2021 07:31:02 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[올려주신 코드 중 $content-&amp;gt;option-&amp;gt;email 부분은

$document-&amp;gt;option-&amp;gt;e...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/56938</link>
			<description><![CDATA[<p>올려주신 코드 중 $content-&gt;option-&gt;email 부분은</p>

<p>$document-&gt;option-&gt;email로 교체하시고</p>

<p> </p>

<p>$content-&gt;member_display 부분은</p>

<p>$document-&gt;member_display로 교체해보시겠어요?</p>

<p>고맙습니다.</p>]]></description>
			<author>스레드봇</author>
			<pubDate>Thu, 16 Dec 2021 07:09:41 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[최종 코드는 아래와 같이 적용할 예정인데, 새로 알려주신 코드로 했을 경우 게시물 작성자의 이메일 인...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/56937</link>
			<description><![CDATA[<p>최종 코드는 아래와 같이 적용할 예정인데, 새로 알려주신 코드로 했을 경우 게시물 작성자의 이메일 인식이 안되는지<br />
메일 발송이 안되고, 예시대로 '$mail-&gt;to ='에 이메일을 직접 넣었을 경우에는 메일은 발송이 되는데 'member_display'가<br />
인식이 안되어 이메일 제목이 '[]님, 문의에 대한 답변입니다.' 이렇게 표시됩니다.<br />
<br />
$mail-&gt;to = $content-&gt;option-&gt;email;<br />
$content-&gt;member_display</p>

<p> </p>

<pre>
<code>//  코멘트 이메일 발송
add_action('kboard_comments_execute_pre_redirect', 'kboard_comments_execute_pre_redirect_20211216', 10, 4);
function kboard_comments_execute_pre_redirect_20211216($next_page_url, $comment, $content, $board){
	if($board-&gt;id == '1'){ // 실제 게시판 id로 적용해주세요.
		$document = new KBContent();
		$document-&gt;initWithUID($comment-&gt;content_uid);
		
		$mail_attachments = array();
		if(isset($comment-&gt;attach-&gt;image1)){
			array_push($mail_attachments, KBOARD_WORDPRESS_ROOT.$comment-&gt;attach-&gt;image1[0]);
		}
		if(isset($comment-&gt;attach-&gt;file1)){
			array_push($mail_attachments, KBOARD_WORDPRESS_ROOT.$comment-&gt;attach-&gt;file1[0]);
		}
		
		$mail = kboard_mail();
		$mail-&gt;to = $content-&gt;option-&gt;email;
		$mail-&gt;title = "[$content-&gt;member_display]님, 문의에 대한 답변입니다.";
		$mail-&gt;content = $comment-&gt;content;
		$mail-&gt;attachments = $mail_attachments;
		$mail-&gt;send();
	}
	return $next_page_url;
}

//  코멘트 에디터 적용
add_action('kboard_skin_header', 'kboard_skin_header_20200818', 10, 1);
function kboard_skin_header_20200818($builder){
	$board = $builder-&gt;board;

	if($board-&gt;id == '1'){ // 실제 게시판 id로 적용해주세요.
		if(!defined('KBOARD_COMMENTS_WP_EDITOR')){
			define('KBOARD_COMMENTS_WP_EDITOR', '1');
		}
	}
}</code></pre>

<p> </p>]]></description>
			<author>MasterK</author>
			<pubDate>Thu, 16 Dec 2021 05:14:40 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[대시보드에서 '첨부파일의 종류를 제한합니다.' 부분에서 jpg, png, gif을 제외하셨기 때문에

jpg 파일...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/56936</link>
			<description><![CDATA[<p>대시보드에서 '첨부파일의 종류를 제한합니다.' 부분에서 jpg, png, gif을 제외하셨기 때문에</p>

<p>jpg 파일 업로드 시 정상적으로 업로드되지 않는 듯합니다.</p>

<p>입력 필드에 업로드되는 파일 형식의 확장자를 입력해보시겠어요?</p>

<p> </p>

<p>그리고 이전 댓글에 안내해드린 코드를 여러 게시판에 적용하시려면</p>

<p>$board-&gt;id == '1' 부분은 in_array($board-&gt;id, array('1', '2')) 이런 식으로 적용해보세요.</p>

<p>고맙습니다.</p>]]></description>
			<author>스레드봇</author>
			<pubDate>Thu, 16 Dec 2021 04:52:57 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[2개 이상의 게시판에 적용시킬 경우 아래와 같이 넣으면 될까요?
 


add_action('kboard_comments_exec...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/56935</link>
			<description><![CDATA[<p>2개 이상의 게시판에 적용시킬 경우 아래와 같이 넣으면 될까요?<br />
 </p>

<pre>
<code>add_action('kboard_comments_execute_pre_redirect', 'kboard_comments_execute_pre_redirect_20211216', 10, 4);
function kboard_comments_execute_pre_redirect_20211216($next_page_url, $comment, $content, $board){
	if($board-&gt;id == '1'){ // 실제 게시판 id로 적용해주세요.
		$document = new KBContent();
		$document-&gt;initWithUID($comment-&gt;content_uid);
		
		$mail_attachments = array();
		if(isset($comment-&gt;attach-&gt;image1)){
			array_push($mail_attachments, KBOARD_WORDPRESS_ROOT.$comment-&gt;attach-&gt;image1[0]);
		}
		if(isset($comment-&gt;attach-&gt;file1)){
			array_push($mail_attachments, KBOARD_WORDPRESS_ROOT.$comment-&gt;attach-&gt;file1[0]);
		}
		
		$mail = kboard_mail();
		$mail-&gt;to = $content-&gt;option-&gt;email;
		$mail-&gt;title = "[$content-&gt;member_display]님, 문의에 대한 답변입니다.";
		$mail-&gt;content = $comment-&gt;content;
		$mail-&gt;attachments = $mail_attachments;
		$mail-&gt;send();
	}
		else if($board-&gt;id == '2'){ // 실제 게시판 id로 적용해주세요.
		$document = new KBContent();
		$document-&gt;initWithUID($comment-&gt;content_uid);
		
		$mail_attachments = array();
		if(isset($comment-&gt;attach-&gt;image1)){
			array_push($mail_attachments, KBOARD_WORDPRESS_ROOT.$comment-&gt;attach-&gt;image1[0]);
		}
		if(isset($comment-&gt;attach-&gt;file1)){
			array_push($mail_attachments, KBOARD_WORDPRESS_ROOT.$comment-&gt;attach-&gt;file1[0]);
		}
		
		$mail = kboard_mail();
		$mail-&gt;to = $content-&gt;option-&gt;email;
		$mail-&gt;title = "[$content-&gt;member_display]님, 문의에 대한 답변입니다.";
		$mail-&gt;content = $comment-&gt;content;
		$mail-&gt;attachments = $mail_attachments;
		$mail-&gt;send();
	}
	
	return $next_page_url;
}</code></pre>

<p> </p>]]></description>
			<author>MasterK</author>
			<pubDate>Thu, 16 Dec 2021 03:14:29 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[안녕하세요.
본문에 문의드린 6.1버전에서 KBoard 미디어 추가로 업로드 시 'sample-img.jpg 파일은 업...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/56934</link>
			<description><![CDATA[<p>안녕하세요.<br />
본문에 문의드린 6.1버전에서 KBoard 미디어 추가로 업로드 시 'sample-img.jpg 파일은 업로드 가능한 파일 형식이 아닙니다.'<br />
이 에러는 어떻게 해결해야 할까요?<br />
<br />
그리고 답변주신대로 해당 코드를 적용하니 이메일에 첨부파일이 잘 들어갑니다.<br />
그런데 기존에 사용하던 대로<br />
$mail-&gt;to = $content-&gt;option-&gt;email; 이렇게 넣으니 이메일 발송이 안됩니다.</p>]]></description>
			<author>MasterK</author>
			<pubDate>Thu, 16 Dec 2021 03:00:50 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[안녕하세요~^^

KBoard 댓글에 사진이나 첨부파일 업로드 시

메일에도 사진과 첨부파일을 전송하시려면...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/56931</link>
			<description><![CDATA[<p>안녕하세요~^^</p>

<p>KBoard 댓글에 사진이나 첨부파일 업로드 시</p>

<p>메일에도 사진과 첨부파일을 전송하시려면</p>

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

<pre>
<code class="language-php">add_action('kboard_comments_execute_pre_redirect', 'kboard_comments_execute_pre_redirect_20211216', 10, 4);
function kboard_comments_execute_pre_redirect_20211216($next_page_url, $comment, $content, $board){
	if($board-&gt;id == '1'){ // 실제 게시판 id로 적용해주세요.
		$document = new KBContent();
		$document-&gt;initWithUID($comment-&gt;content_uid);
		
		$mail_attachments = array();
		if(isset($comment-&gt;attach-&gt;image1)){
			array_push($mail_attachments, KBOARD_WORDPRESS_ROOT.$comment-&gt;attach-&gt;image1[0]);
		}
		if(isset($comment-&gt;attach-&gt;file1)){
			array_push($mail_attachments, KBOARD_WORDPRESS_ROOT.$comment-&gt;attach-&gt;file1[0]);
		}
		
		$mail = kboard_mail();
		$mail-&gt;to = '메일주소';
		$mail-&gt;title = "[$document-&gt;member_display]님, 문의에 대한 답변입니다.";
		$mail-&gt;content = $comment-&gt;content;
		$mail-&gt;attachments = $mail_attachments;
		$mail-&gt;send();
	}
	
	return $next_page_url;
}</code></pre>

<p>위의 코드에서 $board-&gt;id == '1' 부분은 실제 게시판 id로 적용해주세요.</p>

<p>고맙습니다.</p>]]></description>
			<author>스레드봇</author>
			<pubDate>Thu, 16 Dec 2021 01:24:47 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[추가로 질문드립니다.
게시판 플러그인 6.0, 댓글 5.0 버전인 테스트 웹사이트에서 테스트 해보니 본문...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/56914</link>
			<description><![CDATA[<p>추가로 질문드립니다.<br />
게시판 플러그인 6.0, 댓글 5.0 버전인 테스트 웹사이트에서 테스트 해보니 본문에 문의드린 업로드 에러가 발생하지 않았습니다.<br />
<br />
현재 컨택트폼 관리자 페이지에서 댓글 작성시 작성자에게 이메일이 발송되도록 테마의 function.php 파일에 아래의 코드가 들어가 있는데<br />
이메일에서 첨부한 사진과 파일은 보이지 않고 텍스트만 수신됩니다.</p>

<pre>
<code>if($board-&gt;isAdmin()){
		if($content-&gt;option-&gt;email){
			$mail = kboard_mail();
			$mail-&gt;to = $content-&gt;option-&gt;email;
			if($board-&gt;id == '3'){
				$mail-&gt;title = "[$content-&gt;member_display]님, 문의에 대한 답변입니다.";
				$mail-&gt;content = $comment-&gt;content;
				$mail-&gt;send();
			}
		}
	}
}</code></pre>

<p>이메일 발송시 이미지와 첨부파일도 함께 보낼 수 있는 방법이 있을까요?<br />
<br />
 </p>]]></description>
			<author>MasterK</author>
			<pubDate>Wed, 15 Dec 2021 08:19:55 +0000</pubDate>
			<category>KBoard</category>
		</item>
			</channel>
</rss>