Plugin to automatically embed original/mobilized article

Post plugins and custom CSS snippets here
gruf
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 22 Jun 2013, 02:58

Re: Plugin to automatically embed original/mobilized article

Postby gruf » 29 Jun 2013, 18:04

I tried this running with postgres 9.2 and trunk ttrss and it doesn't appear to work. Perhaps the schema changes didn't apply?

Ok hacked this up and it is working for me.

Code: Select all

$result=db_query( 'SELECT 1 FROM plugin_auto_embed_original_mobilizer' );
      if (db_num_rows($result) == 0) {
            if (DB_TYPE == "pgsql") {
                db_query("
                    CREATE TABLE plugin_auto_embed_original_mobilizer
                                    (
                                        id serial NOT NULL,
                      description character varying(255) NOT NULL,
                      url character varying(1000) NOT NULL,
                      CONSTRAINT plugin_auto_embed_original_mobilizer_pkey PRIMARY KEY (id)
                    )
                    WITH (
                        OIDS=FALSE
                    );
                ");

                db_query("INSERT INTO plugin_auto_embed_original_mobilizer (id, description, url) VALUES
                (0, 'feed content', ''),
                (1, 'full original article', '%s'),
                (3, 'instapaper mobilized view', 'http://www.instapaper.com/m?u=%s');
                ");

                db_query("
                CREATE TABLE plugin_auto_embed_original_feeds
                                (
                                    id serial NOT NULL,
                  owner_uid integer NOT NULL,
                  mobilizer_id integer NOT NULL,
                  CONSTRAINT plugin_auto_embed_original_feeds_pkey PRIMARY KEY (id)
                )
                WITH (
                    OIDS=FALSE
                     );
                ");
            }
            else {
                db_query("
                CREATE TABLE IF NOT EXISTS `plugin_auto_embed_original_mobilizer` (
                  `id` int(11) NOT NULL,
                  `description` varchar(255) NOT NULL,
                  `url` varchar(1000) NOT NULL,
                  PRIMARY KEY (`id`)
                ) ENGINE=MyISAM  DEFAULT CHARSET=latin1;
                ");

                db_query("INSERT INTO `plugin_auto_embed_original_mobilizer` (`id`, `description`, `url`) VALUES
                (0, 'feed content', ''),
                (1, 'full original article', '%s'),
                (3, 'instapaper mobilized view', 'http://www.instapaper.com/m?u=%s');
                ");

                db_query("CREATE TABLE IF NOT EXISTS `plugin_auto_embed_original_feeds` (
                  `id` int(11) NOT NULL,
                  `owner_uid` int(11) NOT NULL,
                  `mobilizer_id` int(11) NOT NULL,
                  PRIMARY KEY (`id`,`owner_uid`)
                ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
                ");
            }
      }

User avatar
Morpion
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 05 Jan 2014, 19:47
Location: Hossegor, France
Contact:

Re: Plugin to automatically embed original/mobilized article

Postby Morpion » 05 Jan 2014, 20:42

Thank you for your work, i like this plugin.

For information, i had problems with this messages on some sites :
Refused to display "http://..." in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'
Refused to display "http://..." in a frame because it set 'X-Frame-Options' to 'DENY'

I searched a little bit and found this :
"The X-Frame-Options HTTP response header can be used to indicate whether or not a browser should be allowed to render a page in a <frame> or <iframe>."
https://developer.mozilla.org/en-US/doc ... me-Options

Because it's browser side, the only solution if found was a Chrome extension. You can find it here :
https://chrome.google.com/webstore/deta ... kohkpodhe/

Hope it can help.

cqrt
Bear Rating Disaster
Bear Rating Disaster
Posts: 70
Joined: 05 Apr 2013, 00:37

Re: Plugin to automatically embed original/mobilized article

Postby cqrt » 06 Jan 2014, 20:33

Jeebuz!! No whitelist/blacklist options in that extension. Don't complain when some Russian script kiddie shits all over your hard drive.

User avatar
Morpion
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 05 Jan 2014, 19:47
Location: Hossegor, France
Contact:

Re: Plugin to automatically embed original/mobilized article

Postby Morpion » 06 Jan 2014, 20:52

Yes, as a lot of useful extension, but you can combine it with Extension Automation (https://chrome.google.com/webstore/deta ... jfomdbakkb)

ripley
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 20 Mar 2014, 20:56

Re: Plugin to automatically embed original/mobilized article

Postby ripley » 20 Mar 2014, 21:33

After much forum searching and trying various things this is the closest thing I've found to what I'm look for. So first off thank you to macfly for the plugin and to gruf for the mod to make it with with Postgres. I've got it working now and its great. I do have a question though, is it possible to automatically have it display the Instapaper version for every article in a feed? That's the thing I'd really like for certain feeds.

macfly
Bear Rating Disaster
Bear Rating Disaster
Posts: 82
Joined: 27 Mar 2013, 23:07

Re: Plugin to automatically embed original/mobilized article

Postby macfly » 21 Mar 2014, 00:07

sure.

go to prefs, choose the tab "feeds", select your feed and choose at "Feed content" simply "Instapaper" ....

hth,
macfly.

ripley
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 20 Mar 2014, 20:56

Re: Plugin to automatically embed original/mobilized article

Postby ripley » 22 Mar 2014, 02:50

Ok, I thought that was the setting for it. I've set it on two different feeds now and I'm still just getting the regular RSS display until I hit the toggle button. So I'm clear what, I want is to click on the article title in the top display pane, I'm not using Combined view, and have the Instapaper text display in the lower pane. Right now this requires clicking the article title, then hitting the Toggle Embed Original button for each article I look at. Am I doing something wrong?

murksi
Bear Rating Trainee
Bear Rating Trainee
Posts: 1
Joined: 05 Apr 2014, 01:08

Re: Plugin to automatically embed original/mobilized article

Postby murksi » 05 Apr 2014, 01:18

Hi everybody,

I can reproduce the behaviour described by ripley with tt-rss 1.12 and the most recent release of the plug-in from this thread. Switching to embed original mode using hotkeys "a e" works fine, but the "Edit Subscription" dialogue (not sure about the English name of the dialogue) doesn't show a drop-down for choosing preferred display mode. Any advice would be greatly appreciated!

Thanks for the great work!

cheers,

Phil


Return to “Themes and plugins”

Who is online

Users browsing this forum: No registered users and 1 guest