custom themes — phpmyadmin 5.2.0 documentation-尊龙登录

phpmyadmin comes with support for third party themes. you can download additional themes from our website at <>.

configuration

themes are configured with $cfg['thememanager'] and $cfg['themedefault']. under ./themes/, you should not delete the directory pmahomme or its underlying structure, because this is the system theme used by phpmyadmin. pmahomme contains all images and styles, for backwards compatibility and for all themes that would not include images or css-files. if $cfg['thememanager'] is enabled, you can select your favorite theme on the main page. your selected theme will be stored in a cookie.

creating custom theme

to create a theme:

  • make a new subdirectory (for example “your_theme_name”) under ./themes/.

  • copy the files and directories from pmahomme to “your_theme_name”

  • edit the css-files in “your_theme_name/css”

  • put your new images in “your_theme_name/img”

  • edit _variables.scss in “your_theme_name/scss”

  • edit theme.json in “your_theme_name” to contain theme metadata (see below)

  • make a new screenshot of your theme and save it under “your_theme_name/screen.png”

theme metadata

changed in version 4.8.0: before 4.8.0 the theme metadata was passed in the info.inc.php file. it has been replaced by theme.json to allow easier parsing (without need to handle php code) and to support additional features.

in theme directory there is file theme.json which contains theme metadata. currently it consists of:

name

display name of the theme.

this field is required.

version

theme version, can be quite arbitrary and does not have to match phpmyadmin version.

this field is required.

description

theme description. this will be shown on the website.

this field is required.

author

theme author name.

this field is required.

url

link to theme author website. it’s good idea to have way for getting support there.

supports

array of supported phpmyadmin major versions.

this field is required.

for example, the definition for original theme shipped with phpmyadmin 4.8:

{
    "name": "original",
    "version": "4.8",
    "description": "original phpmyadmin theme",
    "author": "phpmyadmin developers",
    "url": "https://www.phpmyadmin.net/",
    "supports": ["4.8"]
}

sharing images

if you do not want to use your own symbols and buttons, remove the directory “img” in “your_theme_name”. phpmyadmin will use the default icons and buttons (from the system-theme pmahomme).