Changeset 21355 for extensions
- Timestamp:
- Mar 8, 2013, 12:40:14 PM (12 years ago)
- Location:
- extensions/theme_switch/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/theme_switch/trunk/main.inc.php
r16241 r21355 37 37 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 38 38 39 if (mobile_theme()) 40 { 41 return; 42 } 43 39 44 define('THEME_SWITCH_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'); 40 45 -
extensions/theme_switch/trunk/style.css
r16241 r21355 1 1 #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*/ 2 9 background-color: #555; 3 10 border: 1px solid #000; 4 11 } 5 6 12 #themeSwitchBox .switchBoxTitle { 13 padding-bottom:5px; 14 margin-bottom:5px; 7 15 border-bottom: 1px solid #444; 8 16 } -
extensions/theme_switch/trunk/theme_switch.inc.php
r16241 r21355 94 94 } 95 95 } 96 97 $safe_themes = array('clear','dark','elegant','Sylvia','simple-grey','simple-black','simple-white','kardon','luciano','montblancxl'); 96 98 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 )); 98 103 99 104 $template->set_filename('theme_thumb', dirname(__FILE__) . '/thumb.tpl'); 100 105 $template->concat('PLUGIN_INDEX_ACTIONS', $template->parse('theme_thumb', true)); 101 102 106 $template->clear_assign('theme_thumb'); 103 107 } … … 119 123 $template->set_filename('theme_select', dirname(__FILE__) . '/select.tpl'); 120 124 $template->concat('PLUGIN_INDEX_ACTIONS', $template->parse('theme_select', true)); 121 122 125 $template->clear_assign('theme_select'); 123 126 } -
extensions/theme_switch/trunk/thumb.tpl
r16241 r21355 1 1 <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;"> </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;"> </span><span class="pwg-button-text">{'Interface theme'|@translate}</span> 3 3 </a> 4 4 <div id="themeSwitchBox" class="switchBox"> 5 5 <div class="switchBoxTitle">{'Interface theme'|@translate}</div> 6 6 {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> 8 8 {if ($smarty.foreach.t.index+1)%5 == 0}<br>{/if} 9 9 {/foreach} … … 23 23 {/literal}{/footer_script} 24 24 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} 32 27 {combine_css path=$THEME_SWITCH_PATH|@cat:"style.css"} 33 28 {/if}
Note: See TracChangeset
for help on using the changeset viewer.