"; // Pretty printing is love, pretty printing is life +print_r($out); +echo ""; +exit; +``` +This will output the internal representation of the datastore, "unobfuscated" (if this can really be considered obfuscation) + + +# Related software +Unofficial but relatedd work on Shaarli. If you maintain one of these, please get in touch with us to help us find a way to adapt your work to our fork. **TODO** contact repos owners to see if they'd like to standardize their work for the community fork. + + * [shaarchiver](https://github.com/nodiscc/shaarchiver) - Archive your Shaarli bookmarks and their content + * [Shaarli for Android](http://sebsauvage.net/links/?ZAyDzg) - Android application that adds Shaarli as a sharing provider + * [shaarli-river](https://github.com/mknexen/shaarli-river) - an aggregator for shaarlis with many features + * [Shaarlo](https://github.com/DMeloni/shaarlo) - an aggregator for shaarlis with many features ([Demo](http://shaarli.fr/)) + * [kalvn/shaarli-blocks](https://github.com/kalvn/shaarli-blocks) - A template/theme for Shaarli + * [Vinm/Blue-theme-for Shaarli](https://github.com/Vinm/Blue-theme-for-Shaarli) - A template/theme for Shaarli + * [vivienhaese/shaarlitheme](https://github.com/vivienhaese/shaarlitheme) - A Shaarli fork meant to be run in an openshift instance + * [tt-rss-shaarli](https://github.com/jcsaaddupuy/tt-rss-shaarli) - [TinyTiny RSS](http://tt-rss.org/) plugin that adds support for sharing articles with Shaarli + * [dhoko/ShaarliTemplate](https://github.com/dhoko/ShaarliTemplate) - A template/theme for Shaarli + * [mknexen/shaarli-api](https://github.com/mknexen/shaarli-api) - a REST API for Shaarli + * [Shaarli-Albinomouse](https://github.com/alexisju/Shaarli-AlbinoMouse) - A fork of Shaarli with a different template + * [Shaarlimages](https://github.com/BoboTiG/shaarlimages) - An image-oriented aggregator for Shaarlis + * [Shaarli Superhero Theme](https://github.com/AkibaTech/Shaarli---SuperHero-Theme) - A template/theme for Shaarli + * [Limonade](https://github.com/misterair/limonade) - A fork of Shaarli with a new template + * [octopress-shaarli](https://github.com/ahmet2mir/octopress-shaarli) - octoprress plugin to retrieve SHaarli links on the sidebara + * [Bookie](https://github.com/bookieio/bookie) - Another self-hostable, Free bookmark sharing software, written in Python + + + +# Other links + * [Liens en vrac de sebsauvage](http://sebsauvage.net/links/) - the original Shaarli + * [A large list of Shaarlis](http://porneia.free.fr/pub/links/ou-est-shaarli.html) + * [A list of working Shaarli aggregators](https://raw.githubusercontent.com/Oros42/find_shaarlis/master/annuaires.json) + * [A list of some known Shaarlis](https://github.com/Oros42/shaarlis_list) + * [Adieu Delicious, Diigo et StumbleUpon. Salut Shaarli ! - sebsauvage.net](http://sebsauvage.net/rhaa/index.php?2011/09/16/09/29/58-adieu-delicious-diigo-et-stumbleupon-salut-shaarli-) (fr) _16/09/2011 - the original post about Shaarli_ + * [Mentions of Shaarli in the press](Mentions-of-Shaarli-in-%22the-press%22) + * [Original ideas/fixme/TODO page](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:ideas) + * [Original discussion page](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:discussion) (fr) + * [Original revisions history](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:history) + * [Shaarli.fr/my](https://www.shaarli.fr/my.php) - Unofficial, unsupported (old fork) hosted Shaarlis provider, courtesy of [DMeloni](https://github.com/DMeloni) + * [Shaarli Communauty](http://shaarferme.etudiant-libre.fr.nf/index.php) - Another unofficial Shaarli hoster (unsupported, old fork), hoster unknown + + + + +# FAQ + +### Why did you create Shaarli ? + +I was a StumbleUpon user. Then I got fed up with they big toolbar. I switched to delicious, which was lighter, faster and more beautiful. Until Yahoo bought it. Then the export API broke all the time, delicious became slow and was ditched by Yahoo. I switched to Diigo, which is not bad, but does too much. And Diigo is sslllooooowww and their Firefox extension a bit buggy. And… oh… **their Firefox addon sends to Diigo every single URL you visit** (Don't believe me ? Use [Tamper Data](https://addons.mozilla.org/en-US/firefox/addon/tamper-data/) and open any page). + +Enough is enough. Saving simple links should not be a complicated heavy thing. I ditched them all and wrote my own: Shaarli. It's simple, but it does the job and does it well. And my data is not hosted on a foreign server, but on my server. + +### Why use Shaarli and not Delicious/Diigo ? + +With Shaarli: + +* The data is yours: It's hosted on your server. +* Never fear of having your data locked-in. +* Never fear to have your data sold to third party. +* Your private links are not hosted on a third party server. +* You are not tracked by browser addons (like Diigo does) +* You can change the look and feel of the pages if you want. +* You can change the behaviour of the program. +* It's magnitude faster than most bookmarking services. + +### What does Shaarli mean ? + +Shaarli is for shaaring your links. + + + +# Technical details + * Application is protected against XSRF (Cross-site requests forgery): Forms which act on data (save,delete…) contain a token generated by the server. Any posted form which does not contain a valid token is rejected. Any token can only be used once. Token are attached to the session and cannot be reused in another session. + * Sessions automatically expires after 60 minutes. Sessions are protected against highjacking: The sessionID cannot be used from a different IP address. + * An .htaccess file protects the data file. + * Link database is an associative array which is serialized, compressed (with deflate), base64-encoded and saved as a comment in a .php file. Thus even if the server does not support htaccess files, the data file will still not be readable by URL. The database looks like this: +``` + +``` + +* The password is salted, hashed and stored in the data subdirectory, in a php file, and protected by htaccess. Even if the webserver does not support htaccess, the hash is not readable by URL. Even if the .php file is stolen, the password cannot deduced from the hash. The salt prevents rainbow-tables attacks. +* Shaarli relies on `HTTP_REFERER` for some functions (like redirects and clicking on tags). If you have disabled or masqueraded `HTTP_REFERER` in your browser, some features of Shaarli may not work +* `magic_quotes` is a horrible option of php which is often activated on servers. No serious developer should rely on this horror to secure their code against SQL injections. You should disable it (and Shaarli expects this option to be disabled). Nevertheless, I have added code to cope with magic_quotes on, so you should not be bothered even on crappy hosts. +* Small hashes are used to make a link to an entry in Shaarli. They are unique. In fact, the date of the items (eg.20110923_150523) is hashed with CRC32, then converted to base64 and some characters are replaced. They are always 6 characters longs and use only A-Z a-z 0-9 - _ and @. + +### Directory structure + +Here is the directory structure of Shaarli and the purpose of the different files: + +``` + index.php : Main program. + COPYING : Shaarli license. + inc/ : Includes (libraries, CSS…) + shaarli.css : Shaarli stylesheet. + jquery.min.js : jQuery javascript library. + jquery-ui.min.js : jQuery-UI javascript library. + jquery-MIT-LICENSE.txt: jQuery license. + jquery.lazyload.min.js: LazyLoad javascript library. + rain.tpl.class.php : RainTPL templating library. + tpl/ : RainTPL templates for Shaarli. They are used to build the pages. + images/ : Images and icons used in Shaarli. + data/ : Directory where data is stored (bookmark database, configuration, logs, banlist…) + config.php : Shaarli configuration (login, password, timezone, title…) + datastore.php : Your link database (compressed). + ipban.php : IP address ban system data. + lastupdatecheck.txt : Update check timestamp file (used to check every 24 hours if a new version of Shaarli is available). + log.txt : login/IPban log. + cache/ : Directory containing the thumbnails cache. This directory is automatically created. You can erase it anytime you want. + tmp/ : Temporary directory for compiled RainTPL templates. This directory is automatically created. You can erase it anytime you want. +``` + +### Why not use a real database ? Files are slow ! + +Does browsing [this page](http://sebsauvage.net/links/) feel slow ? Try browsing older pages, too. + +It's not slow at all, is it ? And don't forget the database contains more than 16000 links, and it's on a shared host, with 32000 visitors/day for my website alone. And it's still damn fast. Why ? + +The data file is only 3.7 Mb. It's read 99% of the time, and is probably already in the operation system disk cache. So generating a page involves no I/O at all most of the time. + +# Wiki - TODO + * Translate (new page can be called Home.fr, Home.es ...) and linked from Home + * add more screenshots + * add developer documentation (storage architecture, classes and functions, security handling, ...) + * Contact related projects + * Add a Table of Contents to the wiki (can be added to the sidebar) + +... \ No newline at end of file diff --git a/doc/Ideas-for-plugins.md b/doc/Ideas-for-plugins.md new file mode 100644 index 0000000..9c3ffb0 --- /dev/null +++ b/doc/Ideas-for-plugins.md @@ -0,0 +1,11 @@ +Please list here ideas for potential plugins. Do not include lengthy discussion about why/how the plugin should work, but link instead to an issue where this would have been discussed. +By listing these ideas here, we can keep the issues list a bit more clean, and have a centralized place where people wanting to contribute can find potential enhancement ideas. +Also have a look at https://github.com/shaarli/Shaarli/issues/14 for other suggestions. + +* [Mozilla Social API integration](https://github.com/shaarli/Shaarli/issues/101) +* [File sharing/Upload service integration](https://github.com/shaarli/Shaarli/issues/58) +* [Publish to social media services (twitter, facebook, ...)](https://github.com/sebsauvage/Shaarli/pull/70) +* [Comment system](https://github.com/sebsauvage/Shaarli/issues/170) +* [Syntax highlighting support](https://github.com/sebsauvage/Shaarli/pull/144) +* [Piwik tracking code integration](https://github.com/sebsauvage/Shaarli/issues/81) +* [Pingback support](https://github.com/sebsauvage/Shaarli/issues/75) \ No newline at end of file diff --git "a/doc/Mentions-of-Shaarli-in-\"the-press\".md" "b/doc/Mentions-of-Shaarli-in-\"the-press\".md" new file mode 100644 index 0000000..60c22cf --- /dev/null +++ "b/doc/Mentions-of-Shaarli-in-\"the-press\".md" @@ -0,0 +1,3 @@ +This page lists the publications (physical or on the Internet) that mention Shaarli. It is by no means a complete list, and you are invited to add to it, should you spot a Shaarli mentioned in the wild. + +* http://www.linuxjournal.com/content/youre-boss-ubos \ No newline at end of file diff --git a/doc/_Sidebar.md b/doc/_Sidebar.md new file mode 100644 index 0000000..dbe145f --- /dev/null +++ b/doc/_Sidebar.md @@ -0,0 +1,37 @@ + +- [Basic Usage](#basic-usage) + - [Add the sharing button (_bookmarklet_) to your browser](#add-the-sharing-button-_bookmarklet_-to-your-browser) + - [Share links using the _bookmarklet_](#share-links-using-the-_bookmarklet_) +- [Other usage examples](#other-usage-examples) + - [Using Shaarli as a blog, notepad, pastebin...](#using-shaarli-as-a-blog-notepad-pastebin) + - [RSS Feeds or Picture Wall for a specific search/tag](#rss-feeds-or-picture-wall-for-a-specific-searchtag) +- [Configuration](#configuration) + - [Main data/options.php file](#main-dataoptionsphp-file) + - [Changing theme](#changing-theme) +- [Backup](#backup) +- [Login bruteforce protection](#login-bruteforce-protection) + - [List of all login attempts](#list-of-all-login-attempts) +- [Troubleshooting](#troubleshooting) + - [I forgot my password !](#i-forgot-my-password-) + - [Exporting from Diigo](#exporting-from-diigo) + - [Importing from SemanticScuttle](#importing-from-semanticscuttle) + - [Importing from Mister Wong](#importing-from-mister-wong) + - [Hosting problems](#hosting-problems) + - [Dates are not properly formatted](#dates-are-not-properly-formatted) + - [Problems on CentOS servers](#problems-on-centos-servers) + - [My session expires ! I can't stay logged in](#my-session-expires--i-cant-stay-logged-in) + - [`Sessions do not seem to work correctly on your server`](#sessions-do-not-seem-to-work-correctly-on-your-server) + - [pubsubhubbub support](#pubsubhubbub-support) +- [Notes](#notes) + - [Various hacks](#various-hacks) + - [Changing timestamp for a link](#changing-timestamp-for-a-link) +- [Related software](#related-software) +- [Other links](#other-links) +- [FAQ](#faq) + - [Why did you create Shaarli ?](#why-did-you-create-shaarli-) + - [Why use Shaarli and not Delicious/Diigo ?](#why-use-shaarli-and-not-deliciousdiigo-) + - [What does Shaarli mean ?](#what-does-shaarli-mean-) +- [Technical details](#technical-details) + - [Directory structure](#directory-structure) + - [Why not use a real database ? Files are slow !](#why-not-use-a-real-database--files-are-slow-) +- [Wiki - TODO](#wiki---todo) \ No newline at end of file diff --git a/doc/config.json b/doc/config.json new file mode 100644 index 0000000..cc4de30 --- /dev/null +++ b/doc/config.json @@ -0,0 +1,6 @@ +{ + "useSideMenu": true, + "lineBreaks": "gfm", + "additionalFooterText": "", + "title": "Shaarli documentation" +} \ No newline at end of file diff --git a/doc/images/bookmarklet.png b/doc/images/bookmarklet.png new file mode 100644 index 0000000..0262578 Binary files /dev/null and b/doc/images/bookmarklet.png differ diff --git a/doc/images/doc-logo.png b/doc/images/doc-logo.png new file mode 100644 index 0000000..3d8d178 Binary files /dev/null and b/doc/images/doc-logo.png differ diff --git a/doc/images/rss-filter-1.png b/doc/images/rss-filter-1.png new file mode 100644 index 0000000..d2a03f6 Binary files /dev/null and b/doc/images/rss-filter-1.png differ diff --git a/doc/images/rss-filter-2.png b/doc/images/rss-filter-2.png new file mode 100644 index 0000000..538b126 Binary files /dev/null and b/doc/images/rss-filter-2.png differ diff --git a/doc/index.html b/doc/index.html new file mode 100644 index 0000000..78e2814 --- /dev/null +++ b/doc/index.html @@ -0,0 +1,212 @@ + + + + +