[영카트5] 상품 상세 설명에 이미지맵 걸기, 적용하기 > php

본문 바로가기
사이트 내 전체검색

php

[영카트5] 상품 상세 설명에 이미지맵 걸기, 적용하기

페이지 정보

작성자 서방님 댓글 0건 조회 133회 작성일 15-10-16 14:29

본문

HTML 필터 image map 허용하기



/lib/common.lib.php (569 Line)


$config->set('Attr.AllowedFrameTargets', array('_blank'));


구문 아래쪽에


    $config->set('Attr.AllowedFrameTargets', array('_blank'));


$def = $config->getHTMLDefinition(true);

// Add usemap attribute to img tag

$def->addAttribute('img', 'usemap', 'CDATA');

// Add map tag

$map = $def->addElement(

'map', // name

'Block', // content set

'Flow', // allowed children

'Common', // attribute collection

array( // attributes

'name' => 'CDATA',

'id' => 'ID',

'title' => 'CDATA',

)

);

$map->excludes = array('map' => true);

// Add area tag

$area = $def->addElement(

'area', // name

'Block', // content set

'Empty', // don't allow children

'Common', // attribute collection

array( // attributes

'name' => 'CDATA',

'id' => 'ID',

'alt' => 'Text',

'coords' => 'CDATA',

'accesskey' => 'Character',

'nohref' => new HTMLPurifier_AttrDef_Enum(array('nohref')),

'href' => 'URI',

'shape' => new HTMLPurifier_AttrDef_Enum(array('rect', 'circle', 'poly', 'default')),

'tabindex' => 'Number',

'target' => new HTMLPurifier_AttrDef_Enum(array('_blank', '_self', '_target', '_top'))

)

);

$area->excludes = array('area' => true);


    $purifier = new HTMLPurifier($config);

    return $purifier->purify($html);     

댓글목록

등록된 댓글이 없습니다.

Total 612건 18 페이지
게시물 검색

회원로그인

접속자집계

오늘
148
어제
163
최대
1,347
전체
154,682
Latest Crypto Fear & Greed Index

그누보드5
Copyright © 서방님.kr All rights reserved.