그누4 모바일에서 갤러리 게시판 질문인데요.

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!
그누4 모바일에서 갤러리 게시판 질문인데요.

QA

그누4 모바일에서 갤러리 게시판 질문인데요.

답변 2

본문

그누4는 모바일이 없어서 위즈모바일로 작업중인데요.

갤러리 게시판에서 한줄에 보이는 이미지의 갯수를 게시판관리자에서 4개가 지정되어 있는데요.

모바일에서는 별도로 갯수를 지정할수가 없는지요?

 

아니면 코딩팁이 있을까요?

주요부분 소스만 올려봅니다.

 

 

 

<table width="100%" cellpadding="0" cellspacing="0">
<tr align="center">
<!-- 내용 시작-->
<?
for ($i=0; $i<count($list); $i++)
{
    $e_text = array("(",")"); //괄호 표시
    $list[$i][comment_cnt] = str_replace($e_text, "", $list[$i][comment_cnt]); //괄호 표시 변환으로 삭제

    // 이미지가 있으면 썸을 생성, 아니면 pass~!
    if ($list[$i][file][0][file])
    {
    $file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
    $img = "<div class='img curved' style='background:url(". thumbnail($file,$img_width,$img_height,false,1,100) .") center no-repeat'></div>";

    }
    else
    {
    $img = "<div style='width:{$img_width}px;'><table border=0 cellspacing=0 cellpadding=0><tr><td align=center valign=middle class=noimg>NO IMAGE</td></tr></table></div>";
    }

    if ($i && $i%$mod==0)
    echo "<td colspan='{$mod}' height='1' bgcolor='#fff';\"></td></tr><tr>";

    echo "<td valign=top style='word-break:break-all; padding-top:20px;border:0px solid #ddd'>";
    /*echo "<table width={$img_width}px border='0' cellspacing='0' cellpadding='0'>";*/
    echo "<table width=100% border='0' cellspacing='0' cellpadding='0'>";
    echo "<tr><td align=center>";
    echo "<a href=\"{$list[$i][href]}\">$img</a>";
    echo "</td></tr>";
    echo "<tr><td align=center style='padding-top:10px; padding-bottom:20px;'>";
    
    if ($is_checkbox) {
        echo "<input type=checkbox name=chk_wr_id[] value='".$list[$i][wr_id]."'> ";
    }
    
    echo "<a href='".$list[$i][href]."' class=subject>".$list[$i][subject]."</a>";
    echo "</table></td>";

}
// 나머지 td
$cnt = $i%$mod;
if ($cnt)
    for ($i=$cnt; $i<$mod; $i++)
        echo "<td width='{$td_width}%' style='border:1px solid #fff'></td>";
echo "</tr>";

if (count($list) == 0) { echo "<tr><td colspan='$mod' height=100 align=center ></td></tr>"; }

?>
<tr><td colspan="<?=$mod?>" height="20"></td></tr>
<!-- 내용 끝-->
</table>

이 질문에 댓글 쓰기 :

답변 2

이게 모바일용 소스 코드인가요?

for문 위쪽에 모바일에서 맞게 $mod =2; 이렇게 넣으면 되겠네요

pc 모바일 공통으로 사용하는 스킨이라면

if(모바일 판별조건)  $mod =2;

 

관리자 설정에서 설정 가능하지 않나요

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