diff options
Diffstat (limited to 'doc/Datastore-hacks.md')
-rw-r--r-- | doc/Datastore-hacks.md | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/doc/Datastore-hacks.md b/doc/Datastore-hacks.md index 33aa2223..ef6f6d50 100644 --- a/doc/Datastore-hacks.md +++ b/doc/Datastore-hacks.md | |||
@@ -12,8 +12,13 @@ exit; | |||
12 | ``` | 12 | ``` |
13 | This will output the internal representation of the datastore, "unobfuscated" (if this can really be considered obfuscation). | 13 | This will output the internal representation of the datastore, "unobfuscated" (if this can really be considered obfuscation). |
14 | 14 | ||
15 | Alternatively, you can transform to JSON format (and pretty-print if you have `jq` installed): | ||
16 | ``` | ||
17 | php -r 'print(json_encode(unserialize(gzinflate(base64_decode(preg_replace("!.*/\* (.+) \*/.*!", "$1", file_get_contents("data/datastore.php")))))));' | jq . | ||
18 | ``` | ||
19 | |||
15 | ### Changing the timestamp for a link | 20 | ### Changing the timestamp for a link |
16 | * Look for `<input type="hidden" name="lf_linkdate" value="{$link.linkdate}">` in `tpl/editlink.tpl` (line 14) | 21 | * Look for `<input type="hidden" name="lf_linkdate" value="{$link.linkdate}">` in `tpl/editlink.tpl` (line 14) |
17 | * Remove `type="hidden"` from this line | 22 | * Replace `type="hidden"` with `type="text"` from this line |
18 | * A new date/time field becomes available in the edit/new link dialog. | 23 | * A new date/time field becomes available in the edit/new link dialog. |
19 | * You can set the timestamp manually by entering it in the format `YYYMMDD_HHMMS`. | 24 | * You can set the timestamp manually by entering it in the format `YYYMMDD_HHMMS`. |