Jump to content

Make Dark The Default Scheme


Recommended Posts

Change the contents of includeCSS with the following

<if test="hasimportcss:|:is_array( $css['import'] )">
<if test="minifycss:|:$this->settings['use_minify']"><php>$this->minify = array();</php></if>
<foreach loop="cssImport:$css['import'] as $data">
<php>
if( $this->settings['use_minify'] AND ( ! $data['attributes'] OR stripos( $data['attributes'], 'screen' ) !== false ) ) {
$this->minify[] = "{$data['content']}";
}
</php>
<if test="donotminifycss:|:!$this->settings['use_minify'] OR ( $data['attributes'] AND stripos( $data['attributes'], 'screen' ) === false )">
<link rel="stylesheet" type="text/css" {$data['attributes']} href="{$data['content']}" />
</if>
</foreach>
<if test="csstominify:|:$this->settings['use_minify'] AND count($this->minify)">
<link rel="stylesheet" type="text/css" media='screen' href="{$this->settings['public_dir']}min/index.php?ipbv={parse expression="trim(ipsRegistry::$vn_full)"}&amp;f={parse expression="str_replace( $this->settings['public_dir'], 'public/', implode( ',', $this->minify ) )"}" />
</if>
</if>
<if test="inlinecss:|:is_array( $css['inline'] ) AND count( $css['inline'] )">
<foreach loop="cssInline:$css['inline'] as $data">
<style type="text/css" {$data['attributes']}>
{$data['content']}
</style>
</foreach>
</if>
<if test="strpos( strtolower( $this->member->user_agent ), 'windows phone os' ) != true"><link rel="stylesheet" media="only screen and (-webkit-min-device-pixel-ratio: 2)" type="text/css" href="{$this->settings['public_dir']}style_css/{$this->registry->output->skin['_csscacheid']}/iphone4.css" /></if>
<if test="substr($this->member->user_agent, 0, 10) == 'BlackBerry' OR strpos( strtolower( $this->member->user_agent ), 'webos' ) != false OR strpos( strtolower( $this->member->user_agent ), 'presto' ) != false OR strpos( strtolower( $this->member->user_agent ), 'android 2.1' ) != false OR strpos( strtolower( $this->member->user_agent ), 'windows phone os' ) != false">
<link rel="stylesheet" type="text/css" media="screen" href="{$this->settings['public_dir']}style_css/{$this->registry->output->skin['_csscacheid']}/legacy.css" />
</if>
<if test="strpos( strtolower( $this->member->user_agent ), 'windows phone os' ) != false">
<link rel="stylesheet" type="text/css" media="screen" href="{$this->settings['public_dir']}style_css/{$this->registry->output->skin['_csscacheid']}/winphone.css" />
</if>
<link rel="stylesheet" type="text/css" title="dark" media="screen" href="{$this->settings['public_dir']}style_css/{$this->registry->output->skin['_csscacheid']}/color_dark.css" />
<script type="text/javascript">

function createCookie(name,value) {
var date = new Date();
date.setTime(date.getTime()+(365*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
if (readCookie('style') != (undefined || '' || null)) {
styleName = readCookie('style');
}
else {
styleName = 'dark';
}
var StyleFile = "color_" + styleName + ".css";
document.writeln('<link rel="stylesheet" type="text/css" href="{$this->settings['public_dir']}style_css/{$this->registry->output->skin['_csscacheid']}/' + StyleFile + '">');
</script>

Link to post
×
×
  • Create New...