게시판에서 비회원아이콘출력방법

· 16년 전 · 1739 · 6
게시판이 비회원도 글쓰기를 할수있는게시판인데 비회원만 표시해줄수있는 아이콘을 출력하고싶은데  어케해야된늦지요
|

댓글 6개

/lib/common.lib.php 847

// 회원 레이어
function get_sideview


비회원에 대한 부분에 이미지 태그 넣으면 되겠네요.
// 회원 레이어
function get_sideview <--------------------- 이렇게넣었는데 에러나서요...
function get_sideview($mb_id, $name="", $email="", $homepage="")
{
global $config;
global $g4;

$email = base64_encode($email);
$homepage = set_http($homepage);

$name = preg_replace("/\'/", "", $name);
$name = preg_replace("/\'/", "", $name);
$name = preg_replace("/\"/", """, $name);
$title_name = $name;
그렇게 넣으시면 안 되고요.. [비회원] 이렇게 된 부분이 있습니다.

아래와같은 부분을 잘 살피어 이미지 태그를 넣어야죠~



if ($mb_id) { //<- 이 부분이 바로 회원

} else {
// 여기는 비회원 부분..

}
$title_mb_id = "[$mb_id]";
} else {
$tmp_name = "<span class='guest'>$name</span>";
$title_mb_id = "[비회원]";
function get_sideview = 이미지불러오는주소 요렇게요
}

return "<a href=\"javascript:;\" onClick=\"showSideView(this, '$mb_id', '$name', '$email', '$homepage');\" title=\"{$title_mb_id}{$title_name}\">$tmp_name</a>";
}
function get_sideview($mb_id, $name="", $email="", $homepage="")
{
global $config;
global $g4;

$email = base64_encode($email);
$homepage = set_http($homepage);

$name = preg_replace("/\'/", "", $name);
$name = preg_replace("/\'/", "", $name);
$name = preg_replace("/\"/", """, $name);
$title_name = $name;

if ($mb_id) {
$tmp_name = "<span class='member'>$name</span>";

if ($config['cf_use_member_icon']) {
$mb_dir = substr($mb_id,0,2);
$icon_file = "$g4[path]/data/member/$mb_dir/$mb_id.gif";

//if (file_exists($icon_file) && is_file($icon_file)) {
if (file_exists($icon_file)) {
//$size = getimagesize($icon_file);
//$width = $size[0];
//$height = $size[1];
$width = $config['cf_member_icon_width'];
$height = $config['cf_member_icon_height'];
$tmp_name = "<img src='$icon_file' width='$width' height='$height' align='absmiddle' border='0'>";

if ($config['cf_use_member_icon'] == 2) // 회원아이콘+이름
$tmp_name = $tmp_name . " <span class='member'>$name</span>";
}
}
$title_mb_id = "[$mb_id]";
} else {
$tmp_name = "<img src='비회원아이콘' width='22' height='22' align='absmiddle' border='0'> <span class='guest'>$name</span>";
$title_mb_id = "[비회원]";
}

return "<a href=\"javascript:;\" onClick=\"showSideView(this, '$mb_id', '$name', '$email', '$homepage');\" title=\"{$title_mb_id}{$title_name}\">$tmp_name</a>";
}
감사합니다..근데왜 이케뜨지...

Parse error: syntax error, unexpected '}' in /home/peopleen/public_html/lib/common.lib.php on line 889
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
16년 전 조회 2,407
16년 전 조회 991
16년 전 조회 1,547
16년 전 조회 1,431
16년 전 조회 1,067
16년 전 조회 3,930
16년 전 조회 2,367
16년 전 조회 1,487
16년 전 조회 1,722
16년 전 조회 1,740
16년 전 조회 2,698
16년 전 조회 1,555
16년 전 조회 1,177
16년 전 조회 990
16년 전 조회 4,708
16년 전 조회 1,465
16년 전 조회 1,540
16년 전 조회 1,090
16년 전 조회 999
16년 전 조회 1,564