diff --git a/driveby-sharing/README.md b/driveby-sharing/README.md
index 9b3625f..b626259 100644
--- a/driveby-sharing/README.md
+++ b/driveby-sharing/README.md
@@ -1,15 +1,16 @@
# A Drive-by sharing widget (share any web page in your tt-rss)
+[Requirement: tt-rss version >= 1.7.9]
+
1. Make sure a dedicated feed exists in your tt-rss
- You can insert it via executing the SQL in the file `create-gritttt-feed`, which you can find in the main directory. After creating the dedicated feed, look up the table `ttrss_feeds` and take note of the feed's ID.
+ You can insert it via executing the SQL in the file `create-gritttt-feed`, which you can find in the main directory. After creating the dedicated feed, look up the table `ttrss_feeds` and take note of the ID of the newly-created feed.
2. Create a configuration file `config.js` as a copy of `config.js.template`.
Enter your settings in `config.js`:
As `gritttt_url`, set the URL at which you will put the `driveby-sharing` folder later (see step 5).
As `path_to_ttrss`, set the relative path from `gritttt_url` to the folder containing your tt-rss instance.
The feed ID (`feed_id`) is the ID of the feed you created in step 1. For `user_id`, the user is the tt-rss user, and his ID is most likely `1`, if you log in with the user `admin`.
- That is the standard case - if you run a multi-user tt-rss, fill in the ID you want to use in that context of sharing.
- Change the next setting to `false` if your tt-rss instance has a version lower than `1.5.10.` (you can see the version on the login screen).
+ That is the standard case - if you run a multi-user tt-rss, fill in the ID you want to use in that context of sharing.
3. Adjust the URL at which the `driveby-sharing` folder will be in `bookmarklet.js`:
Replace `http://www.example.com/gritttt/driveby-sharing` with whereever you put that folder later, in step 5 (you also edited this in `config.js` in step 2).
@@ -19,4 +20,4 @@
5. Put this directory on your webserver, according to the settings you made in step 2 and 3. The example made a folder called `gritttt`,
and put the `driveby-sharing` folder in there (the `gritttt` folder is also useful to put the `shared-widget` folder in there, should you use that feature).
-6. Share!
+6. Start sharing - on any website, click the bookmarklet, fill in title and possibly a note and hit `Share`!
diff --git a/driveby-sharing/config.js.template b/driveby-sharing/config.js.template
index 7f9507c..19be44f 100644
--- a/driveby-sharing/config.js.template
+++ b/driveby-sharing/config.js.template
@@ -3,5 +3,4 @@ var config = {
"path_to_ttrss": "../../tt-rss",
"feed_id": 183,
"user_id": 1,
- "ttrss_version_above_1.5.10": true
};
diff --git a/driveby-sharing/form.php b/driveby-sharing/form.php
index 0e38356..9d80ae7 100755
--- a/driveby-sharing/form.php
+++ b/driveby-sharing/form.php
@@ -10,21 +10,12 @@
$config = json_decode('{' . $matches[1], true);
$gritttt_url = $config['gritttt_url'];
$path_to_ttrss = $config['path_to_ttrss'];
-$ttrss_above_1510 = $config['ttrss_version_above_1.5.10'];
-if ($ttrss_above_1510) {
- set_include_path(get_include_path() . PATH_SEPARATOR . $path_to_ttrss);
- require_once($path_to_ttrss . "/include/functions.php");
- require_once($path_to_ttrss . "/include/sessions.php");
-} else {
- require_once($path_to_ttrss . "/functions.php");
- require_once($path_to_ttrss . "/sessions.php");
-}
+set_include_path(get_include_path() . PATH_SEPARATOR . $path_to_ttrss);
+require_once($path_to_ttrss . "/classes/idb.php");
+require_once($path_to_ttrss . "/include/sessions.php");
ini_set('default_charset', 'utf-8');
-
-$link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
-init_connection($link);
?>
@@ -49,7 +40,7 @@ function getParameterByName(name)
// Logged in?
-if ($_SESSION["uid"] && validate_session($link)) {
+if ($_SESSION["uid"] && validate_session()) {
?>