<?php // get current style's contents. $currentStyleContents = file_get_contents(getSkinPath($skinSetting['skin']) . "/{$currentStyleFile}"); if (count($styleFileList) > 0) { ?> <hr class="hidden" /> <form id="cssSectionForm" class="section" method="post" action="<?php echo $context->getProperty('uri.blog'); ?> /owner/skin/edit/skin/"> <ul> <?php $count = 0; foreach ($styleFileList as $styleFile) { $tempFile = str_replace(getSkinPath($skinSetting['skin']) . "/", '', $styleFile); if ($tempFile == $currentStyleFile) { ?> <li class="selected"><a href="<?php echo $context->getProperty('uri.blog'); ?> /owner/skin/edit/?style=<?php echo $tempFile; ?> " onclick="changeCSSFile(this, '<?php echo $tempFile; ?> '); return false;"><strong><img src="<?php echo $context->getProperty('uri.service') . $context->getProperty('panel.skin'); ?> /image/img_css_document_on.gif" alt="" /><?php
function setSkinSetting($blogid, $setting) { global $skinSetting; // Legacy global support. TODO: DELETE THIS LINE AFTER CHECK EVERY REFERENCES IN WHOLE SOURCE importlib('blogskin'); $blogid = getBlogId(); if (strncmp($context->getProperty('skin.skin'), 'customize/', 10) == 0) { if (strcmp($context->getProperty('skin.skin'), "customize/{$blogid}") != 0) { return false; } } else { $skinSetting['skin'] = Path::getBaseName($context->getProperty('skin.skin')); // Legacy global support. TODO: DELETE THIS LINE AFTER CHECK EVERY REFERENCES IN WHOLE SOURCE $context->setProperty('skin.skin', $skinSetting['skin']); if ($context->getProperty('skin.skin') === '.' || $context->getProperty('skin.skin') === '..') { return _t('실패 했습니다'); } } $skinpath = getSkinPath($context->getProperty('skin.skin')); if (!is_dir($skinpath)) { return _t('실패 했습니다'); } foreach ($setting as $key => $value) { Setting::setSkinSetting($key, $value, $blogid); } Setting::setSkinSetting('skin', $context->getProperty('skin.skin'), $blogid); Setting::setBlogSetting('useMicroformat', $setting['useMicroformat'], true); Setting::setBlogSetting('useAjaxComment', $setting['useAjaxComment'], true); Setting::setBlogSetting('useFOAF', $setting['useFOAF'] == 1 ? 1 : 0, true); Setting::setBlogSetting('entriesOnPage', $setting['entriesOnPage'], true); Setting::setBlogSetting('entriesOnList', $setting['entriesOnList'], true); CacheControl::flushCategory(); CacheControl::flushTag(); CacheControl::flushSkin(); Setting::getSkinSettings($blogid, true); // refresh skin cache return true; }
/image/noPreview.gif" width="150" height="150" alt="<?php echo _t('스킨 미리보기'); ?> " /> <?php } } ?> </div> <div class="information"> <?php if (file_exists(getSkinPath($skinSetting['skin']) . "/index.xml")) { ?> <div id="currentInfo"> <?php $xml = file_get_contents(getSkinPath($skinSetting['skin']) . "/index.xml"); $xmls = new XMLStruct(); $xmls->open($xml, $service['encoding']); writeValue('<span class="skin-name">' . $xmls->getValue('/skin/information/name') . '</span> <span class="version">ver.' . $xmls->getValue('/skin/information/version') . ($skinSetting['skin'] == "customize/{$blogid}" ? _t('(사용자 수정본)') : NULL) . '</span>', _t('제목'), "title"); writeValue($xmls->getValue('/skin/information/license'), _t('저작권'), "license"); writeValue($xmls->getValue('/skin/author/name'), _t('만든이'), "maker"); writeValue($xmls->getValue('/skin/author/homepage'), _t('홈페이지'), "homepage"); writeValue($xmls->getValue('/skin/author/email'), _t('e-mail'), "email"); writeValue($xmls->getValue('/skin/information/description'), _t('설명'), "explain"); ?> </div> <div class="button-box"> <a class="edit-button button" href="<?php echo $context->getProperty('uri.blog'); ?> /owner/skin/edit"><span class="text"><?php
public function showItemDisplay() { ?> <itemDisplay> <script> idx = getQueryItemIndex(); drawState = getDrawingItemState(); if (drawState == "unfocus") { border = "<?php echo getSkinPath() . static::imageUnFocus; ?> "; color = "<?php echo static::unFocusFontColor; ?> "; } else { border = "<?php echo getSkinPath() . static::imageFocus; ?> "; color = "<?php echo static::focusFontColor; ?> "; } </script> <image redraw="no" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="100"> <script> border; </script> </image> <?php // item image if ($this->itemImage != '') { $px = round(static::itemImageX / static::itemWidth * 100, 4); $py = round(static::itemImageY / static::itemHeight * 100, 4); $pw = round(static::itemImageWidth / static::itemWidth * 100, 4); $ph = round(static::itemImageHeight / static::itemHeight * 100, 4); ?> <image offsetXPC="<?php echo $px; ?> " offsetYPC="<?php echo $py; ?> " widthPC="<?php echo $pw; ?> " heightPC="<?php echo $ph; ?> " ><?php echo $this->itemImage; ?> </image> <?php } // item title if ($this->itemTitle != '') { $px = round(static::itemTextX / static::itemWidth * 100, 4); $py = round(static::itemTextY / static::itemHeight * 100, 4); $pw = round(static::itemTextWidth / static::itemWidth * 100, 4); $ph = round(static::itemTextHeight / static::itemHeight * 100, 4); ?> <text align="<?php echo static::itemTextAlign; ?> " lines="<?php echo static::itemTextLines; ?> " offsetXPC="<?php echo $px; ?> " offsetYPC="<?php echo $py; ?> " widthPC="<?php echo $pw; ?> " heightPC="<?php echo $ph; ?> " fontSize="<?php echo static::itemTextFontSize; ?> " backgroundColor="<?php echo static::itemTextBackgroundColor; ?> "> <foregroundColor> <script> color; </script> </foregroundColor><?php echo $this->itemTitle; ?> </text> <?php } // more item's fields $this->showMoreItemDisplay(); ?> </itemDisplay> <?php }
function showDisplay() { $sw = static::screenWidth; $sh = static::screenHeight; $kw = static::skinWidth; $kh = static::skinHeight; $sx = ($sw - $kw) / 2; $sy = ($sh - $kh) / 2; $vx = static::viewAreaX; $vy = static::viewAreaY; $vw = static::viewAreaWidth; $vh = static::viewAreaHeight; ?> <mediaDisplay name="threePartsView" viewAreaXPC="<?php echo round(($sx + $vx) / $sw * 100, 4); ?> " viewAreaYPC="<?php echo round(($sy + $vy) / $sh * 100, 4); ?> " viewAreaWidthPC="<?php echo round($vw / $sw * 100, 4); ?> " viewAreaHeightPC="<?php echo round($vh / $sh * 100, 4); ?> " backgroundColor="<?php echo static::backgroundColor; ?> " sideLeftWidthPC="0" sideRightWidthPC="0" sideColorLeft="<?php echo static::sideColorLeft; ?> " sideColorRight="<?php echo static::sideColorRight; ?> " showHeader="no" showDefaultInfo="no" idleImageXPC="<?php echo round(static::idleImageX / $sw * 100, 4); ?> " idleImageYPC="<?php echo round(static::idleImageY / $sh * 100, 4); ?> " idleImageWidthPC="<?php echo round(static::idleImageWidth / $sw * 100, 4); ?> " idleImageHeightPC="<?php echo round(static::idleImageHeight / $sh * 100, 4); ?> " > <previewWindow windowColor="<?php echo static::backgroundColor; ?> " offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="100" /> <progressBar backgroundColor="<?php echo static::progressBackgroundColor; ?> " offsetXPC="<?php echo round(static::progressX / $vw * 100, 4); ?> " offsetYPC="<?php echo round(static::progressY / $vh * 100, 4); ?> " widthPC="<?php echo round(static::progressWidth / $vw * 100, 4); ?> " heightPC="<?php echo round(static::progressHeight / $vh * 100, 4); ?> " > <?php if (static::progressBackground != '') { ?> <image redraw="yes" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="100"> <?php echo getSkinPath() . static::progressBackground; ?> </image> <?php } // icon $px = round(static::iconX / static::progressWidth * 100, 4); $py = round(static::iconY / static::progressHeight * 100, 4); $pw = round(static::iconWidth / static::progressWidth * 100, 4); $ph = round(static::iconHeight / static::progressHeight * 100, 4); ?> <image redraw="yes" offsetXPC="<?php echo $px; ?> " offsetYPC="<?php echo $py; ?> " widthPC="<?php echo $pw; ?> " heightPC="<?php echo $ph; ?> "> <script>cImg;</script> </image> <?php // title $px = round(static::titleX / static::progressWidth * 100, 4); $py = round(static::titleY / static::progressHeight * 100, 4); $pw = round(static::titleWidth / static::progressWidth * 100, 4); $ph = round(static::titleHeight / static::progressHeight * 100, 4); ?> <text redraw="yes" offsetXPC="<?php echo $px; ?> " offsetYPC="<?php echo $py; ?> " widthPC="<?php echo $pw; ?> " heightPC="<?php echo $ph; ?> " align="<?php echo static::titleAlign; ?> " lines="<?php echo static::titleLines; ?> " fontSize="<?php echo static::titleFontSize; ?> " backgroundColor="<?php echo static::titleBackgroundColor; ?> " foregroundColor="<?php echo static::titleForegroundColor; ?> "> <script>cTitle;</script> </text> <?php $px = round(static::prevX / static::progressWidth * 100, 4); $py = round(static::prevY / static::progressHeight * 100, 4); $pw = round(static::prevWidth / static::progressWidth * 100, 4); $ph = round(static::prevHeight / static::progressHeight * 100, 4); ?> <image redraw="yes" offsetXPC="<?php echo $px; ?> " offsetYPC="<?php echo $py; ?> " widthPC="<?php echo $pw; ?> " heightPC="<?php echo $ph; ?> "> <script> if ( itemCount > 1 ) "<?php echo getSkinPath() . static::prevIcon; ?> "; else null; </script> </image> <?php $px = round(static::nextX / static::progressWidth * 100, 4); $py = round(static::nextY / static::progressHeight * 100, 4); $pw = round(static::nextWidth / static::progressWidth * 100, 4); $ph = round(static::nextHeight / static::progressHeight * 100, 4); ?> <image redraw="yes" offsetXPC="<?php echo $px; ?> " offsetYPC="<?php echo $py; ?> " widthPC="<?php echo $pw; ?> " heightPC="<?php echo $ph; ?> "> <script> if ( itemCount > 1 ) "<?php echo getSkinPath() . static::nextIcon; ?> "; else null; </script> </image> <?php $px = round(static::statusX / static::progressWidth * 100, 4); $py = round(static::statusY / static::progressHeight * 100, 4); $pw = round(static::statusWidth / static::progressWidth * 100, 4); $ph = round(static::statusHeight / static::progressHeight * 100, 4); ?> <image redraw="yes" offsetXPC="<?php echo $px; ?> " offsetYPC="<?php echo $py; ?> " widthPC="<?php echo $pw; ?> " heightPC="<?php echo $ph; ?> "> <script> if (playStatus == 2) { if (cPlayPause == 1) "<?php echo getSkinPath() . static::statusIconPlay; ?> "; else "<?php echo getSkinPath() . static::statusIconPause; ?> "; } else "<?php echo getSkinPath() . static::statusIconStop; ?> "; </script> </image> <?php $px = round(static::barX / static::progressWidth * 100, 4); $py = round(static::barY / static::progressHeight * 100, 4); $pw = round(static::barWidth / static::progressWidth * 100, 4); $ph = round(static::barHeight / static::progressHeight * 100, 4); ?> <bar offsetXPC="<?php echo $px; ?> " offsetYPC="<?php echo $py; ?> " widthPC="<?php echo $pw; ?> " heightPC="<?php echo $ph; ?> " barColor="<?php echo static::barBarColor; ?> " progressColor="<?php echo static::barProgressColor; ?> " bufferColor="<?php echo static::barBufferColor; ?> " /> <?php $px = round(static::timeX / static::progressWidth * 100, 4); $py = round(static::timeY / static::progressHeight * 100, 4); $pw = round(static::timeWidth / static::progressWidth * 100, 4); $ph = round(static::timeHeight / static::progressHeight * 100, 4); ?> <text redraw="yes" offsetXPC="<?php echo $px; ?> " offsetYPC="<?php echo $py; ?> " widthPC="<?php echo $pw; ?> " heightPC="<?php echo $ph; ?> " align="left" lines="1" fontSize="<?php echo static::timeFontSize; ?> " backgroundColor="<?php echo static::timeBackgroundColor; ?> " foregroundColor="<?php echo static::timeForegroundColor; ?> "> <script>timeLine;</script> </text> <destructor offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="100" color="-1:-1:-1"> </destructor> </progressBar> <?php $this->showIdleBg(); $this->showOnUserInput(); ?> </mediaDisplay> <?php }