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

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

아미나에 비회원일 때 로그인 등 특정 페이지로 강제이동시키기 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 는 유튜브 동영상과 로고를 넣어 봤습니다.

 

[code]

<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>

<!-- 로그인 시작 { -->

[/code]

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

[code]

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();

});

[/code]

 

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

[code]

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

[/code]

 

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

mobile/skin/member/basic

 

[code]

<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>

[/code]

 

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

 

반복이 안되네요. 

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

 

댓글 작성

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

로그인하기

댓글 6개

@arari Loop이 되면 좋을 것 같고. 로고가 정확하게 한번에 가운데 안오는 단점이 있습니다.
감사합니다.
비회원 로그인페이지 강제이동

좋은 팁 감사합니다~!!

게시판 목록

그누보드5 팁자료실

글쓰기
🐛 버그신고