<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
	<channel>
				<title><![CDATA[컨텐츠몰 스킨에서 본인이 올린 자료는 구매하지 않도록 할 수 있을까요]]></title>
		<link>https://www.cosmosfarm.com/threads/rss/document/48091</link>
		<description><![CDATA[<p>컨텐츠몰 스킨에서 본인이 올린 자료도 구매하기 버튼이 생성이 되는데</p>

<p>구매하지 않고도 첨부된 파일을 다운로드 가능하게 할 수 있을까요?</p>

<p>본인인 경우에 첨부파일 다운로드 버튼이 노출되도록 했는데...</p>

<p>아마도 구매해야만 order_item_id 가 생성되기 때문에 다운로드 권한이 없다고 나오는 것 같습니다.</p>

<pre>
<code class="language-php">													&lt;div class="kboard-list-info-row info-download"&gt;
															&lt;?php foreach($content-&gt;attach as $key=&gt;$attach):?&gt;
															&lt;button type="button" class="kboard-first-contents-mall-button-action" onclick="window.open('&lt;?php echo $url-&gt;getDownloadURLWithAttachAndOderItemID($content-&gt;uid, $key, kboard_first_contents_mall_is_buy_item_id())?&gt;')" title="&lt;?php echo sprintf(__('Download %s', 'kboard'), $attach[1])?&gt;"&gt;&lt;i class="fas fa-download"&gt;&lt;/i&gt; &lt;?php echo $attach[1]?&gt;&lt;/button&gt;
															&lt;?php endforeach?&gt;
													&lt;/div&gt;</code></pre>

<p> </p>

<p>다른 방법이 없을까요?</p>]]></description>
		<copyright>Copyright 2026, 코스모스팜</copyright>
				<item>
			<title><![CDATA[잘 해결됐습니다! 감사합니다~]]></title>
			<link>https://www.cosmosfarm.com/threads/document/48123</link>
			<description><![CDATA[<p>잘 해결됐습니다! 감사합니다~</p>]]></description>
			<author>지니라이프</author>
			<pubDate>Mon, 23 Nov 2020 07:12:11 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[안녕하세요~^^

KBoard 퍼스트 콘텐츠몰 스킨 제품 상세 페이지에서

본인이 올린 상품이라면 구매하기 ...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/48119</link>
			<description><![CDATA[<p>안녕하세요~^^</p>

<p>KBoard 퍼스트 콘텐츠몰 스킨 제품 상세 페이지에서</p>

<p>본인이 올린 상품이라면 구매하기 버튼 대신 첨부파일이 표시되게 하시려면</p>

<p>수정하신 코드는 이전의 상태도 되돌려보세요.</p>

<p> </p>

<p>kboard_first_contents_mall_is_downloadable 필터를 활용해서</p>

<p>현재 사용자가 게시글 작성자인지 체크해서 첨부파일이 표시되게 하실 수 있습니다.</p>

<p>아래의 코드를 활용해보시겠어요?</p>

<pre>
<code class="language-php">add_filter('kboard_first_contents_mall_is_downloadable', 'kboard_first_contents_mall_is_downloadable_20201123', 10, 2);
function kboard_first_contents_mall_is_downloadable_20201123($is_downloadable, $item){
	$content_uid = kboard_uid();
	$content = new KBContent();
	$content-&gt;initWithUID($content_uid);
	
	if($content-&gt;member_uid == get_current_user_id()){
		$is_downloadable = true;
	}
	
	return $is_downloadable;
}</code></pre>

<p>테마의 functions.php 파일에 코드를 추가하거나 <a href="https://ko.wordpress.org/plugins/code-snippets/" target="_blank">Code Snippets</a> 플러그인을 사용해서 코드를 추가할 수 있습니다.</p>

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