summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/af_comics/filters/af_comics_gocomics.php4
-rw-r--r--plugins/af_comics/filters/af_comics_gocomics_farside.php3
-rw-r--r--plugins/af_readability/init.js4
-rw-r--r--plugins/auth_internal/init.php6
-rw-r--r--plugins/hotkeys_force_top/init.js6
-rw-r--r--plugins/hotkeys_force_top/init.php24
-rw-r--r--plugins/hotkeys_noscroll/init.php2
-rw-r--r--plugins/hotkeys_swap_jk/init.php (renamed from plugins/swap_jk/init.php)4
-rw-r--r--plugins/mail/init.php14
-rw-r--r--plugins/mailto/init.php6
-rw-r--r--plugins/shorten_expanded/init.js2
11 files changed, 50 insertions, 25 deletions
diff --git a/plugins/af_comics/filters/af_comics_gocomics.php b/plugins/af_comics/filters/af_comics_gocomics.php
index 791dc07d3..2cb49b9bc 100644
--- a/plugins/af_comics/filters/af_comics_gocomics.php
+++ b/plugins/af_comics/filters/af_comics_gocomics.php
@@ -31,13 +31,11 @@ class Af_Comics_Gocomics extends Af_ComicFilter {
$body = fetch_file_contents(array('url' => $article_link, 'type' => 'text/html', 'followlocation' => false));
- require_once 'lib/MiniTemplator.class.php';
-
$feed_title = htmlspecialchars($comic[1]);
$site_url = htmlspecialchars($site_url);
$article_link = htmlspecialchars($article_link);
- $tpl = new MiniTemplator();
+ $tpl = new Templator();
$tpl->readTemplateFromFile('templates/generated_feed.txt');
diff --git a/plugins/af_comics/filters/af_comics_gocomics_farside.php b/plugins/af_comics/filters/af_comics_gocomics_farside.php
index 783907e17..71c5e0059 100644
--- a/plugins/af_comics/filters/af_comics_gocomics_farside.php
+++ b/plugins/af_comics/filters/af_comics_gocomics_farside.php
@@ -25,11 +25,10 @@ class Af_Comics_Gocomics_FarSide extends Af_ComicFilter {
public function on_fetch($url) {
if (preg_match("#^https?://www\.thefarside\.com#", $url)) {
- require_once 'lib/MiniTemplator.class.php';
$article_link = htmlspecialchars("https://www.thefarside.com" . date('/Y/m/d'));
- $tpl = new MiniTemplator();
+ $tpl = new Templator();
$tpl->readTemplateFromFile('templates/generated_feed.txt');
diff --git a/plugins/af_readability/init.js b/plugins/af_readability/init.js
index 644dff9fe..3155475cc 100644
--- a/plugins/af_readability/init.js
+++ b/plugins/af_readability/init.js
@@ -9,7 +9,7 @@ Plugins.Af_Readability = {
content.innerHTML = content.getAttribute(self.orig_attr_name);
content.removeAttribute(self.orig_attr_name);
- if (App.isCombinedMode()) Article.cdmScrollToId(id);
+ if (App.isCombinedMode()) Article.cdmMoveToId(id);
return;
}
@@ -23,7 +23,7 @@ Plugins.Af_Readability = {
content.innerHTML = reply.content;
Notify.close();
- if (App.isCombinedMode()) Article.cdmScrollToId(id);
+ if (App.isCombinedMode()) Article.cdmMoveToId(id);
} else {
Notify.error("Unable to fetch full text for this article");
diff --git a/plugins/auth_internal/init.php b/plugins/auth_internal/init.php
index 8dbc37fb3..ad32d29b9 100644
--- a/plugins/auth_internal/init.php
+++ b/plugins/auth_internal/init.php
@@ -235,11 +235,9 @@ class Auth_Internal extends Plugin implements IAuthModule {
if ($row = $sth->fetch()) {
$mailer = new Mailer();
- require_once "lib/MiniTemplator.class.php";
+ $tpl = new Templator();
- $tpl = new MiniTemplator;
-
- $tpl->readTemplateFromFile("templates/password_change_template.txt");
+ $tpl->readTemplateFromFile("password_change_template.txt");
$tpl->setVariable('LOGIN', $row["login"]);
$tpl->setVariable('TTRSS_HOST', SELF_URL_PATH);
diff --git a/plugins/hotkeys_force_top/init.js b/plugins/hotkeys_force_top/init.js
new file mode 100644
index 000000000..8d6280fc9
--- /dev/null
+++ b/plugins/hotkeys_force_top/init.js
@@ -0,0 +1,6 @@
+require(['dojo/_base/kernel', 'dojo/ready'], function (dojo, ready) {
+ ready(function () {
+ Headlines.default_force_to_top = true;
+ });
+});
+
diff --git a/plugins/hotkeys_force_top/init.php b/plugins/hotkeys_force_top/init.php
new file mode 100644
index 000000000..faddc9148
--- /dev/null
+++ b/plugins/hotkeys_force_top/init.php
@@ -0,0 +1,24 @@
+<?php
+class Hotkeys_Force_Top extends Plugin {
+ private $host;
+
+ function about() {
+ return array(1.0,
+ "Force open article to the top",
+ "itsamenathan");
+ }
+
+ function init($host) {
+ $this->host = $host;
+
+ }
+
+ function get_js() {
+ return file_get_contents(__DIR__ . "/init.js");
+ }
+
+ function api_version() {
+ return 2;
+ }
+
+}
diff --git a/plugins/hotkeys_noscroll/init.php b/plugins/hotkeys_noscroll/init.php
index 2038997f5..b31ee92ae 100644
--- a/plugins/hotkeys_noscroll/init.php
+++ b/plugins/hotkeys_noscroll/init.php
@@ -4,7 +4,7 @@ class Hotkeys_Noscroll extends Plugin {
function about() {
return array(1.0,
- "n/p hotkeys move between articles without scrolling",
+ "n/p (and up/down) hotkeys move between articles without scrolling",
"fox");
}
diff --git a/plugins/swap_jk/init.php b/plugins/hotkeys_swap_jk/init.php
index d85149ef3..b1e3dbe04 100644
--- a/plugins/swap_jk/init.php
+++ b/plugins/hotkeys_swap_jk/init.php
@@ -1,5 +1,5 @@
<?php
-class Swap_JK extends Plugin {
+class Hotkeys_Swap_JK extends Plugin {
private $host;
@@ -27,4 +27,4 @@ class Swap_JK extends Plugin {
return 2;
}
-} \ No newline at end of file
+}
diff --git a/plugins/mail/init.php b/plugins/mail/init.php
index e85053566..40d147fc9 100644
--- a/plugins/mail/init.php
+++ b/plugins/mail/init.php
@@ -92,18 +92,20 @@ class Mail extends Plugin {
if ($row = $sth->fetch()) {
$user_email = htmlspecialchars($row['email']);
$user_name = htmlspecialchars($row['full_name']);
+ } else {
+ $user_name = "";
+ $user_email = "";
}
- if (!$user_name) $user_name = $_SESSION['name'];
+ if (!$user_name)
+ $user_name = $_SESSION['name'];
print_hidden("from_email", "$user_email");
print_hidden("from_name", "$user_name");
- require_once "lib/MiniTemplator.class.php";
-
- $tpl = new MiniTemplator;
+ $tpl = new Templator();
- $tpl->readTemplateFromFile("templates/email_article_template.txt");
+ $tpl->readTemplateFromFile("email_article_template.txt");
$tpl->setVariable('USER_NAME', $_SESSION["name"], true);
$tpl->setVariable('USER_EMAIL', $user_email, true);
@@ -116,6 +118,8 @@ class Mail extends Plugin {
if (count($ids) > 1) {
$subject = __("[Forwarded]") . " " . __("Multiple articles");
+ } else {
+ $subject = "";
}
while ($line = $sth->fetch()) {
diff --git a/plugins/mailto/init.php b/plugins/mailto/init.php
index 421d5fd59..390984b71 100644
--- a/plugins/mailto/init.php
+++ b/plugins/mailto/init.php
@@ -29,11 +29,9 @@ class MailTo extends Plugin {
$ids = explode(",", $_REQUEST['param']);
$ids_qmarks = arr_qmarks($ids);
- require_once "lib/MiniTemplator.class.php";
+ $tpl = new Templator();
- $tpl = new MiniTemplator;
-
- $tpl->readTemplateFromFile("templates/email_article_template.txt");
+ $tpl->readTemplateFromFile("email_article_template.txt");
$tpl->setVariable('USER_NAME', $_SESSION["name"], true);
//$tpl->setVariable('USER_EMAIL', $user_email, true);
diff --git a/plugins/shorten_expanded/init.js b/plugins/shorten_expanded/init.js
index 6371bd1c6..587fcea42 100644
--- a/plugins/shorten_expanded/init.js
+++ b/plugins/shorten_expanded/init.js
@@ -42,8 +42,6 @@ require(['dojo/_base/kernel', 'dojo/ready'], function (dojo, ready) {
${__("Click to expand article")}</button>`;
dojo.parser.parse(c_inner);
-
- Headlines.unpackVisible();
}
}
}, 150);