대문에서 aside를 없애고 통으로 사용하기
예전에 이미 올렸던 내용입니다만,
그누보드 5.3 버전에서 소스 변경이 일부 있어서, 5.3 버전에 맞게 수정하여 게시합니다.
theme/basic/css/default.css
'default.css'파일의 'container' 부분 소스를 복사해서 그 아래에 넣고 수정합니다.
[code]#container {z-index:4;position:relative;float:left;min-height:500px;height:auto !important;margin:20px 0;height:500px;font-size:1.05em;width:875px;zoom:1} /* font-size Modify */
#container:after {display:block;visibility:hidden;clear:both;content:""}
#container_title {font-size:1.333em;margin:0 auto;font-weight:bold;}[/code]
[code]#container_wide {z-index:4;position:relative;float:left;min-height:500px;height:auto !important;margin:20px 0;height:500px;font-size:1.05em;width:875px;zoom:1} /* font-size Modify */
#container_wide:after {display:block;visibility:hidden;clear:both;content:""}
#container_wide_title {font-size:1.333em;margin:0 auto;font-weight:bold;}[/code]
'container'를 전부 'container_wide'로
'width:875px'를 'width:1200px'로 수정
내부 가로폭이 1200px이 되므로...
가로 최대폭 1200px의 이미지나 내용을 넣을 수 있습니다.
'theme/basic/head.php' 파일을 복사해서 'theme/basic/head_wide.php'로 이름을 바꾸고
[code]<div id="container">
<?php if (!defined("_INDEX_")) { ?><h2 id="container_title"><span title="<?php echo get_text($g5['title']); ?>"><?php echo get_head_title($g5['title']); ?></span></h2><?php } ?>[/code]을
[code]<div id="container_wide">
<?php if (!defined("_INDEX_")) { ?><h2 id="container_wide_title"><span title="<?php echo get_text($g5['title']); ?>"><?php echo get_head_title($g5['title']); ?></span></h2><?php } ?>[/code]로 수정
'theme/basic/tail.php' 파일을 복사해서 'theme/basic/tail_wide.php'로 이름을 바꾸고
[code]<div id="aside">
<?php
//공지사항
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
// 사용방법 : latest(스킨, 게시판아이디, 출력라인, 글자수);
// 테마의 스킨을 사용하려면 theme/basic 과 같이 지정
// echo latest('theme/notice', 'notice', 4, 13);
?>
<?php //echo outlogin('theme/basic'); // 외부 로그인, 테마의 스킨을 사용하려면 스킨을 theme/basic 과 같이 지정 ?>
<?php //echo poll('theme/basic'); // 설문조사, 테마의 스킨을 사용하려면 스킨을 theme/basic 과 같이 지정 ?>
<?php //echo visit('theme/basic'); // 접속자집계, 테마의 스킨을 사용하려면 스킨을 theme/basic 과 같이 지정 ?>
</div>[/code]하단의 '외부 로그인', '설문조사', '접속자집계'를 '//' 주석으로 숨깁니다.
'theme/basic/index.php' 파일을 열어서
[code]include_once(G5_THEME_PATH.'/head.php');[/code]와
[code]include_once(G5_THEME_PATH.'/tail.php');[/code]를
[code]include_once(G5_THEME_PATH.'/head_wide.php');[/code]와
[code]include_once(G5_THEME_PATH.'/tail_wide.php');[/code]로 수정합니다.
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기
댓글 6개
그럴때마다 한번씩 새로 깔기도 하고 ;;
저도 소스 지워서 사용하는데...위 소스와의 차이는 뭐에요? 정말 몰라서 물어보는거에요..어떤게 효율적인가 해서요...
그누보드 업데이트 할때 마다 어떤것이 수월한가요?
그 편이 더 나을 수도 있겠지요.
문제를 해결하는 다양한 방법들이 있으니
판단은 사용자가 하면 되겠지요.
다만, 업데이트 때 알아보기 쉽게 하려면
지우는 것보다 주석으로 감추는 편이 더 낫습니다.
그리고 위 내용은 대문에서만 aside를 없애고
그 외 그룹, 게시판, 페이지 등에서는 aside를 사용하기 위함입니다.
저야 만년 초보이지만 매번 백업하고 해야지 하다가도 귀찮아서 걍 그때그때 수정하다보니 나중되면 뭐가 뭔지 몰라 재설치 하고.. 뭐 그럽니다 ;;
적용해보진 않았는데... 위 작은별님 팁이 더 간단하겠네요.