purge content of read articles

Request new functionality here
roshambo
Bear Rating Trainee
Bear Rating Trainee
Posts: 35
Joined: 19 Jun 2013, 20:03

Re: purge content of read articles

Postby roshambo » 01 Jul 2013, 09:16

8yo psu died on my server but up again using latest trunk. Trying shift+x it does speed it back up but it takes a few seconds to respond when there's many articles, like a refresh. It's instant if it's not purging many articles. I see what you mean by jumpiness. Purging content is eventually what I'd like to do.

Sounds great about potential plugins. Is there a guide to creating ttrss plugins? Is it just plain php?

lotrfan
Bear Rating Disaster
Bear Rating Disaster
Posts: 73
Joined: 18 Mar 2013, 04:42

Re: purge content of read articles

Postby lotrfan » 01 Jul 2013, 10:22

roshambo wrote:Is there a guide to creating ttrss plugins?

Not really... it's mainly a learn-by-example "system" - look at the included plugins to see examples.

roshambo wrote:Is it just plain php?

It's mostly PHP, with some html/javascript/css thrown in (as needed)

Some tips to get you started (if you want to start):
  • Each plugin is in it's own subdirectory, named (basically) using only letters, numbers, and underscores (as a regexp, [A-Za-z0-9_]). Traditionally, these use only lowercase letters and underscores.
  • The "entry point" of a plugin is a file called "init.php", which contains a class with the same name as the subdirectory (case insensitively). This class inherits from the "Plugin" class.
  • Here is a sample init.php for a plugin called MyFirstPlugin.

    Code: Select all

    <?php
    class MyFirstPlugin extends Plugin {
       private $host;
       function about() { // This function returns data that is shown in TT-RSS's preferences
          return array(1.0, // Plugin version
             "My First Plugin", // Plugin name
             "Your Name", // Plugin author
             false, // A system plugin?
             "http://example.com"); // Plugin webpage
       }
       function init($host) { // This function is called to initiate the plugin
          $this->host = $host;
       }
       function api_version() { // Required
          return 2;
       }
    }
    ?>

    It doesn't do much, though... It's also not tested, but it should work.
  • A good plugin to base off of might be https://github.com/dandersson/ttrss-openinbgtab. It also defines custom hotkeys, as well as a custom hotkey handler.

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

Re: purge content of read articles

Postby fox » 01 Jul 2013, 11:46

There are several example_ plugins which demonstrate a few common tasks like adding preference panes and so on. I'm not sure if I moved those to contrib repository or not, try checking there if they are not bundled.

roshambo
Bear Rating Trainee
Bear Rating Trainee
Posts: 35
Joined: 19 Jun 2013, 20:03

Re: purge content of read articles

Postby roshambo » 02 Jul 2013, 11:13

Thank you both. I found the example plugins on github, will study and try to learn it in my spare time.


Return to “Feature requests”

Who is online

Users browsing this forum: No registered users and 1 guest