]> git.immae.eu Git - github/shaarli/Shaarli.git/blame - doc/html/Various-hacks/index.html
Merge pull request #911 from virtualtam/fix/release/composer
[github/shaarli/Shaarli.git] / doc / html / Various-hacks / index.html
CommitLineData
53ed6d7d 1<!DOCTYPE html>
2<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
3<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
4<head>
5 <meta charset="utf-8">
6 <meta http-equiv="X-UA-Compatible" content="IE=edge">
7 <meta name="viewport" content="width=device-width, initial-scale=1.0">
8
9
10 <link rel="shortcut icon" href="../img/favicon.ico">
0433c688 11 <title>Various hacks - Shaarli Documentation</title>
53ed6d7d 12 <link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
13
14 <link rel="stylesheet" href="../css/theme.css" type="text/css" />
15 <link rel="stylesheet" href="../css/theme_extra.css" type="text/css" />
16 <link rel="stylesheet" href="../css/highlight.css">
17 <link href="../github-markdown.css" rel="stylesheet">
18
19 <script>
20 // Current page data
0433c688 21 var mkdocs_page_name = "Various hacks";
22 var mkdocs_page_input_path = "Various-hacks.md";
23 var mkdocs_page_url = "/Various-hacks/";
53ed6d7d 24 </script>
25
26 <script src="../js/jquery-2.1.1.min.js"></script>
27 <script src="../js/modernizr-2.8.3.min.js"></script>
28 <script type="text/javascript" src="../js/highlight.pack.js"></script>
29
30</head>
31
32<body class="wy-body-for-nav" role="document">
33
34 <div class="wy-grid-for-nav">
35
36
37 <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
38 <div class="wy-side-nav-search">
39 <a href=".." class="icon icon-home"> Shaarli Documentation</a>
40 <div role="search">
41 <form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
42 <input type="text" name="q" placeholder="Search docs" />
43 </form>
44</div>
45 </div>
46
47 <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
48 <ul class="current">
49
50
51 <li class="toctree-l1">
52
53 <a class="" href="..">Home</a>
54 </li>
55
56 <li class="toctree-l1">
57
58 <span class="caption-text">Setup</span>
59 <ul class="subnav">
60 <li class="">
61
62 <a class="" href="../Download-and-Installation/">Download and Installation</a>
63 </li>
64 <li class="">
65
66 <a class="" href="../Upgrade-and-migration/">Upgrade and migration</a>
67 </li>
68 <li class="">
69
70 <a class="" href="../Server-requirements/">Server requirements</a>
71 </li>
72 <li class="">
73
74 <a class="" href="../Server-configuration/">Server configuration</a>
75 </li>
76 <li class="">
77
78 <a class="" href="../Server-security/">Server security</a>
79 </li>
80 <li class="">
81
82 <a class="" href="../Shaarli-configuration/">Shaarli configuration</a>
83 </li>
84 <li class="">
85
86 <a class="" href="../Plugins/">Plugins</a>
87 </li>
88 </ul>
89 </li>
90
91 <li class="toctree-l1">
92
93 <span class="caption-text">Docker</span>
94 <ul class="subnav">
95 <li class="">
96
3a6f91a9 97 <a class="" href="../docker/docker-101/">Docker 101</a>
53ed6d7d 98 </li>
99 <li class="">
100
3a6f91a9 101 <a class="" href="../docker/shaarli-images/">Shaarli images</a>
53ed6d7d 102 </li>
103 <li class="">
104
3a6f91a9 105 <a class="" href="../docker/reverse-proxy-configuration/">Reverse proxy configuration</a>
53ed6d7d 106 </li>
107 <li class="">
108
3a6f91a9 109 <a class="" href="../docker/resources/">Docker resources</a>
53ed6d7d 110 </li>
111 </ul>
112 </li>
113
114 <li class="toctree-l1">
115
116 <span class="caption-text">Usage</span>
117 <ul class="subnav">
118 <li class="">
119
120 <a class="" href="../Features/">Features</a>
121 </li>
122 <li class="">
123
124 <a class="" href="../Bookmarklet/">Bookmarklet</a>
125 </li>
126 <li class="">
127
128 <a class="" href="../Browsing-and-searching/">Browsing and searching</a>
129 </li>
130 <li class="">
131
132 <a class="" href="../Firefox-share/">Firefox share</a>
133 </li>
134 <li class="">
135
136 <a class="" href="../RSS-feeds/">RSS feeds</a>
137 </li>
138 <li class="">
139
140 <a class="" href="../REST-API/">REST API</a>
141 </li>
142 </ul>
143 </li>
144
145 <li class="toctree-l1">
146
147 <span class="caption-text">How To</span>
148 <ul class="subnav">
149 <li class="">
150
151 <a class="" href="../Backup,-restore,-import-and-export/">Backup, restore, import and export</a>
53ed6d7d 152 </li>
153 <li class=" current">
154
0433c688 155 <a class="current" href="./">Various hacks</a>
53ed6d7d 156 <ul class="subnav">
157
158 <li class="toctree-l3"><a href="#decode-datastore-content">Decode datastore content</a></li>
159
160
0433c688 161 <li class="toctree-l3"><a href="#changing-the-timestamp-for-a-shaare">Changing the timestamp for a shaare</a></li>
162
163
164 <li class="toctree-l3"><a href="#see-also">See also</a></li>
53ed6d7d 165
166
167 </ul>
168 </li>
169 </ul>
170 </li>
171
172 <li class="toctree-l1">
173
174 <a class="" href="../Troubleshooting/">Troubleshooting</a>
175 </li>
176
177 <li class="toctree-l1">
178
179 <span class="caption-text">Development</span>
180 <ul class="subnav">
181 <li class="">
182
183 <a class="" href="../Development-guidelines/">Development guidelines</a>
184 </li>
185 <li class="">
186
187 <a class="" href="../Continuous-integration-tools/">Continuous integration tools</a>
188 </li>
189 <li class="">
190
191 <a class="" href="../GnuPG-signature/">GnuPG signature</a>
192 </li>
193 <li class="">
194
195 <a class="" href="../Coding-guidelines/">Coding guidelines</a>
196 </li>
197 <li class="">
198
199 <a class="" href="../Directory-structure/">Directory structure</a>
200 </li>
201 <li class="">
202
203 <a class="" href="../3rd-party-libraries/">3rd party libraries</a>
204 </li>
205 <li class="">
206
207 <a class="" href="../Plugin-System/">Plugin System</a>
208 </li>
209 <li class="">
210
211 <a class="" href="../Release-Shaarli/">Release Shaarli</a>
212 </li>
213 <li class="">
214
215 <a class="" href="../Versioning-and-Branches/">Versioning and Branches</a>
216 </li>
217 <li class="">
218
219 <a class="" href="../Security/">Security</a>
220 </li>
221 <li class="">
222
223 <a class="" href="../Static-analysis/">Static analysis</a>
224 </li>
225 <li class="">
226
227 <a class="" href="../Theming/">Theming</a>
228 </li>
229 <li class="">
230
231 <a class="" href="../Unit-tests/">Unit tests</a>
232 </li>
233 </ul>
234 </li>
235
236 <li class="toctree-l1">
237
238 <span class="caption-text">About</span>
239 <ul class="subnav">
240 <li class="">
241
242 <a class="" href="../FAQ/">FAQ</a>
243 </li>
244 <li class="">
245
246 <a class="" href="../Community-&-Related-software/">Community & Related software</a>
247 </li>
248 </ul>
249 </li>
250
251 </ul>
252 </div>
253 &nbsp;
254 </nav>
255
256 <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
257
258
259 <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
260 <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
261 <a href="..">Shaarli Documentation</a>
262 </nav>
263
264
265 <div class="wy-nav-content">
266 <div class="rst-content">
267 <div role="navigation" aria-label="breadcrumbs navigation">
268 <ul class="wy-breadcrumbs">
269 <li><a href="..">Docs</a> &raquo;</li>
270
271
272
273 <li>How To &raquo;</li>
274
275
276
0433c688 277 <li>Various hacks</li>
53ed6d7d 278 <li class="wy-breadcrumbs-aside">
279
0433c688 280 <a href="https://github.com/shaarli/Shaarli/edit/master/docs/Various-hacks.md"
53ed6d7d 281 class="icon icon-github"> Edit on GitHub</a>
282
283 </li>
284 </ul>
285 <hr/>
286</div>
287 <div role="main">
288 <div class="section">
289
290 <h3 id="decode-datastore-content">Decode datastore content</h3>
291<p>To display the array representing the data saved in <code>data/datastore.php</code>, use the following snippet:</p>
292<pre><code class="php">$data = &quot;tZNdb9MwFIb... &lt;Commented content inside datastore.php&gt;&quot;;
293$out = unserialize(gzinflate(base64_decode($data)));
294echo &quot;&lt;pre&gt;&quot;; // Pretty printing is love, pretty printing is life
295print_r($out);
296echo &quot;&lt;/pre&gt;&quot;;
297exit;
298</code></pre>
299
300<p>This will output the internal representation of the datastore, "unobfuscated" (if this can really be considered obfuscation).</p>
301<p>Alternatively, you can transform to JSON format (and pretty-print if you have <code>jq</code> installed):</p>
302<pre><code>php -r 'print(json_encode(unserialize(gzinflate(base64_decode(preg_replace(&quot;!.*/\* (.+) \*/.*!&quot;, &quot;$1&quot;, file_get_contents(&quot;data/datastore.php&quot;)))))));' | jq .
303</code></pre>
304
0433c688 305<h3 id="changing-the-timestamp-for-a-shaare">Changing the timestamp for a shaare</h3>
53ed6d7d 306<ul>
307<li>Look for <code>&lt;input type="hidden" name="lf_linkdate" value="{$link.linkdate}"&gt;</code> in <code>tpl/editlink.tpl</code> (line 14)</li>
308<li>Replace <code>type="hidden"</code> with <code>type="text"</code> from this line</li>
309<li>A new date/time field becomes available in the edit/new link dialog.</li>
310<li>You can set the timestamp manually by entering it in the format <code>YYYMMDD_HHMMS</code>.</li>
0433c688 311</ul>
312<h3 id="see-also">See also</h3>
313<ul>
314<li><a href="https://gist.github.com/nodiscc/8b0194921f059d7b9ad89a581ecd482c">Add a new custom field to shaares (example patch)</a></li>
315<li><a href="https://gist.github.com/nodiscc/dede231c92cab22c3ad2cc24d5035012">Download CSS styles for shaarlis listed in an opml file</a></li>
316<li><a href="https://gist.github.com/nodiscc/ed161c66e5b028b5299b0a3733d01c77">Copy an existing Shaarli installation over SSH, and serve it locally</a></li>
317<li><a href="https://gist.github.com/nodiscc/52e711cda3bc47717c16065231cf6b20">Create multiple Shaarli instances, generate an HTML index of them</a></li>
53ed6d7d 318</ul>
319
320 </div>
321 </div>
322 <footer>
323
324 <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
325
326 <a href="../Troubleshooting/" class="btn btn-neutral float-right" title="Troubleshooting">Next <span class="icon icon-circle-arrow-right"></span></a>
327
328
0433c688 329 <a href="../Backup,-restore,-import-and-export/" class="btn btn-neutral" title="Backup, restore, import and export"><span class="icon icon-circle-arrow-left"></span> Previous</a>
53ed6d7d 330
331 </div>
332
333
334 <hr/>
335
336 <div role="contentinfo">
337 <!-- Copyright etc -->
338
339 </div>
340
341 Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
342</footer>
343
344 </div>
345 </div>
346
347 </section>
348
349 </div>
350
351 <div class="rst-versions" role="note" style="cursor: pointer">
352 <span class="rst-current-version" data-toggle="rst-current-version">
353
354 <a href="https://github.com/shaarli/Shaarli" class="fa fa-github" style="float: left; color: #fcfcfc"> GitHub</a>
355
356
0433c688 357 <span><a href="../Backup,-restore,-import-and-export/" style="color: #fcfcfc;">&laquo; Previous</a></span>
53ed6d7d 358
359
360 <span style="margin-left: 15px"><a href="../Troubleshooting/" style="color: #fcfcfc">Next &raquo;</a></span>
361
362 </span>
363</div>
364 <script src="../js/theme.js"></script>
365
366</body>
367</html>