]> CyberLeo.Net >> Repos - Github/YOURLS.git/blob - readme.html
Add 'expand' method to API. Fixes issue 48.
[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="content-type" content="text/html; charset=utf-8" />\r
5         <title>YOURLS: Your Own URL Shortener (and a WordPress plugin)</title>\r
6         <style type="text/css" media="screen">\r
7                 /* Default Style */\r
8                 body {\r
9                         font-family: Verdana, Arial;\r
10                         font-size: 12px;\r
11                         color: #000000;\r
12                         background: #ffffff;\r
13                 }\r
14                 p {\r
15                         padding-left: 10px;\r
16                 }\r
17                 code {\r
18                         background:#eaeaef;\r
19                         padding:0 2px;\r
20                 }\r
21                 tt {\r
22                         background:#ffc;\r
23                         padding:0 2px;          \r
24                 }\r
25                 pre tt {\r
26                         display:block;\r
27                 }\r
28                 blockquote {\r
29                         margin: 10px 20px 0px 20px;\r
30                         padding: 10px;\r
31                         border: 1px solid #8d8d8d;\r
32                         background-color: #f5f5f5;\r
33                 }\r
34                 li {\r
35                         margin-top: 20px;\r
36                 }\r
37                 ul li ul li {\r
38                         margin-top: 10px;\r
39                 }\r
40                 a, a:active, a:link, a:visited {\r
41                         color: #5b87b4;\r
42                         text-decoration: none;\r
43                 }\r
44                 a:hover {\r
45                         color: #5577a5;\r
46                         text-decoration: underline;\r
47                 }\r
48                 div.sshot {\r
49                         text-align:center;\r
50                 }\r
51                 div.sshot img {\r
52                         border:1px solid #5b87b4;\r
53                         zdisplay:block;\r
54                         margin-bottom:1em;\r
55                 }\r
56                 /* Place Holder Style */\r
57                 #Container {\r
58                         width: 780px;\r
59                         margin-left: auto;\r
60                         margin-right: auto; \r
61                 }\r
62                 #Content {\r
63                         background-color: #fafafa;\r
64                         border: 1px solid #a2b6cb;\r
65                         padding: 10px;\r
66                         margin-top: -13px;\r
67                 }\r
68                 /* Title Style */\r
69                 h1 {\r
70                         font-family: Verdana, Arial;\r
71                         font-size: 22px;\r
72                         font-weight: bold;\r
73                         color: #2a85b3;\r
74                         border-bottom: 1px solid #2a85b3;\r
75                         margin-bottom: 10px;\r
76                         background:transparent url(http://yourls.org/images/yourls-logo.png) top center no-repeat;\r
77                         padding-top:90px;\r
78                 }\r
79                 h1:hover span {\r
80                         color: #73A4D6;\r
81                 }\r
82                 h2 {\r
83                         font-family: Verdana, Arial;\r
84                         font-size: 18px;\r
85                         font-weight: bold;\r
86                         color: #5b87b4;\r
87                 }\r
88                 h2:before {\r
89                         content: '\00BB';\r
90                         color:#BFE0FE;\r
91                 }\r
92                 h3 {\r
93                         font-family: Verdana, Arial;\r
94                         font-size: 14px;\r
95                         font-weight: bold;\r
96                         color: #73a4d6;\r
97                         margin-top:2em;\r
98                 }\r
99                 h3:before {\r
100                         content: '\00BB';\r
101                         color:#BFE0FE;\r
102                 }\r
103                 /* Tabs */\r
104                 ul#Tabs {\r
105                         font-family: Verdana, Arial;\r
106                         font-size: 12px;\r
107                         font-weight: bold;\r
108                         list-style-type: none;\r
109                         padding-bottom: 28px;\r
110                         border-bottom: 1px solid #a2b6cb;\r
111                         margin-bottom: 12px;\r
112                         z-index: 1;\r
113                 }\r
114                 #Tabs li.Tab {\r
115                         float: right;\r
116                         height: 25px;\r
117                         background-color: #deedfb;\r
118                         margin: 2px 0px 0px 5px;\r
119                         border: 1px solid #a2b6cb;\r
120                 }\r
121                 #Tabs li.Tab a {\r
122                         float: left;\r
123                         display: block;\r
124                         color: #666666;\r
125                         text-decoration: none;\r
126                         padding: 5px;\r
127                 }\r
128                 #Tabs li.Tab a:hover {\r
129                         background-color: #bfe0fe;\r
130                         border-bottom: 1px solid #bfe0fe;\r
131                 }\r
132                 /* Selected Tab */\r
133                 #Tabs li.SelectedTab {\r
134                         float: right;\r
135                         height: 25px;\r
136                         background-color: #fafafa;\r
137                         margin: 2px 0px 0px 5px;\r
138                         border-top: 1px solid #a2b6cb;\r
139                         border-right: 1px solid #a2b6cb;\r
140                         border-bottom: 1px solid #fafafa;\r
141                         border-left: 1px solid #a2b6cb;\r
142                 }\r
143                 #Tabs li.SelectedTab a {\r
144                         float: left;\r
145                         display: block;\r
146                         color: #666666;\r
147                         text-decoration: none;\r
148                         padding: 5px;\r
149                         cursor: default;\r
150                 }\r
151                 /* Copyright */\r
152                 #Copyright {\r
153                         text-align: center;\r
154                 }\r
155         </style>\r
156 </head>\r
157 <body>\r
158 <div id="Container">\r
159         <!-- Title -->\r
160         <h1>YOURLS: <span>Y</span>our <span>O</span>wn <span>URL</span> <span>S</span>hortener (and a WordPress plugin)</h1>\r
161 \r
162         <!-- Tabs -->\r
163         <ul id="Tabs">\r
164                 <li id="ShowcaseTab" class="Tab"><a href="#Showcase" onclick="toggle(this);">Showcase</a></li>\r
165                 <li id="FAQTab" class="Tab"><a href="#FAQ" onclick="toggle(this);">FAQ</a></li>\r
166                 <li id="APITab" class="Tab"><a href="#API" onclick="toggle(this);">API</a></li>\r
167                 <li id="PluginTab" class="Tab"><a href="#Plugin" onclick="toggle(this);">WordPress plugin</a></li>\r
168                 <li id="ConfigTab" class="Tab"><a href="#Config" onclick="toggle(this);">Configuration</a></li>\r
169                 <li id="InstallTab" class="Tab"><a href="#Install" onclick="toggle(this);">Installation</a></li>\r
170                 <li id="AboutTab" class="SelectedTab"><a href="#About" onclick="toggle(this);">About</a></li>\r
171         </ul>\r
172 \r
173         <!-- Content -->\r
174         <div id="Content">\r
175                 <!-- Index -->\r
176                 <div id="AboutDiv">\r
177                         <h2>About YOURLS</h2>\r
178                         \r
179                         <h3>What is YOURLS</h3>\r
180                         <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
181                         <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
182                         <p>YOURLS is in early stages of its life. While functional, it regularly evolves and improves. Please keep current and up to date to get the most of it</p>\r
183                         \r
184                         <h3>YOURLS Features</h3>\r
185                         <ul>\r
186                                 <li>Public (everybody can create short links) or private (your links only)</li>\r
187                                 <li>Random (sequential) or custom URL keyword</li>\r
188                                 <li>Handy bookmarklet to easily shorten and share links</li>\r
189                                 <li>Track click count on your links</li>\r
190                                 <li>Neat AJAXed interface</li>\r
191                                 <li>Developer API</li>\r
192                         </ul>\r
193                         \r
194                         <h3>Screenshots</h3>\r
195                         \r
196                         <div class="sshot">\r
197                                 <img src="http://yourls.org/images/head.gif" />\r
198                                 <img src="http://yourls.org/images/stats.gif" />\r
199                                 <img src="http://yourls.org/images/footer.gif" />\r
200                         </div>\r
201                         \r
202                         <h3>Download</h3>\r
203                         \r
204                         <p><a href="http://code.google.com/p/yourls/downloads/list">Download YOURLS</a> from Google Code</p>\r
205                         \r
206                         <h3>Credits</h3>\r
207                         \r
208                         <p>YOURLS is made by:</p>\r
209                         <ul>\r
210                                 <li><a href="http://lesterchan.net/" title="Visit Lester Chan's site">Lester Chan</a> &ndash <a href="http://twitter.com/gamerz">@GamerZ</a> on Twitter</li>\r
211                                 <li><a href="http://planetozh.com/" title"Visit Ozh's site">Ozh RICHARD</a> &ndash <a href="http://twitter.com/ozh">@Ozh</a> on Twitter</li>\r
212                         </ul>\r
213                 </div>\r
214 \r
215                 <!-- Installation Instructions -->\r
216                 <div id="InstallDiv" style="display: none;">\r
217                         <h2>Installation Instructions</h2>\r
218                         <ol>\r
219                                 <li>Unzip the YOURLS archive</li>\r
220                                 <li>Copy <code>includes/config-sample.php</code> to <code>includes/config.php</code></li>\r
221                                 <li>Open <code>includes/config.php</code> with a raw text editor (like Notepad) and fill in the required settings</li>\r
222                                 <li>Upload the unzipped files to your domain <code>public_html</code> or <code>www</code> folder</li>\r
223                                 <li>Create a new database (see <a href="#Config" onclick="toggle(this);">Configuration</a> &ndash; you can also use an existing one)</li>\r
224                                 <li>Point your browser to <code>http://yoursite.com/admin/install.php</code></li>\r
225                         </ol>\r
226                 </div>\r
227 \r
228                 <!-- Configuration Instructions -->     \r
229                 <div id="ConfigDiv" style="display: none;">\r
230                         <h2>Configuration (in includes/config.php)</h2>\r
231                         <h3>MySQL settings</h3>\r
232                         <ul>\r
233                                 <li><code>YOURLS_DB_USER</code><br/>\r
234                                 your MySQL username<br/>\r
235                                 <em>Example:</em> <tt>'joe'</tt></li>\r
236                                 <li><code>YOURLS_DB_PASS</code><br/>\r
237                                 your MySQL password<br/>\r
238                                 <em>Example:</em> <tt>'MySeCreTPaSsW0rd'</tt></li>\r
239                                 <li><code>YOURLS_DB_NAME</code>:\r
240                                 The database name<br/>\r
241                                 <em>Example:</em> <tt>'yourls'</tt></li>\r
242                                 <li><code>YOURLS_DB_HOST</code><br/>\r
243                                 The database host<br/>\r
244                                 <em>Example:</em> <tt>'localhost'</tt></li>\r
245                                 <li><code>YOURLS_DB_TABLE_URL</code><br/>\r
246                                 The table name to store URLs<br/>\r
247                                 <em>Example:</em> <tt>'url'</tt></li>\r
248                                 <li><code>YOURLS_DB_TABLE_NEXTDEC</code><br/>\r
249                                 The table name to store the next sequential link decimal id<br/>\r
250                                 <em>Example:</em> <tt>'nextdec'</tt></li>\r
251                         </ul>\r
252                         \r
253                         <h3>Site options</h3>\r
254                         <ul>\r
255                                 <li><code>YOURLS_SITE</code><br/>\r
256                                 Your (short) domain URL, no trailing slash<br/>\r
257                                 <em>Example:</em> <tt>'http://ozh.in'</tt></li>\r
258                                 <li><code>YOURLS_HOURS_OFFSET</code><br/>\r
259                                 Timezone GMT offset<br/>\r
260                                 <em>Example:</em> <tt>'-5'</tt></li>\r
261                                 <li><code>YOURLS_PRIVATE</code><br/>\r
262                                 Private means protected with login/pass as defined below. Set to false for public usage<br/>\r
263                                 <em>Example:</em> <tt>'true'</tt></li>\r
264                                 <li><code>YOURLS_COOKIEKEY</code><br/>\r
265                                 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/cookiekey.php">http://yourls.org/cookiekey.php</a><br/>\r
266                                 <em>Example:</em> <tt>'qQ4KhL_pu|s@Zm7n#%:b^{A[vhm'</tt></li>\r
267                                 <li><code>yourls_user_passwords</code><br/>\r
268                                 A list of username(s) and password(s) allowed to access the site if private<br/>\r
269                                 <em>Example:</em> <tt>'joe' => 'mypassword'</tt></li>\r
270                         </ul>\r
271                         \r
272                         <h3>URL Shortening settings</h3>\r
273                         <ul>\r
274                                 <li><code>YOURLS_URL_CONVERT</code><br/>\r
275                                 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
276                                 <li><code>yourls_reserved_URL</code><br/>\r
277                                 A list of reserved keywords that won't be used as short URLs. Define here negative, unwanted or potentially misleading keywords<br/>\r
278                                 <em>Example:</em> <tt>'porn', 'faggot', 'sex', 'nigger', 'fuck', 'cunt', 'dick', 'gay'</tt></li>\r
279                         </ul>\r
280                 </div>\r
281                 \r
282                 <!-- WordPress plugin -->\r
283                 <div id="PluginDiv" style="display:none">\r
284                         <h2>WordPress Plugin</h2>\r
285                         \r
286                         <h3>Features</h3>\r
287                         <ul>\r
288                                 <li>Generate short URLs for each new post or page</li>\r
289                                 <li>Send a tweet on your Twitter account with the post title and short URL as you publish them</li>\r
290                                 <li>Works if YOURLS is hosted on the same server or on a remote server</li>\r
291                                 <li>Also compatible with tr.im, is.gd, tinyurl.com and bit.ly for maximum fun</li>\r
292                         </ul>\r
293                         \r
294                         <h3>Screenshots</h3>\r
295                         <div class="sshot">\r
296                         <img src="http://yourls.org/images/wpplugin.gif"/>\r
297                         </div>\r
298                         \r
299                         <h3>Download &amp; more informations</h3>\r
300                         <ul>\r
301                                 <li>Download <a href="http://wordpress.org/extend/plugins/yourls-wordpress-to-twitter/">YOURLS: WordPress to Twitter</a> from the official WordPress plugin repository</li>\r
302                                 <li>More information, tips and feedback on <a href="http://planetozh.com/blog/yourls-wordpress-to-twitter-a-short-url-plugin/">the plugin page</a> from planetOzh</li>\r
303                         </ul>\r
304                 \r
305                 </div>\r
306                 \r
307                 <!-- API -->\r
308                 <div id="APIDiv" style="display:none">\r
309                         <h2>YOURLS' API</h2>\r
310                         \r
311                         <h3>Features</h3>\r
312                         <ul>\r
313                                 <li>Generate or get existing short URLs, with sequential or custom keyword</li>\r
314                                 <li>Get some statistics about your links: top clicked links, least clicked links, newest links</li>\r
315                                 <li>Output format: JSON, XML, or simple raw text</li>\r
316                         </ul>\r
317                         \r
318                         <h3>Usage</h3>\r
319                         <p>You need to send parameters to <code>http://yoursite.com/yourls-api.php</code> either via <code>GET</code> or <code>POST</code>. These parameters are:</p>\r
320                         <ul>\r
321                                 <li>A valid <code>username</code></li>\r
322                                 <li>A valid <code>password</code></li>\r
323                                 <li>The requested <code>action</code>: <tt>"shorturl"</tt> (get short URL for a link), <tt>"expand"</tt> (get long URL of a shorturl) or <tt>"stats"</tt> (get stats about your links)</li>\r
324                                 <li>With <tt>action = "shorturl"</tt> :\r
325                                         <ul>\r
326                                                 <li>the <code>url</code> to shorten</li>\r
327                                                 <li>optional <code>keyword</code> for custom short URLs</li>\r
328                                                 <li>output <code>format</code>: either <tt>"json"</tt>, <tt>"xml"</tt> or <tt>"simple"</tt></li>\r
329                                         </ul>\r
330                                 </li>\r
331                                 <li>With <tt>action = "expand"</tt> :\r
332                                         <ul>\r
333                                                 <li>the <code>shorturl</code> to expand (can be either 'abc' or 'http://site/abc')</li>\r
334                                                 <li>output <code>format</code>: either <tt>"json"</tt>, <tt>"xml"</tt> or <tt>"simple"</tt></li>\r
335                                         </ul>\r
336                                 </li>\r
337                                 <li>With <tt>action = "stats"</tt> :\r
338                                         <ul>\r
339                                                 <li>the <code>filter</code>: either <tt>"top"</tt>, <tt>"bottom"</tt> , <tt>"rand"</tt> or <tt>"last"</tt></li>\r
340                                                 <li>the <code>limit</code> (maximum number of links to return)</li>\r
341                                                 <li>output <code>format</code>: either <tt>"json"</tt> or <tt>"xml"</tt></li>\r
342                                         </ul>\r
343                                 </li>\r
344                         </ul>\r
345                         \r
346                         <h3>Sample return</h3>\r
347                         <pre><tt>&lt;result&gt;\r
348         &lt;url&gt;\r
349                 &lt;id&gt;62019439011&lt;/id&gt;\r
350                 &lt;keyword&gt;shorter&lt;/keyword&gt;\r
351                 &lt;url&gt;http://somereallylongurlyouneedtoshrink.com/&lt;/url&gt;\r
352                 &lt;date&gt;2009-06-23 18:08:07&lt;/date&gt;\r
353                 &lt;ip&gt;127.0.0.1&lt;/ip&gt;\r
354         &lt;/url&gt;\r
355         &lt;status&gt;success&lt;/status&gt;\r
356         &lt;message&gt;http://somereallylongurlyouneedtoshrink.com/ (ID: shorter) added to database&lt;/message&gt;\r
357         &lt;shorturl&gt;http://yoursite.com/shorter&lt;/shorturl&gt;\r
358 &lt;/result&gt;</tt></pre>\r
359 \r
360                         <h3>Sample file</h3>\r
361                         <p>There's a sample file included that serves as an example on how to play with the API</p>\r
362 \r
363                 </div>\r
364                 \r
365 \r
366                 <!-- FAQ Instructions -->       \r
367                 <div id="FAQDiv" style="display: none;">\r
368                         <h2>FAQ</h2>\r
369 \r
370                         <h3>Server requirements</h3>\r
371                         <ol>\r
372                                 <li>A server with <strong>mod_rewrite</strong> enabled</li>\r
373                                 <li>At least <strong>PHP 4.3</strong></li>\r
374                                 <li>At least <strong>MYSQL 4.1</strong></li>\r
375                                 <li><em>Note</em>: YOURLS can also run on Nginx (<a href="http://foolrulez.org/blog/2009/08/foolz-us-make-yourls-work-on-ngin/">Read more</a>)</li>\r
376                         </ol>\r
377 \r
378                         <h3>Server recommendations</h3>\r
379                         <ul>\r
380                                 <li>PHP <a href="http://www.php.net/curl">CURL extension</a> installed if you plan on playing with the API</li>\r
381                                 <li>PHP <a href="http://www.php.net/manual/en/ref.bc.php">BCMath extension</a> for handling large integers (ie many (really many many) links or long custom keyword URLs)</li>  \r
382                         </ul>\r
383                         \r
384                         <h3>Limitations</h3>\r
385                         <ul>\r
386                                 <li>Maximum length of custom keyword is <strong>12 characters</strong></li>\r
387                                 <li><strong>4,738,381,338,321,617,846</strong> available URLs</li>\r
388                         </ul>\r
389                         \r
390                         <h3>Difference Between Base 36 And Base 62 Encoding</h3>\r
391                         <ul>\r
392                                 <li>Base 36 encoding uses <code>0123456789abcdefghijklmnopqrstuvwxyz</code></li>\r
393                                 <li>Base 62 encoding uses <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz</code></li>\r
394                                 <li>Stick to one setting, don't change after you've created links as it will change all your short URLs!</li>\r
395                                 <li>Base 36 should be picked. Use 62 only if you understand what it implies.</li>\r
396                                 <li>Using base 62 means you *need* PHP extension BCMath</li>\r
397                                 <li>Consider Base 62 encoding a <code>beta feature</code></li>\r
398                         </ul>\r
399                         \r
400                         <h3>Getting a short domain name for your YOURLS install</h3>\r
401                         <ul>\r
402                                 <li>Unless you plan on making it public, any shared hosting should be fine</li>\r
403                                 <li><a href="http://domai.nr/">Domainr</a> is a fun search tool that might inspire and help you</li>\r
404                                 <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
405                         </ul>\r
406 \r
407                         <h3>YOURLS needs its own .htaccess</h3>\r
408                         <ul>\r
409                                 <li>You cannot install YOURLS and, say, WordPress, in the same directory. Both of them need to handle URLs differently</li>\r
410                                 <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
411                         </ul>\r
412                         \r
413                         <h3>If YOURLS generates 404 for your short URLs</h3>\r
414                         <ul>\r
415                                 <li>Make sure <strong>mod_rewrite</strong> is enabled with your Apache server</li>\r
416                                 <li>Some (crappy) hosts such as GoDaddy or 1and1 need <a href="http://code.google.com/p/yourls/issues/detail?id=25">a small fix</a> to .htaccess:</li>\r
417                         </ul>\r
418                         \r
419                         <h3>Feedback and bug reporting</h3>\r
420                         <ul>\r
421                                 <li>Please don't get in touch directly by mail or Twitter</li>\r
422                                 <li>Raise an <a href="http://code.google.com/p/yourls/issues/list">issue here</a> and give all the details. Thanks!</li>\r
423                         </ul>\r
424 \r
425                 </div>\r
426                 \r
427                 \r
428                                 <!-- Showcase -->       \r
429                 <div id="ShowcaseDiv" style="display: none;">\r
430                         <h2>Showcase</h2>\r
431 \r
432                         <h3>Here are a few examples of sites running YOURLS with a unique design or concept</h3>\r
433                         \r
434                         <ul>\r
435                                 <li><a href="http://hmm.ph/">http://hmm.ph/</a><br/>\r
436                                 Funny domain name, nicely styled</li>\r
437                                 <li><a href="http://qte.me/">http://qte.me/</a><br/>\r
438                                 Another YOURLS setup with a cute quote look</li>\r
439                                 <li><a href="http://unsl.im/">http://unsl.im/</a><br/>\r
440                                 Gorgeous design listing latest links with a custom RSS feed (private use)</li>\r
441                                 <li><a href="http://mrte.ch/">http://mrte.ch/</a><br/>\r
442                                 Mr Tech's public YOURLS setup, listing top links and some stats</li>\r
443                                 <li><a href="http://s4c.in/">http://s4c.in/</a><br/>\r
444                                 Shorten 4 Charity, a public YOURLS setup with shortened links displayed within a frame containing ads for charities     </li>\r
445                                 <li><a href="http://girv.in/">http://girv.in/</a><br/>\r
446                                 John Girvin's YOURLS setup with all links in a sortable display</li>\r
447                                 <li><a href="http://www.iyeman.net/">http://www.iyeman.net/</a><br/>\r
448                                 <a href="http://tinytags.co.cc/">http://tinytags.co.cc/</a><br/>\r
449                                 Examples of portals for your online self with links to your places (blog, Twitter) and your URL shortener</li>\r
450                                 <li><a href="http://li.nkto.me/">http://li.nkto.me/</a><br/>\r
451                                 A nice domain name hack :)</li>\r
452                                 <li><a href="http://vb.ly/">http://vb.ly/</a><br/>\r
453                                 Public YOURLS setup run by famous sex writer Violet Blue as "the internet's first and only sex-positive url shortener"</li>\r
454                                 \r
455                         </ul>\r
456                         \r
457                         <h3>More stuff about or with YOURLS</h3>\r
458                         \r
459                         <ul>\r
460                                 <li><a href="http://screenr.com/nTs">http://screenr.com/nTs</a><br/>\r
461                                 A screencast explaining how to setup YOURLS</li>\r
462                                 <li><a href="http://foolrulez.org/blog/2009/09/yourls-widget-released">YOURLS Widget for WordPress</a><br/>\r
463                                 This widget adds a convenient short URL service into your sidebar. Check the above link for a live example</li>\r
464                                 <li><a href="http://github.com/pjain/WWW-Shorten-Yourls">WWW-Shorten-Yourls</a><br/>\r
465                                 A Perl module to shorten URLs using YOURLS</li>\r
466                                 <li>YOURLS featured on <a href="http://lifehacker.com/5335216/make-your-own-url-shortening-service">Lifehacker</a></li>\r
467                         </ul>\r
468 \r
469                 </div>\r
470         </div> <!-- content -->\r
471 </div> <!-- container -->\r
472 \r
473 <p id="Copyright">YOURLS: Your Own URL Shortener<br />All Free & GPL &ndash; 2009</p>\r
474 \r
475         <script type="text/javascript">\r
476         /* <![CDATA[*/\r
477         // Dynamically get tabs\r
478         function getTabs() {\r
479                 var d = document.getElementById('Tabs');\r
480                 var matches = d.innerHTML.match(/<li id="(.+?)Tab"/g);\r
481                 var tabs = []\r
482                 for (i in matches) {\r
483                   tabs[i]= matches[i].replace('<li id="','').replace('Tab"', '');\r
484                 }\r
485                 tabs = tabs.reverse();\r
486                 return (tabs)\r
487         }\r
488         // Toggle tab display\r
489         function toggle(el) {\r
490                 //var tabs = ["About", "Install", "Config", "Plugin", "FAQ"];\r
491                 var target = el.toString().replace(/^.*#/, '');\r
492                 for (var tab in tabs) {\r
493                         // reinit tabs\r
494                         document.getElementById(tabs[tab]+'Tab').className = 'Tab';\r
495                         // reinit divs\r
496                         document.getElementById(tabs[tab]+'Div').style.display= 'none';\r
497                 }\r
498                 // highlight & display target\r
499                 document.getElementById(target+'Div').style.display = 'block';\r
500                 document.getElementById(target+'Tab').className = 'SelectedTab';\r
501                 el.blur();\r
502         }\r
503         // Get tab list\r
504         var tabs = getTabs();\r
505         // On page load/refresh display required tab\r
506         if (location.hash) {\r
507                 toggle(location.hash);\r
508         }\r
509         /* ]]> */\r
510         </script>\r
511 \r
512 \r
513 </body>\r
514 </html>