배경이미지에 추가로 패턴이미지를 적용하고자 할때.. > 그누4 플러그인

그누4 플러그인

그누보드에는 여러가지 기능 추가가 쉽도록 제작 되었습니다.
플러그인의 저작권은 해당 플러그인 제작자님께 있으며, 그누보드의 저작권과 다를 수 있습니다.
플러그인 다운로드시 좋아요와 감사의 코멘트를 남기시면 제작자에게 큰 힘이됩니다. ^^y

배경이미지에 추가로 패턴이미지를 적용하고자 할때.. 정보

배경이미지에 추가로 패턴이미지를 적용하고자 할때..

본문

테스트블로그 주소: http://www.iallu.com/blog/admin
 
배경이미지의 세로픽셀이 작을때 바둑판모양으로 보이는게 보기 싫어
배경이미지와 패턴이미지를 분리적용하고자...
 
head.skin.php 상단의 배경관련 스타일
-------------------------------------------------
<style>
#head {  background:url(<?=$current['top_image']?>) no-repeat; }
#sidebar .list li { margin-left:5px; padding-left:7px; margin-bottom:2px;  background:url(<?=$blog_skin_url?>/img/l_icon.gif) 0px 6px no-repeat; }
<?
if( file_exists($current['background_image_path']) ) echo "body { background:url({$current['background_image']}); }";
?>
</style>
-------------------------------------------------
-------------------------------------------------
<style>
<?
if( file_exists($current['background_image_path']) ) {
echo "body {background: url($current['background_pattern']) repeat;background-color:;margin:0 0 0 0}";
echo ".oncebg {background: url({$current['background_image']}) no-repeat}";
echo ".body_width {width:1278}";
}
else {
echo "";
}
?>
#head {  background:url(<?=$current['top_image']?>) no-repeat; }
#sidebar .list li { margin-left:5px; padding-left:7px; margin-bottom:2px;  background:url(<?=$blog_skin_url?>/img/l_icon.gif) 0px 6px no-repeat; }
</style>
-------------------------------------------------
이런식으로 수정했습니다...
그리고 관련파일인거 같은...
 
그누보드/blog/adm_design.php
그누보드/blog/adm_design_update.php
 
도 $current['background_image'] 로직에 따라 $current['background_pattern']에 대응되는 로직을 추가했습니다...
 
테스트해보니 저장경로대로 data/blog/file/background_pattern에 파일은 올바르게 저장되고 삭제되는거 같은데...
 
 
head.skin.php에서
$current['background_pattern']하여 표시할려니 나타나질 않네요...
 
상기 세개의 파일들 외에 추가로 수정해줄 파일이 있는지 궁금합니다...
링크의 블로그는 현재 절대경로로 패턴이 적용된 상태입니다...
추천
0
  • 복사

댓글 전체

blog/index.php 하단에

// top_image
$current['top_image'] = "{$g4['url']}/data/blog/top_image/{$mb_id}";
$current['top_image_path'] = "{$g4_path}/data/blog/top_image/{$mb_id}";

// background_image
$current['background_image'] = "{$g4['url']}/data/blog/background_image/{$mb_id}";
$current['background_image_path'] = "{$g4_path}/data/blog/background_image/{$mb_id}";

// 프로필 이미지
$current['profile_image_path']  = "{$g4_path}/data/blog/profile_image/{$current['mb_id']}";
$current['profile_image_url']  = "{$g4['path']}/data/blog/profile_image/{$current['mb_id']}";
이 있습니다..

아마도 이부분에 적용을....참조만 하십시오...^^
재회형님 답변 감사드려요...
그 부분을 본기억이 있는데 꼼꼼하지 못해 주마간산으로 스쳐지났나 봅니다...

// background_pattern
$current['background_pattern'] = "{$g4['url']}/data/blog/background_pattern/{$mb_id}";
$current['background_pattern_path'] = " {$g4_path}/data/blog/background_pattern/{$mb_id} ";

근데 이렇게 추가시켜줘도 안나오는 군요...
다른 뭔가가 있나봅니다...

그냥스킨에서 직접

echo "body {background: url({$g4_path}/data/blog/background_pattern/{$mb_id}) repeat;}";


해서 넘겨버리니 제대로 나오긴하는데 큰거보고 손안 딲은거마냥 영 찜찜하고 그러네요...
© SIRSOFT
현재 페이지 제일 처음으로