리스트에서 배경처리
이미지를 하나를 올리면 고놈의 이미지가 리스트에서 배경으로 깔리게 하고 싶은데
잘 안되네요...
으이구 머리야..
먼저번에 만지다가 처박아 뒀는데 오늘 눈에띄는 바람에 여쭤봅니다^^
위에 스킨입니다.
저 스킨은 최신글로 처리했지만 아예 배경으로 깔려고 합니다.
쓸데도 없는데 왜 만지는건지....이구
|
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기
댓글 23개
최종글이라던지 아니면 랜덤으로 몇개중에서 가져와서 넣으시면 될듯 합니다만.....
오늘은 과제가 넘 많아서 숙제를 못해 드려요....죄송합니다........
랜덤말구요^^
좋은선생을 만나야 숙제가 없는디...
수고하셔유^^
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=18217&page=2
위에 스킨은 최신글로 리스트 상단에 나오게 한것 같은데
저는 게시판스킨 자체에서 처리하면 어떨까 해서요..
이미지 파일을 올리면 고놈이 리스트에 잘 나옵니다.
하지만 작성된 글이 이미지위에 나와야 하니까 배경으로 처리를 해야 하거든요
<tr>
<?
for ($i=0; $i<count($list); $i++)
{
if ($i && $i%$mod==0)
echo "</tr><tr>";
$img = "<img src='$board_skin_path/img/noimage.gif' border=0 width='$board[bo_1]' title='이미지 없음'>";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
if (!file_exists($thumb))
{
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
break;
$rate = $board[bo_1] / $size[0];
$height = (int)($size[1] * $rate);
$dst = imagecreatetruecolor($board[bo_1], $height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_1], $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $board[bo_2]);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
$style = "";
if ($list[$i][icon_new])
$style = ""; // 읽지 않은 글?? style='font-weight:bold;' 추가
$subject = "<span $style>". $list[$i][subject] ."</span>";
$comment_cnt = "";
if ($list[$i][comment_cnt])
$comment_cnt = " <a href=\"{$list[$i][comment_href]}\"><span style='font-size:8pt;'>{$list[$i][comment_cnt]}</span></a>";
echo "<td width='{$td_width}%' valign=bottom style='word-break:break-all;'>";
echo "<table>";
echo "<tr><td height=20><b>{$list[$i][datetime]}</b> | <a href='{$list[$i][href]}'>$subject</a>{$comment_cnt}</td></tr>";
echo "<tr><td height=1 bgcolor=#EEEEEE></td></tr>";
echo "<tr><td height=3></td></tr>";
echo "<tr><td align=center width='560' height='165' style='width:560px;height:170px;border:1px solid #CCCCCC; padding:3px'><div style='width:560px; height:165px; position: relative; overflow:hidden;' align=center><a href='{$list[$i][href]}'>$img</a><a href='{$list[$i][href]}'>$subject</a>{$comment_cnt}</div></td></tr>";
//echo "<tr><td align=center width='150'><a href='{$list[$i][href]}'>$subject</a>{$comment_cnt}</td></tr>";
if ($is_category) echo "<tr><td align=center><a href='{$list[$i][ca_name_href]}'><font color=#cccccc>[{$list[$i][ca_name]}]</font></a></td></tr>";
if ($is_checkbox) echo "<tr><td align=center><input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'></td></tr>";
echo "<tr><td height=5></td></tr>";
echo "</table></td>\n";
}
// 나머지 td
$cnt = $i%$mod;
if ($cnt)
for ($i=$cnt; $i<$mod; $i++)
echo "<td width='{$td_width}%'> </td>";
?>
</tr>
이 소스인데...
http://www.triplecubic.com/tc001/bbs/board.php?bo_table=board
아니요^^
http://artpia.net/art/bbs/board.php?bo_table=cover
게시물 1번은 1번데로
게시물 2번은 2번데로 나와야 합니다
죄송하네요
당장 필요한게 아닙니다^^
echo "<td width='{$td_width}%' valign=bottom style='word-break:break-all;'>";
echo "<table>"; <<-- 에다가 백그라운드로 처리를 하면 안되나유?....
해당 게시판을 쓰지 않으니 원....ㅠ.ㅠ
data/file/$bo_table/$img
안나오더라구요
==>
echo "<table background=$thumb>"; 로 해 보시지유....
일단은 나오는데 테이블만 조정하면 될것 같으네요..
조금 허탈하네요 소스보니^^
echo "<table background=$thumb>";
허탈하시죠...소스가 원래 그래유......알고나면 별거 없삼....호호호~~**
혹 배경에 링크까지 하시려면
onclick을 써서 넣으세요...하하하~~**
감사
알겠습니다.
언젠가는~~ 대접해야죠^^
잘 사용하면 명함 도안등 원하는 항목에도 유용하게 쓰입니다.....^^
말씀 들어보니 그렇네요^^
윗말에 솔깃하여...저도 한번 봐야겠습니다..^^
감사합니다.
방법1. 미리 정해진 이미지를 선택해서 배경으로 깔게 한다.
방법2. 사용자 업을 배경으로 사용한다.
(이는 물론 목록이 아닌 보기 화면에 적용해야 겠지요)
에디터 스킨에서 내용은 편집해서 올리시오 하세요....하하하~~**
명함아이님 무서버서 댓글 놀이도 이젠 못하겄습니다....ㅠ.ㅠ
배경으로 적용할 이미지와 이후 작업할 내용(이미지 또는 텍스트)을
실시간(?!)으로 감상하면서 등록하는 기능도 가능할 것 같군요.(생각만...~*)
한글처리 부분에서 실력부족으로 손들었었습니다.....
좀 더 내공을 수련해서 도전해 보려 합니다....