rhymix/modules/page/page.smartphone.php
zero e48e2900e4 XE Smartphone 애드온에서 iui를 제거하고 자체 제작한 UI 로 변경
(아직 PC 브라우저에서 최적화 되었고 iphone, 옴니아등에서의 최적화는 다시 진행할 예정입니다)
cafeXE, planet, page모듈에서도 스마트폰에 어울리는 컨텐츠로 스마트폰 환경을 제공하도록 수정


git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6283 201d5d3c-b55e-5fd7-737f-ddc643e51545
2009-05-06 07:56:01 +00:00

28 lines
1,014 B
PHP

<?php
/**
* @class pageSmartphone
* @author zero (skklove@gmail.com)
* @brief page 모듈의 SmartPhone class
**/
class pageSPhone extends page {
function procSmartPhone(&$oSmartPhone)
{
if(!$this->grant->access) return $oSmartPhone->setContent(Context::getLang('msg_not_permitted'));
// 위젯을 1렬로 정렬
preg_match_all('!(<img)([^\>]*)(widget=)([^\>]*?)(\>)!is', $this->module_info->content, $matches);
$content = '';
for($i=0,$c=count($matches[0]);$i<$c;$i++) {
$content .= preg_replace('/ style\=\"([^\"]+)\" /i',' style="overflow:hidden;clear:both;margin:0 0 20px 0; _margin-right:10px;" ',$matches[0][$i])."\n\n";
}
Context::set('content', $content);
$oTemplate = new TemplateHandler();
$content = $oTemplate->compile($this->module_path.'tpl','smartphone');
$oSmartPhone->setContent($content);
}
}
?>