Pocket Articles Collection free WordPress plugin
Description
Pocket Articles Collection free WordPress plugin
Pocket Articles Collection plugin helps you collect, manage and display your favourite Pocket articles in your WordPress blog.
Features and notes
Admin interface: An admin interface to add, edit and manage Pocket Articles. Details such as title and source URL of the Article, and attributes like tags and visibility, can be specified. The ‘Pocket Articles’ menu in the WP admin navigation leads to the Pocket Articles admin interface.
Backgrond downloading of new articles: Once every hour, the Pocket articles plugin will connect to the appointed Pocket account and download all articles that’s been added since the job was last run.
Shortcode: Pocket Articles can be displayed in a WordPress page by placing a [pocketarticlecoll]shortcode. A few examples are provided below. For more examples and the full list of arguments, please refer the plugin homepage or ‘other notes’.
Placing [pocketarticlecoll] in the page displays all Pocket articles.
[pocketarticlecoll title=”Somebody”] displays Pocket articles titleed by Somebody.
[pocketarticlecoll tags=”tag1,tag2,tag3″] displays Pocket articles tagged tag1 or tag2 or tag3, one or more or all of these
[pocketarticlecoll orderby=”random” limit=1] displays a random pocketarticle
The template function: To code the random pocketarticle functionality directly into a template file, the template function pocketarticlescollection_pocketarticle() can be used. Please refer the plugin homepage or ‘other notes’ for details.
Compatible with WordPress 3.0 multi-site functionality.
The plugin suppports localization. Refer the plugin page or ‘other notes’ for the full list of available languages and the respective translators.
For more information, visit the plugin homepage, where yo can also provide feed back.
The [pocketarticlecoll] shortcode
Pocket articles can be displayed in a page by placing the shortcode [pocketarticlecoll]. This will display all the public Pocket articles ordered by the pocketarticle id.
Different attributes can be specified to customize the way the Pocket articles are displayed. Here’s the list of attributes:
id (integer)
For example, [pocketarticlecoll id=3] displays a single pocketarticle, the id of which is 3. If there is no pocketarticle with the id 3, nothing is displayed.
This overrides all other attributes. That is, if id attribute is specified, any other attribute specified is ignored.
title (string)
[pocketarticlecoll title=”Somebody”] displays all Pocket articles titleed ‘Somebody’.
sourceurl (string)
[pocketarticlecoll sourceurl=”Something”] displays Pocket articles with the sourceurl ‘Something’.
tags (string, comma separated)
[pocketarticlecoll tags=”tag1″] displays all Pocket articles tagged ‘tag1’.
[pocketarticlecoll tags=”tag1, tag2, tag3″] displays Pocket articles tagged ‘tag1’ or ‘tag2’ or ‘tag3’, one or more or all of these.
orderby (string)
When multiple Pocket articles are displayed, the Pocket articles or ordered based on this value. The value can be either of these:
‘pocketarticle_id’ (default)
‘title’
‘sourceurl’
‘time_added’
‘random’
order (string)
The value can be either ‘ASC’ (default) or ‘DESC’, for ascending and descending order respectively.
For example, [pocketarticlecoll orderby=”time_added” order=”DESC”] will display all the Pocket articles in the order of date added, latest first and the earliest last.
paging (boolean)
The values can be:
false (or 0) (default)
true (or 1) — introduces paging. This is used in conjunction with limit_per_page (see below).
For example, [pocketarticlecoll paging=true limit_per_page=30] will introduce paging with maximum of 30 Pocket articles per page.
Note: if orderby=”random” is used, paging is ignored.
page (integer)
The page to start with on a paged article collection.
limit_per_page (integer)
The maximum number of Pocket articles to be displayed in a page when paging is introduced, as described above.
The defualt value is 10. For example, [pocketarticlecoll paging=true] will introduce paging with maximum of 10 Pocket articles per page.
limit (integer)
The maximum number of Pocket articles to be displayed in a single page ie., when paging is ‘false’.
This can be used, for example, to display just a random pocketarticle. [pocketarticlecoll orderby=”random” limit=1]
show_source (boolean)
The values can be:
false (or 0) (default)
true (or 1) — shows a link to the source of the article with only the url scheme and domain name (for example http://www.google.com)
show_date (boolean)
The values can be:
false (or 0) (default)
true (or 1) — shows the date when the article was downloaded to the wordpress installation by the plugin
The pocketarticlescollection_pocketarticle() template function
The pocketarticlescollection_pocketarticle() template function can be used to display a random pocketarticle in places other than sidebar.
Usage:
The list of parameters (arguments) that can be passed on to this function:
show_title (boolean)
To show/hide the title name
1 – shows the title name (default)
0 – hides the title name
show_sourceurl (boolean)
To show/hide the sourceurl field
1 – shows the sourceurl
0 – hides the sourceurl (default)
random (boolean)
Refresh the pocketarticle in random or sequential order
1 – random refresh (default)
0 – sequential, with the latest pocketarticle first
tags (string)
Comma separated list of tags. Only Pocket articles with one or more of these tags will be shown.
char_limit (integer)
Pocket articles with number of characters more than this value will be filtered out. This is useful if you don’t want to display long Pocket articles using this function. The default value is 500.
echo (boolean)
Toggles the display of the random pocketarticle or return the pocketarticle as an HTML text string to be used in PHP. The default value is 1 (display the pocketarticle). Valid values:
1 (true) – default
0 (false)
Example usage:
Uses the default values for the parameters. Shows title, hides sourceurl, shows the ‘Next pocketarticle’ link, no tags filtering, no character limit, displays the pocketarticle.
Hides title, shows sourceurl, only Pocket articles tagged with ‘fun’ or ‘fav’ or both are shown. ‘Next pocketarticle’ link is shown (default) and no character limit (default).
Localization
As of the current version, localization is available in the following languages (code / language / title):
‘en’ / English / [Martin Hallonqvist]
‘sv_SE’ / Swedish / [Martin Hallonqvist]
You can translate the plugin in your language if it’s not done already. The localization template file (pocketarticles-collection.pot) can be found in the ‘languages’ folder of the plugin.