유튜브 영상 게시판 및 최신글 스킨 제작 시에 

영상 링크 입력 및 해당 영상의 썸네일을 노출시켜야 할때 필요한 정보이다.

 

영상은 ID 값만 입력시키도록 하였고 

해당 ID로 영상 재생 및 썸네일까지 긁어올 수 있다. 

 

ID만 으로 썸네일 긁어올 수 있고, 해상도도 정해서 가져올 수 있다.

 

 

http://img.youtube.com/vi/동영상ID/이미지형식.jpg

http://i.ytimg.com/vi/동영상ID/이미지형식.jpg

이미지형식이 해상도를 정할 수 있다.

- 고품질 (480 x 360) : hqdefault.jpg

- 중간품질 (320 x 180) : mqdefault.jpg

- 보통품질 (120 x 90) : default.jpg

동영상 배경이미지 (480 x 360) : 0.jpg

 

 

 

https://jasontody.tistory.com/227

 

[그누보드] 테이블을 엑셀로 다운받기

Table2excel 을 사용해 게시판 리스트를 엑셀로 다운로드 출력가능하다 1. 다운로드 버튼을 구현하고, 클릭 시 함수를 걸어준다. 2. 테이블 id를 설정 번호 제목 이름 날짜 1 제목입니다 작성자 2019.10.

jasontody.tistory.com

 

는 xlx 만 가능했는데 xlxs가 필요해서 작업함.

 

1. 버튼 추가

<button type="button" class="btn" value="excel 다운" onclick="ReportToExcelConverter()">

 

2. 관련함수 추가

<script src="../tableExport.min.js"></script>
<script src="../libs/FileSaver/FileSaver.min.js"></script>
<script src="../libs/js-xlsx/xlsx.core.min.js"></script>
<script src="../libs/html2canvas/html2canvas.min.js"></script>

관련함수 다운로드 : https://www.npmjs.com/package/tableexport.jquery.plugin

tableExport.jquery.plugin-master.zip
8.80MB

아래 파일은 필요한것만 받은 파일.

Libs Custom.zip
8.60MB&nbsp;/ 8.60MB

3. 자바스크립트 함수 추가

  function ReportToExcelConverter() { 
    $('#table2excel').tableExport(
        {
            type:'excel', 
            mso: {
                fileFormat:'xlsx',
                worksheetName : 'List'
            }

        }
    );
  };

 

 

------

2023.03.31. 

기존 그누보드 버전이 

1.12.4 가 head.sub 파일과 tail.sub 에 각각 추가되어 있었다.

 

개발자모드 콘솔에 tableExport is not a function 오류가 계속 뜨길래

jquery 버전문제로 판단되어 해결해보았다. 

 

tail.sub script 코드에는 주석처리를 해주고, 

엑셀다운버튼이 있는 list.skin.php 파일에 하단부분에

아래 코드를 추가해주었더니 해결되었다.

 

<?php
add_javascript('<script src="https://code.jquery.com/jquery-3.6.4.js" integrity="sha256-a9jBBRygX1Bh5lt8GZjXDzyOB+bWve9EiO7tROUtj/E=" crossorigin="anonymous"></script>', 0);
?>

순서는 아래와 같다.

 

<script src="<?php echo G5_THEME_URL ?>/skin/board/register_musitec/libs/FileSaver/FileSaver.min.js"></script>
<script src="<?php echo G5_THEME_URL ?>/skin/board/register_musitec/libs/js-xlsx/xlsx.core.min.js"></script>
<script src="<?php echo G5_THEME_URL ?>/skin/board/register_musitec/libs/html2canvas/html2canvas.min.js"></script>
<script src="<?php echo G5_THEME_URL ?>/skin/board/register_musitec/tableExport.min.js"></script>




<?php

add_javascript('<script src="https://code.jquery.com/jquery-3.6.4.js" integrity="sha256-a9jBBRygX1Bh5lt8GZjXDzyOB+bWve9EiO7tROUtj/E=" crossorigin="anonymous"></script>', 0);


?>

<script>
	  function ReportToExcelConverter() { 
    $('#table2excel').tableExport(
        {
            type:'excel', 
            mso: {
                fileFormat:'xlsx',
                worksheetName : 'List'
            }

        }
    );
  };
</script>

http://kor.pe.kr/util/4/encode/

 

HTML 소스 변환기

 

kor.pe.kr

 

 

메인화면에서, 최신글 스킨으로 첨부파일을 출력하도록 했으나 '잘못된 접근' 이라는 오류가 발생..

 

세션체크와 같이 들어가는 부분이라, 세션체크도 해줘야함.

 

