지금 설정을 회원가입을 해야지만 글쓰기가가능합니다
하지만 비회원일시는 글쓰기 부분이 보이지가 않는데 보이게 하는방법이 있을까요 ?
어드민에서 설정 2로 하고 비원일시 글쓰기 클릭시 로그인후 다시클릭시 글쓰기 되게끔 하고싶은데
방법좀 알려주시면 감사하겠습니다
답변 1개 / 댓글 7개
비회원이 글쓰기버튼 보이는 부분은
list.skin.php상단에 추가하세요
<?
$write_href = "./write.php?bo_table=$bo_table";
?>
list.skin.php에서 글쓰기버튼잇는 부분에
조건을 추가해주셔야할듯하네요
<?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>" class="btn_b02">글쓰기</a></li><?php } ?>
이부분에 조건 주시면됩니다
예로
if(!is_member){//로그인 회원이 아니면
$write_href = '이동할로그인페이지.php';
<?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>" class="btn_b02">글쓰기</a></li><?php } ?>
}
답변에 대한 댓글 7개
bbs/list.php에
$write_href = '';
if ($member['mb_level'] >= $board['bo_write_level']) {
$write_href = './write.php?bo_table='.$bo_table;
}
이부분을
$write_href = '';
if ($member['mb_level'] >= $board['bo_write_level']) {
$write_href = './write.php?bo_table='.$bo_table;
}else {
$write_href = "javascript:alert('회원가입후 이용하세요.');";
}
이렇게 수정
include_once('./_common.php');
$html_title = '링크 > '.conv_subject($write['wr_subject'], 255);
if (!($bo_table && $wr_id && $no))
alert_close('값이 제대로 넘어오지 않았습니다.');
// SQL Injection 예방
$row = sql_fetch(" select count(*) as cnt from {$g5['write_prefix']}{$bo_table} ", FALSE);
if (!$row['cnt'])
alert_close('존재하는 게시판이 아닙니다.');
if (!$write['wr_link'.$no])
alert_close('링크가 없습니다.');
$ss_name = 'ss_link_'.$bo_table.'_'.$wr_id.'_'.$no;
if (empty($_SESSION[$ss_name]))
{
$sql = " update {$g5['write_prefix']}{$bo_table} set wr_link{$no}_hit = wr_link{$no}_hit + 1 where wr_id = '{$wr_id}' ";
sql_query($sql);
set_session($ss_name, true);
}
goto_url(set_http($write['wr_link'.$no]));
?>
알려주신 폴더입니다 ㅠㅠ;
bbs폴더안에 list.php가 맞나요??..........
다른 빌더를 쓰시나보네요
<div style="float:right;" onclick="<?php if ($write_href) { echo "location.href='".$write_href."';"; }else{echo "medi.openPOP('login');";}?>">
<p class="circle1">+</p>
</div>
여기부분 때문이네요
<div style="float:right;" onclick="<? echo "location.href='".$write_href."';"; }?>">
<p class="circle1">+</p>
</div>
이렇게 수정하시면될듯하네요
그리고 list.php에 alert추가하신 부분에 loginPopup이 뜨게 넣어주심될듯
정말감사합니다
답변을 작성하려면 로그인이 필요합니다.
<div style="float:right;" onclick="<?php if ($write_href) { echo "location.href='".$write_href."';"; }else{echo "medi.openPOP('login');";}?>">
<p class="circle1">+</p>
</div>
<? } ?>
지금 소스가 이렇게 되어있습니다 어떻게 해야하나요 ?
모바일 부분입니다