LoginSignup
0
1

More than 5 years have passed since last update.

phpMyAdmin で、環境ごとにテーマを変える

Posted at

phpMyAdminで、接続先サーバーごとにテーマを変えたかったので探してみたら、あった。

config.inc.php
$i=0;
$i++;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$_COOKIE['pma_theme-' . $i] = 'big_green';

$i++;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = '127.0.0.2';
$_COOKIE['pma_theme-' . $i] = 'big_blue';

$i++;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = '127.0.0.3';
$_COOKIE['pma_theme-' . $i] = 'big_red';
# Needed for server base theme
$cfg['ThemePerServer'] = true;

あとは、テーマを勝手に変更されないように、変更箇所を潰す。

index.php
235 // ThemeManager if available
236 /*
237 if ($GLOBALS['cfg']['ThemeManager']) {
238     echo '<li id="li_select_theme" class="no_bullets">';
239     echo PMA_Util::getImage('s_theme.png') . " "
240             .  $_SESSION['PMA_Theme_Manager']->getHtmlSelectBox();
241     echo '</li>';
242 }
243 */
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1