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

· 16년 전 · 1700 · 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("/\&#039;/", "", $name);
$name = preg_replace("/\'/", "", $name);
$name = preg_replace("/\"/", "&#034;", $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("/\&#039;/", "", $name);
$name = preg_replace("/\'/", "", $name);
$name = preg_replace("/\"/", "&#034;", $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,369
16년 전 조회 954
16년 전 조회 1,513
16년 전 조회 1,404
16년 전 조회 1,038
16년 전 조회 3,882
16년 전 조회 2,336
16년 전 조회 1,454
16년 전 조회 1,700
16년 전 조회 1,701
16년 전 조회 2,662
16년 전 조회 1,521
16년 전 조회 1,147
16년 전 조회 963
16년 전 조회 4,679
16년 전 조회 1,437
16년 전 조회 1,510
16년 전 조회 1,057
16년 전 조회 963
16년 전 조회 1,534
🐛 버그신고