]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Remove Twitter from SubMirror
authorMikael Nordfeldth <mmn@hethane.se>
Sun, 2 Mar 2014 21:58:23 +0000 (22:58 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Sun, 2 Mar 2014 21:58:23 +0000 (22:58 +0100)
Twitter removed Atom feeds in API v1.1, so there is no way to mirror
a feed without screen-scraping or registering a dev account with them.

plugins/SubMirror/actions/addmirror.php
plugins/SubMirror/actions/basemirror.php
plugins/SubMirror/forms/addtwitter.php [deleted file]
plugins/SubMirror/images/providers/twitter.png [deleted file]
plugins/SubMirror/lib/addmirrorwizard.php

index 0031cf1bf4735b17833c620b743bd52a873f5bae..4e2e1a0c52a77a56de327a6f933123271175b7fa 100644 (file)
@@ -71,10 +71,6 @@ class AddMirrorAction extends BaseMirrorAction
         switch ($provider) {
         case 'feed':
             return $this->trimmed('feedurl');
-        case 'twitter':
-            $screenie = $this->trimmed('screen_name');
-            $base = 'http://api.twitter.com/1/statuses/user_timeline.atom?screen_name=';
-            return $base . urlencode($screenie);
         default:
             // TRANS: Exception thrown when a feed provider could not be recognised.
             throw new Exception(_m('Internal form error: Unrecognized feed provider.'));
index bc5e2b541cda7f7134efca7d34be5996dd376586..95e2f9159778901a5c22acaffe4e91cae2b813d2 100644 (file)
@@ -101,8 +101,8 @@ abstract class BaseMirrorAction extends Action
             $oprofile = Ostatus_profile::ensureFeedURL($url);
         }
         if ($oprofile->isGroup()) {
-            // TRANS: Client error displayed when trying to mirror a StatusNet group feed.
-            $this->clientError(_m('Cannot mirror a StatusNet group at this time.'));
+            // TRANS: Client error displayed when trying to mirror a GNU social group feed.
+            $this->clientError(_m('Cannot mirror a GNU social group at this time.'));
         }
         $this->oprofile = $oprofile; // @todo FIXME: ugly side effect :D
         return $oprofile->localProfile();
diff --git a/plugins/SubMirror/forms/addtwitter.php b/plugins/SubMirror/forms/addtwitter.php
deleted file mode 100644 (file)
index 172d321..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-/**
- * StatusNet, the distributed open-source microblogging tool
- * PHP version 5
- *
- * LICENCE: This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- * @package   StatusNet
- * @copyright 2010 StatusNet, Inc.
- * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link      http://status.net/
- */
-
-if (!defined('STATUSNET') && !defined('LACONICA')) {
-    exit(1);
-}
-
-class AddTwitterMirrorForm extends AddMirrorForm
-{
-
-    /**
-     * Visible or invisible data elements
-     *
-     * Display the form fields that make up the data of the form.
-     * Sub-classes should overload this to show their data.
-     *
-     * @return void
-     */
-    function formData()
-    {
-        $this->out->hidden('provider', 'twitter');
-        $this->out->elementStart('fieldset');
-
-        $this->out->elementStart('ul');
-
-        $this->li();
-        $this->doInput('addmirror-feedurl',
-                       'screen_name',
-                       // TRANS: Field label.
-                       _m('Twitter username:'),
-                       $this->out->trimmed('screen_name'));
-        $this->unli();
-
-        $this->li();
-        // TRANS: Button text for adding a Twitter feed mirror.
-        $this->out->submit('addmirror-save', _m('BUTTON','Add feed'));
-        $this->unli();
-        $this->out->elementEnd('ul');
-        $this->out->elementEnd('fieldset');
-    }
-}
diff --git a/plugins/SubMirror/images/providers/twitter.png b/plugins/SubMirror/images/providers/twitter.png
deleted file mode 100644 (file)
index 41dabc8..0000000
Binary files a/plugins/SubMirror/images/providers/twitter.png and /dev/null differ
index 512b2bfa4add66abde9ab9f1280b40ed3421a3b7..0f8ac266eed113ca87c20babcc9024089ab5813a 100644 (file)
@@ -64,18 +64,10 @@ class AddMirrorWizard extends Widget
             // We could accept hostname & username combos here, or
             // webfingery combinations as for remote users.
             array(
-                'id' => 'statusnet',
-                'name' => _m('StatusNet'),
+                'id' => 'gnusocial',
+                'name' => _m('GNU social'),
             ),
              */
-            // Accepts a Twitter username and pulls their user timeline as a
-            // public Atom feed. Requires a working alternate hub which, one
-            // hopes, is getting timely updates.
-            array(
-                'id' => 'twitter',
-                // TRANS: Name for possible feed provider.
-                'name' => _m('Twitter'),
-            ),
             /*
             // WordPress was on our list some whiles ago, but not sure
             // what we can actually do here. Search on Wordpress.com hosted
@@ -85,26 +77,6 @@ class AddMirrorWizard extends Widget
                 'name' => _m('WordPress'),
             ),
              */
-            /*
-            // In theory, Facebook lets you pull public updates over RSS,
-            // but the URLs for your own update feed that I can find from
-            // 2009-era websites no longer seem to work and there's no
-            // good current documentation. May not still be available...
-            // Mirroring from an FB account is probably better done with
-            // the dedicated plugin. (As of March 2011)
-            array(
-                'id' => 'facebook',
-                'name' => _m('Facebook'),
-            ),
-             */
-            /*
-            // LinkedIn doesn't currently seem to have public feeds
-            // for users or groups (March 2011)
-            array(
-                'id' => 'linkedin',
-                'name' => _m('LinkedIn'),
-            ),
-             */
             array(
                 'id' => 'feed',
                 // TRANS: Name for possible feed provider.