로그인 버튼 누르면 모달로 나오는 스킨입니다. 정보
게시판 로그인 버튼 누르면 모달로 나오는 스킨입니다.관련링크
첨부파일
본문
헤더쪽에 로그인 버튼 누르면 모달로 로그인이 나옵니다.
그런데 우선 부트스트랩이 적용된 사이트에만 작동합니다.
모달을 부트스트랩을 이용한거라...
파일에 보시면 tail.php 안에
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body"></div>
</div>
</div>
</div>
<script>
jQuery(function($) {
$(document).on("click", "a", function(e){
var link_href = $(this).attr("href"),
pattern = /bbs\/login.php$/;
console.log(link_href);
if( link_href && pattern.test(link_href) ){ // true 이면 로그인링크를 클릭한것임
e.preventDefault();
$.ajax({
url:link_href
}).done(function(data){
$(".modal-body").html(data);
});
}
});
});
</script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
이게 첨부 된 것이며
head.php
66번째 줄에
<div class="d-inline p-2 float-right text-right" data-toggle="modal" data-target="#exampleModal"><a href="<?php echo G5_BBS_URL ?>/login.php"><b><i class="fa fa-sign-in" aria-hidden="true"></i> 로그인</b></a></div>
이 게 변형된 것입니다.
파일안받고 그냥 위에 코드 변경하는게 더 편하실수 있어요 ㅎ
감사합니다. ^^
9
댓글 전체
추천 누르고 갈게요~
그럼 좋은 오후 되세요 :)