X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=doc%2FDatastore-hacks.md;h=ef6f6d505c4a44f0574f96f4aeb4dba20b48856e;hb=fdf88d194874a533cf3a8de3d317d70018aa8a62;hp=33aa222390541323340389023da1a7434d9c8ed7;hpb=27cf2e671d1f35bd8c9383d008cd3733fc1c6e0d;p=github%2Fshaarli%2FShaarli.git 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; ``` This will output the internal representation of the datastore, "unobfuscated" (if this can really be considered obfuscation). +Alternatively, you can transform to JSON format (and pretty-print if you have `jq` installed): +``` +php -r 'print(json_encode(unserialize(gzinflate(base64_decode(preg_replace("!.*/\* (.+) \*/.*!", "$1", file_get_contents("data/datastore.php")))))));' | jq . +``` + ### Changing the timestamp for a link * Look for `` in `tpl/editlink.tpl` (line 14) -* Remove `type="hidden"` from this line +* Replace `type="hidden"` with `type="text"` from this line * A new date/time field becomes available in the edit/new link dialog. * You can set the timestamp manually by entering it in the format `YYYMMDD_HHMMS`.