배너관리 여러군대 호출해 쓰기
현재 배너관리에서 출력 위치가 메인과 좌측 2군대라 배너관리 여러군대 호출해 사용시 문제가 발생할 수 있습니다.
출력위치로 호출하고 스킨을 지정해 출력갯수까지 지정하여 뿌려주는 방식으로 변경해 보았습니다.
현재 배너관리도 요로콤 변경되었으면 좋겠습니다 ㅠㅠ
---------------------------------------------------
/public_html/adm/shop_admin/bannerform.php
84번째줄부터
출력위치 select부분만
<input type="text" name="bn_position" size="80" value="<?php echo $bn['bn_position']; ?>" id="bn_position" class="frm_input">
으로 수정
---------------------------------------------------
/public_html/lib/shop.lib.php
1108번째줄 배너출력부분
// 배너출력
function display_banner($position='', $skin='', $rows='')
{
global $g5;
// if (!$position) $position = '왼쪽';
if (!$skin) $skin = 'boxbanner.skin.php';
$skin_path = G5_SHOP_SKIN_PATH.'/'.$skin;
if(file_exists($skin_path)) {
// 배너 출력
$sql = " select * from {$g5['g5_shop_banner_table']} where '".G5_TIME_YMDHIS."' between bn_begin_time and bn_end_time and bn_position = '$position' order by bn_order, bn_id desc limit 0, {$rows} ";
$result = sql_query($sql);
include $skin_path;
} else {
echo '<p>'.str_replace(G5_PATH.'/', '', $skin_path).'파일이 존재하지 않습니다.</p>';
}
}
으로 수정
------------------------------------------------
/public_html/skin/shop/basic/banner.10.skin.php 생성
(mainbanner.10.skin.php을 메인용같아서 이름변경)
-----------------------------------------------------
배너출력시
echo display_banner('메인좌측', 'banner.10.skin.php', '7'); // 출력위치, 출력스킨, 갯수
배너관리 출력위치에 메인좌측 입력
--------------------------------------------------------
배너스킨 추가시 banner.20.skin.php / banner.30.skin.php 으로 늘리고
호출시 echo display_banner('메인우측', 'banner.20.skin.php', '5'); / echo display_banner('서브하단', 'banner.30.skin.php', '10'); 처럼 하시면 됩니다.
출력위치로 호출하고 스킨을 지정해 출력갯수까지 지정하여 뿌려주는 방식으로 변경해 보았습니다.
현재 배너관리도 요로콤 변경되었으면 좋겠습니다 ㅠㅠ
---------------------------------------------------
/public_html/adm/shop_admin/bannerform.php
84번째줄부터
출력위치 select부분만
<input type="text" name="bn_position" size="80" value="<?php echo $bn['bn_position']; ?>" id="bn_position" class="frm_input">
으로 수정
---------------------------------------------------
/public_html/lib/shop.lib.php
1108번째줄 배너출력부분
// 배너출력
function display_banner($position='', $skin='', $rows='')
{
global $g5;
// if (!$position) $position = '왼쪽';
if (!$skin) $skin = 'boxbanner.skin.php';
$skin_path = G5_SHOP_SKIN_PATH.'/'.$skin;
if(file_exists($skin_path)) {
// 배너 출력
$sql = " select * from {$g5['g5_shop_banner_table']} where '".G5_TIME_YMDHIS."' between bn_begin_time and bn_end_time and bn_position = '$position' order by bn_order, bn_id desc limit 0, {$rows} ";
$result = sql_query($sql);
include $skin_path;
} else {
echo '<p>'.str_replace(G5_PATH.'/', '', $skin_path).'파일이 존재하지 않습니다.</p>';
}
}
으로 수정
------------------------------------------------
/public_html/skin/shop/basic/banner.10.skin.php 생성
(mainbanner.10.skin.php을 메인용같아서 이름변경)
-----------------------------------------------------
배너출력시
echo display_banner('메인좌측', 'banner.10.skin.php', '7'); // 출력위치, 출력스킨, 갯수
배너관리 출력위치에 메인좌측 입력
--------------------------------------------------------
배너스킨 추가시 banner.20.skin.php / banner.30.skin.php 으로 늘리고
호출시 echo display_banner('메인우측', 'banner.20.skin.php', '5'); / echo display_banner('서브하단', 'banner.30.skin.php', '10'); 처럼 하시면 됩니다.
댓글 3개
11년 전
배너 내용도 다르게 설정 할 수 있나요?
10년 전
좌측 가로 출력 어떤식으로 해야 하나요?
제주도in
2년 전
감사합니다.
게시글 목록
| 번호 | 제목 |
|---|---|
| 2400 | |
| 2394 | |
| 2363 | |
| 2362 | |
| 2351 | |
| 2350 | |
| 2348 | |
| 2347 | |
| 2336 | |
| 2326 | |
| 2324 | |
| 2323 | |
| 2318 | |
| 2306 | |
| 2305 | |
| 2299 | |
| 2295 | |
| 2293 | |
| 2283 | |
| 2279 | |
| 2266 | |
| 2254 | |
| 2248 | |
| 2232 | |
| 2231 | |
| 2204 | |
| 2184 | |
| 2183 | |
| 2181 | |
| 2179 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기