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

Sideview 를 bootstrap 3.x 에 맞게 수정

common.lib.php 1195번째줄 수정하세요
bootstrap 사용자용입니다.

[code]

function get_sideview($mb_id, $name = '', $email = '', $homepage = '') {
global $config, $i;
global $g5;
global $bo_table, $sca, $is_admin, $member;

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

$name = get_text($name, 0, true);
$email = get_text($email);
$homepage = get_text($homepage);

$tmp_name = "";
if ($mb_id) {
//$tmp_name = "<a href=\"".G5_BBS_URL."/profile.php?mb_id=".$mb_id."\" class=\"sv_member\" title=\"$name 자기소개\" target=\"_blank\" onclick=\"return false;\">$name</a>";
$tmp_name = '<a href="' . G5_BBS_URL . '/profile.php?mb_id=' . $mb_id . '" class="sv_member" title="' . $name . ' 자기소개" target="_blank" onclick="return false;" data-target="#" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" id="mb_sideview' . $i . '">';

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

if (file_exists($icon_file)) {
$width = $config['cf_member_icon_width'];
$height = $config['cf_member_icon_height'];
$icon_file_url = G5_DATA_URL . '/member/' . $mb_dir . '/' . $mb_id . '.gif';
$tmp_name .= '<img src="' . $icon_file_url . '" width="' . $width . '" height="' . $height . '" alt="">';

if ($config['cf_use_member_icon'] == 2) { // 회원아이콘+이름
$tmp_name = $tmp_name . ' ' . $name;
}
} else {
$tmp_name = $tmp_name . " " . $name;
}
} else {
$tmp_name = $tmp_name . ' ' . $name;
}
$tmp_name .= '<span class="caret"></span></a>';

$title_mb_id = '[' . $mb_id . ']';
} else {
if (!$bo_table) {
return $name;
}

$tmp_name = '<a href="' . G5_BBS_URL . '/board.php?bo_table=' . $bo_table . '&amp;sca=' . $sca . '&amp;sfl=wr_name,1&amp;stx=' . $name . '" title="' . $name . ' 이름으로 검색" class="sv_guest" onclick="return false;" data-target="#" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" id="mb_sideview' . $i . '">' . $name .'<span class="caret"></span></a>';
$title_mb_id = '[비회원]';
}

$str = "<span class=\"sv_wrap\">\n";
$str .= '<div class="dropdown">';
$str .= $tmp_name . "\n";

$str2 = "<ul class=\"sv dropdown-menu\" aria-labelledby='mb_sideview" . $i . "'>\n";
if ($mb_id) {
$str2 .= "<li>";
$str2 .= "<a href=\"" . G5_BBS_URL . "/memo_form.php?me_recv_mb_id=" . $mb_id . "\" onclick=\"win_memo(this.href); return false;\">쪽지보내기</a>\n";
$str2 .= "</li>";
}
if ($email) {
$str2 .= "<li>";
$str2 .= "<a href=\"" . G5_BBS_URL . "/formmail.php?mb_id=" . $mb_id . "&amp;name=" . urlencode($name) . "&amp;email=" . $email . "\" onclick=\"win_email(this.href); return false;\">메일보내기</a>\n";
$str2 .= "</li>";
}
if ($homepage) {
$str2 .= "<li>";
$str2 .= "<a href=\"" . $homepage . "\" target=\"_blank\">홈페이지</a>\n";
$str2 .= "</li>";
}
if ($mb_id) {
$str2 .= "<li>";
$str2 .= "<a href=\"" . G5_BBS_URL . "/profile.php?mb_id=" . $mb_id . "\" onclick=\"win_profile(this.href); return false;\">자기소개</a>\n";
$str2 .= "</li>";
}
if ($bo_table) {
if ($mb_id) {
$str2 .= "<li>";
$str2 .= "<a href=\"" . G5_BBS_URL . "/board.php?bo_table=" . $bo_table . "&amp;sca=" . $sca . "&amp;sfl=mb_id,1&amp;stx=" . $mb_id . "\">아이디로 검색</a>\n";
$str2 .= "</li>";
} else {
$str2 .= "<li>";
$str2 .= "<a href=\"" . G5_BBS_URL . "/board.php?bo_table=" . $bo_table . "&amp;sca=" . $sca . "&amp;sfl=wr_name,1&amp;stx=" . $name . "\">이름으로 검색</a>\n";
$str2 .= "</li>";
}
}
if ($mb_id) {
$str2 .= "<li>";
$str2 .= "<a href=\"" . G5_BBS_URL . "/new.php?mb_id=" . $mb_id . "\">전체게시물</a>\n";
$str2 .= "</li>";
}
if ($g5['sms5_use_sideview']) {
$mb = get_member($mb_id, " mb_open, mb_sms , mb_hp ");
if ($mb['mb_open'] && $mb['mb_sms'] && $mb['mb_hp']) {
$str2 .= "<li>";
$str2 .= "<a href=\"" . G5_SMS5_URL . "/?mb_id=" . $mb_id . "\" class=\"win_sms5\" target=\"_blank\">문자보내기</a>\n";
$str2 .= "</li>";
}
}
if ($is_admin == "super" && $mb_id) {
$str2 .= "<li>";
$str2 .= "<a href=\"" . G5_ADMIN_URL . "/member_form.php?w=u&amp;mb_id=" . $mb_id . "\" target=\"_blank\">회원정보변경</a>\n";
$str2 .= "</li>";
$str2 .= "<li>";
$str2 .= "<a href=\"" . G5_ADMIN_URL . "/point_list.php?sfl=mb_id&amp;stx=" . $mb_id . "\" target=\"_blank\">포인트내역</a>\n";
$str2 .= "</li>";
}
$str2 .= "</span>\n";
$str .= $str2;
$str .= "\n<noscript class=\"sv_nojs\">" . $str2 . "</noscript>";
$str .= '</div>';
$str .= "</span>";

return $str;
}

[/code]

댓글 작성

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

로그인하기

댓글 1개

감사합니다.

게시글 목록

번호 제목
23254
23244
23241
23236
23200
23199
23179
23174
23138
23128
23125
23116
23109
23099
23092
23083
23079
23063
23050
23036
23029
23007
23003
22983
22959
22943
22939
22934
22905
22897