Changeset 5123


Ignore:
Timestamp:
03/13/10 01:00:52 (10 years ago)
Author:
plg
Message:

feature 1502: based on Dotclear model, P@t has reorganized the way Piwigo
manages template/theme in a simpler "theme only level" architecture. It
supports multiple level inheritance.

Location:
trunk
Files:
21 added
3 deleted
41 edited
87 copied

Legend:

Unmodified
Added
Removed
  • trunk/admin.php

    r5098 r5123  
    6363if (isset($_GET['change_theme'])) 
    6464{ 
    65   $admin_themes = array('goto/roma', 'goto/clear'); 
     65  $admin_themes = array('roma', 'clear'); 
    6666 
    6767  $new_admin_theme = array_pop( 
    6868    array_diff( 
    6969      $admin_themes, 
    70       array($conf['admin_layout']) 
     70      array($conf['admin_theme']) 
    7171      ) 
    7272    ); 
     
    7575DELETE 
    7676  FROM '.CONFIG_TABLE.' 
    77   WHERE param = "admin_layout" 
     77  WHERE param = "admin_theme" 
    7878;'; 
    7979  pwg_query($query); 
     
    8282INSERT 
    8383  INTO '.CONFIG_TABLE.' 
    84   SET param = "admin_layout" 
     84  SET param = "admin_theme" 
    8585    , value = "'.$new_admin_theme.'" 
    8686;'; 
  • trunk/admin/extend_for_templates.php

    r5021 r5123  
    112112$available_templates = array_merge( 
    113113  array('N/A' => '----------'), 
    114   get_dirs(PHPWG_ROOT_PATH.'template')); 
     114  get_dirs(PHPWG_ROOT_PATH.'theme')); 
    115115 
    116116// +-----------------------------------------------------------------------+ 
  • trunk/admin/include/functions_notification_by_mail.inc.php

    r5036 r5123  
    257257  if ($is_action_send) 
    258258  { 
    259     $nbm_user['template'] = $user['template']; 
    260259    $nbm_user['theme'] = $user['theme']; 
    261     $env_nbm['mail_template'] = 
    262       get_mail_template($env_nbm['email_format'],  
    263         array('template' => $nbm_user['template'], 'theme' => $nbm_user['theme'])); 
     260    $env_nbm['mail_template'] = get_mail_template($env_nbm['email_format'], $nbm_user['theme']); 
    264261    $env_nbm['mail_template']->set_filename('notification_by_mail', 'notification_by_mail.tpl'); 
    265262  } 
     
    436433                'content' => $env_nbm['mail_template']->parse('notification_by_mail', true), 
    437434                'content_format' => $env_nbm['email_format'], 
    438                 'template' => $nbm_user['template'], 
    439435                'theme' => $nbm_user['theme'] 
    440436              ) 
  • trunk/admin/themes/clear/mail-css.tpl

    r5090 r5123  
    77#copyright {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/footer-bg.png) no-repeat scroll left bottom; 
    88color: #69c;} 
    9 h2 {ldelim} background-color: #222;color:#eee;background-image: url({$ROOT_URL}template/{$themeconf.template}/theme/{$themeconf.theme}/images/tableh1_bg.png);} 
     9h2 {ldelim} background-color: #222;color:#eee;background-image: url({$ROOT_URL}template/{$themeconf.template}/themes/{$themeconf.theme}/images/tableh1_bg.png);} 
    1010img {ldelim} margin: 16px; padding:15px;border:1px solid #eee; -moz-border-radius: 4px; border-radius: 4px 4px; } 
    1111img:hover {ldelim} border:1px solid #69c; -moz-border-radius: 4px; border-radius: 4px 4px; } 
  • trunk/admin/themes/clear/themeconf.inc.php

    r5090 r5123  
    55} 
    66$themeconf = array( 
    7   'template' => 'goto', 
    8   'theme' => 'clear', 
    9   'icon_dir' => 'template/yoga/icon', 
    10   'admin_icon_dir' => 'admin/template/goto/theme/clear/icon', 
    11   'mime_icon_dir' => 'template/yoga/icon/mimetypes', 
     7  'theme'    => 'clear', 
     8  'parent'   => 'default', 
     9  'admin_icon_dir' => 'admin/themes/clear/icon', 
    1210  'selected_admin_menu' => selected_admin_menu(), 
    13   'local_head' => '', 
    1411); 
    1512?> 
  • trunk/admin/themes/default/default-layout.css

    r5098 r5123  
    697697        } 
    698698} 
     699 
     700/* Set the width of the menubar for the galery */ 
     701#menubar { 
     702  width: 18em; 
     703} 
     704.content { 
     705  margin-left: 20em;  /* = #menubar width + 2em */ 
     706} 
     707/* Set minimum width of the page before getting a scrollbar */ 
     708/* IE5 and IE6 don't get that */ 
     709BODY { 
     710  min-width: 60em;  /* ~ 3* #menubar width */ 
     711} 
     712BODY#thePopuphelpPage { 
     713  min-width: 0; 
     714} 
     715 
     716/* Set some sizes according to your maximum thumbnail width and height */ 
     717.content UL.thumbnails SPAN, 
     718.content UL.thumbnails SPAN.wrap2 A, 
     719.content UL.thumbnails LABEL, 
     720.content DIV.thumbnailCategory DIV.illustration { 
     721  width: 140px;      /* max thumbnail width + 2px */ 
     722} 
     723.content UL.thumbnails SPAN.wrap2, 
     724.content DIV.thumbnailCategory DIV.description { 
     725  height: 140px;    /* max thumbnail height + 2px */ 
     726} 
     727 
     728 
     729/* Category thumbnails on main page */ 
     730.content UL.thumbnailCategories LI { 
     731  width: 49.7%;    /* 49.7% for 2 per line, 33.2% for 3 per line*/ 
     732} 
     733 
     734/* Set defaults for thumbnails legend */ 
     735.content UL.thumbnails SPAN.thumbLegend { 
     736  display: block;  /* display: none; if you don't want legend */ 
     737  height: 4em;    /* legend height (don't set auto to be Gecko friendly)*/ 
     738} 
  • trunk/admin/themes/default/template/admin.tpl

    r5098 r5123  
    1 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"template-common/lib/ui/packed/ui.core.packed.js" } 
    2 {known_script id="jquery.ui.accordion" src=$ROOT_URL|@cat:"template-common/lib/ui/packed/ui.accordion.packed.js" } 
    3 {known_script id="jquery.tipTip" src=$ROOT_URL|@cat:"template-common/lib/plugins/jquery.tipTip.minified.js" } 
     1{known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js" } 
     2{known_script id="jquery.ui.accordion" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.accordion.packed.js" } 
     3{known_script id="jquery.tipTip" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.tipTip.minified.js" } 
    44 
    55<script type="text/javascript"> 
  • trunk/admin/themes/default/template/cat_list.tpl

    r5079 r5123  
    1 {known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"} 
    2 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"template-common/lib/ui/packed/ui.core.packed.js" } 
    3 {known_script id="jquery.ui.sortable" src=$ROOT_URL|@cat:"template-common/lib/ui/packed/ui.sortable.packed.js" } 
     1{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"} 
     2{known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js" } 
     3{known_script id="jquery.ui.sortable" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.sortable.packed.js" } 
    44 
    55<script type="text/javascript"> 
  • trunk/admin/themes/default/template/element_set_ranks.tpl

    r3282 r5123  
    1 {known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"} 
    2 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"template-common/lib/ui/packed/ui.core.packed.js" } 
    3 {known_script id="jquery.ui.sortable" src=$ROOT_URL|@cat:"template-common/lib/ui/packed/ui.sortable.packed.js" } 
     1{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"} 
     2{known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js" } 
     3{known_script id="jquery.ui.sortable" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.sortable.packed.js" } 
    44 
    55{literal} 
  • trunk/admin/themes/default/template/header.tpl

    r5098 r5123  
    1212<meta name="generator" content="Piwigo (aka PWG), see piwigo.org"> 
    1313<title>{$GALLERY_TITLE} :: {$PAGE_TITLE}</title> 
    14 <link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}template-common/favicon.ico"> 
     14<link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}{$themeconf.icon_dir}/favicon.ico"> 
    1515 
    16 <link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/template/{$themeconf.template}/layout.css"> 
     16{foreach from=$themes item=theme} 
     17{if isset($theme.local_head)}{include file=$theme.local_head}{/if} 
     18<link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/themes/{$theme.name}/theme.css"> 
     19{/foreach} 
     20 
     21{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js" now=1} {*jQuery is always available by default*} 
     22 
     23<script type="text/javascript" src="{$ROOT_URL}themes/default/js/scripts.js"></script> 
    1724<!--[if lt IE 7]> 
    18   <link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/template/{$themeconf.template}/fix-ie5-ie6.css"> 
    19 <![endif]--> 
    20 <link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/template/{$themeconf.template}/default-colors.css"> 
    21 <link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/template/{$themeconf.template}/theme/{$themeconf.theme}/theme.css"> 
    22 {known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js" now=1} {*jQuery is always available by default*} 
    23 {$themeconf.local_head} 
    24 <script type="text/javascript" src="{$ROOT_URL}template-common/scripts.js"></script> 
    25 <!--[if lt IE 7]> 
    26 <style> 
    27   {* only because we need {$ROOT_URL} otherwise use fix-ie5-ie6.css *} 
    28   BODY {ldelim} behavior:url("{$ROOT_URL}template-common/csshover.htc"); } 
    29   A IMG, .button, .icon {ldelim} 
    30     behavior:url("{$ROOT_URL}template-common/tooltipfix.htc"); 
    31   } 
    32   FORM {ldelim} behavior: url("{$ROOT_URL}template-common/inputfix.htc"); } 
    33 </style> 
    34 <script type="text/javascript" src="{$ROOT_URL}template-common/pngfix.js"></script> 
     25<script type="text/javascript" src="{$ROOT_URL}themes/default/js/pngfix.js"></script> 
    3526<![endif]--> 
    3627 
     
    5041  <h1> 
    5142    <a href="{$U_RETURN}" title="Visit Gallery"> 
    52       <img src="admin/template/goto/icon/home.png" alt="{'Home'|@translate}"> 
     43      <img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/home.png" alt="{'Home'|@translate}"> 
    5344      {$GALLERY_TITLE} 
    5445    </a> 
     
    6051    <a href="{$U_CHANGE_THEME}" title="Switch to clear theme for administration">Change Theme</a> | 
    6152    <a href="{$U_LOGOUT}">{'Logout'|@translate}</a> 
    62     <a href="{$U_FAQ}" title="{'Instructions'|@translate}" id="instructions"><img style="padding-left:10px;" src="{$ROOT_URL}admin/template/goto/icon/help.png" class="button" alt="(?)"></a> 
     53    <a href="{$U_FAQ}" title="{'Instructions'|@translate}" id="instructions"><img style="padding-left:10px;" src="{$ROOT_URL}{$themeconf.admin_icon_dir}/help.png" class="button" alt="(?)"></a> 
    6354  </div> 
    6455</div> 
  • trunk/admin/themes/default/template/include/autosize.inc.tpl

    r3283 r5123  
    1 {known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"} 
    2 {known_script id="jquery.autogrow" src=$ROOT_URL|@cat:"template-common/lib/plugins/jquery.autogrow-textarea.js"} 
     1{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"} 
     2{known_script id="jquery.autogrow" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.autogrow-textarea.js"} 
    33 
    44{* Auto size and auto grow textarea *} 
  • trunk/admin/themes/default/template/include/datepicker.inc.tpl

    r3283 r5123  
    11 
    2 {known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"} 
    3 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"template-common/lib/ui/packed/ui.core.packed.js"} 
    4 {known_script id="jquery.ui.datepicker" src=$ROOT_URL|@cat:"template-common/lib/ui/packed/ui.datepicker.packed.js"} 
    5 {known_script id="datepicker.js" src=$ROOT_URL|@cat:"template-common/datepicker.js"} 
     2{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"} 
     3{known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"} 
     4{known_script id="jquery.ui.datepicker" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.datepicker.packed.js"} 
     5{known_script id="datepicker.js" src=$ROOT_URL|@cat:"themes/default/js/datepicker.js"} 
    66 
    7 {assign var="datepicker_language" value="template-common/lib/ui/i18n/ui.datepicker-"|@cat:$lang_info.code|@cat:".js"} 
     7{assign var="datepicker_language" value="themes/default/js/ui/i18n/ui.datepicker-"|@cat:$lang_info.code|@cat:".js"} 
    88 
    99{if "PHPWG_ROOT_PATH"|@constant|@cat:$datepicker_language|@file_exists} 
     
    1212 
    1313{html_head} 
    14 <link rel="stylesheet" type="text/css" href="{$ROOT_URL}template-common/lib/ui/theme/ui.datepicker.css"> 
     14<link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/default/js/ui/themes/ui.datepicker.css"> 
    1515{/html_head} 
    1616 
     
    1919{ldelim} 
    2020  return pwg_common_initialization_datepicker( 
    21     "{$ROOT_URL}admin/template/{$themeconf.template}/icon/datepicker.png", 
     21    "{$ROOT_URL}{$themeconf.admin_icon_dir}/datepicker.png", 
    2222    day, month, year, linked_date, checked_on_change, min_linked_date, max_linked_date); 
    2323} 
  • trunk/admin/themes/default/template/include/dbselect.inc.tpl

    r3283 r5123  
    1 {known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"} 
    2 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"template-common/lib/ui/packed/ui.core.packed.js"} 
    3 {known_script id="jquery.ui.resizable" src=$ROOT_URL|@cat:"template-common/lib/ui/packed/ui.resizable.packed.js"} 
     1{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"} 
     2{known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"} 
     3{known_script id="jquery.ui.resizable" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.resizable.packed.js"} 
    44 
    55{* Resize possible *} 
  • trunk/admin/themes/default/template/include/resize.inc.tpl

    r3283 r5123  
    1 {known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"} 
    2 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"template-common/lib/ui/packed/ui.core.packed.js"} 
    3 {known_script id="jquery.ui.resizable" src=$ROOT_URL|@cat:"template-common/lib/ui/packed/ui.resizable.packed.js"} 
     1{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"} 
     2{known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"} 
     3{known_script id="jquery.ui.resizable" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.resizable.packed.js"} 
    44 
    55{* Resize possible *} 
  • trunk/admin/themes/default/template/install.tpl

    r5022 r5123  
    66<meta http-equiv="Content-script-type" content="text/javascript"> 
    77<meta http-equiv="Content-Style-Type" content="text/css"> 
    8 <link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}template-common/favicon.ico"> 
    9 <link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/template/{$themeconf.template}/layout.css"> 
    10 <link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/template/{$themeconf.template}/default-colors.css"> 
    11 <link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/template/{$themeconf.template}/theme/{$themeconf.theme}/theme.css"> 
    12 {include file="include/install.inc.tpl"} 
     8<link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}{$themeconf.icon_dir}/favicon.ico"> 
     9 
     10{foreach from=$themes item=theme} 
     11{if isset($theme.local_head)}{include file=$theme.local_head}{/if} 
     12<link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/themes/{$theme.name}/theme.css"> 
     13{/foreach} 
     14 
     15<script type="text/javascript" src="themes/default/js/jquery.packed.js"></script> 
    1316{literal} 
     17<script type="text/javascript"> 
     18$(function() { 
     19    $option_selected = $('#dblayer option:selected').attr('value'); 
     20    if ($option_selected=='sqlite' || $option_selected=='pdo-sqlite') { 
     21       $('input[name=dbhost],input[name=dbuser],input[name=dbpasswd]').parent().parent().hide(); 
     22    } 
     23    $('#dblayer').change(function() { 
     24        $db = this; 
     25        if ($db.value=='sqlite' || $db.value=='pdo-sqlite') { 
     26           $('input[name=dbhost],input[name=dbuser],input[name=dbpasswd]').parent().parent().hide(); 
     27        } else { 
     28           $('input[name=dbhost],input[name=dbuser],input[name=dbpasswd]').parent().parent().show(); 
     29        } 
     30      }); 
     31  }); 
     32</script> 
     33 
    1434<style type="text/css"> 
    1535.content { 
  • trunk/admin/themes/default/template/intro.tpl

    r5021 r5123  
    1 {known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"} 
    2 {known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"template-common/lib/plugins/jquery.cluetip.packed.js"} 
     1{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"} 
     2{known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.cluetip.packed.js"} 
    33 
    44<script type="text/javascript"> 
  • trunk/admin/themes/default/template/menubar.tpl

    r4919 r5123  
    1 {known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"} 
    2 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"template-common/lib/ui/packed/ui.core.packed.js" } 
    3 {known_script id="jquery-tablednd" src=$ROOT_URL|@cat:"template-common/lib/jquery.tablednd.js"} 
     1{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"} 
     2{known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js" } 
     3{known_script id="jquery-tablednd" src=$ROOT_URL|@cat:"themes/default/js/jquery.tablednd.js"} 
    44 
    55{literal} 
  • trunk/admin/themes/default/template/photos_add_direct.tpl

    r5098 r5123  
    1 {known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"} 
     1{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"} 
    22 
    33{literal} 
  • trunk/admin/themes/default/template/picture_modify.tpl

    r5067 r5123  
    33{include file='include/datepicker.inc.tpl'} 
    44 
    5 {known_script id="jquery.fcbkcomplete" src=$ROOT_URL|@cat:"template-common/lib/plugins/jquery.fcbkcomplete.js"} 
     5{known_script id="jquery.fcbkcomplete" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.fcbkcomplete.js"} 
    66{literal} 
    77<script type="text/javascript"> 
  • trunk/admin/themes/default/template/plugins_new.tpl

    r5036 r5123  
    1 {known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"} 
    2 {known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"template-common/lib/plugins/jquery.cluetip.packed.js"} 
     1{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"} 
     2{known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.cluetip.packed.js"} 
    33 
    44<script type="text/javascript"> 
  • trunk/admin/themes/default/template/plugins_update.tpl

    r5039 r5123  
    1 {known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"} 
    2 {known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"template-common/lib/plugins/jquery.cluetip.packed.js"} 
     1{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"} 
     2{known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.cluetip.packed.js"} 
    33 
    44<script type="text/javascript"> 
  • trunk/admin/themes/default/template/upgrade.tpl

    r5021 r5123  
    66<meta http-equiv="Content-script-type" content="text/javascript"> 
    77<meta http-equiv="Content-Style-Type" content="text/css"> 
    8 <link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}template-common/favicon.ico"> 
    9 <link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/template/{$themeconf.template}/layout.css"> 
    10 <link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/template/{$themeconf.template}/default-colors.css"> 
    11 <link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/template/{$themeconf.template}/theme/{$themeconf.theme}/theme.css"> 
     8<link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}{$themeconf.icon_dir}/favicon.ico"> 
     9 
     10{foreach from=$themes item=theme} 
     11{if isset($theme.local_head)}{include file=$theme.local_head}{/if} 
     12<link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/themes/{$theme.name}/theme.css"> 
     13{/foreach} 
     14 
    1215{literal} 
    1316<style type="text/css"> 
  • trunk/admin/themes/default/template/user_list.tpl

    r5036 r5123  
    219219    <td>{'Interface theme'|@translate}</td> 
    220220    <td> 
    221       <label><input type="radio" name="template_action" value="leave" checked="checked"> {'leave'|@translate}</label> 
    222       <label><input type="radio" name="template_action" value="set" id="template_action_set"> {'set to'|@translate}</label> 
    223       <select onchange="document.getElementById('template_action_set').checked = true;" name="template" size="1"> 
    224         {html_options values=$template_options output=$template_options selected=$template_selected} 
     221      <label><input type="radio" name="theme_action" value="leave" checked="checked"> {'leave'|@translate}</label> 
     222      <label><input type="radio" name="theme_action" value="set" id="theme_action_set"> {'set to'|@translate}</label> 
     223      <select onchange="document.getElementById('theme_action_set').checked = true;" name="theme" size="1"> 
     224        {html_options values=$theme_options output=$theme_options selected=$theme_selected} 
    225225      </select> 
    226226    </td> 
  • trunk/admin/themes/roma/mail-css.tpl

    r3283 r5123  
    66#copyright {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/footer-bg.png) no-repeat scroll left bottom; 
    77color: #69c;} 
    8 h2 {ldelim} background-color: #222;color:#eee;background-image: url({$ROOT_URL}template/{$themeconf.template}/theme/{$themeconf.theme}/images/tableh1_bg.png);} 
     8h2 {ldelim} background-color: #222;color:#eee;background-image: url({$ROOT_URL}template/{$themeconf.template}/themes/{$themeconf.theme}/images/tableh1_bg.png);} 
    99img {ldelim} margin: 16px; padding:15px;border:1px solid #eee; -moz-border-radius: 4px; border-radius: 4px 4px; } 
    1010img:hover {ldelim} border:1px solid #69c; -moz-border-radius: 4px; border-radius: 4px 4px; } 
  • trunk/admin/themes/roma/themeconf.inc.php

    r3282 r5123  
    55} 
    66$themeconf = array( 
    7   'template' => 'goto', /* Goto Admin template */ 
    8   'theme' => 'roma',    /* "roma" is the foundation theme of Piwigo */ 
    9   'icon_dir' => 'template/yoga/icon', 
    10   'admin_icon_dir' => 'admin/template/goto/icon', 
    11   'mime_icon_dir' => 'template/yoga/icon/mimetypes/', 
     7  'theme'  => 'roma', 
     8  'parent' => 'default', 
    129  'selected_admin_menu' => selected_admin_menu(), 
    13   'local_head' => '', 
    1410); 
    1511?> 
  • trunk/admin/user_list.php

    r5036 r5123  
    386386 
    387387  $formfields = 
    388     array('nb_image_line', 'nb_line_page', 'template', 'language', 
     388    array('nb_image_line', 'nb_line_page', 'theme', 'language', 
    389389          'recent_period', 'maxwidth', 'expand', 'show_nb_comments', 
    390390          'show_nb_hits', 'maxheight', 'status', 'enabled_high', 
     
    584584 
    585585// Template Options 
    586 $template->assign('template_options', get_pwg_themes()); 
    587 $template->assign('template_selected', 
    588     isset($_POST['pref_submit']) ? $_POST['template'] : get_default_template()); 
     586$template->assign('theme_options', get_pwg_themes()); 
     587$template->assign('theme_selected', 
     588    isset($_POST['pref_submit']) ? $_POST['theme'] : get_default_theme()); 
    589589 
    590590// Language options 
     
    593593    isset($_POST['pref_submit']) ? $_POST['language'] : get_default_language()); 
    594594 
    595 Log::getInstance()->debug($status); 
     595//Log::getInstance()->debug($status); 
    596596// Status options 
    597597foreach (get_enums(USER_INFOS_TABLE, 'status') as $status) 
  • trunk/include/common.inc.php

    r5021 r5123  
    159159    or (defined('PWG_HELP') and PWG_HELP)) 
    160160{// Admin template 
    161   list($user['admin_template'], $user['admin_theme']) = 
    162     explode ('/', $conf['admin_layout']); 
    163   $template = new Template(PHPWG_ROOT_PATH.'admin/template/' 
    164     . $user['admin_template'], $user['admin_theme'] ); 
     161  $template = new Template(PHPWG_ROOT_PATH.'admin/themes', $conf['admin_theme']); 
    165162} 
    166163else 
    167164{ // Classic template 
    168   $template = new Template(PHPWG_ROOT_PATH.'template/' 
    169     . $user['template'], $user['theme'] ); 
     165  $template = new Template(PHPWG_ROOT_PATH.'themes', $user['theme'] ); 
    170166} 
    171167 
  • trunk/include/config_default.inc.php

    r5060 r5123  
    336336$conf['uniqueness_mode'] = 'md5sum'; 
    337337 
     338// Define default theme for your gallery 
     339$conf['default_theme'] = 'Sylvia'; 
     340 
    338341// +-----------------------------------------------------------------------+ 
    339342// |                               metadata                                | 
     
    677680// +-----------------------------------------------------------------------+ 
    678681 
    679 $conf['admin_layout'] = 'goto/roma'; 
     682$conf['admin_theme'] = 'roma'; 
    680683 
    681684// should we load the active plugins ? true=Yes, false=No 
  • trunk/include/functions.inc.php

    r5102 r5123  
    612612    trigger_action('loading_lang'); 
    613613    load_language('local.lang', '', array('no_fallback'=>true) ); 
    614     list($tmpl, $thm) = explode('/', get_default_template()); 
    615     $template = new Template(PHPWG_ROOT_PATH.'template/'.$tmpl, $thm); 
     614    $template = new Template(PHPWG_ROOT_PATH.'themes', get_default_theme()); 
    616615  } 
    617616  else 
    618617  { 
    619     $template = new Template(PHPWG_ROOT_PATH.'template/'.$user['template'], $user['theme']); 
     618    $template = new Template(PHPWG_ROOT_PATH.'themes', $user['theme']); 
    620619  } 
    621620 
     
    711710 
    712711/** 
    713  * returns available template/theme 
     712 * returns available themes 
    714713 */ 
    715714function get_pwg_themes() 
     
    718717  $themes = array(); 
    719718 
    720   $template_dir = PHPWG_ROOT_PATH.'template'; 
    721  
    722   foreach (get_dirs($template_dir) as $template) 
    723   { 
    724     if ( $template != 'default' ) 
    725         { 
    726       foreach (get_dirs($template_dir.'/'.$template.'/theme') as $theme) 
    727       { 
    728         array_push($themes, $template.'/'.$theme); 
    729       } 
    730         } 
     719  $template_dir = PHPWG_ROOT_PATH.'themes'; 
     720 
     721  foreach (get_dirs($template_dir) as $theme) 
     722  { 
     723    if ( $theme != 'default' ) 
     724          { 
     725      array_push($themes, $theme); 
     726          } 
    731727  } 
    732728 
  • trunk/include/functions_mail.inc.php

    r5021 r5123  
    153153/** 
    154154 * Returns an completed array template/theme 
    155  * completed with get_default_template() 
     155 * completed with get_default_theme() 
    156156 * 
    157157 * @params: 
    158158 *   - args: incompleted array of template/theme 
    159  *       o template: template to use [default get_default_template()] 
    160  *       o theme: template to use [default get_default_template()] 
     159 *       o template: template to use [default get_default_theme()] 
     160 *       o theme: template to use [default get_default_theme()] 
    161161 */ 
    162162function get_array_template_theme($args = array()) 
     
    168168  if (empty($args['template']) or empty($args['theme'])) 
    169169  { 
    170     list($res['template'], $res['theme']) = explode('/', get_default_template()); 
     170    list($res['template'], $res['theme']) = explode('/', get_default_theme()); 
    171171  } 
    172172 
     
    190190 *   - email_format: mail format 
    191191 *   - args: function params of mail function: 
    192  *       o template: template to use [default get_default_template()] 
    193  *       o theme: template to use [default get_default_template()] 
    194  */ 
    195 function & get_mail_template($email_format, $args = array()) 
    196 { 
    197   $args = get_array_template_theme($args); 
    198  
    199   $mail_template = new Template(PHPWG_ROOT_PATH.'template/'.$args['template'], $args['theme']); 
    200   $mail_template->set_template_dir(PHPWG_ROOT_PATH.'template/'.$args['template'].'/mail/'.$email_format); 
     192 *       o template: template to use [default get_default_theme()] 
     193 *       o theme: template to use [default get_default_theme()] 
     194 */ 
     195function & get_mail_template($email_format, $theme='') 
     196{ 
     197  if (empty($theme)) 
     198  { 
     199    $theme = get_default_theme(); 
     200  } 
     201 
     202  $mail_template = new Template(PHPWG_ROOT_PATH.'themes', $theme, 'template/mail/'.$email_format); 
     203 
    201204  return $mail_template; 
    202205} 
     
    418421  $query = ' 
    419422SELECT 
    420   distinct language, template 
     423  distinct language, theme 
    421424FROM 
    422425  '.USER_GROUP_TABLE.' as ug 
     
    443446    while ($row = pwg_db_fetch_assoc($result)) 
    444447    { 
    445       $row['template_theme'] = $row['template']; 
    446       list($row['template'], $row['theme']) = explode('/', $row['template_theme']); 
    447448      $list[] = $row; 
    448449    } 
     
    462463    AND group_id = '.$group_id.' 
    463464    AND language = \''.$elem['language'].'\' 
    464     AND template = \''.$elem['template_theme'].'\' 
     465    AND theme = \''.$elem['theme'].'\' 
    465466;'; 
    466467 
     
    482483          switch_lang_to($elem['language']); 
    483484 
    484           $mail_template = get_mail_template($email_format, $elem); 
     485          $mail_template = get_mail_template($email_format, $elem['theme']); 
    485486          $mail_template->set_filename($tpl_shortname, $tpl_shortname.'.tpl'); 
    486487 
     
    498499              'content' => $mail_template->parse($tpl_shortname, true), 
    499500              'content_format' => $email_format, 
    500               'template' => $elem['template'], 
    501501              'theme' => $elem['theme'] 
    502502            ) 
     
    525525 *       o content_format: format of mail content  [default value 'text/plain'] 
    526526 *       o email_format: global mail format  [default value $conf_mail['default_email_format']] 
    527  *       o template: template to use [default get_default_template()] 
    528  *       o theme: template to use [default get_default_template()] 
     527 *       o theme: template to use [default get_default_theme()] 
    529528 * 
    530529 * @return boolean (Ok or not) 
     
    585584  } 
    586585 
    587   $args = array_merge($args, get_array_template_theme($args)); 
     586  if (empty($args['theme'])) 
     587  { 
     588    $args['theme'] = get_default_theme(); 
     589  } 
    588590 
    589591  $headers = 'From: '.$args['from']."\n"; 
     
    618620  { 
    619621    // key compose of indexes witch allow ti cache mail data 
    620     $cache_key = $content_type.'-'.$lang_info['code'].'-'.$args['template'].'-'.$args['theme']; 
     622    $cache_key = $content_type.'-'.$lang_info['code'].'-'.$args['theme']; 
    621623 
    622624    if (!isset($conf_mail[$cache_key])) 
    623625    { 
    624       if (!isset($conf_mail[$cache_key]['template'])) 
     626      if (!isset($conf_mail[$cache_key]['theme'])) 
    625627      { 
    626         $conf_mail[$cache_key]['template'] = get_mail_template($content_type); 
     628        $conf_mail[$cache_key]['theme'] = get_mail_template($content_type); 
    627629      } 
    628630 
    629       $conf_mail[$cache_key]['template']->set_filename('mail_header', 'header.tpl'); 
    630       $conf_mail[$cache_key]['template']->set_filename('mail_footer', 'footer.tpl'); 
    631  
    632       $conf_mail[$cache_key]['template']->assign( 
     631      $conf_mail[$cache_key]['theme']->set_filename('mail_header', 'header.tpl'); 
     632      $conf_mail[$cache_key]['theme']->set_filename('mail_footer', 'footer.tpl'); 
     633 
     634      $conf_mail[$cache_key]['theme']->assign( 
    633635        array( 
    634636          //Header 
     
    653655      if ($content_type == 'text/html') 
    654656      { 
    655         if (is_file($conf_mail[$cache_key]['template']->get_template_dir().'/global-mail-css.tpl')) 
     657        /* 
     658        if (is_file($conf_mail[$cache_key]['theme']->get_template_dir().'/global-mail-css.tpl')) 
    656659        { 
    657           $conf_mail[$cache_key]['template']->set_filename('css', 'global-mail-css.tpl'); 
    658           $conf_mail[$cache_key]['template']->assign_var_from_handle('GLOBAL_MAIL_CSS', 'css'); 
     660          $conf_mail[$cache_key]['theme']->set_filename('css', 'global-mail-css.tpl'); 
     661          $conf_mail[$cache_key]['theme']->assign_var_from_handle('GLOBAL_MAIL_CSS', 'css'); 
    659662        } 
    660  
    661         $root_abs_path = dirname(dirname(__FILE__)); 
    662  
    663         $file = $root_abs_path.'/template/'.$args['template'].'/theme/'.$args['theme'].'/mail-css.tpl'; 
     663        */ 
     664 
     665        $file = PHPWG_ROOT_PATH.'themes/'.$args['theme'].'/mail-css.tpl'; 
    664666        if (is_file($file)) 
    665667        { 
    666           $conf_mail[$cache_key]['template']->set_filename('css', $file); 
    667           $conf_mail[$cache_key]['template']->assign_var_from_handle('MAIL_CSS', 'css'); 
     668          $conf_mail[$cache_key]['theme']->set_filename('css', realpath($file)); 
     669          $conf_mail[$cache_key]['theme']->assign_var_from_handle('MAIL_CSS', 'css'); 
    668670        } 
    669  
     671        /* 
    670672        $file = $root_abs_path.'/template-common/local-mail-css.tpl'; 
    671673        if (is_file($file)) 
     
    674676          $conf_mail[$cache_key]['template']->assign_var_from_handle('LOCAL_MAIL_CSS', 'css'); 
    675677        } 
     678        */ 
    676679      } 
    677680 
    678681      // what are displayed on the header of each mail ? 
    679682      $conf_mail[$cache_key]['header'] = 
    680         $conf_mail[$cache_key]['template']->parse('mail_header', true); 
     683        $conf_mail[$cache_key]['theme']->parse('mail_header', true); 
    681684 
    682685      // what are displayed on the footer of each mail ? 
    683686      $conf_mail[$cache_key]['footer'] = 
    684         $conf_mail[$cache_key]['template']->parse('mail_footer', true); 
     687        $conf_mail[$cache_key]['theme']->parse('mail_footer', true); 
    685688    } 
    686689 
     
    714717  $content.= "\n".'-----='.$conf_mail['boundary_key'].'--'."\n"; 
    715718  } 
    716  
    717719 
    718720  //~ // Close boundary 
  • trunk/include/functions_user.inc.php

    r5060 r5123  
    246246  $user['nb_image_page'] = $user['nb_image_line'] * $user['nb_line_page']; 
    247247 
    248   list($user['template'], $user['theme']) = explode('/', $user['template']); 
     248  // Check user theme 
     249  if (!file_exists(PHPWG_ROOT_PATH.'themes/'.$user['theme'].'/themeconf.inc.php')) 
     250  { 
     251    $user['theme'] = $conf['default_theme']; 
     252  } 
    249253 
    250254  return $user; 
     
    842846 * 
    843847 */ 
    844 function get_default_template() 
    845 { 
    846   return get_default_user_value('template', PHPWG_DEFAULT_TEMPLATE); 
     848function get_default_theme() 
     849{ 
     850  return get_default_user_value('theme', PHPWG_DEFAULT_TEMPLATE); 
    847851} 
    848852 
  • trunk/include/template.class.php

    r5101 r5123  
    5353  var $html_head_elements = array(); 
    5454 
    55   function Template($root = ".", $theme= "") 
     55  function Template($root = ".", $theme= "", $path = "template") 
    5656  { 
    5757    global $conf, $lang_info; 
     
    7878    } 
    7979 
     80    $this->smarty->template_dir = array(); 
    8081    if ( !empty($theme) ) 
    8182    { 
    82       include($root.'/theme/'.$theme.'/themeconf.inc.php'); 
    83       $this->smarty->assign('themeconf', $themeconf); 
     83      $this->set_theme($root, $theme, $path); 
    8484    } 
    8585 
    8686    $this->smarty->assign('lang_info', $lang_info); 
    87  
    88     $this->set_template_dir($root); 
    8987 
    9088    if (!defined('IN_ADMIN') and isset($conf['extents_for_templates'])) 
     
    9694 
    9795  /** 
    98    * Sets the template root directory for this Template object. 
    99    * Revised from Piwigo 2.1 to add modeling support 
    100    */ 
     96   * Load theme's parameters. 
     97   */ 
     98  function set_theme($root, $theme, $path) 
     99  { 
     100    $this->set_template_dir($root.'/'.$theme.'/'.$path); 
     101 
     102    include($root.'/'.$theme.'/themeconf.inc.php'); 
     103 
     104    if (isset($themeconf['parent'])) 
     105    { 
     106      $this->set_theme($root, $themeconf['parent'], $path); 
     107    } 
     108 
     109    $tpl_var = array('name' => $themeconf['theme']); 
     110    if (file_exists($root.'/'.$theme.'/local_head.tpl')) 
     111    { 
     112      $tpl_var['local_head'] = realpath($root.'/'.$theme.'/local_head.tpl'); 
     113    } 
     114    $this->smarty->append('themes', $tpl_var); 
     115    $this->smarty->append('themeconf', $themeconf, true); 
     116  } 
     117 
    101118  function set_template_dir($dir) 
    102119  { 
    103     $modeling = $this->get_themeconf('modeling'); 
    104         if (!defined('IN_ADMIN') and ($modeling !== false))  
    105         { // Modeling is active only on gallery side and never in admin 
    106           // Set the normal directory 
    107       $this->smarty->template_dir = array($dir); 
    108           // Modeling by theme parameter 
    109           $model = './template/' . $modeling; 
    110       if ( $model != './template/' and is_dir($model)) 
    111           { 
    112                 $this->smarty->template_dir[] = $model; 
    113       } 
    114           // Default template directory 
    115           $this->smarty->template_dir[] = './template/default'; 
    116         } 
    117     else 
    118         { 
    119       $this->smarty->template_dir = $dir; 
    120         } 
    121     $real_dir = realpath($dir); 
    122     $compile_id = crc32( $real_dir===false ? $dir : $real_dir); 
    123     $this->smarty->compile_id = base_convert($compile_id, 10, 36 ); 
     120    $this->smarty->template_dir[] = $dir; 
     121 
     122    if (!isset($this->smarty->compile_id)) 
     123    { 
     124      $real_dir = realpath($dir); 
     125      $compile_id = crc32( $real_dir===false ? $dir : $real_dir); 
     126      $this->smarty->compile_id = base_convert($compile_id, 10, 36 ); 
     127    } 
    124128  } 
    125129 
     
    197201  function set_extents($filename_array, $dir='', $overwrite=true) 
    198202  { 
     203    global $user; 
     204 
    199205    if (!is_array($filename_array)) 
    200206    { 
     
    221227 
    222228      if ((stripos(implode('',array_keys($_GET)), '/'.$param) !== false or $param == 'N/A') 
    223         and (preg_match('/'.preg_quote($tpl,'/').'$/', $this->get_template_dir()) or $tpl == 'N/A') 
     229        and ($tpl == $user['theme'] or $tpl == 'N/A') 
    224230        and (!isset($this->extents[$handle]) or $overwrite) 
    225231        and file_exists($dir . $filename)) 
  • trunk/install.php

    r5022 r5123  
    219219//----------------------------------------------------- template initialization 
    220220include( PHPWG_ROOT_PATH .'include/template.class.php'); 
    221 $template = new Template(PHPWG_ROOT_PATH.'admin/template/goto', 'roma'); 
     221$template = new Template(PHPWG_ROOT_PATH.'admin/themes', 'roma'); 
    222222$template->set_filenames( array('install' => 'install.tpl') ); 
    223223if (!isset($step)) 
  • trunk/install/php5_apache_configuration.php

    r5021 r5123  
    7676<meta http-equiv="Content-script-type" content="text/javascript"> 
    7777<meta http-equiv="Content-Style-Type" content="text/css"> 
    78 <link rel="shortcut icon" type="image/x-icon" href="template-common/favicon.ico"> 
    79 <link rel="stylesheet" type="text/css" href="admin/template/goto/layout.css"> 
    80 <link rel="stylesheet" type="text/css" href="admin/template/goto/default-colors.css"> 
    81 <link rel="stylesheet" type="text/css" href="admin/template/goto/theme/roma/theme.css"> 
     78<link rel="shortcut icon" type="image/x-icon" href="themes/default/icon/favicon.ico"> 
     79<link rel="stylesheet" type="text/css" href="admin/themes/roma/default-colors.css"> 
     80<link rel="stylesheet" type="text/css" href="admin/themes/roma/theme.css"> 
    8281<style type="text/css"> 
    8382.content { 
  • trunk/install/piwigo_structure-mysql.sql

    r4410 r5123  
    389389  `show_nb_hits` enum('true','false') NOT NULL default 'false', 
    390390  `recent_period` tinyint(3) unsigned NOT NULL default '7', 
    391   `template` varchar(255) NOT NULL default 'yoga/Sylvia', 
     391  `theme` varchar(255) NOT NULL default 'Sylvia', 
    392392  `registration_date` datetime NOT NULL default '0000-00-00 00:00:00', 
    393393  `enabled_high` enum('true','false') NOT NULL default 'true', 
  • trunk/install/piwigo_structure-pdo-sqlite.sql

    r4967 r5123  
    450450  "show_nb_hits" BOOLEAN default false, 
    451451  "recent_period" INTEGER default 7 NOT NULL, 
    452   "template" VARCHAR(255) default 'yoga/Sylvia' NOT NULL, 
     452  "theme" VARCHAR(255) default 'Sylvia' NOT NULL, 
    453453  "registration_date" TIMESTAMP NOT NULL, 
    454454  "enabled_high" BOOLEAN default true, 
  • trunk/install/piwigo_structure-pgsql.sql

    r4410 r5123  
    548548  "show_nb_hits" BOOLEAN default false, 
    549549  "recent_period" INTEGER default 7 NOT NULL, 
    550   "template" VARCHAR(255) default 'yoga/Sylvia' NOT NULL, 
     550  "theme" VARCHAR(255) default 'Sylvia' NOT NULL, 
    551551  "registration_date" TIMESTAMP NOT NULL, 
    552552  "enabled_high" BOOLEAN default true, 
  • trunk/install/piwigo_structure-sqlite.sql

    r4781 r5123  
    450450  "show_nb_hits" BOOLEAN default false, 
    451451  "recent_period" INTEGER default 7 NOT NULL, 
    452   "template" VARCHAR(255) default 'yoga/Sylvia' NOT NULL, 
     452  "theme" VARCHAR(255) default 'Sylvia' NOT NULL, 
    453453  "registration_date" TIMESTAMP NOT NULL, 
    454454  "enabled_high" BOOLEAN default true, 
  • trunk/profile.php

    r5021 r5123  
    203203    $fields = array( 
    204204      'nb_image_line', 'nb_line_page', 'language', 'maxwidth', 'maxheight', 
    205       'expand', 'show_nb_comments', 'show_nb_hits', 'recent_period', 'template' 
     205      'expand', 'show_nb_comments', 'show_nb_hits', 'recent_period', 'theme' 
    206206      ); 
    207207 
     
    258258      )); 
    259259 
    260   foreach (get_pwg_themes() as $pwg_template) 
    261   { 
    262     if (isset($_POST['submit']) 
    263       or $userdata['template'].'/'.$userdata['theme'] == $pwg_template) 
    264     { 
    265       $template->assign('template_selection', $pwg_template); 
    266     } 
    267     $template_options[$pwg_template] = $pwg_template; 
     260  foreach (get_pwg_themes() as $pwg_theme) 
     261  { 
     262    if (isset($_POST['submit']) or $userdata['theme'] == $pwg_theme) 
     263    { 
     264      $template->assign('template_selection', $pwg_theme); 
     265    } 
     266    $template_options[$pwg_theme] = $pwg_theme; 
    268267  } 
    269268  $template->assign('template_options', $template_options); 
  • trunk/themes/Sylvia/mail-css.tpl

    r3283 r5123  
    66#copyright {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/footer-bg.jpg) no-repeat scroll left bottom; 
    77min-height: 220px; height: 220px; width: 100%; min-width: 100%; padding: 10px 100px 30px 100px; } 
    8 h2 {ldelim} color:#f70;background: transparent url({$ROOT_URL}template/{$themeconf.template}/theme/{$themeconf.theme}/images/fillet.gif) repeat-x scroll left bottom; padding-bottom: 5px;} 
     8h2 {ldelim} color:#f70;background: transparent url({$ROOT_URL}template/{$themeconf.template}/themes/{$themeconf.theme}/images/fillet.gif) repeat-x scroll left bottom; padding-bottom: 5px;} 
    99img {ldelim} margin: 16px; border: 16px solid #444; -moz-border-radius: 4px; border-radius: 4px 4px; } 
    1010img:hover {ldelim} padding: 15px; border: 0; background-color:#222;-moz-border-radius: 4px; border-radius: 4px 4px; } 
  • trunk/themes/Sylvia/themeconf.inc.php

    r3282 r5123  
    11<?php 
    22$themeconf = array( 
    3   'template' => 'yoga', 
    4   'theme' => 'Sylvia', 
    5   'icon_dir' => 'template/yoga/theme/Sylvia/icon', 
    6   'admin_icon_dir' => 'template/yoga/icon/admin', 
    7   'mime_icon_dir' => 'template/yoga/theme/Sylvia/icon/mimetypes/', 
    8   'local_head' => ' 
    9 <!--[if IE]>  
    10         <link rel="stylesheet" href="template/yoga/theme/Sylvia/theme-ie.css" type="text/css"> 
    11 <![endif]--> 
    12   ', 
     3  'theme'         => 'Sylvia', 
     4  'parent'        => 'default', 
     5  'icon_dir'      => 'themes/Sylvia/icon', 
     6  'mime_icon_dir' => 'themes/Sylvia/icon/mimetypes/', 
    137); 
    148?> 
  • trunk/themes/clear/themeconf.inc.php

    r3282 r5123  
    11<?php 
    22$themeconf = array( 
    3   'template' => 'yoga', 
    4   'theme' => 'clear', 
    5   'icon_dir' => 'template/yoga/icon', 
    6   'admin_icon_dir' => 'template/yoga/icon/admin', 
    7   'mime_icon_dir' => 'template/yoga/icon/mimetypes/', 
    8   'local_head' => '', 
     3  'theme'  => 'clear', 
     4  'parent' => 'default', 
    95); 
    106?> 
  • trunk/themes/dark/mail-css.tpl

    r3283 r5123  
    66#copyright {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/footer-bg.png) no-repeat scroll left bottom; 
    77color: #69c;} 
    8 h2 {ldelim} background-color: #333;color:#fff48e;background-image: url({$ROOT_URL}template/{$themeconf.template}/theme/{$themeconf.theme}/images/tableh1_bg.png);} 
     8h2 {ldelim} background-color: #333;color:#fff48e;background-image: url({$ROOT_URL}template/{$themeconf.template}/themes/{$themeconf.theme}/images/tableh1_bg.png);} 
    99img {ldelim} margin: 16px; border: 16px solid #111; -moz-border-radius: 4px; border-radius: 4px 4px; } 
    1010img:hover {ldelim} padding: 15px; border: 1px solid yellow;background-color:#444;-moz-border-radius: 4px; border-radius: 4px 4px; } 
  • trunk/themes/dark/themeconf.inc.php

    r3282 r5123  
    11<?php 
    22$themeconf = array( 
    3   'template' => 'yoga', 
    4   'theme' => 'dark', 
    5   'icon_dir' => 'template/yoga/icon', 
    6   'admin_icon_dir' => 'template/yoga/icon/admin', 
    7   'mime_icon_dir' => 'template/yoga/icon/mimetypes/', 
    8   'local_head' => '', 
     3  'theme'  => 'dark', 
     4  'parent' => 'default', 
    95); 
    106?> 
  • trunk/themes/default/default-layout.css

    r3283 r5123  
    273273        cursor : pointer; 
    274274} 
     275 
     276/* Set the width of the menubar for the galery */ 
     277#menubar { 
     278  width: 18em; 
     279} 
     280.content { 
     281  margin-left: 20em;  /* = #menubar width + 2em */ 
     282} 
     283/* Set minimum width of the page before getting a scrollbar */ 
     284/* IE5 and IE6 don't get that */ 
     285BODY { 
     286  min-width: 60em;  /* ~ 3* #menubar width */ 
     287} 
     288BODY#thePopuphelpPage { 
     289  min-width: 0; 
     290} 
     291 
     292/* Set some sizes according to your maximum thumbnail width and height */ 
     293.content UL.thumbnails SPAN, 
     294.content UL.thumbnails SPAN.wrap2 A, 
     295.content UL.thumbnails LABEL, 
     296.content DIV.thumbnailCategory DIV.illustration { 
     297  width: 140px;      /* max thumbnail width + 2px */ 
     298} 
     299.content UL.thumbnails SPAN.wrap2, 
     300.content DIV.thumbnailCategory DIV.description { 
     301  height: 140px;    /* max thumbnail height + 2px */ 
     302} 
     303 
     304 
     305/* Category thumbnails on main page */ 
     306.content UL.thumbnailCategories LI { 
     307  width: 49.7%;    /* 49.7% for 2 per line, 33.2% for 3 per line*/ 
     308} 
     309 
     310/* Set defaults for thumbnails legend */ 
     311.content UL.thumbnails SPAN.thumbLegend { 
     312  display: block;  /* display: none; if you don't want legend */ 
     313  height: 4em;    /* legend height (don't set auto to be Gecko friendly)*/ 
     314} 
  • trunk/themes/default/template/header.tpl

    r5095 r5123  
    2121<title>{$GALLERY_TITLE} | {$PAGE_TITLE}</title>{else} 
    2222<title>{$PAGE_TITLE} | {$GALLERY_TITLE}</title>{/if} 
    23 <link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}template-common/favicon.ico"> 
     23<link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}{$themeconf.icon_dir}/favicon.ico"> 
    2424 
    2525<link rel="start" title="{'Home'|@translate}" href="{$U_HOME}" > 
     
    3131{if isset($U_UP)          }<link rel="up" title="{'Thumbnails'|@translate}" href="{$U_UP}" >{/if} 
    3232 
    33 <link rel="stylesheet" type="text/css" href="{$ROOT_URL}template/{$themeconf.template}/layout.css"> 
    34 {* the next css is used to fix khtml (Konqueror/Safari) issue the "text/nonsense" prevents gecko based browsers to load it *} 
    35 <link rel="stylesheet" type="text/nonsense" href="{$ROOT_URL}template/{$themeconf.template}/fix-khtml.css"> 
    36 <!--[if lt IE 7]> 
    37         <link rel="stylesheet" type="text/css" href="{$ROOT_URL}template/{$themeconf.template}/fix-ie5-ie6.css"> 
    38 <![endif]--> 
    39 <!--[if gt IE 6]> 
    40         <link rel="stylesheet" type="text/css" href="{$ROOT_URL}template/{$themeconf.template}/fix-ie7.css"> 
    41 <![endif]--> 
    42 <!--[if !IE]> <--> 
    43         <link rel="stylesheet" href="{$ROOT_URL}template/{$themeconf.template}/not-ie.css" type="text/css"> 
    44 <!--> <![endif]--> 
    45 <link rel="stylesheet" type="text/css" media="print" href="{$ROOT_URL}template/{$themeconf.template}/print.css"> 
    46 <link rel="stylesheet" type="text/css" href="{$ROOT_URL}template/{$themeconf.template}/theme/{$themeconf.theme}/theme.css"> 
    47 {$themeconf.local_head} 
     33{foreach from=$themes item=theme} 
     34{if isset($theme.local_head)}{include file=$theme.local_head}{/if} 
     35<link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/{$theme.name}/theme.css"> 
     36{/foreach} 
     37 
    4838{if isset($U_PREFETCH)          }<link rel="prefetch" href="{$U_PREFETCH}">{/if} 
    4939 
    5040{if not empty($page_refresh)    }<meta http-equiv="refresh" content="{$page_refresh.TIME};url={$page_refresh.U_REFRESH}">{/if} 
    5141 
    52 <script type="text/javascript" src="{$ROOT_URL}template-common/scripts.js"></script> 
     42<script type="text/javascript" src="{$ROOT_URL}{$themeconf.js_dir}/scripts.js"></script> 
    5343<!--[if lt IE 7]> 
    54 <style> 
    55         {* only because we need {$ROOT_URL} otherwise use fix-ie5-ie6.css *} 
    56         BODY {ldelim} behavior:url("{$ROOT_URL}template-common/csshover.htc"); } 
    57         A IMG, .button, .icon {ldelim} 
    58                 behavior:url("{$ROOT_URL}template-common/tooltipfix.htc"); 
    59         } 
    60         FORM {ldelim} behavior: url("{$ROOT_URL}template-common/inputfix.htc"); } 
    61 </style> 
    62 <script type="text/javascript" src="{$ROOT_URL}template-common/pngfix.js"></script> 
     44<script type="text/javascript" src="{$ROOT_URL}{$themeconf.js_dir}/pngfix.js"></script> 
    6345<![endif]--> 
    6446 
  • trunk/themes/default/template/include/autosize.inc.tpl

    r5095 r5123  
    1 {known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"} 
    2 {known_script id="jquery.autogrow" src=$ROOT_URL|@cat:"template-common/lib/plugins/jquery.autogrow-textarea.js"} 
     1{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"} 
     2{known_script id="jquery.autogrow" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.autogrow-textarea.js"} 
    33 
    44{* Auto size and auto grow textarea *} 
  • trunk/themes/default/template/include/datepicker.inc.tpl

    r5095 r5123  
    11 
    2 {known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"} 
    3 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"template-common/lib/ui/packed/ui.core.packed.js"} 
    4 {known_script id="jquery.ui.datepicker" src=$ROOT_URL|@cat:"template-common/lib/ui/packed/ui.datepicker.packed.js"} 
    5 {known_script id="datepicker.js" src=$ROOT_URL|@cat:"template-common/datepicker.js"} 
     2{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"} 
     3{known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"} 
     4{known_script id="jquery.ui.datepicker" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.datepicker.packed.js"} 
     5{known_script id="datepicker.js" src=$ROOT_URL|@cat:"themes/default/js/datepicker.js"} 
    66 
    7 {assign var="datepicker_language" value="template-common/lib/ui/i18n/ui.datepicker-"|@cat:$lang_info.code|@cat:".js"} 
     7{assign var="datepicker_language" value="themes/default/js/ui/i18n/ui.datepicker-"|@cat:$lang_info.code|@cat:".js"} 
    88 
    99{if "PHPWG_ROOT_PATH"|@constant|@cat:$datepicker_language|@file_exists} 
     
    1212 
    1313{html_head} 
    14 <link rel="stylesheet" type="text/css" href="{$ROOT_URL}template-common/lib/ui/theme/ui.datepicker.css"> 
     14<link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/default/js/ui/themes/ui.datepicker.css"> 
    1515{/html_head} 
    1616 
  • trunk/themes/default/template/include/resize.inc.tpl

    r5095 r5123  
    1 {known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"} 
    2 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"template-common/lib/ui/packed/ui.core.packed.js"} 
    3 {known_script id="jquery.ui.resizable" src=$ROOT_URL|@cat:"template-common/lib/ui/packed/ui.resizable.packed.js"} 
     1{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"} 
     2{known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"} 
     3{known_script id="jquery.ui.resizable" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.resizable.packed.js"} 
    44 
    55{* Resize possible *} 
  • trunk/themes/default/template/picture.tpl

    r5112 r5123  
    191191                        {/if} 
    192192                        {/foreach} 
    193                         <script type="text/javascript" src="{$ROOT_URL}template/{$themeconf.template}/rating.js"></script> 
     193                        <script type="text/javascript" src="{$ROOT_URL}themes/default/js/rating.js"></script> 
    194194                        <script type="text/javascript"> 
    195195                        makeNiceRatingForm( {ldelim}rootUrl: '{$ROOT_URL|@escape:"javascript"}', image_id: {$current.id}, 
  • trunk/themes/default/template/profile_content.tpl

    r5095 r5123  
    6060          <label for="template">{'Interface theme'|@translate}</label> 
    6161        </span> 
    62         {html_options name=template options=$template_options selected=$template_selection} 
     62        {html_options name=theme options=$template_options selected=$template_selection} 
    6363      </li> 
    6464      <li> 
  • trunk/themes/p0w0/mail-css.tpl

    r3283 r5123  
    66#copyright {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/footer-bg.png) no-repeat scroll left bottom; 
    77color: #69c;} 
    8 h2 {ldelim} color:#fff;background: #369 url({$ROOT_URL}template/{$themeconf.template}/theme/{$themeconf.theme}/images/button-bg.png);} 
     8h2 {ldelim} color:#fff;background: #369 url({$ROOT_URL}template/{$themeconf.template}/themes/{$themeconf.theme}/images/button-bg.png);} 
    99img {ldelim} margin:16px;padding:15px;border:1px solid #69c;background-color:#eef;-moz-border-radius:4px; border-radius:4px 4px; } 
    1010img:hover {ldelim} border: 1px solid #c60; -moz-border-radius:4px; border-radius:4px 4px; } 
  • trunk/themes/p0w0/themeconf.inc.php

    r3282 r5123  
    11<?php 
    22$themeconf = array( 
    3   'template' => 'yoga', 
    4   'theme' => 'p0w0', 
    5   'icon_dir' => 'template/yoga/icon', 
    6   'admin_icon_dir' => 'template/yoga/icon/admin', 
    7   'mime_icon_dir' => 'template/yoga/icon/mimetypes/', 
    8   'local_head' => '', 
     3  'theme'  => 'p0w0', 
     4  'parent' => 'default', 
    95); 
    106?> 
  • trunk/themes/wipi/mail-css.tpl

    r3283 r5123  
    66#copyright {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/footer-bg.png) no-repeat scroll left bottom; 
    77color: #69c;} 
    8 h2 {ldelim} background-color: #222;color:#eee;background-image: url({$ROOT_URL}template/{$themeconf.template}/theme/{$themeconf.theme}/images/tableh1_bg.png);} 
     8h2 {ldelim} background-color: #222;color:#eee;background-image: url({$ROOT_URL}template/{$themeconf.template}/themes/{$themeconf.theme}/images/tableh1_bg.png);} 
    99img {ldelim} margin: 16px; padding:15px;border:1px solid #eee; -moz-border-radius: 4px; border-radius: 4px 4px; } 
    1010img:hover {ldelim} border:1px solid #69c; -moz-border-radius: 4px; border-radius: 4px 4px; } 
  • trunk/themes/wipi/themeconf.inc.php

    r3282 r5123  
    11<?php 
    22$themeconf = array( 
    3   'template' => 'yoga', 
    4   'theme' => 'wipi', 
    5   'icon_dir' => 'template/yoga/icon', 
    6   'admin_icon_dir' => 'template/yoga/icon/admin', 
    7   'mime_icon_dir' => 'template/yoga/icon/mimetypes/', 
    8   'local_head' => '', 
     3  'theme'  => 'wipi', 
     4  'parent' => 'default', 
    95); 
    106if ( !isset($lang['Theme: wipi']) ) 
  • trunk/upgrade.php

    r5021 r5123  
    191191 
    192192include( PHPWG_ROOT_PATH .'include/template.class.php'); 
    193 $template = new Template(PHPWG_ROOT_PATH.'admin/template/goto', 'roma'); 
     193$template = new Template(PHPWG_ROOT_PATH.'admin/themes', 'roma'); 
    194194$template->set_filenames(array('upgrade'=>'upgrade.tpl')); 
    195195$template->assign(array( 
Note: See TracChangeset for help on using the changeset viewer.