Changeset 2492


Ignore:
Timestamp:
Aug 31, 2008, 10:54:39 PM (16 years ago)
Author:
vdigital
Message:
  • Configuration reversed to simplify CSS
  • theme.css a test to solve menubar issue
  • STC: php version control
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/template/yoga/admin/configuration.tpl

    r2426 r2492  
    77
    88{if isset($main)}
    9 <fieldset id="mainConf">
     9<fieldset>
    1010  <ul>
    1111    <li>
    12       <span class="property">
     12      <span class="property m38">
    1313        <label for="gallery_title">{'Gallery title'|@translate}</label>
    1414      </span>
     
    1717
    1818    <li>
    19       <span class="property">
     19      <span class="property m38">
    2020        <label for="page_banner">{'Page banner'|@translate}</label>
    2121      </span>
     
    2424
    2525    <li>
    26       <span class="property">
     26      <span class="property m38">
    2727        <label for="gallery_url">{'Gallery URL'|@translate}</label>
    2828      </span>
     
    3232</fieldset>
    3333
    34 <fieldset id="mainConfCheck">
     34<fieldset>
    3535  <ul>
    3636
     
    8181
    8282{if isset($history)}
    83 <fieldset id="historyConf">
     83<fieldset>
    8484  <ul>
    8585      <li>
     
    100100
    101101{if isset($comments)}
    102 <fieldset id="commentsConf">
     102<fieldset>
    103103  <ul>
    104104    <li>
     
    143143
    144144{if isset($upload)}
    145 <fieldset id="uploadConf">
     145<fieldset>
    146146  <ul>
    147147    <li>
     
    151151    <li>
    152152      <label><span class="property">{'User access level to upload'|@translate}</span>
    153       {html_options name="upload_user_access" options=$upload.upload_user_access_options selected=$upload.upload_user_access_options_selected}
     153      {html_options class="widefield" name="upload_user_access" options=$upload.upload_user_access_options selected=$upload.upload_user_access_options_selected}
    154154    </li>
    155155    <li>
  • trunk/admin/template/yoga/default-layout.css

    r2489 r2492  
    9494  white-space: nowrap;
    9595}
    96 
    97 FIELDSET#mainConfCheck SPAN.property,
    98 FIELDSET#historyConf SPAN.property,
    99 FIELDSET#commentsConf SPAN.property,
    100 FIELDSET#uploadConf SPAN.property {
    101   float: right;
    102   text-align: left;
    103 }
    104 FIELDSET#mainConfCheck INPUT,
    105 FIELDSET#historyConf INPUT,
    106 FIELDSET#commentsConf INPUT,
    107 FIELDSET#uploadConf INPUT {
    108   float: none;
    109 }
    110 
    111 FIELDSET#mainConf SPAN.property {
    112   width: 25%;
    113 }
    114 FIELDSET#mainConf TEXTAREA.description {
     96.property {
     97  width: 60%;
     98}
     99TEXTAREA.description {
    115100  width: 70%;
    116 }
    117 
    118 FIELDSET#mainConfCheck SPAN.property,
    119 FIELDSET#historyConf SPAN.property {
    120   width: 90%;
    121 }
    122 FIELDSET#mainConfCheck INPUT,
    123 FIELDSET#historyConf INPUT,
    124 FIELDSET#commentsConf INPUT,
    125 FIELDSET#uploadConf SELECT,
    126 FIELDSET#uploadConf INPUT {
    127   margin-left: 5%;
    128 }
    129 
    130 FIELDSET#commentsConf SPAN.property {
    131   width: 85%;
    132 }
    133 
    134 FIELDSET#uploadConf SPAN.property {
    135   width: 75%;
    136101}
    137102
     
    315280
    316281TEXTAREA.description {
    317   height: 6em;
    318   width: 40em;
     282  height: 12em;
     283  width: 60%;
    319284  overflow: auto;
    320285}
     
    424389  font-weight: bold;
    425390  float: left;
    426   width: 50%;
     391  width: 60%;
    427392  text-align: right;
    428393  margin: 0;
    429394  padding: 0 0.5em 0 0;
     395}
     396.m38 {
     397  width: 38% !important;
    430398}
    431399
  • trunk/admin/template/yoga/theme/admin/theme.css

    r2472 r2492  
    6565a:hover { color: #f33; border-color: #FF3363; }
    6666
    67 #theAdminPage h2 { display:block; font-size:28px; letter-spacing:-1px;
     67h2 { display:block; font-size:28px; letter-spacing:-1px;
    6868margin:0 20px; height:95px; overflow:hidden; padding:0; position:absolute;
    6969right:0; text-align:right; top:0; width:770px; }
     
    7272.HelpActions li {list-style-image:none; list-style-position:outside;
    7373list-style-type:none; text-align:center; text-indent:0pt; }
    74 fieldset#uploadConf input { margin:0 5px 0 110px; width:160px; }
     74
    7575table.table2 th { padding:3px 30px; }
    7676table.table2 tr.throw { text-align: center; }
     
    9191background:transparent url(images/inactive_tab.png) no-repeat scroll left 5px;
    9292border: 0 none; color:#777777; display:block; font-size:11px; text-transform:capitalize;
    93 font-weight:bold; height:33px; overflow:hidden; padding:12px 30px 5px 0;  line-height: 18px;
     93font-weight:bold; height:28px; overflow:hidden; padding:12px 30px 5px 0;  line-height: 18px;
    9494text-align:right; text-decoration:none; width:122px !important; }
    9595.tabsheet a:hover, .tabsheet li.selected_tab  a {
     
    104104#menubar {
    105105background:transparent url(images/menuBoxBottom_new.png) no-repeat scroll left bottom;
    106 border:0; display:inline; float:left; left:0; margin: 0 0 0 35px; min-height:468px;
    107 padding:0; width:207px; z-index:99; text-align: left; /*  "be nice to IE5" rule */ }
    108 #menubar .selected a { color: #f70; border-color: #f36; }
     106border:0; display:inline; float:left; left:0; margin: 0 0 0 35px; min-height:477px; height:477px;
     107padding:0; width:207px; z-index:99; text-align: left; }
     108#menubar .selected a { color: #f70; border-color: #f36;}
    109109#menubar .selected a:hover { color: #f36; border-bottom: 1px solid #f36;}
    110110#menubar dd {
    111111background: transparent url(images/menubar-detail.png) repeat-y top left;
    112 margin: 0; padding: 0; height:232px; display:block; }
     112margin: 10px 0 0 0; padding: 0; height:232px; }
    113113#menubar dl {
    114114background:transparent url(images/menuBoxTop_new.png) no-repeat scroll left top;
    115115width: 207px; border:0; margin: 0; padding: 0; display: block; min-height:35px; }
    116 #menubar dl.first {
     116#menubar dl.first { 
    117117background:transparent url(images/menubar-top.png) no-repeat scroll left 1px; }
    118118#menubar dt { margin: 0; display: block; background: none; left:10px; font-weight:bold;
    119 position:relative; padding: 5px; top:-10px; font-size: 13px; color: #666; }
     119position:relative; padding: 5px 1px 4px 5px; top:-10px; font-size: 13px; color: #666; }
    120120#menubar dt  span { background-color: #111; cursor:pointer; }
    121121#menubar a { border-bottom:0; text-decoration:none; font-size: 12px;
     
    124124#menubar li.external { list-style-image:url(images/external_inactive.png); padding:10px 0px 0pt 10px; }
    125125#menubar li.external:hover { list-style-image:url(images/external_active.png); }
    126 #menubar ul { color: #333; margin:9px 0pt 3px 9px;
     126#menubar ul { color: #333; margin:10px 0pt 3px 9px;
    127127  list-style-type: square; list-style-position: inside; padding: 0 0 0 2px; }
  • trunk/plugins/SwiftThemeCreator/theme_creator.php

    r2487 r2492  
    258258   */
    259259  $main['subphase'] = 'fixed background controls';
     260  if (isset($_POST['picture_url'])) $main['picture_url'] = $_POST['picture_url'];
     261  if (isset($_POST['background_mode']))
     262      $main['background_mode'] = $_POST['background_mode']; 
    260263  if (isset($_POST['background'])) $main['background'] = $_POST['background'];
    261264  // Fixed
    262   if ( $main['background'] == 'fixed' and isset($_POST['picture_url'])) {
    263     if ( is_dir($_POST['picture_url'])
    264         or !is_file($_POST['picture_url']) )
     265  if ( $main['background'] == 'fixed') {
     266    if ( is_dir($main['picture_url'])
     267        or !is_file($main['picture_url']) )
    265268      array_push($errors, l10n('Header picture is not found, check its path and name.'));
    266     $extension = substr($_POST['picture_url'],strrpos($_POST['picture_url'],'.')+1);
     269    $extension = substr($main['picture_url'],strrpos($main['picture_url'],'.')+1);
    267270    if (!in_array($extension, array('jpg','jpeg','png')))
    268271      array_push($errors, l10n('Compliant extensions are .jpg, .jpeg or .png.'));
     
    316319// +-----------------------------------------------------------------------+
    317320$main['phase'] = 'Files building';
     321if (!function_exists('imagecreatetruecolor') or !function_exists('imagefilter')) {
     322  array_push($errors, l10n('Some Php Graphic resources are missing.'
     323        . ' Sorry for the inconvenience, but Swift Theme Creator couldn\'t work in such case.'));
     324  array_push($infos, l10n('This plugin requires PHP 5.2.5 or later'
     325        . ' and compiled against graphic library GD 2.0.1 or later.'));
     326  array_push($infos, l10n('On this server, PHP is:'). phpversion());
     327  if (function_exists('gd_info')) {
     328    $GD = gd_info();           
     329    array_push($infos, l10n('and graphic library is:').$GD['GD Version']);
     330  }
     331  else array_push($infos, l10n('graphic library version is not available.'));
     332  $main['background'] = 'off';
     333}
    318334if ((isset($_POST['submit']) or $main['simulate'] ) and (!is_adviser()))
    319335{
     
    388404         ORDER BY RAND(' . $main['random'] . ')
    389405         LIMIT 0,1');
    390       if($result) list($main['pic_path']) = mysql_fetch_array($result);
    391       else $main['pic_path'] =
    392            PHPWG_ROOT_PATH . 'plugins/SwiftThemeCreator/simul/header.jpg';
    393       $main['pic_ext'] = substr($main['pic_path'],strrpos($main['pic_path'],'.')+1);
    394       if ($main['pic_ext']=='png')
    395         $img = imagecreatefrompng($main['pic_path']);
    396       elseif (in_array($main['pic_ext'],array('jpg','jpeg')))
    397               $img = imagecreatefromjpeg($main['pic_path']);
    398       else $img = imagecreatefromjpeg(PHPWG_ROOT_PATH
    399                    . 'plugins/SwiftThemeCreator/simul/header.jpg');
    400       imagejpeg( $img, $themedir . '/header.jpg', 90 );
    401       imagedestroy ($img);
     406        if($result) list($main['pic_path']) = mysql_fetch_array($result);
     407        else $main['pic_path'] =
     408             PHPWG_ROOT_PATH . 'plugins/SwiftThemeCreator/simul/header.jpg';
     409        $main['pic_ext'] = substr($main['pic_path'],strrpos($main['pic_path'],'.')+1);
     410        if ($main['pic_ext']=='png')
     411          $img = imagecreatefrompng($main['pic_path']);
     412        elseif (in_array($main['pic_ext'],array('jpg','jpeg')))
     413                $img = imagecreatefromjpeg($main['pic_path']);
     414        else $img = imagecreatefromjpeg(PHPWG_ROOT_PATH
     415                     . 'plugins/SwiftThemeCreator/simul/header.jpg');
     416        imagejpeg( $img, $themedir . '/header.jpg', 90 );
     417        imagedestroy ($img);
    402418      }
    403419      if (isset($_POST['background']) and $_POST['background'] == 'fixed')
    404420      {
    405         if (function_exists('imagecreatefromjpeg'))
    406         {
    407           $hdr = imagecreatetruecolor ($main['picture_width'], $main['picture_height']);
    408           imagecolorset ( $hdr, 0, $r2, $g2, $b2 );
    409           if ($extension == 'png') $img = imagecreatefrompng($_POST['picture_url']);
    410           else $img = imagecreatefromjpeg($_POST['picture_url']);
    411           imagecopymerge ( $hdr, $img, 0, 0, 0, 0, $main['picture_width'], $main['picture_height'], 60 );
    412           imagedestroy ($img);
    413           if ($main['colorize']) imagefilter($hdr, IMG_FILTER_COLORIZE, $r, $g, $b);
    414           if ($main['brightness']) imagefilter($hdr, IMG_FILTER_BRIGHTNESS, $delta);
    415           if ($main['contrast']) imagefilter($hdr, IMG_FILTER_CONTRAST, 20);
    416           imagejpeg( $hdr, $themedir . '/header.jpg', 90 );
     421        $main['subphase'] = 'Fixed background';
     422        $hdr = imagecreatetruecolor ($main['picture_width'], $main['picture_height']);
     423        imagecolorset ( $hdr, 0, $r2, $g2, $b2 );
     424        if ($extension == 'png') $img = imagecreatefrompng($main['picture_url']);
     425        else $img = imagecreatefromjpeg($main['picture_url']);
     426        imagecopymerge ( $hdr, $img, 0, 0, 0, 0, $main['picture_width'], $main['picture_height'], 60 );
     427        imagedestroy ($img);
     428        if ($main['colorize']) imagefilter($hdr, IMG_FILTER_COLORIZE, $r, $g, $b);
     429        if ($main['brightness']) imagefilter($hdr, IMG_FILTER_BRIGHTNESS, $delta);
     430        if ($main['contrast']) imagefilter($hdr, IMG_FILTER_CONTRAST, 20);
     431        imagejpeg( $hdr, $themedir . '/header.jpg', 90 );
    417432          imagedestroy ($hdr);
    418         }
    419         else @copy( $_POST['picture_url'], $themedir . '/header.jpg');     
    420433      }
    421434      /*
    422435       * Build background image for titrePage or definition list (in #menubar)
    423436       **/
    424       if (function_exists('imagecreatefrompng'))
    425       {
    426         $hdr = imagecreatetruecolor (1, 38);
    427         imagecolorset ( $hdr, 0, $r2, $g2, $b2 );
    428         $img = imagecreatefrompng(STC_PATH . '/titrePage-bg.png');
    429         imagecopymerge ( $hdr, $img, 0, 0, 0, 0, 1, 38, 60 );
    430         imagedestroy ($img);
    431         if ($main['colorize']) imagefilter($hdr, IMG_FILTER_COLORIZE, $r, $g, $b);
    432         if ($main['brightness']) imagefilter($hdr, IMG_FILTER_BRIGHTNESS, $delta);
    433         if ($main['contrast']) imagefilter($hdr, IMG_FILTER_CONTRAST, 20);
    434         imagepng( $hdr, $themedir . '/stc.png', 9 );
    435         imagedestroy ($hdr);
    436       }
    437       else @copy( STC_PATH
    438                  . '/titrePage-bg.png', $themedir . '/stc.png');     
     437      $main['subphase'] = 'Headbars background';
     438      $hdr = imagecreatetruecolor (1, 38);
     439      imagecolorset ( $hdr, 0, $r2, $g2, $b2 );
     440      $img = imagecreatefrompng(STC_PATH . '/titrePage-bg.png');
     441      imagecopymerge ( $hdr, $img, 0, 0, 0, 0, 1, 38, 60 );
     442      imagedestroy ($img);
     443      if ($main['colorize']) imagefilter($hdr, IMG_FILTER_COLORIZE, $r, $g, $b);
     444      if ($main['brightness']) imagefilter($hdr, IMG_FILTER_BRIGHTNESS, $delta);
     445      if ($main['contrast']) imagefilter($hdr, IMG_FILTER_CONTRAST, 20);
     446      imagepng( $hdr, $themedir . '/stc.png', 9 );
     447      imagedestroy ($hdr);
     448
     449      /*
     450       * Errors and cleaning or Congratulations
     451       **/
     452      $main['phase'] = 'Congratulation';
     453      $main['subphase'] = 'cleaning';
    439454      if ($rfs == false) {
    440455        array_push($errors,
     
    508523    'fixed' => l10n('Fixed URL'),
    509524  ));
    510 $main['picture_url'] = PHPWG_ROOT_PATH . 'plugins/SwiftThemeCreator/sample.jpg';
    511 if (isset($swift_theme_creator->picture_url))
    512     $main['picture_url'] = $swift_theme_creator->picture_url;
    513 if (isset($_POST['picture_url'])) $main['picture_url'] = $_POST['picture_url'];
    514 
    515 if (isset($_POST['picture_width']))
    516     $main['picture_width'] = $_POST['picture_width'];
    517 if (isset($_POST['picture_height']))
    518     $main['picture_height'] = $_POST['picture_height'];
    519 
    520 if (isset($_POST['background_mode']))
    521       $main['background_mode'] = $_POST['background_mode'];
    522525$template->assign('background_mode_options',
    523526  array(
  • trunk/template/yoga/default-layout.css

    r2489 r2492  
    274274        border-collapse : collapse;
    275275}
     276#theHeader {text-align: center;}
Note: See TracChangeset for help on using the changeset viewer.