pre 1.0
This commit is contained in:
parent
c43db02457
commit
9fd4603892
4 changed files with 78 additions and 43 deletions
|
@ -174,6 +174,7 @@ class Keyring_500px_Reactions extends Keyring_Reactions_Base {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
// temporarily hack
|
// temporarily hack
|
||||||
$baseurl = sprintf( "https://api.500px.com/v1/photos/%s?", $silo_id );
|
$baseurl = sprintf( "https://api.500px.com/v1/photos/%s?", $silo_id );
|
||||||
$params = array(
|
$params = array(
|
||||||
|
@ -197,6 +198,7 @@ class Keyring_500px_Reactions extends Keyring_Reactions_Base {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -144,8 +144,27 @@ class Keyring_Flickr_Reactions extends Keyring_Reactions_Base {
|
||||||
* COMMENTS
|
* COMMENTS
|
||||||
*/
|
*/
|
||||||
function get_comments ( $post_id, $silo_id ) {
|
function get_comments ( $post_id, $silo_id ) {
|
||||||
$results = $this->query_comments( $silo_id );
|
/*
|
||||||
|
// <!-- TEMP
|
||||||
|
$lat = get_post_meta($post_id, 'geo_latitude', true);
|
||||||
|
$lon = get_post_meta($post_id, 'geo_longitude', true);
|
||||||
|
if (!empty($lat) && !empty($lon)) {
|
||||||
|
$baseurl = "https://api.flickr.com/services/rest/?";
|
||||||
|
$params = array(
|
||||||
|
'method' => 'flickr.photos.geo.setLocation',
|
||||||
|
'api_key' => $this->service->key,
|
||||||
|
'photo_id' => $silo_id,
|
||||||
|
'lat' => $lat,
|
||||||
|
'lon' => $lon,
|
||||||
|
);
|
||||||
|
$url = $baseurl . http_build_query( $params );
|
||||||
|
Keyring_Util::Debug(sprintf(__('setting geodata for #%s lat: %s long: %s'), $post_id, $lat, $lon));
|
||||||
|
$this->service->request( $url, array( 'method' => $this->request_method, 'timeout' => 10 ) );
|
||||||
|
}
|
||||||
|
// -->
|
||||||
|
*/
|
||||||
|
|
||||||
|
$results = $this->query_comments( $silo_id );
|
||||||
if ($results && is_array($results) && !empty($results)) {
|
if ($results && is_array($results) && !empty($results)) {
|
||||||
|
|
||||||
$auto = ( $this->get_option( 'auto_approve' ) == 1 ) ? 1 : 0;
|
$auto = ( $this->get_option( 'auto_approve' ) == 1 ) ? 1 : 0;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
Plugin Name: Keyring Reactions Importer
|
Plugin Name: Keyring Reactions Importer
|
||||||
Plugin URI: https://github.com/petermolnar/keyring-reactions-importer
|
Plugin URI: https://github.com/petermolnar/keyring-reactions-importer
|
||||||
Description: A recations (comments, favs, etc. ) importer based on Keyring
|
Description: A recations (comments, favs, etc. ) importer based on Keyring
|
||||||
Version: 0.2
|
Version: 1.0
|
||||||
Author: Peter Molnar <hello@petermolnar.eu>
|
Author: Peter Molnar <hello@petermolnar.eu>
|
||||||
Author URI: http://petermolnar.eu/
|
Author URI: http://petermolnar.eu/
|
||||||
License: GPLv3
|
License: GPLv3
|
||||||
|
|
32
readme.txt
32
readme.txt
|
@ -2,8 +2,8 @@
|
||||||
Contributors: cadeyrn
|
Contributors: cadeyrn
|
||||||
Tags: instagram, facebook, flickr, 500px, backfeed, indieweb, comments, likes, favorites
|
Tags: instagram, facebook, flickr, 500px, backfeed, indieweb, comments, likes, favorites
|
||||||
Requires at least: 3.0
|
Requires at least: 3.0
|
||||||
Tested up to: 4.1
|
Tested up to: 4.2.1
|
||||||
Stable tag: 0.3
|
Stable tag: 1.0
|
||||||
License: GPLv3
|
License: GPLv3
|
||||||
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
|
@ -13,18 +13,25 @@ A social reactions ( comments, like, favs, etc. ) importer.
|
||||||
|
|
||||||
A [backfeed](http://indiewebcamp.com/backfeed) plugin to have all the reaction from all the social networks you have a copy of your post at.
|
A [backfeed](http://indiewebcamp.com/backfeed) plugin to have all the reaction from all the social networks you have a copy of your post at.
|
||||||
|
|
||||||
= How it works =
|
|
||||||
* it checks the `syndication_urls` post meta field populated either by the [Syndication Links](https://wordpress.org/plugins/syndication-links/) plugin or by hand (one syndicated url per line)
|
|
||||||
* based on the activated and available importers it will fire up scheduled jobs to import reactions for each and every post we have the syndication link for the [silo](http://indiewebcamp.com/silo) available
|
|
||||||
|
|
||||||
= Required plugins =
|
= Required plugins =
|
||||||
* [Keyring](https://wordpress.org/plugins/keyring)
|
* [Keyring](https://wordpress.org/plugins/keyring)
|
||||||
* note: to use 500px, you'll need a [not-yet-merged addition to Keyring for 500px](https://github.com/petermolnar/keyring/blob/master/includes/services/extended/500px.php)
|
* note: to use 500px, you'll need a [not-yet-merged addition to Keyring for 500px](https://github.com/petermolnar/keyring/blob/master/includes/services/extended/500px.php)
|
||||||
|
|
||||||
|
[Keyring](https://wordpress.org/plugins/keyring/) is a dependency; the plugin will not function without it!
|
||||||
|
|
||||||
|
= How it works =
|
||||||
|
The plugin checks the `syndication_urls` post meta field populated either by the [Syndication Links](https://wordpress.org/plugins/syndication-links/) plugin or by hand: one syndicated url per line.
|
||||||
|
|
||||||
= Recommended plugins =
|
For example, it should look like:
|
||||||
* [Syndication Links](https://wordpress.org/plugins/syndication-links/)
|
|
||||||
|
`https://www.facebook.com/your-facebook-user/posts/facebook-post-id
|
||||||
|
https://www.flickr.com/photos/your-flickr-user/flickr-post-id`
|
||||||
|
|
||||||
|
In case the auto-import is enabled it will fire up scheduled cron job once every day ( not changeable currently ) for each network auto-import is enabled on. The job will query X ( depending on the service it's querying ) posts per request, then fire up a new cron in the background until all posts are processed.
|
||||||
|
|
||||||
|
= Known issues =
|
||||||
|
* due to the nature of the plugin it's highly recommended to use [system cron](https://support.hostgator.com/articles/specialized-help/technical/wordpress/how-to-replace-wordpress-cron-with-a-real-cron-job) for WordPress instead of the built-in version
|
||||||
|
* the plugin can be heavy on load; in this case please consider limiting the import date range on the settings page.
|
||||||
|
|
||||||
= Currently supported networks =
|
= Currently supported networks =
|
||||||
|
|
||||||
|
@ -33,7 +40,9 @@ A [backfeed](http://indiewebcamp.com/backfeed) plugin to have all the reaction f
|
||||||
* [Facebook](https://facebook.com/) - comments, likes
|
* [Facebook](https://facebook.com/) - comments, likes
|
||||||
* [Instagram](https://instagram.com) - comments, likes
|
* [Instagram](https://instagram.com) - comments, likes
|
||||||
|
|
||||||
The plugin uses the brilliant [Keyring](https://wordpress.org/plugins/keyring/) for handling networks and us based on [Keyring Social Importers](https://wordpress.org/plugins/keyring-social-importers/); both from [Beau Lebens](http://dentedreality.com.au/).
|
|
||||||
|
= Credit =
|
||||||
|
Countless thanks for the [Keyring Social Importers](https://wordpress.org/plugins/keyring-social-importers/) and the Keyring plugin from [Beau Lebens](http://dentedreality.com.au/).
|
||||||
|
|
||||||
== Installation ==
|
== Installation ==
|
||||||
|
|
||||||
|
@ -44,6 +53,11 @@ The plugin uses the brilliant [Keyring](https://wordpress.org/plugins/keyring/)
|
||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
|
= 1.0 =
|
||||||
|
*2015-05-01*
|
||||||
|
|
||||||
|
* initial stable release
|
||||||
|
|
||||||
= 0.3 =
|
= 0.3 =
|
||||||
*2015-04-16*
|
*2015-04-16*
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue