테스트 사이트 - 개발 중인 베타 버전입니다

현재 접속자 페이지 URL 길이 채택완료

원스타 7년 전 조회 2,131

현재 접속자 페이지 URL 길이가 첨부사진과 같이

 

아래와 같이 접속중 페이지 URL 길이가 길면 틀에서 벗어나요.

 

어느 정도 길이 안에서만 표시하게 하려면 어떻게 해야 할까요? ㅠㅠ

 

http://openqueer.com/bbs/formmail.php?mb_id=openqueer&name=%EC%98%A4%ED%94%88%ED%80%B4%EC%96%B4&email=ptTHo6Lbx8jToaKnx6XSqcmYq4/Fo54=

 

http://openqueer.com/bbs/current_connect.php

 

댓글을 작성하려면 로그인이 필요합니다.

답변 2개

채택된 답변
+20 포인트
e
7년 전

cut_str($str, $len) 함수 활용하시면 됩니다.

예) cut_str($url, 50);

로그인 후 평가할 수 있습니다

답변에 대한 댓글 3개

원스타
7년 전
$list[$i]['name'] = get_sideview($row['mb_id'], cut_str($url['50'], $row['mb_nick'], $config['cf_cut_name']), $row['mb_email'], $row['mb_homepage']);

이렇게 바꿔주면 되는것인가요? ㅠㅠ
e
eyekiss
7년 전
현재 url 부분의 소스를 올려주시면 수정해드릴께요.
원스타
7년 전
<?php
include_once('./_common.php');

$g5['title'] = '현재접속자';
include_once('./_head.php');

$list = array();

$sql = " select a.mb_id, b.mb_nick, b.mb_name, b.mb_email, b.mb_homepage, b.mb_open, b.mb_point, a.lo_ip, a.lo_location, a.lo_url
from {$g5['login_table']} a left join {$g5['member_table']} b on (a.mb_id = b.mb_id)
where a.mb_id <> '{$config['cf_admin']}'
order by a.lo_datetime desc ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
$row['lo_url'] = get_text($row['lo_url']);
$list[$i] = $row;

if ($row['mb_id']) {
$list[$i]['name'] = get_sideview($row['mb_id'], cut_str($row['mb_nick'], $config['cf_cut_name']), $row['mb_email'], $row['mb_homepage']);
} else {
if ($is_admin)
$list[$i]['name'] = $row['lo_ip'];
else
$list[$i]['name'] = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", G5_IP_DISPLAY, $row['lo_ip']);
}

$list[$i]['num'] = sprintf('%03d',$i+1);
}

include_once($connect_skin_path.'/current_connect.skin.php');

include_once('./_tail.php');
?>

댓글을 작성하려면 로그인이 필요합니다.

text-overflow: ellipsis; 줘서 넘치는건 안나오도록 하세요.

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

원스타
7년 전
소스 파일 위치와 라인좀 부탁드립니다. ㅠㅠ text-overflow: ellipsis;

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인