From 0cd85c1ce97a2adbadf145ef6f85c660489db7be Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Tue, 2 Apr 2013 18:49:32 -0700 Subject: [PATCH] Plugin for displaying JSON data --- adminer/plugin.php | 1 + plugins/json-column.php | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 plugins/json-column.php diff --git a/adminer/plugin.php b/adminer/plugin.php index 534b50f1..0e94373c 100644 --- a/adminer/plugin.php +++ b/adminer/plugin.php @@ -19,6 +19,7 @@ function adminer_object() { //~ new AdminerTinymce("../externals/tinymce/jscripts/tiny_mce/tiny_mce_dev.js"), //~ new AdminerWymeditor(array("../externals/wymeditor/src/jquery/jquery.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.explorer.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.mozilla.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.opera.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.safari.js")), new AdminerFileUpload(""), + new AdminerJsonColumn, new AdminerSlugify, new AdminerTranslation, new AdminerForeignSystem, diff --git a/plugins/json-column.php b/plugins/json-column.php new file mode 100644 index 00000000..2bb09770 --- /dev/null +++ b/plugins/json-column.php @@ -0,0 +1,21 @@ +"; + foreach ($json as $key => $val) { + echo "" . h($key) . "" . h(json_encode($val)) . ""; + } + echo ""; + } + } + +}