Custom Themes

phpMyAdmin comes with support for third party themes. You can download additonal themes from our website at <https://www.phpmyadmin.net/themes/>.

Configuración

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

Para crear un tema:

  • make a new subdirectory (for example “your_theme_name”) under ./themes/.
  • copie los archivos y directorios de pmahomme a «nombre_del_tema»

  • edite los archivos CSS en «nombre_del_tema/css»

  • ubique las nuevas imágenes en «nombre_de_tema/img»

  • edite layout.inc.php en «nombre_del_tema»

  • edit theme.json in “your_theme_name” to contain theme metadata (see below)
  • cree una captura de pantalla del tema y guárdelo como «nombre_del_tema/screen.png»

Theme metadata

Distinto en la versión 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 arbirary and does not have to match phpMyAdmin version.

This field is required.

desciption

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 phpMyAdnin 4.8:

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

Sharing images

Si no desea utilizar sus propios símbolos y botones, elimine el directorio «img» de «nombre_del_tema». phpMyAdmin utilizará los iconos y botones predeterminados (del tema de sistema pmahomme).