Skip to content

Commit

Permalink
Fix: eldy theme still works without css3
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Apr 17, 2012
1 parent 66531ea commit 220d7a2
Show file tree
Hide file tree
Showing 6 changed files with 123 additions and 92 deletions.
6 changes: 1 addition & 5 deletions htdocs/core/class/conf.class.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -357,11 +357,7 @@ function setValues($db)
$this->product->limit_size=$this->global->PRODUIT_LIMIT_SIZE; $this->product->limit_size=$this->global->PRODUIT_LIMIT_SIZE;


// conf->theme et $this->css // conf->theme et $this->css
if (empty($this->global->MAIN_THEME)) if (empty($this->global->MAIN_THEME)) $this->global->MAIN_THEME="eldy";
{
if (isset($_SERVER["HTTP_USER_AGENT"]) && preg_match('/(epiphany|iceweasel)/i',$_SERVER["HTTP_USER_AGENT"])) $this->global->MAIN_THEME="auguria";
else $this->global->MAIN_THEME="eldy";
}
$this->theme=$this->global->MAIN_THEME; $this->theme=$this->global->MAIN_THEME;
$this->css = "/theme/".$this->theme."/style.css.php"; $this->css = "/theme/".$this->theme."/style.css.php";


Expand Down
1 change: 1 addition & 0 deletions htdocs/core/lib/functions.lib.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ function getBrowserInfo()
elseif (preg_match('/chrome(\/|\s)([\d\.]+)/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='chrome'; $version=$reg[2]; } // we can have 'chrome (Mozilla...) chrome x.y' in one string elseif (preg_match('/chrome(\/|\s)([\d\.]+)/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='chrome'; $version=$reg[2]; } // we can have 'chrome (Mozilla...) chrome x.y' in one string
elseif (preg_match('/chrome/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='chrome'; } elseif (preg_match('/chrome/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='chrome'; }
elseif (preg_match('/iceweasel/i',$_SERVER["HTTP_USER_AGENT"])) { $name='iceweasel'; $version=$reg[2]; } elseif (preg_match('/iceweasel/i',$_SERVER["HTTP_USER_AGENT"])) { $name='iceweasel'; $version=$reg[2]; }
elseif (preg_match('/epiphany/i',$_SERVER["HTTP_USER_AGENT"])) { $name='epiphany'; $version=$reg[2]; }
elseif ((empty($phone) || preg_match('/iphone/i',$_SERVER["HTTP_USER_AGENT"])) && preg_match('/safari(\/|\s)([\d\.]*)/i',$_SERVER["HTTP_USER_AGENT"], $reg)) { $name='safari'; $version=$reg[2]; } // Safari is often present in string for mobile but its not. elseif ((empty($phone) || preg_match('/iphone/i',$_SERVER["HTTP_USER_AGENT"])) && preg_match('/safari(\/|\s)([\d\.]*)/i',$_SERVER["HTTP_USER_AGENT"], $reg)) { $name='safari'; $version=$reg[2]; } // Safari is often present in string for mobile but its not.
elseif (preg_match('/opera(\/|\s)([\d\.]*)/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='opera'; $version=$reg[2]; } elseif (preg_match('/opera(\/|\s)([\d\.]*)/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='opera'; $version=$reg[2]; }
elseif (preg_match('/msie(\/|\s)([\d\.]*)/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='ie'; $version=$reg[2]; } // MS products at end elseif (preg_match('/msie(\/|\s)([\d\.]*)/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='ie'; $version=$reg[2]; } // MS products at end
Expand Down
2 changes: 1 addition & 1 deletion htdocs/main.inc.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -1222,7 +1222,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
$loginhtmltext.='<br><b>'.$langs->trans("CurrentTheme").'</b>: '.$conf->theme; $loginhtmltext.='<br><b>'.$langs->trans("CurrentTheme").'</b>: '.$conf->theme;
$s=picto_from_langcode($langs->getDefaultLang()); $s=picto_from_langcode($langs->getDefaultLang());
$loginhtmltext.='<br><b>'.$langs->trans("CurrentUserLanguage").'</b>: '.($s?$s.' ':'').$langs->getDefaultLang(); $loginhtmltext.='<br><b>'.$langs->trans("CurrentUserLanguage").'</b>: '.($s?$s.' ':'').$langs->getDefaultLang();
$loginhtmltext.='<br><b>'.$langs->trans("Browser").'</b>: '.$conf->browser->name.' ('.$_SERVER['HTTP_USER_AGENT'].')'; $loginhtmltext.='<br><b>'.$langs->trans("Browser").'</b>: '.$conf->browser->name.($conf->browser->version?' '.$conf->browser->version:'').' ('.$_SERVER['HTTP_USER_AGENT'].')';
if (! empty($conf->browser->phone)) $loginhtmltext.='<br><b>'.$langs->trans("Phone").'</b>: '.$conf->browser->phone; if (! empty($conf->browser->phone)) $loginhtmltext.='<br><b>'.$langs->trans("Phone").'</b>: '.$conf->browser->phone;
if (! empty($_SESSION["disablemodules"])) $loginhtmltext.='<br><b>'.$langs->trans("DisabledModules").'</b>: <br>'.join(', ',explode(',',$_SESSION["disablemodules"])); if (! empty($_SESSION["disablemodules"])) $loginhtmltext.='<br><b>'.$langs->trans("DisabledModules").'</b>: <br>'.join(', ',explode(',',$_SESSION["disablemodules"]));


Expand Down
Binary file added htdocs/theme/eldy/img/liste_titre.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added htdocs/theme/eldy/img/liste_titre2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 220d7a2

Please sign in to comment.