pinterest, owncloud, pocket, tweet, etc social plugins

Post plugins and custom CSS snippets here
WSMcG
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 02 Apr 2013, 18:57

Trimming URL for Saving to Pocket

Postby WSMcG » 02 Apr 2013, 19:08

Noticed when trying to save a Penny Arcade Reports URL to Pocket that the URL ends up with a couple of tabs at the beginning and end. This is an error on the Pocket save screen until they are removed.

In pocket.js, replacing

Code: Select all

ti.link
with

Code: Select all

ti.link.trim()
does the trick, at least on Chrome 26.

I also added

Code: Select all

        if(!String.prototype.trim) {
          String.prototype.trim = function () {
            return this.replace(/^\s+|\s+$/g,'');
          };
        }

to the beginning of the function to help improve compatibility with older browsers, although I don't know if they will even run TT-RSS. I also haven't really tested it, so YMMV.

Is there a proper bug tracker for TT-RSS?

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Trimming URL for Saving to Pocket

Postby fox » 02 Apr 2013, 19:11

>Is there a proper bug tracker for TT-RSS?

Hoo boy.

Edit: to add, the plugin is no longer in trunk, so don't file bugs against it.

WSMcG
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 02 Apr 2013, 18:57

Re: Trimming URL for Saving to Pocket

Postby WSMcG » 02 Apr 2013, 19:16

I guess I'm missing something regarding bug trackers... anyway, was this the right way to bring this up?

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Trimming URL for Saving to Pocket

Postby fox » 02 Apr 2013, 19:21

There's a thread in the themes forum, you can post the updated zip (or a fix) there I suppose.

Or I or some other mod can merge the threads.

aurelieng
Bear Rating Trainee
Bear Rating Trainee
Posts: 11
Joined: 03 Apr 2013, 10:55

Re: pinterest, owncloud, pocket, tweet, etc social plugins

Postby aurelieng » 03 Apr 2013, 11:04

sandebert wrote:I think I've found a small typo in the Pocket plugin, probably due to using the Twitter plugin as base for it. (Might be in more of them, haven't checked.)

pocket.js

Code: Select all

      var w = window.open('backend.php?op=backend&method=loading', 'ttrss_tweet',
         "status=0,toolbar=0,location=0,width=500,height=400,scrollbars=1,menubar=0");

...should probably be something like...

Code: Select all

      var w = window.open('backend.php?op=backend&method=loading', 'ttrss_pocket',
         "status=0,toolbar=0,location=0,width=500,height=400,scrollbars=1,menubar=0");


The string of the exception below should also probably be updated from

Code: Select all

exception_error("tweetArticle", e);


to

Code: Select all

exception_error("pocketArticle", e);


Btw, is it possible to have the pocket icon next to article headlines (eg. next to the star icon), so that there's no need to show the article content to be able to add it to pocket?

Best,

Aurel.

bmar
Bear Rating Trainee
Bear Rating Trainee
Posts: 14
Joined: 28 Mar 2013, 09:49
Location: NN, Russia

Re: pinterest, owncloud, pocket, tweet, etc social plugins

Postby bmar » 03 Apr 2013, 11:37

I've modified googleplus plugin to make posts to vk.com. Does anybody need it? :)

User avatar
Andyt8
Bear Rating Disaster
Bear Rating Disaster
Posts: 83
Joined: 19 Mar 2013, 17:02
Location: Austria
Contact:

Re: pinterest, owncloud, pocket, tweet, etc social plugins

Postby Andyt8 » 03 Apr 2013, 11:54

@fox: do you post a new version of twitter or/and googleplus plugin? Both isn't included in TT-RSS 1.7.6 as before and the attached files on first post are older...

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: pinterest, owncloud, pocket, tweet, etc social plugins

Postby fox » 03 Apr 2013, 12:19

Not sure how they could be older (older than what?) because I pulled them from trunk.

User avatar
Andyt8
Bear Rating Disaster
Bear Rating Disaster
Posts: 83
Joined: 19 Mar 2013, 17:02
Location: Austria
Contact:

Re: pinterest, owncloud, pocket, tweet, etc social plugins

Postby Andyt8 » 03 Apr 2013, 12:33

I mean it work only for older TT-RSS Version - I tried Twitter and Google+ and they don't work with TT-RSS 1.7.6....

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: pinterest, owncloud, pocket, tweet, etc social plugins

Postby fox » 03 Apr 2013, 12:37

Just tried g+ from the zip and it seems to work fine on trunk.

User avatar
Andyt8
Bear Rating Disaster
Bear Rating Disaster
Posts: 83
Joined: 19 Mar 2013, 17:02
Location: Austria
Contact:

Re: pinterest, owncloud, pocket, tweet, etc social plugins

Postby Andyt8 » 03 Apr 2013, 13:04

You mean the zip-files which are attached in first post? They don't work for me. What do you exactly mean with "work fine on trunk"?

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: pinterest, owncloud, pocket, tweet, etc social plugins

Postby fox » 03 Apr 2013, 15:59

Be more specific. What happens when you unzip the plugin and enable it?

Trunk means development head version I use, which is mostly equal to 1.7.6 at this point.

User avatar
Andyt8
Bear Rating Disaster
Bear Rating Disaster
Posts: 83
Joined: 19 Mar 2013, 17:02
Location: Austria
Contact:

Re: pinterest, owncloud, pocket, tweet, etc social plugins

Postby Andyt8 » 04 Apr 2013, 11:01

After downloading, unzip and uploading to TT-RSS Webspace - the plugin isn't available through TT-RSS plugin settings.

So I looked to the file and changed one small point:

Code: Select all

   function about() {
      return array(1.0,
         "Share article on Twitter",
         "fox");
   }

to

Code: Select all

   function about() {
      return array(1.0,
         "Share article on Twitter",
         "fox",
         false);
   }


After uploading the changed file, I was able to enable the plugin and it work again as in TT-RSS 1.7.5. Hopefully, I'm now more specific?

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: pinterest, owncloud, pocket, tweet, etc social plugins

Postby fox » 04 Apr 2013, 13:33

Right, this might have been changed recently. It would be great if you attached the updated zips, I'll reattach them to the first post then.

(Well either that or I'll do it sometime later I guess)

User avatar
Andyt8
Bear Rating Disaster
Bear Rating Disaster
Posts: 83
Joined: 19 Mar 2013, 17:02
Location: Austria
Contact:

Re: pinterest, owncloud, pocket, tweet, etc social plugins

Postby Andyt8 » 04 Apr 2013, 14:42

Ok, at the moment I use only tweet and googleplus. If you have less time, I'm able to do a short fix to the other plugins later this week.
Attachments
googleplus.zip
Ver. 1.1, for TT-RSS 1.7.6 and above
(4.65 KiB) Downloaded 271 times
tweet.zip
Ver. 1.1, for TT-RSS 1.7.6 and above
(1.52 KiB) Downloaded 235 times


Return to “Themes and plugins”

Who is online

Users browsing this forum: No registered users and 1 guest