메인에서 불러오는 최신글 스킨 for문 안에 코드 추가했더니 해결.

 

$ss_name = "ss_view_{$bo_table}_{$list[ $i]['wr_id']}";

if (!get_session($ss_name)); set_session($ss_name, TRUE);

 

 

1. #instagram-feed 영역 추가

          <div id="instagram-feed"></div>

 

2. 스크립트 임포트 / 스크립트 추가

<script src="js/jquery.instagramFeed.min.js"></script>
    <script >
    (function($){
        $(window).on('load', function(){
            $.instagramFeed({
                'tag': '해시태그',
                'container': "#instagram-feed",
                'display_profile': false,
                'display_gallery': true,
                'items': 10,
                'items_per_row': 5,
                'margin': 0,
                'callback': null,
                'styling': true
            });
        });
    })(jQuery);
</script>

3. 반응형 소스 추가

<style>
  @media (max-width: 375px){
  .instagram_gallery a, .instagram_gallery a img{ width: calc(50% - 0px) !important; }
  }
  @media (min-width: 375px){
    .instagram_gallery a, .instagram_gallery a img{ width: calc(33.3333% - 0px) !important; }
    #insta-box{min-height:810px;}

  }
  @media ( min-width: 768px){
    .instagram_gallery a, .instagram_gallery a img{ width: calc(33.3333% - 0px) !important; }

  }
  @media (min-width: 768px){
    .instagram_gallery a, .instagram_gallery a img{ width: calc(25% - 0px) !important; }
    #insta-box{min-height:620px;}
  }
  @media (min-width: 992px) {
    .instagram_gallery a, .instagram_gallery a img{ width: calc(20% - 0px) !important; }
    #insta-box{min-height:560px;}
  }
</style>

 

 

scontent-ssn1-1.cdninstagram.com/v/t51.2885-15/sh0.08/e35/s640x640/107457615_309015266907659_5616632477996359043_n.jpg?_nc_ht=scontent-ssn1-1.cdninstagram.com&_nc_cat=111&_nc_ohc=lv5XcFez34MAX9JJyfj&oh=f21a6e16cfb8892934386fa114f9ff7f&oe=5F38E659

 

$nano /etc/ssh/sshd_config

주석처리된 PermitRootLogin Yes를 주석처리 해제 및 No로 변경

PermitRootLogin no

해당 단락(?) 밑에 AllowUser 추가 하고 접근 허락할 아이디를 써줌

#MaxAuthTries 6
#MaxSessions 10
AllowUsers admin user2 user3 user ..

저장 후 재시작

service sshd restart

 

500 OOPS vsftpd: refusing to run with writable root inside chroot()

에러, 530에러 등등 각종 에러가 뜨길래... 

chroot_list 방법도  해봤다가 안되길래, pasv 모드를 설정해줬더니 바로됨.

 

# yum install vsftpd
# nano /etc/vsftpd/vsftpd.conf
.
.
anonymous_enable=NO  (YES → NO 변경)
.
.
100 chroot_local_user=YES  (# 주석 제거 / 또는 추가)
.
.
pasv_enable=YES   (추가)

pasv_min_port=50001   (추가)
pasv_max_port=50005   (추가)

allow_writeable_chroot=YES  (추가)

 

<?php

/* root/about.php */
include_once('./common.php');

/* root/theme/basic/dir/about.php */
include_once('../../../common.php');


/* root/sub/about.php 의 경우 ../common.php로 */

$g5['title'] = "새로운 페이지";
include_once(G5_PATH.'/head.php');

?>

<!-- 새로운 페이지 내용 작성 부분 -->

<!-- 새로운 페이지 내용 작성 부분 -->


<?php

include_once(G5_PATH.'/tail.php');

?>

 

.line-clamp
{
	display            : block;
	display            : -webkit-box;
	-webkit-box-orient : vertical;
	position           : relative;
 
	line-height        : 1.2;
	overflow           : hidden;
	text-overflow      : ellipsis;
	padding            : 0 !important;
}
.line-clamp:after
{
	content    : '...';
	text-align : right;
	bottom     : 0;
	right      : 0;
	width      : 25%;
	display    : block;
	position   : absolute;
	height     : calc(1em * 1.2);
	background : linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1) 75%);
}
@supports (-webkit-line-clamp: 1)
{
	.line-clamp:after
	{
		display : none !important;
	}
}
 
.line-clamp-5
{
	-webkit-line-clamp : 2;
	height             : calc(1em * 1.2 * 2);
}
.line-clamp{
	line-height        : 1.2;
}

이 부분 적당히 조절해가면서 사용

+ Recent posts