웹마스터 팁
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
모바일 이미지 제거모드
2015.05.07 18:29
<block cond="$_COOKIE['img_remove'] == 'Y'"> {@ $strfront = strpos($content,'BeforeDocument'); $strbehind = strpos($content,'AfterDocument'); $content_find = substr($content,$strfront); $content_find = substr($content_find,0,strlen($content_find) - (strlen($content_find)-$strbehind)); $content_rep = preg_replace("/<img[^>]+\>/i", "", $content_find); $content = str_replace($content_find,$content_rep,$content); } </block>
<script>function setCookie(a,b,c){var expire=new Date();expire.setDate(expire.getDate()+c);cookies=a+'='+escape(b)+';path=/';if(typeof c!='undefined')cookies+=';expires='+expire.toGMTString()+';';document.cookie=cookies}</script>
모바일의 layout.html에 다음의 코드를 삽입합니다.
<li><button type="button" onclick="setCookie('img_remove','Y',60);top.location.reload()" cond="$_COOKIE['img_remove'] != 'Y'">절약모드 ON</button></li> <li><button type="button" onclick="setCookie('img_remove','N',60);top.location.reload()" cond="$_COOKIE['img_remove'] == 'Y'">절약모드 OFF</button></li>
이미지 제거모드를 켜고 끄기위한 버튼을 추가합니다.
댓글 0
제목 | 글쓴이 | 날짜 |
---|---|---|
정식버전 후 갤러리 스킨 사용시 이미지 정렬 안되시는 분들~ | 다케루 | 2008.02.29 |
홈페이지에 국경일이면 태극기 다는법이에요~ ^^ [11] [1] | jaehee_91 | 2008.03.01 |
게시판 확장 변수에 그림 입력받기 [7] | 대암지기 | 2008.03.04 |
게시판 확장변수에 라디오버튼 추가해서 사용하기 [6] | 똑디 | 2008.03.04 |
utf-8 저장시 레이아웃 윗부분 빈공간이 생기는 문제 (BOM)처리 [8] | 주금보 | 2008.03.04 |
회원 기본정보 공개여부 및 정보변경 옵션으로 처리하기(Member Moudle) [18] | 대암지기 | 2008.03.04 |
확장변수 쉽게 출력하기 [7] | lightnsalt | 2008.03.04 |
리스트를 작성날짜(regdate)로 정렬하기 [7] | JAMSUN2 | 2008.03.05 |
우분투에서 rewrite 모드 사용하기 [2] | 용꿍 | 2008.03.06 |
기초적인 배경등록시 게시판투명되는것 고치는법[초보만] [3] | 이정제421 | 2008.03.07 |
제로보드 XE에 연동 가능 채팅, 100% 플래시, 1:1 채팅 지원, 필요하면 음성/화상 채팅 지원 [2] | digirave | 2008.03.09 |
애드온에서 그룹 별로 실행여부 설정 [1] | imsoo.net | 2008.03.09 |
[수정 했습니다.]본문 입력없이 확장 변수로만 글작성 작성하기(그림삽입포함) [13] | 대암지기 | 2008.03.09 |
글작성및수정, 코멘트작성및 수정을 하면 미리 입력한 메일주소로 메일발송 [18] | 채연파파 | 2008.03.12 |
동창회 사이트용 프로필 이미지 두개 출력하기 [1] | 지연아빠 | 2008.03.12 |
zbXE에 퍼머링크 달기 [3] | 라르게덴 | 2008.03.13 |
관리 화면의 회원 목록에서 소속 그룹 출력하기 [6] | 띵야 | 2008.03.14 |
큰 파일의 썸네일이 안생기는 경우 해결방법(수정) [12] | 얼터 | 2008.03.15 |
팝업창 띄우기 [16] | 레망 | 2008.03.16 |
큰 파일의 썸네일이 안생길때 해결방법-추가 [7] | HIKARU | 2008.03.18 |