Contributors :
Nicolas LÅ“uillet aka nico_somb
Tom.C. aka tmos
+PeaceCopathe
\ No newline at end of file
## Usage
You can easily add a "poched" page with the bookmarklet.
+poche save the entire content of a poched links : text and pictures are stored on your server.
+
You can :
* read a page in a comfortable reading view
* archive a link
* put a link in favorite
* delete a link
+## Requirements & installation
+You have to install [sqlite for php](http://www.php.net/manual/en/book.sqlite.php) on your server.
+
+Get the [latest version](https://github.com/nicosomb/poche) of poche on github. Unzip it and upload it on your server. poche must have write access on assets, cache and db directories.
+
+That's all, **poche works** !
+
## Security
You **have** to protect your db/poche.sqlite file. Modify the virtual host of your website to add this condition :
```apache
* @license http://www.wtfpl.net/ see COPYING file
*/
-if(!is_dir('db/')){mkdir('db/',0705);}
+if (!is_dir('db/')) {
+ @mkdir('db/',0705);
+}
+
define ('DB_PATH', 'sqlite:./db/poche.sqlite');
-define ('ABS_PATH', 'archiveImg/');
+define ('ABS_PATH', 'assets/');
include 'db.php';
include 'functions.php';
class db {
var $handle;
- function __construct($path)
- {
+ function __construct($path) {
$this->handle = new PDO($path);
$this->handle->exec('CREATE TABLE IF NOT EXISTS "entries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE , "title" VARCHAR, "url" VARCHAR UNIQUE , "is_read" INTEGER DEFAULT 0, "is_fav" INTEGER DEFAULT 0, "content" BLOB)');
$this->handle->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
- public function getHandle()
- {
+ public function getHandle() {
return $this->handle;
}
}
\ No newline at end of file
$tpl->assign('id', $entry[0]['id']);
$tpl->assign('url', $entry[0]['url']);
$tpl->assign('title', $entry[0]['title']);
- $tpl->assign('content', gzinflate(base64_decode($entry[0]['content'])));
+ $tpl->assign('content', $entry[0]['content']);
$tpl->assign('is_fav', $entry[0]['is_fav']);
$tpl->assign('is_read', $entry[0]['is_read']);
$tpl->assign('load_all_js', 0);