public function save()
 {
     foreach ($this->getValues() as $k => $v) {
         opSkinClassicConfig::set($k, $v);
     }
     opToolkit::clearCache();
 }
Example #2
0
 public function executeSkinList(sfWebRequest $request)
 {
     $this->forms = array();
     $images = array_merge(opSkinClassicConfig::getImages(), opSkinClassicConfig::getThemeImages());
     foreach ($images as $v) {
         $this->forms[$v] = new opSkinClassicImageForm(array(), array('target' => $v));
     }
 }
 public static function getDefaults()
 {
     if (empty(self::$defaults)) {
         $configPath = realpath(dirname(__FILE__) . '/../config/preset.yml');
         self::$defaults = sfYaml::load($configPath);
     }
     return self::$defaults;
 }
 public static function cacheCss($event, $content)
 {
     $lastEntry = sfContext::getInstance()->getActionStack()->getLastEntry();
     if (!$lastEntry) {
         return $content;
     }
     if ('opSkinClassicPlugin' === $lastEntry->getModuleName() && 'css' === $lastEntry->getActionName()) {
         $filesystem = new sfFilesystem();
         $dir = sfConfig::get('sf_web_dir') . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'css';
         @$filesystem->mkdirs($dir);
         file_put_contents($dir . DIRECTORY_SEPARATOR . opSkinClassicConfig::getCurrentTheme() . '.css', $content);
     }
     return $content;
 }
 public function save()
 {
     $target = $this->getOption('target');
     $rawConfig = Doctrine::getTable('SkinConfig')->retrieveByPluginAndName('opSkinClassicPlugin', $target . '_image');
     if ($rawConfig) {
         $file = Doctrine::getTable('File')->findOneByName($rawConfig->value);
         if ($file) {
             $file->delete();
         }
     }
     $file = new File();
     $file->setFromValidatedFile($this->getValue('image'));
     $file->save();
     opSkinClassicConfig::set($target . '_image', $file->name);
     opToolkit::clearCache();
 }
 public function save()
 {
     opSkinClassicConfig::set('theme', $this->getValue('theme'));
     foreach (opSkinClassicConfig::getAllowdColors() as $k) {
         opSkinClassicConfig::delete($k);
     }
     $configs = array_merge(opSkinClassicConfig::getImages(), opSkinClassicConfig::getThemeImages());
     foreach ($configs as $k) {
         $key = $k . '_image';
         $rawConfig = Doctrine::getTable('SkinConfig')->retrieveByPluginAndName('opSkinClassicPlugin', $key);
         if ($rawConfig) {
             $file = Doctrine::getTable('File')->findOneByName($rawConfig->value);
             if ($file) {
                 $file->delete();
             }
         }
         opSkinClassicConfig::delete($key);
     }
     opToolkit::clearCache();
 }
Example #7
0
}
div.dparts {
	background: #<?php 
echo opSkinClassicConfig::get('frame_color');
?>
;
}
div.parts {
	background-color: #<?php 
echo opSkinClassicConfig::get('box_background_color');
?>
;
}
.sideNav .item {
	background-color: #<?php 
echo opSkinClassicConfig::get('box_background_color');
?>
;
}
#Body .sideNav {
	background-color: transparent;
}
#Body .linkLine,
#Body .searchFormLine,
#Body .buttonLine,
#Body .prevNextLinkLine,
#Body .homeBirthdayBox {
	background-color: transparent;
}

/**=============================================================================
Example #8
0
  display: block;
  width: 98%;
  margin: 5px 0 5px 2px;
  text-align: right;
}

div.activityBox div.box_form div.box_body span.submit input.submit {
  min-height: 30px;
  margin: 0;
  padding: 0 8px;
  -moz-border-radius: 3px;
  -webkit-border-radius: 3px;
  border-radius: 3px;
  border: 1px solid #888888;
  background: url(<?php 
echo image_path(opSkinClassicConfig::get('bg_button_a_image'));
?>
);
  font-weight: bold;
  font-size: 14px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

div.activityBox div.box_form div.box_body span.submit input.submit:active {
  color: #888888;
}

*:first-child+html div.activityBox div.box_form div.box_body span.submit input.submit {
  padding: 0;
  line-height: 24px;
}
Example #9
0
 public function executeCss(sfWebRequest $request)
 {
     opSkinClassicConfig::setCurrentTheme($request->getParameter('theme'));
 }
Example #10
0
<div id="container_login"><div class="w_screen">
<?php 
if ($form->getAuthAdapter()->getAuthConfig('invite_mode') == 2 && opToolkit::isEnabledRegistration('pc')) {
    ?>
<img src="<?php 
    echo image_path(opSkinClassicConfig::get('skin_login_open_image'));
    ?>
" class="bg" alt="" />
<?php 
} else {
    ?>
<img src="<?php 
    echo image_path(opSkinClassicConfig::get('skin_login_image'));
    ?>
" class="bg" alt="" />
<?php 
}
?>

<form action="<?php 
echo url_for(sprintf('member/login?%s=%s', sfOpenPNEAuthForm::AUTH_MODE_FIELD_NAME, $form->getAuthMode()));
?>
" method="post">
<?php 
foreach ($form as $name => $field) {
    echo $field->render();
}
?>
<input type="image" name="submit" src="<?php 
echo image_path('dummy.gif');
?>
Example #11
0
<?php

if (0 === strpos($target, 'skin_')) {
    echo image_tag(opSkinClassicConfig::get($target . '_image'), array('width' => '180'));
    ?>
<br />
<?php 
} else {
    echo image_tag(opSkinClassicConfig::get($target . '_image'));
    ?>
<br />
<?php 
}
?>
<br />
%input%<br />
%delete% %delete_label%