diff --git a/CHANGELOG.md b/CHANGELOG.md
index c6d9f16c..bbd56273 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@
- Editor: Move mass sending e-mails to a plugin
- Plugins: Allow formatting translations using Adminer\lang_format()
- New plugin: Configure options by end-users and store them to a cookie
+- New plugin: Configure menu table links
- New plugin: Set up driver, server and database in Adminer Editor
## Adminer 5.1.1 (released 2025-04-02)
diff --git a/adminer/include/html.inc.php b/adminer/include/html.inc.php
index 543bcb4b..9193b5d5 100644
--- a/adminer/include/html.inc.php
+++ b/adminer/include/html.inc.php
@@ -100,10 +100,10 @@ function html_select(string $name, array $options, ?string $value = "", string $
/** Generate HTML radio list
* @param string[] $options
*/
-function html_radios(string $name, array $options, ?string $value = ""): string {
+function html_radios(string $name, array $options, ?string $value = "", string $separator = ""): string {
$return = "";
foreach ($options as $key => $val) {
- $return .= "";
+ $return .= "$separator";
}
return $return;
}
diff --git a/plugins/menu-links.php b/plugins/menu-links.php
new file mode 100644
index 00000000..4ba89f0d
--- /dev/null
+++ b/plugins/menu-links.php
@@ -0,0 +1,79 @@
+menu = Adminer\get_setting("menu", "adminer_config") ?: $menu;
+ }
+
+ function config() {
+ $options = array(
+ 'select' => Adminer\lang('Select'),
+ 'table' => Adminer\lang('Table'),
+ '' => $this->lang('Both'),
+ 'auto' => $this->lang('Auto (Select on select page, Table otherwise)'),
+ );
+ return array($this->lang('Menu table links') => Adminer\html_radios('menu', $options, $this->menu, "
"));
+ }
+
+ function tablesPrint(array $tables) {
+ $menu = $this->menu;
+ $titles = array(
+ 'select' => Adminer\lang('Select data'),
+ 'table' => Adminer\lang('Show structure'),
+ );
+ // this is copied from Adminer::tablesPrint()
+ echo "