aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.default.php5
-rw-r--r--force-https.default.txt1
-rw-r--r--lib/core-extensions/Google-Groups/README.md3
-rw-r--r--lib/core-extensions/Google-Groups/extension.php10
-rw-r--r--lib/core-extensions/Google-Groups/metadata.json8
5 files changed, 25 insertions, 2 deletions
diff --git a/config.default.php b/config.default.php
index 71f8d477c..49869f7ac 100644
--- a/config.default.php
+++ b/config.default.php
@@ -175,9 +175,10 @@ return array(
),
# List of enabled FreshRSS extensions.
- 'extensions_enabled' => array(
+ 'extensions_enabled' => [
+ 'Google-Groups' => true,
'Tumblr-GDPR' => true,
- ),
+ ],
# Disable self-update,
'disable_update' => false,
diff --git a/force-https.default.txt b/force-https.default.txt
index cae2d4ef2..6a1f32f36 100644
--- a/force-https.default.txt
+++ b/force-https.default.txt
@@ -8,6 +8,7 @@ fsfe.org
github.com
gitlab.com
gnu.org
+google.com
gravatar.com
gstatic.com
kernel.org
diff --git a/lib/core-extensions/Google-Groups/README.md b/lib/core-extensions/Google-Groups/README.md
new file mode 100644
index 000000000..21b901ded
--- /dev/null
+++ b/lib/core-extensions/Google-Groups/README.md
@@ -0,0 +1,3 @@
+# Google Groups
+
+Needed for discovering RSS feeds from [Google Groups](https://groups.google.com).
diff --git a/lib/core-extensions/Google-Groups/extension.php b/lib/core-extensions/Google-Groups/extension.php
new file mode 100644
index 000000000..656bf9b8f
--- /dev/null
+++ b/lib/core-extensions/Google-Groups/extension.php
@@ -0,0 +1,10 @@
+<?php
+class GoogleGroupsExtension extends Minz_Extension {
+ public function init() {
+ $this->registerHook('check_url_before_add', array('GoogleGroupsExtension', 'findFeed'));
+ }
+
+ public static function findFeed($url) {
+ return preg_replace('%^(https?://groups.google.com/forum)/#!forum/(.+)$%i', '$1/feed/$2/msgs/rss.xml', $url);
+ }
+}
diff --git a/lib/core-extensions/Google-Groups/metadata.json b/lib/core-extensions/Google-Groups/metadata.json
new file mode 100644
index 000000000..afaa18392
--- /dev/null
+++ b/lib/core-extensions/Google-Groups/metadata.json
@@ -0,0 +1,8 @@
+{
+ "name": "Google-Groups",
+ "author": "Alkarex",
+ "description": "To discover RSS feeds for Google Groups",
+ "version": 1.0,
+ "entrypoint": "GoogleGroups",
+ "type": "system"
+}