]> CyberLeo.Net >> Repos - Github/YOURLS.git/blob - readme.html
Attempt at decrapping MSIE. Fixes issue 1257.
[Github/YOURLS.git] / readme.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\r
3 <head>  \r
4         <meta http-equiv="X-UA-Compatible" content="IE-9"/>\r
5         <meta http-equiv="content-type" content="text/html; charset=utf-8" />\r
6         <title>YOURLS: Your Own URL Shortener</title>\r
7         <link href='http://fonts.googleapis.com/css?family=Magra:400,700' rel='stylesheet' type='text/css'>\r
8         <style type="text/css" media="screen">\r
9                 /* Default Style */\r
10                 body {\r
11                         font-family: Verdana, Arial, sans-serif;\r
12                         font-size: 12px;\r
13                         color: #595441;\r
14                         background:#E3F3FF;\r
15                         margin-top:0px;\r
16                 }\r
17                 p {\r
18                         padding-left: 10px;\r
19                 }\r
20                 code {\r
21                         background:#eaeaef;\r
22                         padding:0 2px;\r
23                 }\r
24                 tt {\r
25                         background:#ffc;\r
26                         padding:0 2px;          \r
27                 }\r
28                 pre tt {\r
29                         display:block;\r
30                 }\r
31                 blockquote {\r
32                         margin: 10px 20px 0px 20px;\r
33                         padding: 10px;\r
34                         border: 1px solid #8d8d8d;\r
35                         background-color: #f5f5f5;\r
36                 }\r
37                 li {\r
38                         margin-top: 20px;\r
39                 }\r
40                 ul li ul li {\r
41                         margin-top: 10px;\r
42                 }\r
43                 a, a:active, a:link, a:visited {\r
44                         color: #7ba7e4;\r
45                         text-decoration: none;\r
46                 }\r
47                 a:hover {\r
48                         color: #5577a5;\r
49                         text-decoration: underline;\r
50                 }\r
51                 div.sshot {\r
52                 }\r
53                 div.sshot p {\r
54                         zcolor:#5577a5;\r
55                         zfont-size:90%;\r
56                 }\r
57                 div.sshot img {\r
58                         margin-bottom:1em;\r
59                         border:1px solid #2A85B3;\r
60                         padding:10px;\r
61                         border-radius:10px;\r
62                 }\r
63                 #fade {\r
64                         position:absolute; background: #E3F3FF; width:100%; height:230px; top:0px; left:0px; z-index:-1;\r
65                         background: -webkit-gradient(linear, left top, left bottom, from(rgba(227, 243, 255, 1)), to(rgba(227, 243, 255, 0)));\r
66                         background: -moz-linear-gradient(top,  rgba(227, 243, 255, 1),  rgba(227, 243, 255, 0.1)); /* for firefox 3.6+ */ \r
67                 }\r
68                 /* Social */\r
69                 @keyframes mymove { 0% {top:130px;} 50% {top:150px;} 100% {top:130px;} }\r
70                 @-moz-keyframes mymove { 0% {top:130px;} 50% {top:135px;} 100% {top:130px;} }\r
71                 @-webkit-keyframes mymove { 0% {top:130px;} 50% {top:140px;} 100% {top:130px;} }\r
72                 @-o-keyframes mymove { 0% {top:130px;} 50% {top:135px;} 100% {top:130px;} }\r
73                 #buttons{\r
74                         width:80px; margin-top:10px; float:right; position:absolute; margin-left: 810px;\r
75                         animation:mymove 0.5s ease 5s 7;\r
76                         -moz-animation:mymove 0.5s ease 5s 7;\r
77                         -webkit-animation:mymove 0.5s ease 5s 7;\r
78                         -o-animation:mymove 0.5s ease 5s 7;\r
79                 }\r
80                 #fb,#g1,#tw{ float:left; margin:0 5px; width: 60px; height:63px; text-align: center; margin-bottom: 10px; padding:7px 2px; border:2px solid #2A85B3; background: #E3F3FF; border-radius:10px;}\r
81                 #fb span {width:50px !important}\r
82                 /* Place Holder Style */\r
83                 #Container {\r
84                         width: 850px;\r
85                         margin-left: auto;\r
86                         margin-right: auto;\r
87                         z-index:1337;\r
88                 }\r
89                 #Content {\r
90                     background: none repeat scroll 0 0 white;\r
91                     border: 3px solid #2A85B3;\r
92                         -moz-border-radius:20px;\r
93                         -webkit-border-radius:20px;\r
94                     border-radius: 20px;\r
95                         margin-top:-13px;\r
96                     min-height: 150px;\r
97                     padding: 5px 20px 10px;\r
98                     text-align: left;\r
99                         z-index:2;\r
100                 }\r
101                 /* Title Style */\r
102                 h1{margin:0px}\r
103                 #Container h1 a {\r
104                         display:block;\r
105                         font-family: 'Magra', Verdana, Arial;\r
106                         font-size: 32px;\r
107                         font-weight: 700;\r
108                         color: #2A85B3;\r
109                         margin-top:0px;\r
110                         margin-bottom: 0px;\r
111                         background:transparent url(http://yourls.org/images/yourls-logo.png) left 5px no-repeat;\r
112                         padding-top:15px;\r
113                         height:80px;\r
114                         padding-left:220px;\r
115                         text-align:left;\r
116                 }\r
117                 h1 a:hover{text-decoration:none}\r
118                 h1 a:hover span {\r
119                         color: #88C0EB;\r
120                         text-decoration:underline;\r
121                 }\r
122                 h2 {\r
123                         font-family: 'Magra', Verdana, Arial;\r
124                         font-size: 22px;\r
125                         font-weight: 700;\r
126                         color: #5b87b4;\r
127                         margin-top:50px;\r
128                 }\r
129                 h2.first{margin-top:10px}\r
130                 h2:before {\r
131                         content: '\00BB  ';\r
132                         color:#BFE0FE;\r
133                 }\r
134                 h3 {\r
135                         font-family: 'Magra', Verdana, Arial;\r
136                         font-size: 18px;\r
137                         font-weight: bold;\r
138                         color: #73a4d6;\r
139                         margin-top:2em;\r
140                 }\r
141                 h3:before {\r
142                         content: '\203A  ';\r
143                         color:#BFE0FE;\r
144                 }\r
145                 /* Tabs */\r
146                 ul#Tabs {\r
147                         font-family: Verdana, Arial;\r
148                         font-size: 13px;\r
149                         font-weight: 400;\r
150                         list-style-type: none;\r
151                         padding-bottom: 28px;\r
152                         border-bottom: 1px solid #2A85B3;\r
153                         margin:0 30px 12px 30px;\r
154                         z-index: 1;\r
155                 }\r
156                 #Tabs li.Tab {\r
157                         float: right;\r
158                         height: 23px;\r
159                         background-color: #deedfb;\r
160                         margin: 3px 0px 0px 5px;\r
161                         border: 2px solid #2A85B3;\r
162                         -webkit-border-top-left-radius: 10px;\r
163                         -webkit-border-top-right-radius: 10px;\r
164                         -moz-border-radius-topleft: 10px;\r
165                         -moz-border-radius-topright: 10px;\r
166                         border-top-left-radius: 10px;\r
167                         border-top-right-radius: 10px;\r
168                 }\r
169                 #Tabs li.Tab a {\r
170                         float: left;\r
171                         display: block;\r
172                         color: #666666;\r
173                         text-decoration: none;\r
174                         padding: 3px 5px;\r
175                 }\r
176                 #Tabs li.Tab a:hover {\r
177                         background-color: #bfe0fe;\r
178                         -webkit-border-top-left-radius: 10px;\r
179                         -webkit-border-top-right-radius: 10px;\r
180                         -moz-border-radius-topleft: 10px;\r
181                         -moz-border-radius-topright: 10px;\r
182                         border-top-left-radius: 10px;\r
183                         border-top-right-radius: 10px;\r
184                 }\r
185                 /* Selected Tab */\r
186                 #Tabs li.SelectedTab {\r
187                         float: right;\r
188                         height: 24px;\r
189                         background-color: #fff;\r
190                         margin: 0px 0px 0px 5px;\r
191                         border-top: 2px solid #2A85B3;\r
192                         border-right: 2px solid #2A85B3;\r
193                         border-left: 2px solid #2A85B3;\r
194                         border-bottom: 6px solid #fff;\r
195                         -webkit-border-top-left-radius: 10px;\r
196                         -webkit-border-top-right-radius: 10px;\r
197                         -moz-border-radius-topleft: 10px;\r
198                         -moz-border-radius-topright: 10px;\r
199                         border-top-left-radius: 10px;\r
200                         border-top-right-radius: 10px;\r
201                 }\r
202                 #Tabs li.SelectedTab a {\r
203                         float: left;\r
204                         display: block;\r
205                         color: #666666;\r
206                         text-decoration: none;\r
207                         padding: 5px;\r
208                         cursor: default;\r
209                 }\r
210                 /* Copyright */\r
211                 #Copyright {\r
212                         text-align:center;\r
213                         margin-top:20px;\r
214                 }\r
215                 #Copyright p {\r
216                         padding:10px;\r
217                         background:white;\r
218                         margin:0 auto;\r
219                         width:750px;\r
220                         border:1px solid #2A85B3;\r
221                         -webkit-border-radius: 10px;\r
222                         -webkit-border-bottom-right-radius: 25px;\r
223                         -webkit-border-bottom-left-radius: 25px;\r
224                         -moz-border-radius: 10px;\r
225                         -moz-border-radius-bottomright: 30px;\r
226                         -moz-border-radius-bottomleft: 30px;\r
227                         border-radius: 10px;\r
228                         border-bottom-right-radius: 30px;\r
229                         border-bottom-left-radius: 30px;\r
230                 }\r
231                 #Copyright p a {\r
232                         background:#fff url(http://yourls.org/images/favicon.gif) 2px center no-repeat;\r
233                         padding-left:20px;\r
234                 }\r
235         </style>\r
236         <!--[if IE]> <style>#fade{display:none}</style> <![endif]-->\r
237 </head>\r
238 <body>\r
239 <div id="fb-root"></div>\r
240 <div id="Container">\r
241 \r
242         <!-- Title -->\r
243         <h1><a href="http://yourls.org/">YOURLS: <span>Y</span>our <span>O</span>wn <span>URL</span> <span>S</span>hortener</a></h1>\r
244 \r
245         <!-- Tabs -->\r
246         <ul id="Tabs">\r
247                 <li id="MoreTab" class="Tab"><a href="#More" onclick="toggle(this);">More</a></li>\r
248                 <li id="FAQTab" class="Tab"><a href="#FAQ" onclick="toggle(this);">FAQ</a></li>\r
249                 <li id="APITab" class="Tab"><a href="#API" onclick="toggle(this);">API</a></li>\r
250                 <li id="PluginTab" class="Tab"><a href="#Plugin" onclick="toggle(this);">WordPress plugin</a></li>\r
251                 <li id="PluginsTab" class="Tab"><a href="#Plugins" onclick="toggle(this);">YOURLS plugins</a></li>\r
252                 <li id="ConfigTab" class="Tab"><a href="#Config" onclick="toggle(this);">Config</a></li>\r
253                 <li id="InstallTab" class="Tab"><a href="#Install" onclick="toggle(this);">Install/Upgrade</a></li>\r
254                 <li id="AboutTab" class="SelectedTab"><a href="#About" onclick="toggle(this);">About</a></li>\r
255         </ul>\r
256 \r
257         <!-- Content -->\r
258         <div id="Content">\r
259 \r
260                 <div id="buttons">\r
261                         <div id="fb">\r
262                         <div class="fb-like" data-href="http://yourls.org/" data-send="false" data-layout="box_count" data-width="60" data-show-faces="true" data-font="verdana"></div>\r
263                         \r
264 <script>(function(d, s, id) {\r
265   var js, fjs = d.getElementsByTagName(s)[0];\r
266   if (d.getElementById(id)) return;\r
267   js = d.createElement(s); js.id = id;\r
268   js.src = "https://connect.facebook.net/en_US/all.js#xfbml=1&appId=125474947598196";\r
269   fjs.parentNode.insertBefore(js, fjs);\r
270 }(document, 'script', 'facebook-jssdk'));</script>\r
271                         </div>\r
272                         <div id="g1">\r
273                         <div class="g-plusone" data-size="tall" data-href="http://yourls.org/"></div>\r
274                         <script type="text/javascript">(function(){var po=document.createElement('script');po.type='text/javascript';po.async=true;po.src='https://apis.google.com/js/plusone.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(po,s);})();</script>\r
275                         </div>\r
276                         <div id="tw">\r
277                         <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://yourls.org" data-via="ozh" data-lang="en" data-related="YOURLS" data-count="vertical">Tweet</a>\r
278                         <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>\r
279                         </div>\r
280                 </div>\r
281 \r
282                 <!-- Index -->\r
283                 <div id="AboutDiv">\r
284                         <h2 class='first'>About YOURLS</h2>\r
285                         \r
286                         <h3>What is YOURLS</h3>\r
287                         <p>YOURLS is a small set of PHP scripts that will allow you to run your own URL shortening service (<em>a la</em> TinyURL). You can make it private or public, you can pick custom keyword URLs, it comes with its own API. You will love it.</p>\r
288                         <p>There's a <a href="#Plugin" onclick="toggle(this);">WordPress plugin</a> available for YOURLS, making integration with your blog a snap: create short URLs and tweet them automagically as you publish blog posts.</p>\r
289                         \r
290                         <h3>YOURLS Features</h3>\r
291                         <ul>\r
292                                 <li><tt>Private</tt> (your links only) or <tt>Public</tt> (everybody can create short links, fine for an intranet)</li>\r
293                                 <li>Sequential or custom URL keyword</li>\r
294                                 <li>Handy <tt>bookmarklets</tt> to easily shorten and share links</li>\r
295                                 <li>Awesome <tt>stats</tt>: historical click reports, referrers tracking, visitors geo-location</li>\r
296                                 <li>Neat <tt>Ajaxed</tt> interface</li>\r
297                                 <li>Terrific <tt>Plugin</tt> architecture to easily implement new features</li>\r
298                                 <li>Cool developer <tt>API</tt></li>\r
299                                 <li>Full <tt>jsonp</tt> support</li>\r
300                                 <li>Friendly <tt>installer</tt></li>\r
301                                 <li><tt>Sample files</tt> to create your own public interface and more</li>\r
302                         </ul>\r
303                         \r
304                         <h3>Screenshots</h3>\r
305                         \r
306                         <div class="sshot">\r
307                                 <p>Main admin dashboard</p>\r
308                                 <img src="http://yourls.org/yourls-org-images/admin-dashboard.gif" />\r
309                                 \r
310                                 <p>Stats for each short URL</p>\r
311                                 <img src="http://yourls.org/yourls-org-images/stats-anim.gif" />\r
312                                 \r
313                                 <p>See a live example of YOURLS stats on <a href="http://yourls.org/cookie+">http://yourls.org/cookie+</a></p>\r
314                         </div>\r
315                         \r
316                         <h2>Download</h2>\r
317                         \r
318                         <p><a href="http://yourls.org/download">Download YOURLS</a> from Google Code</p>\r
319                         <p>You can follow YOURLS' development on the <a href="http://yourls.org/revisions">revision list</a> and get current snapshot <a href="http://yourls.org/svnco">using SVN</a></p>\r
320                         \r
321                         <h2>Credits</h2>\r
322                         \r
323                         <p>YOURLS is made by:</p>\r
324                         <ul>\r
325                                 <li><a href="http://yourls.org/lesterchan" title="Visit Lester Chan's site">Lester Chan</a> &ndash; <a href="http://twitter.com/gamerz">@GamerZ</a> on Twitter (initial idea)</li>\r
326                                 <li><a href="http://yourls.org/ozh" title"Visit Ozh's site">Ozh Richard</a> &ndash; <a href="http://twitter.com/ozh">@Ozh</a> on Twitter (development)</li>\r
327                         </ul>\r
328                         <p>Keep up to date: follow <a href="http://twitter.com/ozh">Ozh</a> and read the official <a href="http://blog.yourls.org/">YOURLS Blog</a></p>\r
329                 </div>\r
330 \r
331                 <!-- Installation Instructions -->\r
332                 <div id="InstallDiv" style="display: none;">\r
333                         <h2 class='first'>Fresh Install</h2>\r
334                         <ol>\r
335                                 <li>Unzip the YOURLS archive</li>\r
336                                 <li>Copy <code>user/config-sample.php</code> to <code>user/config.php</code></li>\r
337                                 <li>Open <code>user/config.php</code> with a raw text editor (like Notepad) and fill in the required settings</li>\r
338                                 <li>Upload the unzipped files to your domain <code>public_html</code> or <code>www</code> folder</li>\r
339                                 <li>Create a new database (see <a href="#Config" onclick="toggle(this);">Configuration</a> &ndash; you can also use an existing one)</li>\r
340                                 <li>Point your browser to <code>http://yoursite.com/admin/</code></li>\r
341                         </ol>\r
342                         \r
343                         <h2>Upgrade</h2>\r
344                         <ol>\r
345                                 <li><strong>Backup the database!</strong></li>\r
346                                 <li>Unzip the YOURLS archive</li>\r
347                                 <li>Upload files to your server, overwriting your existing install</li>\r
348                                 <li>Point your browser to <code>http://yoursite.com/admin/</code></li>\r
349                                 <li>Tip: you can now move your <code>config.php</code> file to the <code>/user</code> directory</li>\r
350                         </ol>\r
351                         \r
352                         <h2>Upgrade from YOURLS 1.3 or earlier</h2>\r
353                         <ol>\r
354                                 <li><strong>Backup the database!</strong></li>\r
355                                 <li>Make a copy of your <code>config.php</code></li>\r
356                                 <li>Delete all files including <code>.htaccess</code> in YOURLS root directory</li>\r
357                                 <li>Unzip the YOURLS archive, upload the files</li>\r
358                                 <li>Copy <code>config-sample.php</code> to <code>config.php</code> and fill in details. <strong>Don't start with your old config file</strong>, use the new sample config file.</li>\r
359                                 <li>In your new <code>config.php</code>, add the <em>defines</em> for <code>YOURLS_DB_TABLE_URL</code> and <code>YOURLS_DB_TABLE_NEXTDEC</code> you had in your previous config file\r
360                                 <li>Point your browser to <code>http://yoursite.com/admin/</code> and follow instructions</li>\r
361                                 <li>After upgrade is well and over, remove the define <code>YOURLS_DB_TABLE_NEXTDEC</code> from your config file</li>\r
362                         </ol>\r
363                         \r
364                 </div>\r
365 \r
366                 <!-- Configuration Instructions -->     \r
367                 <div id="ConfigDiv" style="display: none;">\r
368                         <h2 class='first'>Configuration (in <code>user/config.php</code>)</h2>\r
369                         <h3>MySQL settings</h3>\r
370                         <ul>\r
371                                 <li><code>YOURLS_DB_USER</code><br/>\r
372                                 your MySQL username<br/>\r
373                                 <em>Example:</em> <tt>'joe'</tt></li>\r
374                                 <li><code>YOURLS_DB_PASS</code><br/>\r
375                                 your MySQL password<br/>\r
376                                 <em>Example:</em> <tt>'MySeCreTPaSsW0rd'</tt></li>\r
377                                 <li><code>YOURLS_DB_NAME</code>:\r
378                                 The database name<br/>\r
379                                 <em>Example:</em> <tt>'yourls'</tt></li>\r
380                                 <li><code>YOURLS_DB_HOST</code><br/>\r
381                                 The database host<br/>\r
382                                 <em>Example:</em> <tt>'localhost'</tt></li>\r
383                                 <li><code>YOURLS_DB_PREFIX</code><br/>\r
384                                 The name prefix for all the tables YOURLS will need<br/>\r
385                                 <em>Example:</em> <tt>'yourls_'</tt></li>\r
386                         </ul>\r
387                         \r
388                         <h3>Site options</h3>\r
389                         <ul>\r
390                                 <li><code>YOURLS_SITE</code><br/>\r
391                                 Your (short) domain URL, no trailing slash, lowercase. If you pick the non-www version of your domain, don't use the www version in your browser (and vice-versa)<br/>\r
392                                 <em>Example:</em> <tt>'http://ozh.in'</tt></li>\r
393                                 <li><code>YOURLS_HOURS_OFFSET</code><br/>\r
394                                 Timezone GMT offset<br/>\r
395                                 <em>Example:</em> <tt>'-5'</tt></li>\r
396                                 <li><code>YOURLS_PRIVATE</code><br/>\r
397                                 Private means the admin area will be protected with login/pass as defined below. See <a href="http://yourls.org/privatepublic">Private or Public</a> for more.<br/>\r
398                                 <em>Example:</em> <tt>'true'</tt></li>\r
399                                 <li><code>YOURLS_UNIQUE_URLS</code><br/>\r
400                                 Allow multiple short URLs for a same long URL<br/>\r
401                                 Set to <tt>true</tt> to allow only one pair of shortURL/longURL (default YOURLS behavior), or to <tt>false</tt> to allow creation of multiple short URLs pointing to the same long URL (as bit.ly does)<br/>\r
402                                 <em>Example:</em> <tt>'true'</tt></li>\r
403                                 <li><code>YOURLS_COOKIEKEY</code><br/>\r
404                                 A random secret hash used to encrypt cookies. You don't have to remember it, make it long and complicated. Hint: generate a unique one at <a href="http://yourls.org/cookie">http://yourls.org/cookie</a><br/>\r
405                                 <em>Example:</em> <tt>'qQ4KhL_pu|s@Zm7n#%:b^{A[vhm'</tt></li>\r
406                                 <li><code>yourls_user_passwords</code><br/>\r
407                                 A list of username(s) and password(s) allowed to access the site if private<br/>\r
408                                 Passwords can either be in plain text, or encrypted: see <a href="http://yourls.org/userpassword">http://yourls.org/userpassword</a> for more information<br/>\r
409                                 <em>Example:</em> <tt>'joe' => 'mypassword'</tt></li>\r
410                         </ul>\r
411                         \r
412                         <h3>URL Shortening settings</h3>\r
413                         <ul>\r
414                                 <li><code>YOURLS_URL_CONVERT</code><br/>\r
415                                 URL shortening method: base <tt>36</tt> or <tt>62</tt>. See <a onclick="toggle(this);" href="#FAQ">FAQ</a> for more explanations</li>\r
416                                 <li><code>yourls_reserved_URL</code><br/>\r
417                                 A list of reserved keywords that won't be used as short URLs. Define here negative, unwanted or potentially misleading keywords<br/>\r
418                                 <em>Example:</em> <tt>'porn', 'faggot', 'sex', 'nigger', 'fuck', 'cunt', 'dick', 'gay'</tt></li>\r
419                         </ul>\r
420                         \r
421                         <h3>Optional settings</h3>\r
422                         <ul>\r
423                                 <li><code>YOURLS_PRIVATE_INFOS</code><br/>\r
424                                 If <code>YOURLS_PRIVATE</code> is set to <tt>true</tt>, you can still make stat pages public. To do so, define with:<br/>\r
425                                 <tt>define('YOURLS_PRIVATE_INFOS', false);</tt>\r
426                                 </li>\r
427                                 <li><code>YOURLS_PRIVATE_API</code><br/>\r
428                                 If <code>YOURLS_PRIVATE</code> is set to <tt>true</tt>, you can still make your API public. To do so, define with:<br/>\r
429                                 <tt>define('YOURLS_PRIVATE_API', false);</tt>\r
430                                 <li><code>YOURLS_NOSTATS</code><br/>\r
431                                 If <code>YOURLS_NOSTATS</code> is set to <tt>true</tt>, redirects won't be logged and there will be not stats available.<br/>\r
432                                 </li>\r
433                         </ul>\r
434                         \r
435                         <h3>Advanced settings</h3>\r
436                         <p>File <code>includes/yourls-load.php</code> contains a few more undocumented but self explanatory and commented settings. Add them to your own <code>config.php</code> if you know what you're doing</p>\r
437                 </div>\r
438                 \r
439                 <!-- WordPress plugin -->\r
440                 <div id="PluginDiv" style="display:none">\r
441                         <h2 class='first'>WordPress Plugin</h2>\r
442                         \r
443                         <h3>Features</h3>\r
444                         <ul>\r
445                                 <li>Generate short URLs for each new post or page</li>\r
446                                 <li>Generate short URLs for all your old posts and pages if wished</li>\r
447                                 <li>Send a tweet on your Twitter account with the post title and short URL as you publish them</li>\r
448                                 <li>Works if YOURLS is hosted on the same server or on a remote server</li>\r
449                         </ul>\r
450                         \r
451                         <h3>Download &amp; more informations</h3>\r
452                         <ul>\r
453                                 <li>Download <a href="http://yourls.org/plugin">YOURLS: WordPress to Twitter</a> from the official WordPress plugin repository</li>\r
454                                 <li>More information, tips and feedback on <a href="http://yourls.org/plugindoc">the plugin page</a> from planetOzh</li>\r
455                         </ul>\r
456                 \r
457                 </div>\r
458                 \r
459                 <!-- YOURLS plugins -->\r
460                 <div id="PluginsDiv" style="display:none">\r
461                         <h2 class='first'>Plugins for YOURLS</h2>\r
462                         \r
463                         <h3>Plugins?</h3>\r
464                         <p>Plugins are additional PHP scripts that extend the functionalities or features of YOURLS. The core of YOURLS is designed to be as light as possible and avoid bloat (implementing functions not everybody needs) and to allow for easy customization.</p>\r
465                         <p>Using the plugin architecture, you can add new features to YOURLS without having to modify core files. This way, your changes won't be lost when you upgrade your YOURLS installation and you can easily activate and deactivate a plugin from the admin interface.</p>\r
466                         <p>There's a growing number of plugins available: check the <a href="http://yourls.org/pluginlist">Plugin list</a>.</p>\r
467 \r
468                         <h3>Documentation</h3>\r
469                         <p>Several sample plugins are included in the archive. Read the source and learn the concept. It's easy and fun!</p>\r
470                         <p>Check the <a href="http://yourls.org/pluginapi">plugin API documentation</a> to learn more</p>\r
471                 \r
472                 </div>\r
473                 \r
474                 <!-- API -->\r
475                 <div id="APIDiv" style="display:none">\r
476                         <h2 class='first'>YOURLS' API</h2>\r
477                         \r
478                         <h3>Features</h3>\r
479                         <ul>\r
480                                 <li>Generate or get existing short URLs, with sequential or custom keyword</li>\r
481                                 <li>Get some statistics about your links: top clicked links, least clicked links, newest links</li>\r
482                                 <li>Output format: JSON, XML, or simple raw text</li>\r
483                                 <li>Authentify either with login/password or using a secure passwordless mechanism</li>\r
484                         </ul>\r
485                         \r
486                         <h3>Usage</h3>\r
487                         <p>You need to send parameters to <code>http://yoursite.com/yourls-api.php</code> either via <code>GET</code> or <code>POST</code> (remember to URL encode parameters if via GET). These parameters are:</p>\r
488                         <ul>\r
489                                 <li>A valid <code>username</code> / <code>password</code> pair, or your <code>signature</code> (see <a href="http://yourls.org/passwordlessapi">Passwordless API requests</a>)</li>\r
490                                 <li>The requested <code>action</code>: <tt>"shorturl"</tt> (get short URL for a link), <tt>"expand"</tt> (get long URL of a shorturl), <tt>"url-stats"</tt> (get stats about one short URL), <tt>"stats"</tt> (get stats about your links) or <tt>"db-stats"</tt> (get global link and click count)</li>\r
491                                 <li>With <tt>action = "shorturl"</tt> :\r
492                                         <ul>\r
493                                                 <li>the <code>url</code> to shorten</li>\r
494                                                 <li>optional <code>keyword</code> and <code>title</code> for custom short URLs</li>\r
495                                                 <li>output <code>format</code>: either <tt>"json"</tt>, <tt>"xml"</tt> or <tt>"simple"</tt></li>\r
496                                         </ul>\r
497                                 </li>\r
498                                 <li>With <tt>action = "expand"</tt> :\r
499                                         <ul>\r
500                                                 <li>the <code>shorturl</code> to expand (can be either 'abc' or 'http://site/abc')</li>\r
501                                                 <li>output <code>format</code>: either <tt>"json"</tt>, <tt>"xml"</tt> or <tt>"simple"</tt></li>\r
502                                         </ul>\r
503                                 </li>\r
504                                 <li>With <tt>action = "url-stats"</tt> :\r
505                                         <ul>\r
506                                                 <li>the <code>shorturl</code> for which to get stats (can be either 'abc' or 'http://site/abc')</li>\r
507                                                 <li>output <code>format</code>: either <tt>"json"</tt> or <tt>"xml"</tt></li>\r
508                                         </ul>\r
509                                 </li>\r
510                                 <li>With <tt>action = "stats"</tt> :\r
511                                         <ul>\r
512                                                 <li>the <code>filter</code>: either <tt>"top"</tt>, <tt>"bottom"</tt> , <tt>"rand"</tt> or <tt>"last"</tt></li>\r
513                                                 <li>the <code>limit</code> (maximum number of links to return)</li>\r
514                                                 <li>output <code>format</code>: either <tt>"json"</tt> or <tt>"xml"</tt></li>\r
515                                         </ul>\r
516                                 </li>\r
517                                 <li>With <tt>action = "db-stats"</tt> :\r
518                                         <ul>\r
519                                                 <li>output <code>format</code>: either <tt>"json"</tt> or <tt>"xml"</tt></li>\r
520                                         </ul>\r
521                                 </li>\r
522                         </ul>\r
523                         \r
524                         <h3>Sample return</h3>\r
525                         <pre><tt>&lt;result&gt;\r
526         &lt;url&gt;\r
527                 &lt;keyword&gt;shorter&lt;/keyword&gt;\r
528                 &lt;url&gt;http://somereallylongurlyouneedtoshrink.com/&lt;/url&gt;\r
529                 &lt;title&gt;The Page Title&lt;/title&gt;\r
530                 &lt;date&gt;2009-06-23 18:08:07&lt;/date&gt;\r
531                 &lt;ip&gt;127.0.0.1&lt;/ip&gt;\r
532         &lt;/url&gt;\r
533         &lt;status&gt;success&lt;/status&gt;\r
534         &lt;message&gt;http://somereallylongurlyouneedtoshrink.com/ (ID: shorter) added to database&lt;/message&gt;\r
535         &lt;title&gt;The Page Title&lt;/title&gt;\r
536         &lt;shorturl&gt;http://yoursite.com/shorter&lt;/shorturl&gt;\r
537         &lt;statusCode&gt;200&lt;/statusCode&gt;\r
538 &lt;/result&gt;</tt></pre>\r
539 \r
540                         <h3>Sample file</h3>\r
541                         <p>There's a sample file included that serves as an example on how to play with the API</p>\r
542 \r
543                 </div>\r
544                 \r
545 \r
546                 <!-- FAQ Instructions -->       \r
547                 <div id="FAQDiv" style="display: none;">\r
548                         <h2 class='first'>FAQ</h2>\r
549 \r
550                         <h3>Server requirements</h3>\r
551                         <ol>\r
552                                 <li>A server with <strong>mod_rewrite</strong> enabled</li>\r
553                                 <li>At least <strong>PHP 4.3</strong></li>\r
554                                 <li>At least <strong>MYSQL 4.1</strong></li>\r
555                                 <li><em>Note</em>: YOURLS can also run on <a href="http://www.packetcollision.com/2012/01/27/yourls-and-nginx-an-updated-config/">Nginx</a> and <a href="http://www.ututech.com/2010/10/configuring-yourls-to-work-with-cherokee-web-server/">Cherokee</a></li>\r
556                         </ol>\r
557 \r
558                         <h3>Server recommendations</h3>\r
559                         <ul>\r
560                                 <li>PHP <a href="http://www.php.net/curl">CURL extension</a> installed if you plan on playing with the API</li>\r
561                         </ul>\r
562                         \r
563                         <h3>Limitations</h3>\r
564                         <ul>\r
565                                 <li>Maximum length of long URLs to be shortened is <strong>2000 characters</strong></li>\r
566                                 <li>Maximum length of custom keyword is <strong>200 characters</strong></li>\r
567                                 <li>That makes about <strong>8 sexdecillions of centillions</strong> of available URLs (<a href="http://en.wikipedia.org/wiki/Names_of_large_numbers">seriously</a>. That's a 355 digits number). </li>\r
568                         </ul>\r
569                         \r
570                         <h3>Difference Between Base 36 And Base 62 Encoding</h3>\r
571                         <ul>\r
572                                 <li>Base 36 encoding uses <code>0123456789abcdefghijklmnopqrstuvwxyz</code> for short URLs</li>\r
573                                 <li>Base 62 encoding uses <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz</code></li>\r
574                                 <li>Stick to one setting, don't change after you've created links as it will change all your short URLs!</li>\r
575                                 <li>Base 36 is the default and should be picked if you're not sure.</li>\r
576                         </ul>\r
577                         \r
578                         <h3>Getting a short domain name for your YOURLS install</h3>\r
579                         <ul>\r
580                                 <li>Unless you plan on making it public and as popular as bit.ly, any shared hosting will be fine. Ozh runs all his YOURLS instance on <a href="http://yourls.org/dreamhost">Dreamhost</a> and it works just great.</li>\r
581                                 <li><a href="http://domai.nr/">Domainr</a> is a fun search tool that might inspire and help you</li>\r
582                                 <li>Aim for exotic top level domains (.in, .im, .li ...), they're often cheap and a lot are still available. <a href="https://www.gandi.net/domain/buy/search/">Gandi</a> is a pretty comprehensive registrar, for instance.</li>\r
583                         </ul>\r
584 \r
585                         <h3>YOURLS needs its own .htaccess</h3>\r
586                         <ul>\r
587                                 <li>You cannot install YOURLS and, say, WordPress, in the same directory. Both need to handle URLs differently and need their own <tt>.htaccess</tt> file.</li>\r
588                                 <li>If you want to install YOURLS on the same domain than your blog, give it its own (short) subdirectory, such as yourblog.com/s/ (for "short") or yourblog.com/x/ (for "exit")</li>\r
589                         </ul>\r
590                         \r
591                         <h3>If YOURLS generates 404 for your short URLs</h3>\r
592                         <ul>\r
593                                 <li>Make sure <strong>mod_rewrite</strong> is enabled with your Apache server</li>\r
594                                 <li>Make sure your .htaccess file looks like <a href="http://yourls.org/htaccess">this one</a></li>\r
595                         </ul>\r
596                         \r
597                         <h3>There is no index page at the root of the install</h3>\r
598                         <ul>\r
599                                 <li>Indeed. It's intented. It's up to the user to make what they need. Some will redirect the root to a different place, some make a public interface for anyone to shorten links, some make a portfolio. You make it.</li>\r
600                                 <li>If you want to make a public interface, there's a sample file provided as an example. In such a case, please be aware that you will most likely attract gazillions of spammers with pharmacy links and the like. You are strongly advised to install anti-spam plugins.</li>\r
601                         </ul>\r
602                         \r
603                         <h3>Uppercase letters in short URLs are eaten up, eg "<code>OmgOzh</code>" becomes "<code>mgzh</code>" !</h3>\r
604                         <ul>\r
605                                 <li>Indeed. It's intented if you selected Base 36 (see above). Letters that don't belong to the character set, eg <code>@#!</code> or <code>ABC</code>, are removed.</li>\r
606                                 <li>If you want to force lowercase, you'll need a plugin.</li>\r
607                         </ul>\r
608                         \r
609                         <h3>Feedback, feature requests and bug reporting</h3>\r
610                         <ul>\r
611                                 <li>Please don't get in touch directly by mail or Twitter. <a href="http://yourls.org/support">Please</a>.</li>\r
612                                 <li>Check the <a href="http://yourls.org/roadmap">Road Map</a> for future features.</li>\r
613                                 <li>Read all the <a href="http://yourls.org/wiki">wiki documents</a>.</li>\r
614                                 <li>Search in the <a href="http://yourls.org/closedissues">closed issues</a>.</li>\r
615                                 <li>Eventually raise an <a href="http://yourls.org/issues">issue here</a> and give all the details. Thanks!</li>\r
616                         </ul>\r
617 \r
618                 </div>\r
619                 \r
620                 \r
621                 <!-- More -->   \r
622                 <div id="MoreDiv" style="display: none;">\r
623                 \r
624                         <h2 class='first'>Community</h2>\r
625                         \r
626                         <p>YOURLS is open source, so the community of users plays a great role in its development, by contributing, helping others or giving feedback that helps improve the software.</p>\r
627                         \r
628                         <h3>Resources</h3>\r
629                         <ul>\r
630                                 <li>The official <a href="http://blog.yourls.org">YOURLS blog</a>, for news, hints and showcase.</li>\r
631                                 <li>The <a href="http://yourls.org/wiki">wiki</a>: advanced documentation, plugins, tips and more</li>\r
632                                 <li>Follow <a href="https://twitter.com/YOURLS">@YOURLS</a> to get the scoops on development, and <a href="https://twitter.com/ozh">@Ozh</a> for tips and news (and random geekiness too)</li>\r
633                         </ul>\r
634                 \r
635                         <h2>Showcase</h2>\r
636 \r
637                         <h3>Here are a few examples of sites running YOURLS with a unique design or concept</h3>\r
638                         <ul>\r
639                                 <li><a href="http://oe.cd/">http://oe.cd/</a><br/>\r
640                                 OECD's internal URL shortener with a neat interface and private features</li>\r
641                                 \r
642                                 <li><a href="http://freze.it/">http://freze.it/</a></br/>\r
643                                 Shortens and saves a screenshot of a long URL</li>\r
644                                 \r
645                                 <li><a href="http://xib.me/">http://xib.me/</a></br/>\r
646                                 A nicely styled YOURLS public interface</li>\r
647                                 \r
648                                 <li><a href="http://girv.in/">http://girv.in/</a><br/>\r
649                                 John Girvin's YOURLS setup with all links in a sortable display (and its <a href="https://github.com/johngirvin/yourls-index-page">source</a>)</li>\r
650                                 \r
651                                 <li><a href="http://rml.me/">http://rml.me/</a><br/>\r
652                                 A personal URL shortener front page showing new links and most clicked links</li>\r
653                                 \r
654                                 <li><a href="http://vt802.us/">http://vt802.us/</a><br/>\r
655                                 Defined as "The World's First Vermont-centric URL Shortener"</li>\r
656                                 \r
657                                 <li><a href="http://yourwish.es/">http://yourwish.es/</a><br/>\r
658                                 Easily share an Amazon wishlist</li>\r
659                                 \r
660                                 <li><a href="http://vbly.us">http://vbly.us</a><br/>\r
661                                 Public YOURLS setup and early adopter, run by famous sex writer Violet Blue as "the internet's first and only sex-positive url shortener", once taken down by Libya (<a href="http://www.readwriteweb.com/archives/libya_shuts_down_vbly_bitly_owly_next.php">story</a>)</li>\r
662                         </ul>\r
663                         \r
664                         <h2>YOURLS and other platforms or frameworks</h2>\r
665                         <ul>            \r
666                                 <li><a href="http://github.com/pjain/WWW-Shorten-Yourls">Perl</a><br/>\r
667                                 WWW-Shorten-Yourls is a Perl module to shorten URLs using YOURLS</li>\r
668                                 \r
669                                 <li><a href="https://github.com/threestage/yourls">Ruby</a><br/>\r
670                                 A Ruby wrapper for the YOURLS API</li>\r
671                                 \r
672                                 <li><a href="http://tflink.github.com/python-yourls/">Python</a><br/>\r
673                                 A Python client for YOURLS</li>\r
674                                 \r
675                                 <li><a href="http://neocotic.com/yourls-api/">Javascript</a><br/>\r
676                                 JavaScript bindings for the YOURLS API to leverage JSONP support</li>\r
677 \r
678                                 <li><a href="https://github.com/driflash/CakePHP-YOURLS-Plugin">CakePHP</a><br/>\r
679                                 Plugin which integrates CakePHP with Yourls</li>\r
680                                 \r
681                                 <li><a href="http://drupal.org/project/yourls">Drupal</a><br/>\r
682                                 Allows for the automatic creation of short urls using a YOURLS installation</li>\r
683                                 \r
684                                 <li><a href="https://github.com/rthees/yourls-status-net">status.net</a><br/>\r
685                                 A plugin for status.net to use YOURLS</li>\r
686                                 \r
687                                 <li><a href="http://developer.sharetronix.com/mpview/12/tag:yourls">Sharetronix</a><br/>\r
688                                 A YOURLS addon for Sharetronix</li>\r
689                                 \r
690                         </ul>\r
691                                 \r
692                         <h2>YOURLS works with your favorite sofware or device</h2>\r
693                         <ul>\r
694                                 <li><a href="http://www.eugenegordin.com/etc/how-to-use-your-custom-yourls-shortener-with-tweetie-2.html">Tweetie 2</a><br/>\r
695                                 How to set up Tweetie2 so it uses your own service</li>\r
696                                 \r
697                                 <li><a href="http://remkusdevries.com/how-to-setup-tweetdeck-with-yourls/">TweetDeck</a><br/>\r
698                                 Set up TweetDeck to run with YOURLS</li>\r
699                                 \r
700                                 <li><a href="http://2fatdads.com/2012/02/how-to-make-yourls-org-work-in-tweetbot/">Tweetbot</a><br/>\r
701                                 Make Tweetbot run with YOURLS</li>\r
702                                 \r
703                                 <li><a href="http://christophe.rousee.fr/plugin-yourls-pour-seesmic-desktop-2">Seesmic</a><br/>\r
704                                 Use YOURLS with Seesmic</li>\r
705                                 \r
706                                 <li><a href="http://blog.yourls.org/2011/09/how-to-use-twitterfeed-with-your-custom-yourls-url-shortener/">Twitterfeed</a><br/>\r
707                                 Use Twitterfeed with YOURLS</li>\r
708 \r
709                                 <li><a href="http://timi.im/app/">Mac Client</a><br/>\r
710                                 Simple app to have a global keyboard shortcut send a link to YOURLS</li>\r
711 \r
712                                 <li>Android: <a href="https://play.google.com/store/apps/details?id=com.mndroid.apps.urly">URLy</a> and <a href="https://play.google.com/store/apps/details?id=de.keineantwort.android.urlshortener">URL Shortener</a><br/>\r
713                                 Android apps that plays nice with YOURLS</li>\r
714 \r
715                                 <li><a href="http://itunes.apple.com/us/app/clicklytics-track-clicks-on/id444008024?mt=8">iOS</a><br/>\r
716                                 Clicklytics track links using YOURLS on iPhone and iPad</li>\r
717 \r
718                                 <li><a href="https://github.com/ukoms/Chrourls">Chrourls</a><br/>\r
719                                 Google Chrome quick link shortening addon for YOURLS</li>\r
720 \r
721                                 <li><a href="https://addons.mozilla.org/en-us/firefox/addon/yourls-shortener/">Firefox Addon</a><br/>\r
722                                 Firefox Addon for YOURLS</li>\r
723 \r
724                                 <li><a href="http://www.chrismarquardt.com/blog.php?id=7952283233607249761">Textexpander and YOURLS</a><br/>\r
725                                 Making YOURLS and Textexpander on the Mac play together</li>\r
726                         </ul>\r
727 \r
728                         <h2>More stuff to do with YOURLS</h2>\r
729                         <ul>\r
730                                 \r
731                                 <li><a href="https://github.com/tomslominski/infinity-squared">Infinity Squared</a><br/>\r
732                                 &#8734;&sup2; is a public page theme for YOURLS to help you design your own public interface</li>\r
733                                 \r
734                                 <li><a href="https://github.com/johngirvin/yourls-index-page">John Girvin's page</a><br/>\r
735                                 The source of http://girv.in/ home page</li>\r
736                                 \r
737                                 <li><a href="https://github.com/ctrloptcmd/xs.ht">xs.ht</a><br/>\r
738                                 An example front end page for YOURLS</li>\r
739                                 \r
740                                 <li><a href="http://screenr.com/nTs">http://screenr.com/nTs</a><br/>\r
741                                 A screencast explaining how to setup YOURLS</li>\r
742                                 \r
743                                 <li><a href="http://v007.me/836">YOURLS: Short URL Widget</a><br/>\r
744                                 Creates a fully configurable widget that outputs the short URL to the current post or page</li>\r
745                                 \r
746                                 <li><a href="http://foolrulez.org/blog/2009/09/yourls-widget-released">YOURLS Widget for WordPress</a><br/>\r
747                                 This widget adds a convenient short URL service into your sidebar. Check the above link for a live example</li>\r
748                                 \r
749                                 <li><a href="http://www.stewartallen.org/2010/08/yourls-twitter-tools-wordpress-plugin/">Twitter Tools & YOURLS</a><br/>\r
750                                 Companion plugin for Alex King's Twitter Tool for WordPress, that enables YOURLS support</li>\r
751                                 \r
752                                 <li><a href="http://code.google.com/p/yourls/issues/detail?id=137">Export URLS as text list</a><br/>\r
753                                 A simple script to list all URLs, one per line, in plain text (for using as an indexer config file, for example)</li>\r
754                                 \r
755                                 <li>YOURLS featured on <a href="http://lifehacker.com/5335216/make-your-own-url-shortening-service">Lifehacker</a></li>\r
756                         </ul>\r
757 \r
758                         <h2>"Celebrity endorsements", sort of.</h2>\r
759                         <ul>\r
760                                 \r
761                                 <li><a href="http://ithem.es/">http://ithem.es/</a> by <a href="http://www.ithemes.com/">iThemes</a></li>\r
762                                 \r
763                                 <li><a href="http://virg.in/">http://virg.in/</a> for the <a href="http://www.virgin.com/">Virgin Group companies</a></li>\r
764                                 \r
765                                 <li><a href="http://dhurl.org/">http://dhurl.org/</a> by <a href="http://yourls.org/dreamhost">Dreamhost</a></li>\r
766                                 \r
767                         </ul>\r
768                                 \r
769                                 \r
770                 </div>\r
771         </div> <!-- content -->\r
772 </div> <!-- container -->\r
773 \r
774 <div id="fade"></div>\r
775 \r
776         <script type="text/javascript">\r
777         /* <![CDATA[*/\r
778         // Dynamically get tabs\r
779         function getTabs() {\r
780                 var d = document.getElementById('Tabs');\r
781                 var matches = d.innerHTML.match(/<li id="(.+?)Tab"/g);\r
782                 var tabs = []\r
783                 for (i in matches) {\r
784                   tabs[i]= matches[i].replace('<li id="','').replace('Tab"', '');\r
785                 }\r
786                 tabs = tabs.reverse();\r
787                 return (tabs)\r
788         }\r
789         // Toggle tab display\r
790         function toggle(el) {\r
791                 //var tabs = ["About", "Install", "Config", "Plugin", "FAQ"];\r
792                 var target = el.toString().replace(/^.*#/, '');\r
793                 for (var tab in tabs) {\r
794                         // reinit tabs\r
795                         document.getElementById(tabs[tab]+'Tab').className = 'Tab';\r
796                         // reinit divs\r
797                         document.getElementById(tabs[tab]+'Div').style.display= 'none';\r
798                 }\r
799                 // highlight & display target\r
800                 document.getElementById(target+'Div').style.display = 'block';\r
801                 document.getElementById(target+'Tab').className = 'SelectedTab';\r
802                 randbg();\r
803                 try { el.blur(); } catch(err) {}\r
804         }\r
805         // Get tab list\r
806         var tabs = getTabs();\r
807         // On page load/refresh display required tab\r
808         if (location.hash) {\r
809                 toggle(location.hash);\r
810         }\r
811         // Background fancyness\r
812         function randbg(){\r
813                 var rndbg = [ 'bg_ants.png', 'bg_circles.png', 'bg_cross.png', 'bg_diag.png', 'bg_fuzzy.png', 'bg_fuzzy_bits.png', 'bg_yourls.png', 'bg_fuzzy_bits.png', 'bg_life.png', 'bg_boobs.png' ];\r
814                 var bg = rndbg[ Math.floor( Math.random() * rndbg.length ) ];\r
815                 document.body.style.background='#E3F3FF url(user/plugins/random-bg/img/'+bg+')';\r
816         };\r
817         randbg();\r
818         /* ]]> */\r
819         </script>\r
820 \r
821 \r
822 </body>\r
823 </html>