링크하는 방법과 스타일 해주는 방법을 알고 싶습니다.

링크하는 방법과 스타일 해주는 방법을 알고 싶습니다.

QA

링크하는 방법과 스타일 해주는 방법을 알고 싶습니다.

답변 1

본문

아미나 베이직 테마 사용중입니다.

현재 아래 소스는 공지사항을 체크시 게시판 윗쪽에 썸네일이 표시되는 부분입니다.

여기 다른분의 소스 부분이고요. 이걸 가져가서 잘 붙여서 작동은 잘합니다. 단, 링크 처리를 못해서 

"링크가 없습니다" 메시지만 뜹니다. 공지체크를 해서 표현됬으면 그 썸네일을 클릭하면 해달 글로 넘어가야 되는데요. 안가는거죠. 아래 a href 부분을 수정 해야되는거 같은데요. 직설적으로 답변좀 부탁 드릴께요. 아직 많이 초보라서요. 

 

또하나는 썸네일에 박스를 처리해서 예쁘게 하고 싶은데요. 아래 그림처럼요. css 로 하면 될거 같은데... 소스안에 div와 style이 있는 부분을 어떻게 처리할지 몰라서요.

988307285_1580211295.8424.jpg

 초보가 열심히 공부중이오니 고수님들의 답변 기다려 봅니다. ^^;;


<?php
// 공지 처리
    $arr_notice = explode(',', trim($board['bo_notice'])); 
    $from_notice_idx = ($page - 1) * $page_rows;
    if($from_notice_idx < 0)
        $from_notice_idx = 0;
    $board_notice_count = count($arr_notice); 
    for ($k=0; $k<$board_notice_count; $k++) 
      
      {
        if (trim($arr_notice[$k]) == '') continue;
        $row = sql_fetch(" select * from {$write_table} where wr_id = '{$arr_notice[$k]}'");
        if (!$row['wr_id']) continue;
           $thumb = get_list_thumbnail($board['bo_table'], $row['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height']);
         if($thumb['src']) { $img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="208px" height="150px">'; }
           else { $img_content = '<div style="width:'.$board['bo_gallery_width'].'px;height:'.$board['bo_gallery_height'].'px; padding-top:10%;">'.$row['wr_subject'].'</div>'; } 
         echo "<div style='float:left;margin-bottom:10px;margin-left:10px;'><a href=". G5_BBS_URL."/link.php?bo_table=".$board['bo_table']."&wr_id=".$row['wr_id']."&no=1 target='".$row['wr_link2']."'>". $img_content." </a>   </div>";
        }
           echo "<div style='clear:both;margin-bottom:10px;'></div>";
//공지처리 끝
?>

 

이 질문에 댓글 쓰기 :

답변 1

1)

<a href=". G5_BBS_URL."/link.php?bo_table=".$board['bo_table']."&wr_id=".$row['wr_id']."&no=1 target='".$row['wr_link2']."'>". $img_content." </a>

->

<a href='". G5_BBS_URL."/board.php?bo_table=".$board['bo_table']."&wr_id=".$row['wr_id']."'>". $img_content." </a>

 

2)

<div style='float:left;margin-bottom:10px;margin-left:10px;'> 
->
<div style='float:left;margin-bottom:10px;margin-left:10px;border:1px solid #ccc;padding:5px'>

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 123,673
© SIRSOFT
현재 페이지 제일 처음으로