1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-06 14:46:36 +02:00

Plugins: Link screenshot

This commit is contained in:
Jakub Vrana
2025-04-07 19:09:53 +02:00
parent e33ead15e5
commit bf24198e68
12 changed files with 55 additions and 9 deletions

View File

@@ -100,7 +100,12 @@ if (
$description = $match[1];
}
}
echo "<li><b>" . get_class($plugin) . "</b>" . h($description ? ": $description" : "") . "\n";
$screenshot = (method_exists($plugin, 'screenshot') ? $plugin->screenshot() : "");
echo "<li><b>" . get_class($plugin) . "</b>"
. h($description ? ": $description" : "")
. ($screenshot ? " (<a href='" . h($screenshot) . "'" . target_blank() . ">" . lang('screenshot') . "</a>)" : "")
. "\n"
;
}
echo "</ul>\n";
echo "</div>\n";

View File

@@ -12,6 +12,13 @@ abstract class Plugin {
return $this->lang('');
}
/** Get URL of plugin screenshot
* @return string
*/
function screenshot() {
return "";
}
/** Translate a string from static::$translations; use Adminer\lang() for strings used by Adminer
* @param literal-string $idf
* @param float|string $number

View File

@@ -13,9 +13,6 @@ Lang::$translations = array(
'Logged as: %s' => 'Přihlášen jako: %s',
'Logout successful.' => 'Odhlášení proběhlo v pořádku.',
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => 'Díky za použití Admineru, <a href="https://www.adminer.org/cs/donation/">přispějte</a> na vývoj.',
'Loaded plugins' => 'Nahrané pluginy',
'%s must <a%s>return an array</a>.' => '%s musí <a%s>vracet pole</a>.',
'<a%s>Configure</a> %s in %s.' => '<a%s>Nakonfigurujte</a> %s v %s.',
'Invalid credentials.' => 'Neplatné přihlašovací údaje.',
'There is a space in the input password which might be the cause.' => 'Problém může být, že je v zadaném hesle mezera.',
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => 'Adminer nepodporuje přístup k databázi bez hesla, <a href="https://www.adminer.org/cs/password/"%s>více informací</a>.',
@@ -352,6 +349,11 @@ Lang::$translations = array(
'Check has been created.' => 'Kontrola byla vytvořena.',
'Check has been altered.' => 'Kontrola byla změněna.',
'Check has been dropped.' => 'Kontrola byla odstraněna.',
'Loaded plugins' => 'Nahrané pluginy',
'%s must <a%s>return an array</a>.' => '%s musí <a%s>vracet pole</a>.',
'<a%s>Configure</a> %s in %s.' => '<a%s>Nakonfigurujte</a> %s v %s.',
'screenshot' => 'obrázek',
);
// run `php ../../lang.php cs` to update this file

View File

@@ -13,9 +13,6 @@ Lang::$translations = array(
'Logged as: %s' => 'Xx: %s',
'Logout successful.' => 'Xx.',
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => 'Xx <a href="https://www.adminer.org/en/donation/">xx</a>.',
'Loaded plugins' => 'Xx',
'%s must <a%s>return an array</a>.' => '%s xx <a%s>xx</a>.',
'<a%s>Configure</a> %s in %s.' => '<a%s>Xx</a> %s xx %s.',
'Invalid credentials.' => 'Xx.',
'There is a space in the input password which might be the cause.' => 'Xx.',
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => 'Xx, <a href="https://www.adminer.org/en/password/"%s>xx</a>.',
@@ -354,6 +351,11 @@ Lang::$translations = array(
'Check has been created.' => 'Xx.',
'Check has been altered.' => 'Xx.',
'Check has been dropped.' => 'Xx.',
'Loaded plugins' => 'Xx',
'%s must <a%s>return an array</a>.' => '%s xx <a%s>xx</a>.',
'<a%s>Configure</a> %s in %s.' => '<a%s>Xx</a> %s xx %s.',
'screenshot' => 'xx',
);
// run `php ../../lang.php xx` to update this file

View File

@@ -1,7 +1,6 @@
<?php
/** Display links to tables referencing current row, same as in Adminer Editor
* @link https://www.adminer.org/static/plugins/backward-keys.png
* @link https://www.adminer.org/plugins/#use
* @author Jakub Vrana, https://www.vrana.cz/
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
@@ -53,6 +52,10 @@ ORDER BY ORDINAL_POSITION", null, "") as $row
}
}
function screenshot() {
return "https://www.adminer.org/static/plugins/backward-keys.png";
}
protected static $translations = array(
'cs' => array('' => 'Zobrazí odkazy na tabulky odkazující aktuální řádek, stejně jako Adminer Editor'),
);

View File

@@ -98,6 +98,10 @@ addEventListener('DOMContentLoaded', () => {
return true;
}
function screenshot() {
return "https://www.adminer.org/static/plugins/codemirror.gif";
}
protected static $translations = array(
'cs' => array('' => 'Použít CodeMirror 5 pro zvýrazňování syntaxe a <textarea> včetně našeptávání klíčových slov a tabulek'),
);

View File

@@ -67,6 +67,10 @@ class AdminerConfig extends Adminer\Plugin {
}
}
function screenshot() {
return "https://www.adminer.org/static/plugins/config.png";
}
protected static $translations = array(
'cs' => array(
'' => 'Konfigurace možností uživateli a jejich uložení do cookie',

View File

@@ -39,6 +39,10 @@ if (saved) {
;
}
function screenshot() {
return "https://www.adminer.org/static/plugins/dark-switcher.gif";
}
protected static $translations = array(
'cs' => array('' => 'Dovoluje přepínání světlého a tmavého vzhledu'),
);

View File

@@ -39,6 +39,10 @@ class AdminerDesigns extends Adminer\Plugin {
echo "</form>\n";
}
function screenshot() {
return "https://www.adminer.org/static/plugins/designs.png";
}
protected static $translations = array(
'cs' => array('' => 'Umožní změnit vzhled'),
'de' => array('' => 'Designwechsel ermöglichen'),

View File

@@ -51,6 +51,10 @@ class AdminerLoginOtp extends Adminer\Plugin {
return ($unpacked[1] & 0x7FFFFFFF) % 1e6;
}
function screenshot() {
return "https://www.adminer.org/static/login-otp.png";
}
protected static $translations = array(
'cs' => array('' => 'Při přihlášení požaduje jednorázové heslo'),
'de' => array('' => 'Bei der Anmeldung ist ein Einmalpasswort (Zwei-Faktor-Authentifizierung) erforderlich'),

View File

@@ -67,6 +67,10 @@ class AdminerMenuLinks extends Adminer\Plugin {
return true;
}
function screenshot() {
return "https://www.adminer.org/static/plugins/menu-links.png";
}
protected static $translations = array(
'cs' => array(
'' => 'Konfigurace odkazů na tabulky v menu; kombinovatelné s AdminerConfig',

View File

@@ -2,7 +2,6 @@
/** AI prompt in SQL command generating the queries with Google Gemini
* Beware that this sends your whole database structure (not data) to Google Gemini.
* @link https://www.adminer.org/static/plugins/sql-gemini.gif
* @link https://gemini.google.com/
* @link https://www.adminer.org/plugins/#use
* @author Jakub Vrana, https://www.vrana.cz/
@@ -92,6 +91,10 @@ geminiText.onkeydown = event => {
<?php
}
function screenshot() {
return "https://www.adminer.org/static/plugins/sql-gemini.gif";
}
// use the phrases from https://gemini.google.com/
protected static $translations = array(
'cs' => array(