채택완료
영카트랑 그누보드중 영카트를 기본화면으로 사용하고싶은데...방법좀;;
theme.config 에서 커뮤니티 사용여부를 false 로 변경하면
영카트를 기본적으로 사용이 되긴하는데 이렇게되면 그누보드 사용이 안되는듯합니다.
둘다 동시에 사용하면서 영카트가 첫화면에 출력되게 할 수있을까요?
자료를 찾아보니 theme.config에서 false 로 하란 말밖에없어서;;;;
답변 4개
채택된 답변
+20 포인트
여러가지 방법중
코드단만 수정해서 동작되도록 하는 방법입니다.
e.g. ${WEB_ROOT} : public_html, www, html, ...
- create custom resource : ${WEB_ROOT}/community/index.php
Copy
user@server:~/www$ ls -al
adm
bbs
...
css
data
extend
...
user@server:~/www$ mkdir community
user@server:~/www$ touch community/index.php
user@server:~/www$ vi community/index.php
user@server:~/www$ cat community/index.php
<?php
$target_dir = dirname(__DIR__) . DIRECTORY_SEPARATOR;
chdir($target_dir);
require $target_dir . 'index.php';
?>
- modify core file : ${WEB_ROOT}/index.php
Copy
<?php
// ------------------------------------------ added
$uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
if ($uri == '/' || $uri == '/index.php') { // 서브 경로 존재시 그에 맞게 커스텀
//header('Location: /community'); // 서브 경로 존재시 그에 맞게 커스텀
header('Location: /shop'); // 서브 경로 존재시 그에 맞게 커스텀
exit();
}
// ------------------------------------------ added
include_once('./_common.php');
define('_INDEX_', true);
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
if(defined('G5_THEME_PATH')) {
...
- modify core files :
${WEB_ROOT}/shop/shop.head.php
${WEB_ROOT}/head.php
${WEB_ROOT}/theme/basic/shop/shop.head.php
${WEB_ROOT}/theme/basic/head.php
Copy
...
<ul id="hd_define">
<li class="active"><a href="<?php echo G5_URL ?>/community">커뮤니티</a></li>
<!-- 서브 경로 존재시 그에 맞게 커스텀 -->
...
답변을 작성하려면 로그인이 필요합니다.