From d178419c66fb1950aee7dc8e012c35f12f2a44bc Mon Sep 17 00:00:00 2001 From: nicosomb Date: Wed, 17 Apr 2013 15:32:57 +0200 Subject: [PATCH] README, CREDITS & chmod --- CREDITS | 1 + README.md | 9 +++++++++ img/checkmark-off.png | Bin img/checkmark-on.png | Bin img/down.png | Bin img/remove.png | Bin img/star-off.png | Bin img/star-on.png | Bin img/up.png | Bin inc/Encoding.php | 0 inc/JSLikeHTMLElement.php | 0 inc/Readability.php | 0 inc/config.php | 7 +++++-- inc/db.php | 6 ++---- inc/functions.php | 0 inc/rain.tpl.class.php | 0 index.php | 0 tpl/footer.html | 0 tpl/view.html | 0 view.php | 2 +- 20 files changed, 18 insertions(+), 7 deletions(-) mode change 100755 => 100644 README.md mode change 100755 => 100644 img/checkmark-off.png mode change 100755 => 100644 img/checkmark-on.png mode change 100755 => 100644 img/down.png mode change 100755 => 100644 img/remove.png mode change 100755 => 100644 img/star-off.png mode change 100755 => 100644 img/star-on.png mode change 100755 => 100644 img/up.png mode change 100755 => 100644 inc/Encoding.php mode change 100755 => 100644 inc/JSLikeHTMLElement.php mode change 100755 => 100644 inc/Readability.php mode change 100755 => 100644 inc/functions.php mode change 100755 => 100644 inc/rain.tpl.class.php mode change 100755 => 100644 index.php mode change 100755 => 100644 tpl/footer.html mode change 100755 => 100644 tpl/view.html mode change 100755 => 100644 view.php diff --git a/CREDITS b/CREDITS index 6df488ee4..8a36be4b0 100644 --- a/CREDITS +++ b/CREDITS @@ -11,3 +11,4 @@ poche is developed by Nicolas LÅ“uillet under the Do What the Fuck You Want to P Contributors : Nicolas LÅ“uillet aka nico_somb Tom.C. aka tmos +PeaceCopathe \ No newline at end of file diff --git a/README.md b/README.md old mode 100755 new mode 100644 index c678d11cf..1015085ac --- a/README.md +++ b/README.md @@ -12,12 +12,21 @@ To get news from poche, [follow us on twitter](http://twitter.com/getpoche). ## 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 diff --git a/img/checkmark-off.png b/img/checkmark-off.png old mode 100755 new mode 100644 diff --git a/img/checkmark-on.png b/img/checkmark-on.png old mode 100755 new mode 100644 diff --git a/img/down.png b/img/down.png old mode 100755 new mode 100644 diff --git a/img/remove.png b/img/remove.png old mode 100755 new mode 100644 diff --git a/img/star-off.png b/img/star-off.png old mode 100755 new mode 100644 diff --git a/img/star-on.png b/img/star-on.png old mode 100755 new mode 100644 diff --git a/img/up.png b/img/up.png old mode 100755 new mode 100644 diff --git a/inc/Encoding.php b/inc/Encoding.php old mode 100755 new mode 100644 diff --git a/inc/JSLikeHTMLElement.php b/inc/JSLikeHTMLElement.php old mode 100755 new mode 100644 diff --git a/inc/Readability.php b/inc/Readability.php old mode 100755 new mode 100644 diff --git a/inc/config.php b/inc/config.php index 51a25d369..a7904def0 100644 --- a/inc/config.php +++ b/inc/config.php @@ -8,9 +8,12 @@ * @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'; diff --git a/inc/db.php b/inc/db.php index a1674ea75..60d7c108c 100644 --- a/inc/db.php +++ b/inc/db.php @@ -10,15 +10,13 @@ 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 diff --git a/inc/functions.php b/inc/functions.php old mode 100755 new mode 100644 diff --git a/inc/rain.tpl.class.php b/inc/rain.tpl.class.php old mode 100755 new mode 100644 diff --git a/index.php b/index.php old mode 100755 new mode 100644 diff --git a/tpl/footer.html b/tpl/footer.html old mode 100755 new mode 100644 diff --git a/tpl/view.html b/tpl/view.html old mode 100755 new mode 100644 diff --git a/view.php b/view.php old mode 100755 new mode 100644 index 9aa9a445f..9ba6f62da --- a/view.php +++ b/view.php @@ -20,7 +20,7 @@ if(!empty($id)) { $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);