Changeset 21355


Ignore:
Timestamp:
03/08/13 12:40:14 (6 years ago)
Author:
mistic100
Message:

question_mark_in_url=false and update css overload

Location:
extensions/theme_switch/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/theme_switch/trunk/main.inc.php

    r16241 r21355  
    3737if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 
    3838 
     39if (mobile_theme()) 
     40{ 
     41  return; 
     42} 
     43 
    3944define('THEME_SWITCH_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'); 
    4045 
  • extensions/theme_switch/trunk/style.css

    r16241 r21355  
    11#themeSwitchBox { 
     2        padding: 0.5em 5px; 
     3        border-radius: 4px; 
     4        z-index: 100; 
     5        text-align:left; 
     6        display: none; 
     7        position: absolute; 
     8        left: 0; top: 0; /*left, right set through js*/ 
    29  background-color: #555; 
    310  border: 1px solid #000; 
    411} 
    5  
    612#themeSwitchBox .switchBoxTitle { 
     13  padding-bottom:5px; 
     14  margin-bottom:5px; 
    715  border-bottom: 1px solid #444; 
    816} 
  • extensions/theme_switch/trunk/theme_switch.inc.php

    r16241 r21355  
    9494    } 
    9595  }  
     96 
     97  $safe_themes = array('clear','dark','elegant','Sylvia','simple-grey','simple-black','simple-white','kardon','luciano','montblancxl'); 
    9698   
    97   $template->assign('THEME_SWITCH_PATH', THEME_SWITCH_PATH); 
     99  $template->assign(array( 
     100    'THEME_SWITCH_PATH' => THEME_SWITCH_PATH, 
     101    'THEME_SWITCH_LOAD_STYLE' => !in_array($user['theme'], $safe_themes), 
     102    )); 
    98103   
    99104  $template->set_filename('theme_thumb', dirname(__FILE__) . '/thumb.tpl'); 
    100105  $template->concat('PLUGIN_INDEX_ACTIONS', $template->parse('theme_thumb', true)); 
    101    
    102106  $template->clear_assign('theme_thumb'); 
    103107} 
     
    119123  $template->set_filename('theme_select', dirname(__FILE__) . '/select.tpl'); 
    120124  $template->concat('PLUGIN_INDEX_ACTIONS', $template->parse('theme_select', true)); 
    121    
    122125  $template->clear_assign('theme_select'); 
    123126} 
  • extensions/theme_switch/trunk/thumb.tpl

    r16241 r21355  
    11<li>{strip}<a id="themeSwitchLink" title="{'Interface theme'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> 
    2   <span class="pwg-icon" style="background:url('{$THEME_SWITCH_PATH}icon.png') center center no-repeat;">&nbsp;</span><span class="pwg-button-text">{'Interface theme'|@translate}</span> 
     2  <span class="pwg-icon" style="background:url('{$ROOT_URL}{$THEME_SWITCH_PATH}icon.png') center center no-repeat;">&nbsp;</span><span class="pwg-button-text">{'Interface theme'|@translate}</span> 
    33</a> 
    44<div id="themeSwitchBox" class="switchBox"> 
    55  <div class="switchBoxTitle">{'Interface theme'|@translate}</div>  
    66  {foreach from=$theme_switch item=theme name=t} 
    7   <a rel="nofollow" href="{$theme.url}" title="{$theme.name}"><img src="{$theme.img}" alt="{$theme.name}" class="theme-thumb"></a> 
     7  <a rel="nofollow" href="{$theme.url}" title="{$theme.name}"><img src="{$ROOT_URL}{$theme.img}" alt="{$theme.name}" class="theme-thumb"></a> 
    88  {if ($smarty.foreach.t.index+1)%5 == 0}<br>{/if} 
    99  {/foreach} 
     
    2323{/literal}{/footer_script} 
    2424 
    25 {* <!-- switchBox structure for theme which don't include default style --> *} 
    26 {if $themeconf.parent != 'default' or (isset($themeconf.load_parent_local_head) and $themeconf.load_parent_local_head == false) } 
    27 {combine_css path=$THEME_SWITCH_PATH|@cat:"default.css"} 
    28 {/if} 
    29  
    30 {* <!-- stylish for non core themes (should be removed when all themes are updated) --> *} 
    31 {if $themeconf.name != 'clear' and $themeconf.name != 'dark' and $themeconf.name != 'elegant' and $themeconf.name != 'Sylvia'} 
     25{* <!-- stylish for themes missing .switchBox styles --> * 
     26{if $THEME_SWITCH_LOAD_STYLE} 
    3227{combine_css path=$THEME_SWITCH_PATH|@cat:"style.css"} 
    3328{/if} 
Note: See TracChangeset for help on using the changeset viewer.