링크게시판에서 링크주소가 길때 리스트에서 ... 으로 바꾸는 방법이요.. > 그누4 질문답변

그누4 질문답변

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

링크게시판에서 링크주소가 길때 리스트에서 ... 으로 바꾸는 방법이요.. 정보

링크게시판에서 링크주소가 길때 리스트에서 ... 으로 바꾸는 방법이요..

본문

링크게시판에서 링크주소가 길때
리스트에서 어느정도 길이만 나오고 뒤에... 으로 바꾸는 방법이요..

잘 모르겠습니다 한수 알려주세요.

<!-- 목록 -->
<? for ($i=0; $i<count($list); $i++) { ?>
<tr height=28 align=center>
    <? if ($is_category) { ?><td><a href="<?=$list[$i][ca_name_href]?>"><font color=gray><span class=small><?=$list[$i][ca_name]?></span></font></a></td><? } ?>
    <? if ($is_checkbox) { ?><td><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"></td><? } ?>
    <td align=left class=eng01 nowrap>
        <?
        echo $nobr_begin;
        echo $list[$i][reply];
        echo $list[$i][icon_reply];
        echo "<a href='{$list[$i][href]}'>";
        echo "&nbsp;&nbsp;";
        if ($list[$i][is_notice])
            echo "<font color='#A4B5BD'><strong>{$list[$i][subject]}</strong></font>";
        else
        {
            echo "<strong>{$list[$i][subject]}</strong></span>";
        }
        echo "</a>";

        if ($list[$i][comment_cnt])
            {

              $co_wr_parent = $list[$i][wr_id];
              $co_wr_comment =substr($list[$i][comment_cnt],1,1);

              $intime = date("Y-m-d H:i:s", time() - (int)(60 * 60 * 24));
              $sqlcomm = "SELECT count(*) AS cnt FROM $write_table WHERE wr_is_comment = '1' and wr_parent = '$co_wr_parent' and wr_datetime >='$intime'";
          $row = sql_fetch($sqlcomm);

                  if ($row[cnt])
            echo " <a href=\"{$list[$i][comment_href]}\"><span style='font:normal 9px tahoma; color:#790000;'><b>{$list[$i][comment_cnt]}</b></font></span></a>";
                  else
            echo " <a href=\"{$list[$i][comment_href]}\"><span style='font:normal 9px tahoma; color:#998675;'>{$list[$i][comment_cnt]}</span></a>";
        }

        // if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
        // if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }

        //echo " " . $list[$i][icon_new];
        //echo " " . $list[$i][icon_file];
        //echo " " . $list[$i][icon_link];
        //echo " " . $list[$i][icon_hot];
        //echo " " . $list[$i][icon_secret];

        echo "</td><td align=right class=eng01><a href='{$list[$i][wr_link1]}' target='_blank'>";
        echo "{$list[$i][wr_link1]}";
                echo "&nbsp;&nbsp;";
        echo "</a>";
        echo $nobr_end;
        ?></td>
</tr>
<tr><td colspan=<?=$colspan?> height="1" class="line"></td></tr>
<?}?>

리스트 소스중에 발췌했는데...위와 같고요..
저기서 어떻게 수정해야 될까요?

뷰화면에 소스를 보니

<?
    }
}

// 링크
$cnt = 0;
for ($i=1; $i<=$g4[link_count]; $i++)
{
    if ($view[link][$i])
    {
        $cnt++;
        $link = cut_str($view[link][$i], 70);
?>

  <tr>
    <td height="27"><table width="666" height="25" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="93" align="center" background="<?=$board_skin_path?>/img/pt01.gif" class="gray01">관련링크<?=$i?></td>
          <td width="25">&nbsp;</td>       
          <td class="eng01"><? echo "<a href='{$view[link_href][$i]}' target=_blank><strong>{$link}</strong> ({$view[link_hit][$i]})</a>"; ?></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td height="1" class="line"></td>
  </tr>
       
<?
}
}
?>

이렇게 되어있는데요.. 응용도 안되고 ㅠㅠ 잘 모르겠습니다
도와주세요
  • 복사

댓글 전체

© SIRSOFT
현재 페이지 제일 처음으로