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

내용관리에서 내용하고 모바일내용을 동시에.. 채택완료

비커즈 6년 전 조회 3,308

$co['co_content']

$co['co_mobile_content']

필드가 부족하여 2개 같이 PC화면에 보여주고 싶은데 같이 안나오네요..

해결방법 아시는분? 

두 필드에 내용 넣고 pc 내용 페이지 만들때 같이 쓰고 픈데 같이 안나오네요 ㅠㅠ

 

bbs/content.php 관련소스입니다.

$co_id = preg_replace('/[^a-z0-9_]/i', '', $co_id);

//dbconfig파일에 $g5['content_table'] 배열변수가 있는지 체크 if( !isset($g5['content_table']) ){     die('관리자 모드에서 게시판관리->내용 관리를 먼저 확인해 주세요.'); }

if (G5_IS_MOBILE) {     include_once(G5_MOBILE_PATH.'/content.php');     return; }

// 내용 $sql = " select * from {$g5['content_table']} where co_id = '$co_id' "; $co = sql_fetch($sql); if (!$co['co_id'])     alert('등록된 내용이 없습니다.');

$g5['title'] = $co['co_subject'];

if ($co['co_include_head'] && is_include_path_check($co['co_include_head']))     @include_once($co['co_include_head']); else     include_once('./_head.php');

$str = conv_content($co['co_content'], $co['co_html'], $co['co_tag_filter_use']); $mobile = conv_content($co['co_mobile_content'], $co['co_html'], $co['co_tag_filter_use']);

// $src 를 $dst 로 변환 unset($src); unset($dst); $src[] = "/{{쇼핑몰명}}|{{홈페이지제목}}/"; $dst[] = $config['cf_title']; $src[] = "/{{회사명}}|{{상호}}/"; $dst[] = $default['de_admin_company_name']; $src[] = "/{{대표자명}}/"; $dst[] = $default['de_admin_company_owner']; $src[] = "/{{사업자등록번호}}/"; $dst[] = $default['de_admin_company_saupja_no']; $src[] = "/{{대표전화번호}}/"; $dst[] = $default['de_admin_company_tel']; $src[] = "/{{팩스번호}}/"; $dst[] = $default['de_admin_company_fax']; $src[] = "/{{통신판매업신고번호}}/"; $dst[] = $default['de_admin_company_tongsin_no']; $src[] = "/{{사업장우편번호}}/"; $dst[] = $default['de_admin_company_zip']; $src[] = "/{{사업장주소}}/"; $dst[] = $default['de_admin_company_addr']; $src[] = "/{{운영자명}}|{{관리자명}}/"; $dst[] = $default['de_admin_name']; $src[] = "/{{운영자e-mail}}|{{관리자e-mail}}/i"; $dst[] = $default['de_admin_email']; $src[] = "/{{정보관리책임자명}}/"; $dst[] = $default['de_admin_info_name']; $src[] = "/{{정보관리책임자e-mail}}|{{정보책임자e-mail}}/i"; $dst[] = $default['de_admin_info_email'];

//$str = preg_replace($src, $dst, $str); //$mobile = preg_replace($src, $dst, $mobile);

// 스킨경로 if(trim($co['co_skin']) == '')     $co['co_skin'] = 'basic';

$content_skin_path = get_skin_path('content', $co['co_skin']); $content_skin_url  = get_skin_url('content', $co['co_skin']); $skin_file = $content_skin_path.'/content.skin.php';

if ($is_admin)     echo '

'; ?>

    $himg = G5_DATA_PATH.'/content/'.$co_id.'_h';     if (file_exists($himg)) // 상단 이미지         echo '

';

    $timg = G5_DATA_PATH.'/content/'.$co_id.'_t';     if (file_exists($timg)) // 하단 이미지         echo '

'; } else {     echo '

'.str_replace(G5_PATH.'/', '', $skin_file).'이 존재하지 않습니다.

'; }

if ($co['co_include_tail'] && is_include_path_check($co['co_include_tail']))     @include_once($co['co_include_tail']); else     include_once('./_tail.php'); ?>

 

$str = conv_content($co['co_content'], $co['co_html'], $co['co_tag_filter_use']); $mobile = conv_content($co['co_mobile_content'], $co['co_html'], $co['co_tag_filter_use']);

이렇게 하면 나올줄 알았더만 안나오네요 ㅠㅠ 왜 그럴가요?

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

답변 1개

채택된 답변
+20 포인트
6년 전

참고 : http://gnustudy.com/bbs/board.php?bo_table=skin_etc&wr_id=53

 

bbs/content.php 파일 수정

 

$str = conv_content($co['co_content'], $co['co_html'], $co['co_tag_filter_use']);

여기 밑에 추가 $str_mobile = conv_content($co['co_mobile_content'], $co['co_html'], $co['co_tag_filter_use']);

 

스킨에서 출력

skin/content/basic/content.skin.php

원하는 곳에 이렇게..

 

로그인 후 평가할 수 있습니다

답변에 대한 댓글 6개

비커즈
6년 전
저도 그렇게 해봤는데 안되서 여기에 글써본거에요 다시해봤는데 역시나 안되네요 ㅠㅠ
작은별
6년 전
저도 직접 해봤습니다. 잘 나옵니다.
테마용 스킨인지 아닌지 확인하셔서 다른 스킨을 수정하진 않았는지 체크하시고
혹시 반응형인가요? 반응형은 mobile/content.php 파일을 수정해야 합니다. 코드가 조금 차이가 있지만 방법은 같습니다.
비커즈
6년 전
음 베이직 그대로 수정해서 쓰고있어요.
mobile 폴더가 있긴합니다.
작은별
6년 전
똑같이 적용한 겁니다.
http://gnuskin.com/bbs/content.php?co_id=company
비커즈
6년 전
헐 그렇게 하는게 맞았네요
내용관리 설정에서 자세히 보니
베이직이 있고
(테마)베이직이 있었네요 전 같은건줄 알았는데..
전혀 틀린거였나봅니다...ㅠㅠ
하이튼 감사합니다.
강남멋장이
6년 전
감사합니다.^^ 이것때문에 해맸는데 해보니 되는 것 같네요.

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

답변을 작성하려면 로그인이 필요합니다.

로그인