diff --git a/Compile-Adminer-with-Plugin(s)-and-Design.md b/Compile-Adminer-with-Plugin(s)-and-Design.md new file mode 100644 index 0000000..74dc2df --- /dev/null +++ b/Compile-Adminer-with-Plugin(s)-and-Design.md @@ -0,0 +1,45 @@ +# Compile Adminer with Plugin(s) and Design + +## `compile.php` +It is possible to compile a specific version of Adminer with only one translation and one database driver with the script `compile.php` +``` +Usage: php compile.php [editor] [driver] [lang] +Purpose: Compile adminer[-driver][-lang].php or editor[-driver][-lang].php. +``` +So by adding files and/or pieces of code to the Adminer sources before the compilation, it's possible to **compiled a custom version of Adminer**. + +## `compile.sh` + +### Add plugin(s) +The [`compile.sh`](https://github.com/FrancoisCapon/LoginToASqlite3DatabaseWithoutCredentialsWithAdminer/blob/master/compile.sh) from the [LoginToASqlite3DatabaseWithoutCredentialsWithAdminer](https://github.com/FrancoisCapon/LoginToASqlite3DatabaseWithoutCredentialsWithAdminer) repository is written to embedded this plugin but it can be easily modified to embedded any other plugin(s) in a dedicated version of Adminer: +```bash +echo -e "\n$step. Load plugin's sources:\n" +((step+=1)) +wget -P adminer/plugins/ https://raw.githubusercontent.com/.../master/fc-sqlite-connection-without-credentials.php +echo -e "\n$step. Adding the plugin to the sources\n" +((step+=1)) +cat << "EOPHP" >> adminer/adminer/include/bootstrap.inc.php +include "../plugins/plugin.php"; +include "../plugins/fc-sqlite-connection-without-credentials.php"; +function adminer_object() { + $plugins = array(new FCSqliteConnectionWithoutCredentials()); + return new AdminerPlugin($plugins); + } +EOPHP +``` + +### Add Adminer design +The script can also embedded design: +```bash +design=$2 +echo -e "\n$step. Set the design: $design\n" +((step+=1)) + cp $CSS_FILE $CSS_FILE.backup + cat $CSS_FILE.backup $DESIGNS_DIR/$design/adminer.css > $CSS_FILE +fi +``` + + + + + \ No newline at end of file