비회원 무조건 로그인페이지로 보내기 > 그누보드5 팁자료실

그누보드5 팁자료실

비회원 무조건 로그인페이지로 보내기 정보

비회원 무조건 로그인페이지로 보내기

본문

아미나에 비회원일 때 로그인 등 특정 페이지로 강제이동시키기 http://amina.co.kr/bbs/board.php?bo_table=skin_amina&wr_id=262

 

가 있어서..

 

접속했을 때,  너무 로그인 페이지만 나와서..  login 스킨에 

 

유튜브나 로고를 첨가하는 것을 역시 짜집기로 만들어 봤습니다.

 

위에서 다운로드 코드인 extend/login.extend.php 에서 레벨과 페이지 컨트롤이 가능합니다.

 

theme/basic/skin/member/basic/login.skin.php 는 유튜브 동영상과 로고를 넣어 봤습니다.

 


<div class="tv" style="position: fixed; z-index: -99; width: 100%; height: 100%">
  <div class="screen mute" id="tv"></div>
</div>
 
<div id="logo" style="position:fixed;margin:0 auto 0;top:23%;left:48%;transform:translate(-23%,-48%)">
  <a href="<?php echo G5_URL ?>"><img src="<?php echo G5_IMG_URL ?>/logo.png" alt="<?php echo $config['cf_title']; ?>"></a>
</div>
<!-- 로그인 시작 { -->

그리고 아래쪽 </script> 위에


var tag = document.createElement('script');
    tag.src = 'https://www.youtube.com/player_api';
var firstScriptTag = document.getElementsByTagName('script')[0];
    firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
var tv,
    playerDefaults = {autoplay: 0, autohide: 1, modestbranding: 0, rel: 0, showinfo: 0, controls: 0, disablekb: 1, enablejsapi: 0, iv_load_policy: 3};
var vid = [
      {'videoId': '2b5QNj-BVhs', 'startSeconds': 515, 'endSeconds': 690, 'suggestedQuality': 'hd720'},
      {'videoId': '9ge5PzHSS0Y', 'startSeconds': 465, 'endSeconds': 657, 'suggestedQuality': 'hd720'},
      {'videoId': 'OWsCt7B-KWs', 'startSeconds': 0, 'endSeconds': 240, 'suggestedQuality': 'hd720'},
      {'videoId': 'qMR-mPlyduE', 'startSeconds': 19, 'endSeconds': 241, 'suggestedQuality': 'hd720'}
    ],
    randomVid = Math.floor(Math.random() * vid.length),
    currVid = randomVid;
 
$('.hi em:last-of-type').html(vid.length);
 
function onYouTubePlayerAPIReady(){
  tv = new YT.Player('tv', {events: {'onReady': onPlayerReady, 'onStateChange': onPlayerStateChange}, playerVars: playerDefaults});
}
 
function onPlayerReady(){
  tv.loadVideoById(vid[currVid]);
  tv.mute();
}
 
function onPlayerStateChange(e) {
  if (e.data === 1){
    $('#tv').addClass('active');
    $('.hi em:nth-of-type(2)').html(currVid + 1);
  } else if (e.data === 2){
    $('#tv').removeClass('active');
    if(currVid === vid.length - 1){
      currVid = 0;
    } else {
      currVid++;  
    }
    tv.loadVideoById(vid[currVid]);
    tv.seekTo(vid[currVid].startSeconds);
  }
}
 
function vidRescale(){
 
  var w = $(window).width()+200,
    h = $(window).height()+200;
 
  if (w/h > 16/9){
    tv.setSize(w, w/16*9);
    $('.tv .screen').css({'left': '0px'});
  } else {
    tv.setSize(h/9*16, h);
    $('.tv .screen').css({'left': -($('.tv .screen').outerWidth()-w)/2});
  }
}
 
$(window).on('load resize', function(){
  vidRescale();
});
 
$('.hi span:first-of-type').on('click', function(){
  $('#tv').toggleClass('mute');
  $('.hi em:first-of-type').toggleClass('hidden');
  if($('#tv').hasClass('mute')){
    tv.mute();
  } else {
    tv.unMute();
  }
});
 
$('.hi span:last-of-type').on('click', function(){
  $('.hi em:nth-of-type(2)').html('~');
  tv.pauseVideo();
});

 

mbskin이 가운데로 가게 아래와 같이 변경해 주세요


<div id="mb_login" class="mbskin" style="position:fixed;margin:0 auto 0;top:50%;left:50%;transform:translate(-50%,-50%)">

 

모바일은 동영상이 보담되어서 그냥 로고만 넣어 봤습니다.

mobile/skin/member/basic

 


<div id="mb_login" class="mbskin">
  <div id="logo">
    <a href="<?php echo G5_URL ?>"><img src="<?php echo G5_IMG_URL ?>/logo.png" alt="<?php echo $config['cf_title']; ?>"></a>
  </div>

 

유튜브 동영상은 원하는 것으로 바꾸세요. (회사동영상등으로..)

 

반복이 안되네요. 

유튜브 동영상 여러개를 넣을 수 있습니다.

 

추천
10

댓글 6개

전체 2,411 |RSS
그누보드5 팁자료실 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT