테스트 사이트 - 개발 중인 베타 버전입니다

베스트이미지스킨제작에 도움좀 부탁드립니다. 채택완료

좌맥 8년 전 조회 2,256
베스트스킨이&amp;nbsp; 텍스트로만 출력이 되서 이미지형으로 만들자 하는데 썸네일 이미지가 출력이 안되네요.<br />
<br />
베스트스킨은 아래주소의 스킨을 기본으로 해서 이미지(갤러리형)최신글스킨 에서&amp;nbsp; 썸네일 코드를 추가 했습니다.<br />
<a href="https://sir.kr/g5_skin/6948?sca=%EC%B5%9C%EC%8B%A0%EA%B8%80&amp;sfl=wr_subject%7C%7Cwr_content&amp;stx=%EB%B2%A0%EC%8A%A4%ED%8A%B8" target="_blank" rel="noopener noreferrer">https://sir.kr/g5_skin/6948?sca=%EC%B5%9C%EC%8B%A0%EA%B8%80&amp;sfl=wr_subject%7C%7Cwr_content&amp;stx=%EB%B2%A0%EC%8A%A4%ED%8A%B8</a><br />
<br />
latest.skin.php파일은 아래와 같이 수정했습니다.<br />
<br />
include_once(G5_LIB_PATH.&#039;/thumbnail.lib.php&#039;);<br />
// 스넵이미지 생성함수<br />
<br />
$w = 110;&amp;nbsp; //썸네일 가로 크기 700<br />
$h = 110; //썸네일 세로 크기<br />
?&gt;<br />
&lt;style type=&quot;text/css&quot;&gt;<br />
.subject {width:212px;padding:2px 0 0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block}<br />
.subject img {vertical-align:bottom;}<br />
&lt;/style&gt;<br />
&lt;table width=&quot;212&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;padding:2px 0 0;&quot;&gt;<br />
&lt;? for ($i=0; $i&lt;count($list); $i++) { ?&gt;<br />
&lt;tr&gt;<br />
&amp;nbsp; &amp;nbsp; &lt;td colspan=&quot;4&quot;&gt;<br />
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;table width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;<br />
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;tr&gt;<br />
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;td height=&quot;22&quot; valign=&quot;bottom&quot; class=&quot;subject&quot;&gt;&lt;img src=&quot;../skin/latest/best10/img/btn&lt;?=$titles?&gt;_&lt;?=$i+1?&gt;.gif&quot; align=&quot;top&quot;&gt;<br />
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;?<br />
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo $list[$i][&#039;icon_reply&#039;] . &quot; &quot;;<br />
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &quot;&lt;a href=&#039;{$list[$i][&#039;href&#039;]}&#039; target=_parent&gt;&quot;;<br />
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ($list[$i][&#039;is_notice&#039;])<br />
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo $list[$i][&#039;subject&#039;];<br />
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else<br />
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo $list[$i][&#039;subject&#039;];<br />
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &quot;&lt;/a&gt;&quot;;<br />
<br />
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //if ($list[$i][&#039;comment_cnt&#039;]) //<br />
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //echo &quot; &lt;a href=\&quot;{$list[$i][&#039;comment_href&#039;]}\&quot;&gt;&lt;span style=&#039;font-family:돋움; font-size:8pt; &#039;&gt;{$list[$i][&#039;comment_cnt&#039;]}&lt;/span&gt;&lt;/a&gt;&quot;;//<br />
<br />
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // if ($list[$i][&#039;link&#039;][&#039;count&#039;]) { echo &quot;[{$list[$i][&#039;link&#039;][&#039;count&#039;]}]&quot;; }<br />
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // if ($list[$i][&#039;file&#039;][&#039;count&#039;]) { echo &quot;&lt;{$list[$i][&#039;file&#039;][&#039;count&#039;]}&gt;&quot;; }<br />
<br />
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ?&gt;&lt;/td&gt;<br />
&lt;td&gt;<br />
&lt;?php<br />
$n_thumb = get_list_thumbnail($bo_table, $list[$i][&#039;wr_id&#039;], $w, $h); //게시판1개인경우사용<br />
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //$n_thumb = get_list_thumbnail($list[$i][&#039;bo_table&#039;], $list[$i][&#039;wr_id&#039;], $w, $h); //그룹용으로사용<br />
// 스넵이미지 생성하고 뷰어 시킨다.<br />
$n_noimg = &quot;$latest_skin_url/img/noimg.gif&quot;;<br />
// 이미지가 없을경우의 이미지 위치<br />
if($n_thumb[&#039;src&#039;]) {<br />
$img_content = &#039;&lt;img src=&quot;&#039;.$n_thumb[&#039;src&#039;].&#039;&quot; width=&quot;&#039;.$w.&#039;&quot; height=&quot;&#039;.$h.&#039;&quot; alt=&quot;&#039;.$list[$i][&#039;subject&#039;].&#039;&quot; title=&quot;&quot; class=&quot;file-img&quot;/&gt;&#039;;<br />
} else {<br />
$img_content = &#039;&lt;img src=&quot;&#039;.$n_noimg.&#039;&quot; width=&quot;&#039;.$w.&#039;&quot; height=&quot;&#039;.$h.&#039;&quot; alt=&quot;이미지없음&quot; title=&quot;&quot; class=&quot;file-img&quot;/&gt;&#039;;<br />
}<br />
echo $img_content;<br />
?&gt;<br />
<br />
<br />
&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; <br />
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/table&gt;<br />
&lt;/td&gt;<br />
&lt;/tr&gt;<br />
<br />
&lt;? } ?&gt;<br />
<br />
&lt;? if (count($list) == 0) { ?&gt;&lt;tr&gt;&lt;td colspan=4 align=center height=50&gt;게시물이 없습니다.&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;? } ?&gt;<br />
&lt;/table&gt;<br />
<br />
-----<br />
<br />
그리고 출력코드는 <br />
<br />
&lt;?php echo izen_group(&quot;theme/best11&quot;, &quot;&quot;, &quot;&#039;B11&#039;&quot;, wr_hit,&amp;nbsp; 10, 20,300);?&gt;<br />
<br />
로 일단 한개의 게시판 베스트로 했습니다.<br />
<br />
<br />
썸네일이 나와야 하는 위치에 썸네일이 안나오고 noimg만 출력이 됩니다.<br />
<br />
어떻게 해야 썸네일이 정상적으로 출력이 될지 조언좀 부탁드립니다.<br />
댓글을 작성하려면 로그인이 필요합니다.

답변 2개

채택된 답변
+20 포인트

$n_thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $w, $h); //게시판1개인경우사용

여기에 보면 $bo_table이라는 변수가 있는데 이거 echo로 찍어 보면 값 나오나요?

그리고

print_r($n_thumb);

이렇게 했을 때 값이 정상적으로 나오는지도 확인해 보셔야 하겠네요. 

로그인 후 평가할 수 있습니다

답변에 대한 댓글 4개

좌맥
8년 전
답변감사합니다,
아무것도 나오지 않네요.
왕계란
8년 전
$bo_table에 값이 없어서 그렇겠네요.
위에 보니 for문 안에서 돌아가네요.
그러면 그냥 기존 코드 그대로 쓰면 되지 않나요?
$bo_table 대신에 $list[$i]['bo_table']
왕계란
8년 전
저 부분은 $bo_table로 이미지를 갖고 오려는 테이블명을 직접 적으시거나 아니면 해당 함수 호출하는 부분에서 추가를 하시거나 해야 하겠네요.
좌맥
8년 전
함수호출하는건 제가 못해서 그냥게시판 1개지정으로 했습니다.
감사합니다.

댓글을 작성하려면 로그인이 필요합니다.

8년 전
$list[$i][&#039;bo_table&#039;] 도 해봤는데 안되더군요.
로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인