From 34ea0773be1f8f44622fe3c163829f05b614c6dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Vr=C3=A1na?= Date: Mon, 30 Aug 2021 10:12:11 +0200 Subject: [PATCH] Highlight syntax --- Technical-Wiki.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Technical-Wiki.md b/Technical-Wiki.md index c4038f5..3176ff0 100644 --- a/Technical-Wiki.md +++ b/Technical-Wiki.md @@ -17,7 +17,7 @@ Best project EVER. * Method ````permanentLogin()```` is used for [permanent storing passwords in cookies](https://sourceforge.net/p/adminer/discussion/960418/thread/a878c666/#99f1). Returned string is a key so you should change it to anything else (preferably random). You can also take it out but then permanent login would be disabled. The example.php can be used to limit the tables displayed to a specific list with: -```` +```php function tableName($tableStatus) { // tables without comments would return empty string and will be ignored by Adminer $allowed_tables = Array('mytable1', 'mytable2'); @@ -26,9 +26,9 @@ The example.php can be used to limit the tables displayed to a specific list wit else return ''; } -```` +``` Different possibilities with columns to be displayed in the table initial listing: -```` +```php function fieldName($field, $order = 0) { /* $field = Array @@ -79,10 +79,10 @@ $field = Array } return ""; } -```` +``` * Different number of records in listing and select choices: -```` +```php function selectLimitProcess() { return (isset($_GET["limit"]) ? $_GET["limit"] : "20"); } @@ -92,10 +92,10 @@ $field = Array echo html_select("limit", array("", "20", "50", "100"), $limit); echo "\n"; } -```` +``` * Enable Record View beside Edit link: -```` +```diff --- adminer/include/functions.inc.php Mon Jan 25 04:02:41 2016 +++ adminer/include/functions.inc.php Tue Feb 02 12:34:43 2016 @@ -864,6 +864,7 @@ @@ -156,9 +156,9 @@ $field = Array foreach ($row as $key => $val) { if (isset($names[$key])) { -```` +``` * Hide Auto-increment Primary Key in New Record Form (populate ````$hidePKfields```` as needed). Alternatively, just the table names would suffice where the primary key can be ascertained from the ````$field['primary'] == 1```` taking the field name from ````$field['field']```` element. -```` +```php function fieldName($field, $order = 0) { if ($order && preg_match('~_(md5|sha1)$~', $field["field"])) { return ""; // hide hashes in select @@ -188,11 +188,11 @@ $field = Array return ""; } -```` +``` * To link a table's (````chq_batches````) displayed field (````ORID````) value to an external file as a link with it's value in the url using a $_GET variable (````orid````): -```` +```php function selectLink($val, $field) { if ($field['field'] == 'ORID' && $_GET['select'] == 'chq_batches' && $val !== NULL) return 'orslip.php?select=chq_batches&orid='.$val; } -```` +```