리스트에서 배경처리 > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

리스트에서 배경처리 정보

리스트에서 배경처리

본문

이미지를 하나를 올리면 고놈의 이미지가 리스트에서 배경으로 깔리게 하고 싶은데
잘 안되네요...
으이구 머리야..
먼저번에 만지다가 처박아 뒀는데 오늘 눈에띄는 바람에 여쭤봅니다^^
위에 스킨입니다.
저 스킨은 최신글로 처리했지만 아예 배경으로 깔려고 합니다.
쓸데도 없는데 왜 만지는건지....이구
  • 복사

댓글 전체

리스트 스킨 상단에 해당 게시판에 대한 쿼리문으로 끌으셔야 하지 않을까요?......

최종글이라던지 아니면 랜덤으로 몇개중에서 가져와서 넣으시면 될듯 합니다만.....

오늘은 과제가 넘 많아서 숙제를 못해 드려요....죄송합니다........
헉!

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}%'>&nbsp;</td>";
?>
</tr>


이 소스인데...
일단 마지막 작성된글의 첨부 이미지1을 임시로 막노가다로 깔아 보았는데 이 형식이 맞는지요?

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>"; <<-- 에다가 백그라운드로 처리를 하면 안되나유?....

해당 게시판을 쓰지 않으니 원....ㅠ.ㅠ
명함 디자인 주문시

방법1. 미리 정해진 이미지를 선택해서 배경으로 깔게 한다.
방법2. 사용자 업을 배경으로 사용한다.
(이는 물론 목록이 아닌 보기 화면에 적용해야 겠지요)

에디터 스킨에서 내용은 편집해서 올리시오 하세요....하하하~~**

명함아이님 무서버서 댓글 놀이도 이젠 못하겄습니다....ㅠ.ㅠ
미리 정해진 이미지를 선택해서 배경으로 깐다...그담에 글쓰기를 하면 에디터스킨에 배경으로 들어가야 거기에서 편집해서 올리지 않을까요??
이전에 공개된 '첨부이미지 미리보기' 기능을 적용해서,
배경으로 적용할 이미지와 이후 작업할 내용(이미지 또는 텍스트)을
실시간(?!)으로 감상하면서 등록하는 기능도 가능할 것 같군요.(생각만...~*)
이미지를 한종류(png/gif/jpg)로 해서 배경으로 깔고 영문이나 숫자의 경우는 미리보기 기능으로 해보았으나
한글처리 부분에서 실력부족으로 손들었었습니다.....
좀 더 내공을 수련해서 도전해 보려 합니다....
© SIRSOFT
현재 페이지 제일 처음으로