<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
	<channel>
				<title><![CDATA[게시판 첨부 파일 관련 커스터마이징]]></title>
		<link>https://www.cosmosfarm.com/threads/rss/document/71241</link>
		<description><![CDATA[<p><strong><big><em>1. 정확한 제품 또는 플러그인 이름</em></big></strong></p>

<p>KBoard<br />
 </p>

<p><strong><big><em>2. 상세 내용</em></big></strong></p>

<p>KBoard에서 첨부파일 영역의 폰트 크기를 키우고, 사용자 경험을 개선하기 위해 커스터마이징을 시도했습니다.<br />
아래와 같은 코드를 CSS와 PHP로 적용했지만, 의도한 대로 작동하지 않고 있습니다. 도움을 요청드립니다.<br />
<br />
<strong>**1. KBoard 스킨 CSS에 추가**</strong><br />
.kboard-attachment a {<br />
    font-size: 16px !important; /* 폰트 크기 */<br />
    color: #333 !important; /* 텍스트 색상 */<br />
    font-weight: bold !important; /* 굵기 */<br />
    text-decoration: none; /* 밑줄 제거 */<br />
    margin-bottom: 10px; /* 하단 여백 추가 */<br />
    display: block; /* 블록 형태로 표시 */<br />
}</p>

<p><strong>**2. KBoard 스킨 list.php에 추가**</strong><br />
&lt;?php foreach($attachments as $attachment): ?&gt;<br />
    &lt;?php <br />
        $file_ext = pathinfo($attachment['file_name'], PATHINFO_EXTENSION);<br />
        $icon = '';<br />
        if(in_array($file_ext, ['pdf'])) $icon = '????'; // PDF 아이콘<br />
        elseif(in_array($file_ext, ['doc', 'docx'])) $icon = '????'; // Word 아이콘<br />
        elseif(in_array($file_ext, ['jpg', 'png', 'gif'])) $icon = '????️'; // 이미지 아이콘<br />
        else $icon = '????'; // 기본 파일 아이콘<br />
    ?&gt;<br />
    &lt;div class="kboard-attachment-item"&gt;<br />
        &lt;?php echo $icon; ?&gt; <br />
        &lt;a href="&lt;?php echo $attachment['file_url']; ?&gt;" target="_blank"&gt;&lt;?php echo $attachment['file_name']; ?&gt;&lt;/a&gt;<br />
    &lt;/div&gt;<br />
&lt;?php endforeach; ?&gt;<br />
<br />
<strong>**3. 사이트 전역에 첨부파일의 필터를 적용하기 위한 코드**</strong><br />
add_filter('kboard_attachments_display', function($attachments) {<br />
    foreach ($attachments as &amp;$attachment) {<br />
        $attachment['file_name'] = strtoupper($attachment['file_name']); // 파일 이름을 대문자로 변환<br />
    }<br />
    return $attachments;<br />
});<br />
<br />
문제점:<br />
<code>- </code>위 코드들을 각 위치에 삽입했으나 <strong>CSS가 적용되지 않거나 PHP 코드가 동작하지 않음</strong>.<br />
<code>- functions.php</code>에 PHP 코드를 삽입했을 때도 필터가 작동하지 않는 것으로 보임.<br />
<code>- style.css</code>에 추가한 CSS가 KBoard 첨부파일 영역에 반영되지 않음.<br />
<code>- </code>KBoard 스킨의 <code>view.php</code>를 수정했으나 첨부파일 출력에 변화가 없음.</p>

<p>필요한 도움:<br />
<code>- </code>위 코드 중 <strong>오류나 누락된 부분</strong>이 있는지 확인 부탁드립니다.<br />
<code>- </code>KBoard에서 첨부파일 영역의 폰트 크기와 스타일을 변경하고, 파일 형식별 아이콘을 적용하는 올바른 방법이 궁금합니다.<br />
<code>- </code>CSS가 제대로 적용되지 않는 문제의 원인과 해결 방법을 알고 싶습니다.<br />
 </p>

<p><strong><big><em>3. 확인 가능한 상세 페이지 주소</em></big></strong></p>

<p>eslim123.mycafe24.con</p>

<p> </p>

<p>4. 수정한 코드 내역 (있다면)</p>

<p> </p>

<p> </p>]]></description>
		<copyright>Copyright 2026, 코스모스팜</copyright>
				<item>
			<title><![CDATA[안녕하세요~^^

CSS코드는 style.css 직접 추가 하실 필요없이

관리자 페이지-&amp;gt;Kboard 대시보드...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/71244</link>
			<description><![CDATA[<p>안녕하세요~^^</p>

<p>CSS코드는 style.css 직접 추가 하실 필요없이</p>

<p>관리자 페이지-&gt;Kboard 대시보드-&gt; 커스텀 CSS 에 추가해보시겠어요?</p>

<p>남겨주신 다른 코드를 봤을때는 별다른 문제는 없어보이는데 </p>

<p>아래 링크를 참고해서 print_r을 사용해서 필터가 잘걸리는지 일단 확인 먼저 해보시겠어요?</p>

<p><a href="https://www.cosmosfarm.com/threads/document/26750" target="_blank">https://www.cosmosfarm.com/threads/document/26750</a></p>

<p> </p>

<p>그리고 정확한 원인을 파악하기 위해 디버그 모드를 활성화해서</p>

<p>어떤 오류 메시지가 표시되는지 확인해보셔야 할 듯합니다.</p>

<p>디버그 모드 활성화 방법은 아래의 링크를 참고해보세요.</p>

<p><a href="https://blog.naver.com/PostView.nhn?blogId=chan2rrj&amp;logNo=221223664194" target="_blank">워드프레스 에러 확인하기 - 디버그 모드 활성화 방법</a></p>

<p>확인 후 다시 답변 주시겠어요?</p>

<p>고맙습니다.</p>]]></description>
			<author>스레드봇</author>
			<pubDate>Tue, 10 Dec 2024 05:32:26 +0000</pubDate>
			<category>KBoard</category>
		</item>
			</channel>
</rss>