forked from friendica/friendica-addons
fromgplus addon deprecated
This commit is contained in:
parent
745e1675a2
commit
4754b94a44
|
@ -1,9 +0,0 @@
|
||||||
This extension fetches messages from a Google+ account and reshares it.
|
|
||||||
|
|
||||||
To get the needed API key please follow these steps:
|
|
||||||
|
|
||||||
* go to [https://code.google.com/apis/console/](https://code.google.com/apis/console/)
|
|
||||||
* Create a new project or open an existing one
|
|
||||||
* Activate the Google+ API
|
|
||||||
* Go to the credentials
|
|
||||||
* Create an API key (browser key) and leave the field for the referrer empty
|
|
|
@ -1,574 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Name: From GPlus
|
|
||||||
* Description: Imports posts from a Google+ account and repeats them
|
|
||||||
* Version: 0.1
|
|
||||||
* Author: Michael Vogel <ike@piratenpartei.de>
|
|
||||||
* Status: unsupported
|
|
||||||
*/
|
|
||||||
|
|
||||||
define('FROMGPLUS_DEFAULT_POLL_INTERVAL', 30); // given in minutes
|
|
||||||
|
|
||||||
use Friendica\Core\Config;
|
|
||||||
use Friendica\Core\Hook;
|
|
||||||
use Friendica\Core\L10n;
|
|
||||||
use Friendica\Core\Logger;
|
|
||||||
use Friendica\Core\PConfig;
|
|
||||||
use Friendica\Core\Protocol;
|
|
||||||
use Friendica\Core\Renderer;
|
|
||||||
use Friendica\Object\Image;
|
|
||||||
use Friendica\Util\DateTimeFormat;
|
|
||||||
use Friendica\Util\Network;
|
|
||||||
use Friendica\Model\Item;
|
|
||||||
|
|
||||||
require_once 'mod/share.php';
|
|
||||||
require_once 'mod/parse_url.php';
|
|
||||||
function fromgplus_install() {
|
|
||||||
Hook::register('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
|
|
||||||
Hook::register('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
|
|
||||||
Hook::register('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
|
|
||||||
}
|
|
||||||
|
|
||||||
function fromgplus_uninstall() {
|
|
||||||
Hook::unregister('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
|
|
||||||
Hook::unregister('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
|
|
||||||
Hook::unregister('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
|
|
||||||
|
|
||||||
// Old hooks
|
|
||||||
Hook::unregister('addon_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
|
|
||||||
Hook::unregister('addon_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
|
|
||||||
}
|
|
||||||
|
|
||||||
function fromgplus_addon_settings(&$a,&$s) {
|
|
||||||
|
|
||||||
if(! local_user())
|
|
||||||
return;
|
|
||||||
|
|
||||||
// If "gpluspost" is installed as well, then the settings are displayed there
|
|
||||||
$result = q("SELECT `installed` FROM `addon` WHERE `name` = 'gpluspost' AND `installed`");
|
|
||||||
if (count($result) > 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
$enable_checked = (intval(PConfig::get(local_user(),'fromgplus','enable')) ? ' checked="checked"' : '');
|
|
||||||
$keywords_checked = (intval(PConfig::get(local_user(), 'fromgplus', 'keywords')) ? ' checked="checked"' : '');
|
|
||||||
$account = PConfig::get(local_user(),'fromgplus','account');
|
|
||||||
|
|
||||||
$s .= '<span id="settings_fromgplus_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_fromgplus_expanded\'); openClose(\'settings_fromgplus_inflated\');">';
|
|
||||||
$s .= '<img class="connector" src="images/googleplus.png" /><h3 class="connector">'. L10n::t('Google+ Mirror').'</h3>';
|
|
||||||
$s .= '</span>';
|
|
||||||
$s .= '<div id="settings_fromgplus_expanded" class="settings-block" style="display: none;">';
|
|
||||||
$s .= '<span class="fakelink" onclick="openClose(\'settings_fromgplus_expanded\'); openClose(\'settings_fromgplus_inflated\');">';
|
|
||||||
$s .= '<img class="connector" src="images/googleplus.png" /><h3 class="connector">'. L10n::t('Google+ Mirror').'</h3>';
|
|
||||||
$s .= '</span>';
|
|
||||||
|
|
||||||
$s .= '<div id="fromgplus-wrapper">';
|
|
||||||
|
|
||||||
$s .= '<label id="fromgplus-enable-label" for="fromgplus-enable">'.L10n::t('Enable Google+ Import').'</label>';
|
|
||||||
$s .= '<input id="fromgplus-enable" type="checkbox" name="fromgplus-enable" value="1"'.$enable_checked.' />';
|
|
||||||
$s .= '<div class="clear"></div>';
|
|
||||||
$s .= '<label id="fromgplus-label" for="fromgplus-account">'.L10n::t('Google Account ID').' </label>';
|
|
||||||
$s .= '<input id="fromgplus-account" type="text" name="fromgplus-account" value="'.$account.'" />';
|
|
||||||
$s .= '</div><div class="clear"></div>';
|
|
||||||
$s .= '<label id="fromgplus-keywords-label" for="fromgplus-keywords">'.L10n::t('Add keywords to post').'</label>';
|
|
||||||
$s .= '<input id="fromgplus-keywords" type="checkbox" name="fromgplus-keywords" value="1"'.$keywords_checked.' />';
|
|
||||||
$s .= '<div class="clear"></div>';
|
|
||||||
|
|
||||||
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="fromgplus-submit" name="fromgplus-submit"
|
|
||||||
class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div>';
|
|
||||||
$s .= '</div>';
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
function fromgplus_addon_settings_post(&$a,&$b) {
|
|
||||||
|
|
||||||
if (!local_user())
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!empty($_POST['fromgplus-submit'])) {
|
|
||||||
PConfig::set(local_user(),'fromgplus','account',trim($_POST['fromgplus-account']));
|
|
||||||
$enable = (!empty($_POST['fromgplus-enable']) ? intval($_POST['fromgplus-enable']) : 0);
|
|
||||||
PConfig::set(local_user(),'fromgplus','enable', $enable);
|
|
||||||
$keywords = (!empty($_POST['fromgplus-keywords']) ? intval($_POST['fromgplus-keywords']) : 0);
|
|
||||||
PConfig::set(local_user(),'fromgplus', 'keywords', $keywords);
|
|
||||||
|
|
||||||
if (!$enable)
|
|
||||||
PConfig::delete(local_user(),'fromgplus','lastdate');
|
|
||||||
|
|
||||||
info(L10n::t('Google+ Import Settings saved.') . EOL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function fromgplus_addon_admin(&$a, &$o)
|
|
||||||
{
|
|
||||||
$t = Renderer::getMarkupTemplate("admin.tpl", "addon/fromgplus/");
|
|
||||||
|
|
||||||
$o = Renderer::replaceMacros($t, [
|
|
||||||
'$submit' => L10n::t('Save Settings'),
|
|
||||||
'$key' => ['key', L10n::t('Key'), trim(Config::get('fromgplus', 'key')), ''],
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
function fromgplus_addon_admin_post(&$a)
|
|
||||||
{
|
|
||||||
$key = (!empty($_POST['key']) ? trim($_POST['key']) : '');
|
|
||||||
Config::set('fromgplus', 'key', $key);
|
|
||||||
info(L10n::t('Settings updated.'). EOL);
|
|
||||||
}
|
|
||||||
|
|
||||||
function fromgplus_cron($a,$b) {
|
|
||||||
$last = Config::get('fromgplus','last_poll');
|
|
||||||
|
|
||||||
$poll_interval = intval(Config::get('fromgplus','poll_interval'));
|
|
||||||
if(! $poll_interval)
|
|
||||||
$poll_interval = FROMGPLUS_DEFAULT_POLL_INTERVAL;
|
|
||||||
|
|
||||||
if($last) {
|
|
||||||
$next = $last + ($poll_interval * 60);
|
|
||||||
if($next > time()) {
|
|
||||||
Logger::log('fromgplus: poll intervall not reached');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Logger::log('fromgplus: cron_start');
|
|
||||||
|
|
||||||
$r = q("SELECT * FROM `pconfig` WHERE `cat` = 'fromgplus' AND `k` = 'enable' AND `v` = '1' ORDER BY RAND() ");
|
|
||||||
if(count($r)) {
|
|
||||||
foreach($r as $rr) {
|
|
||||||
$account = PConfig::get($rr['uid'],'fromgplus','account');
|
|
||||||
if ($account) {
|
|
||||||
Logger::log('fromgplus: fetching for user '.$rr['uid']);
|
|
||||||
fromgplus_fetch($a, $rr['uid']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Logger::log('fromgplus: cron_end');
|
|
||||||
|
|
||||||
Config::set('fromgplus','last_poll', time());
|
|
||||||
}
|
|
||||||
|
|
||||||
function fromgplus_post($a, $uid, $source, $body, $location, $coord, $id) {
|
|
||||||
|
|
||||||
//$uid = 2;
|
|
||||||
|
|
||||||
// Don't know what it is. Maybe some trash from the mobile client
|
|
||||||
$trash = html_entity_decode("", ENT_QUOTES, 'UTF-8');
|
|
||||||
$body = str_replace($trash, "", $body);
|
|
||||||
|
|
||||||
$body = trim($body);
|
|
||||||
|
|
||||||
if (substr($body, 0, 3) == "[b]") {
|
|
||||||
$pos = strpos($body, "[/b]");
|
|
||||||
$title = substr($body, 3, $pos-3);
|
|
||||||
$body = trim(substr($body, $pos+4));
|
|
||||||
} else
|
|
||||||
$title = "";
|
|
||||||
|
|
||||||
$_SESSION['authenticated'] = true;
|
|
||||||
$_SESSION['uid'] = $uid;
|
|
||||||
|
|
||||||
unset($_REQUEST);
|
|
||||||
$_REQUEST['api_source'] = true;
|
|
||||||
|
|
||||||
$_REQUEST['profile_uid'] = $uid;
|
|
||||||
$_REQUEST['source'] = $source;
|
|
||||||
$_REQUEST['extid'] = Protocol::GPLUS;
|
|
||||||
|
|
||||||
if (isset($id)) {
|
|
||||||
$_REQUEST['message_id'] = Item::newURI($uid, Protocol::GPLUS.':'.$id);
|
|
||||||
}
|
|
||||||
|
|
||||||
// $_REQUEST['verb']
|
|
||||||
// $_REQUEST['parent']
|
|
||||||
// $_REQUEST['parent_uri']
|
|
||||||
|
|
||||||
$_REQUEST['title'] = $title;
|
|
||||||
$_REQUEST['body'] = $body;
|
|
||||||
$_REQUEST['location'] = $location;
|
|
||||||
$_REQUEST['coord'] = $coord;
|
|
||||||
|
|
||||||
if (($_REQUEST['title'] == "") && ($_REQUEST['body'] == "")) {
|
|
||||||
Logger::log('fromgplus: empty post for user '.$uid." ".print_r($_REQUEST, true));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
require_once('mod/item.php');
|
|
||||||
//print_r($_REQUEST);
|
|
||||||
Logger::log('fromgplus: posting for user '.$uid." ".print_r($_REQUEST, true));
|
|
||||||
item_post($a);
|
|
||||||
Logger::log('fromgplus: done for user '.$uid);
|
|
||||||
}
|
|
||||||
|
|
||||||
function fromgplus_html2bbcode($html) {
|
|
||||||
|
|
||||||
$bbcode = html_entity_decode($html, ENT_QUOTES, 'UTF-8');
|
|
||||||
|
|
||||||
$bbcode = str_ireplace(["\n"], [""], $bbcode);
|
|
||||||
$bbcode = str_ireplace(["<b>", "</b>"], ["[b]", "[/b]"], $bbcode);
|
|
||||||
$bbcode = str_ireplace(["<i>", "</i>"], ["[i]", "[/i]"], $bbcode);
|
|
||||||
$bbcode = str_ireplace(["<s>", "</s>"], ["[s]", "[/s]"], $bbcode);
|
|
||||||
$bbcode = str_ireplace(["<br />"], ["\n"], $bbcode);
|
|
||||||
$bbcode = str_ireplace(["<br/>"], ["\n"], $bbcode);
|
|
||||||
$bbcode = str_ireplace(["<br>"], ["\n"], $bbcode);
|
|
||||||
|
|
||||||
$bbcode = trim(strip_tags($bbcode));
|
|
||||||
return($bbcode);
|
|
||||||
}
|
|
||||||
|
|
||||||
function fromgplus_parse_query($var)
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Use this function to parse out the query array element from
|
|
||||||
* the output of parse_url().
|
|
||||||
*/
|
|
||||||
$var = parse_url($var, PHP_URL_QUERY);
|
|
||||||
$var = html_entity_decode($var);
|
|
||||||
$var = explode('&', $var);
|
|
||||||
$arr = [];
|
|
||||||
|
|
||||||
foreach($var as $val) {
|
|
||||||
$x = explode('=', $val);
|
|
||||||
if (count($x) > 1) {
|
|
||||||
$arr[$x[0]] = $x[1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
unset($val, $x, $var);
|
|
||||||
return $arr;
|
|
||||||
}
|
|
||||||
|
|
||||||
function fromgplus_cleanupgoogleproxy($fullImage, $image) {
|
|
||||||
//$preview = "/w".$fullImage->width."-h".$fullImage->height."/";
|
|
||||||
//$preview2 = "/w".$fullImage->width."-h".$fullImage->height."-p/";
|
|
||||||
//$fullImage = str_replace(array($preview, $preview2), array("/", "/"), $fullImage->url);
|
|
||||||
$fullImage = $fullImage->url;
|
|
||||||
|
|
||||||
//$preview = "/w".$image->width."-h".$image->height."/";
|
|
||||||
//$preview2 = "/w".$image->width."-h".$image->height."-p/";
|
|
||||||
//$image = str_replace(array($preview, $preview2), array("/", "/"), $image->url);
|
|
||||||
$image = $image->url;
|
|
||||||
|
|
||||||
$cleaned = [];
|
|
||||||
|
|
||||||
$queryvar = fromgplus_parse_query($fullImage);
|
|
||||||
if (!empty($queryvar['url']))
|
|
||||||
$cleaned["full"] = urldecode($queryvar['url']);
|
|
||||||
else
|
|
||||||
$cleaned["full"] = $fullImage;
|
|
||||||
if (@exif_imagetype($cleaned["full"]) == 0)
|
|
||||||
$cleaned["full"] = "";
|
|
||||||
|
|
||||||
$queryvar = fromgplus_parse_query($image);
|
|
||||||
if (!empty($queryvar['url']))
|
|
||||||
$cleaned["preview"] = urldecode($queryvar['url']);
|
|
||||||
else
|
|
||||||
$cleaned["preview"] = $image;
|
|
||||||
if (@exif_imagetype($cleaned["preview"]) == 0)
|
|
||||||
$cleaned["preview"] = "";
|
|
||||||
|
|
||||||
if (empty($cleaned["full"])) {
|
|
||||||
$cleaned["full"] = $cleaned["preview"];
|
|
||||||
$cleaned["preview"] = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!empty($cleaned["full"]))
|
|
||||||
$infoFull = Image::getInfoFromURL($cleaned["full"]);
|
|
||||||
else
|
|
||||||
$infoFull = ["0" => 0, "1" => 0];
|
|
||||||
|
|
||||||
if (!empty($cleaned["preview"]))
|
|
||||||
$infoPreview = Image::getInfoFromURL($cleaned["preview"]);
|
|
||||||
else
|
|
||||||
$infoPreview = ["0" => 0, "1" => 0];
|
|
||||||
|
|
||||||
if (($infoPreview[0] >= $infoFull[0]) && ($infoPreview[1] >= $infoFull[1])) {
|
|
||||||
$temp = $cleaned["full"];
|
|
||||||
$cleaned["full"] = $cleaned["preview"];
|
|
||||||
$cleaned["preview"] = $temp;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (($cleaned["full"] == $cleaned["preview"]) || (($infoPreview[0] == $infoFull[0]) && ($infoPreview[1] == $infoFull[1])))
|
|
||||||
$cleaned["preview"] = "";
|
|
||||||
|
|
||||||
if ($cleaned["full"] == "")
|
|
||||||
if (@exif_imagetype($fullImage) != 0)
|
|
||||||
$cleaned["full"] = $fullImage;
|
|
||||||
|
|
||||||
if ($cleaned["full"] == "")
|
|
||||||
if (@exif_imagetype($image) != 0)
|
|
||||||
$cleaned["full"] = $image;
|
|
||||||
|
|
||||||
// Could be changed in the future to a link to the album
|
|
||||||
$cleaned["page"] = $cleaned["full"];
|
|
||||||
|
|
||||||
return($cleaned);
|
|
||||||
}
|
|
||||||
|
|
||||||
function fromgplus_cleantext($text) {
|
|
||||||
|
|
||||||
// Don't know what it is. But it is added to the text.
|
|
||||||
$trash = html_entity_decode("", ENT_QUOTES, 'UTF-8');
|
|
||||||
|
|
||||||
$text = strip_tags($text);
|
|
||||||
$text = html_entity_decode($text, ENT_QUOTES);
|
|
||||||
$text = trim($text);
|
|
||||||
$text = str_replace(["\n", "\r", " ", $trash], ["", "", "", ""], $text);
|
|
||||||
return($text);
|
|
||||||
}
|
|
||||||
|
|
||||||
function fromgplus_handleattachments($a, $uid, $item, $displaytext, $shared) {
|
|
||||||
$post = "";
|
|
||||||
$quote = "";
|
|
||||||
$pagedata = [];
|
|
||||||
$pagedata["type"] = "";
|
|
||||||
|
|
||||||
foreach ($item->object->attachments as $attachment) {
|
|
||||||
switch($attachment->objectType) {
|
|
||||||
case "video":
|
|
||||||
$pagedata["type"] = "video";
|
|
||||||
$pagedata["url"] = Network::finalUrl($attachment->url);
|
|
||||||
$pagedata["title"] = fromgplus_html2bbcode($attachment->displayName);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "article":
|
|
||||||
$pagedata["type"] = "link";
|
|
||||||
$pagedata["url"] = Network::finalUrl($attachment->url);
|
|
||||||
$pagedata["title"] = fromgplus_html2bbcode($attachment->displayName);
|
|
||||||
|
|
||||||
$images = fromgplus_cleanupgoogleproxy($attachment->fullImage, $attachment->image);
|
|
||||||
if ($images["full"] != "")
|
|
||||||
$pagedata["images"][0]["src"] = $images["full"];
|
|
||||||
|
|
||||||
if (!empty($attachment->content)) {
|
|
||||||
$quote = trim(fromgplus_html2bbcode($attachment->content));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!empty($quote)) {
|
|
||||||
$pagedata["text"] = $quote;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add Keywords to page link
|
|
||||||
$data = parseurl_getsiteinfo_cached($pagedata["url"], true);
|
|
||||||
if (isset($data["keywords"]) && PConfig::get($uid, 'fromgplus', 'keywords')) {
|
|
||||||
$pagedata["keywords"] = $data["keywords"];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "photo":
|
|
||||||
// Don't store shared pictures in your wall photos (to prevent a possible violating of licenses)
|
|
||||||
if ($shared) {
|
|
||||||
$images = fromgplus_cleanupgoogleproxy($attachment->fullImage, $attachment->image);
|
|
||||||
} else {
|
|
||||||
if ($attachment->fullImage->url != "") {
|
|
||||||
$images = Image::storePhoto($a, $uid, "", $attachment->fullImage->url);
|
|
||||||
} elseif ($attachment->image->url != "") {
|
|
||||||
$images = Image::storePhoto($a, $uid, "", $attachment->image->url);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!empty($images["preview"])) {
|
|
||||||
$post .= "\n[url=".$images["page"]."][img]".$images["preview"]."[/img][/url]\n";
|
|
||||||
$pagedata["images"][0]["src"] = $images["preview"];
|
|
||||||
$pagedata["url"] = $images["page"];
|
|
||||||
} elseif (!empty($images["full"])) {
|
|
||||||
$post .= "\n[img]".$images["full"]."[/img]\n";
|
|
||||||
$pagedata["images"][0]["src"] = $images["full"];
|
|
||||||
|
|
||||||
if ($images["preview"] != "") {
|
|
||||||
$pagedata["images"][1]["src"] = $images["preview"];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (($attachment->displayName != "") && (fromgplus_cleantext($attachment->displayName) != fromgplus_cleantext($displaytext))) {
|
|
||||||
$post .= fromgplus_html2bbcode($attachment->displayName)."\n";
|
|
||||||
$pagedata["title"] = fromgplus_html2bbcode($attachment->displayName);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "photo-album":
|
|
||||||
$pagedata["url"] = Network::finalUrl($attachment->url);
|
|
||||||
$pagedata["title"] = fromgplus_html2bbcode($attachment->displayName);
|
|
||||||
$post .= "\n\n[bookmark=".$pagedata["url"]."]".$pagedata["title"]."[/bookmark]\n";
|
|
||||||
|
|
||||||
$images = fromgplus_cleanupgoogleproxy($attachment->fullImage, $attachment->image);
|
|
||||||
|
|
||||||
if ($images["preview"] != "") {
|
|
||||||
$post .= "\n[url=".$images["full"]."][img]".$images["preview"]."[/img][/url]\n";
|
|
||||||
$pagedata["images"][0]["src"] = $images["preview"];
|
|
||||||
$pagedata["url"] = $images["full"];
|
|
||||||
} elseif ($images["full"] != "") {
|
|
||||||
$post .= "\n[img]".$images["full"]."[/img]\n";
|
|
||||||
$pagedata["images"][0]["src"] = $images["full"];
|
|
||||||
|
|
||||||
if ($images["preview"] != "")
|
|
||||||
$pagedata["images"][1]["src"] = $images["preview"];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "album":
|
|
||||||
$pagedata["type"] = "link";
|
|
||||||
$pagedata["url"] = Network::finalUrl($attachment->url);
|
|
||||||
$pagedata["title"] = fromgplus_html2bbcode($attachment->displayName);
|
|
||||||
|
|
||||||
$thumb = $attachment->thumbnails[0];
|
|
||||||
$pagedata["images"][0]["src"] = $thumb->image->url;
|
|
||||||
|
|
||||||
$quote = trim(fromgplus_html2bbcode($thumb->description));
|
|
||||||
if ($quote != "")
|
|
||||||
$pagedata["text"] = $quote;
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "audio":
|
|
||||||
$pagedata["url"] = Network::finalUrl($attachment->url);
|
|
||||||
$pagedata["title"] = fromgplus_html2bbcode($attachment->displayName);
|
|
||||||
$post .= "\n\n[bookmark=".$pagedata["url"]."]".$pagedata["title"]."[/bookmark]\n";
|
|
||||||
break;
|
|
||||||
|
|
||||||
//default:
|
|
||||||
// die($attachment->objectType);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($pagedata["type"] != "")
|
|
||||||
return(add_page_info_data($pagedata));
|
|
||||||
|
|
||||||
return($post.$quote);
|
|
||||||
}
|
|
||||||
|
|
||||||
function fromgplus_fetch($a, $uid) {
|
|
||||||
$maxfetch = 20;
|
|
||||||
|
|
||||||
// Special blank to identify postings from the googleplus connector
|
|
||||||
$blank = html_entity_decode(" ", ENT_QUOTES, 'UTF-8');
|
|
||||||
|
|
||||||
$account = PConfig::get($uid,'fromgplus','account');
|
|
||||||
$key = Config::get('fromgplus','key');
|
|
||||||
|
|
||||||
$result = Network::fetchUrl("https://www.googleapis.com/plus/v1/people/".$account."/activities/public?alt=json&pp=1&key=".$key."&maxResults=".$maxfetch);
|
|
||||||
//$result = file_get_contents("google.txt");
|
|
||||||
//file_put_contents("google.txt", $result);
|
|
||||||
|
|
||||||
$activities = json_decode($result);
|
|
||||||
|
|
||||||
$initiallastdate = PConfig::get($uid,'fromgplus','lastdate');
|
|
||||||
|
|
||||||
$first_time = ($initiallastdate == "");
|
|
||||||
|
|
||||||
$lastdate = 0;
|
|
||||||
|
|
||||||
if (empty($activities->items))
|
|
||||||
return;
|
|
||||||
|
|
||||||
$reversed = array_reverse($activities->items);
|
|
||||||
|
|
||||||
foreach($reversed as $item) {
|
|
||||||
|
|
||||||
if (strtotime($item->published) <= $initiallastdate)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// Don't publish items that are too young
|
|
||||||
if (strtotime($item->published) > (time() - 3*60)) {
|
|
||||||
Logger::log('fromgplus_fetch: item too new '.$item->published);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($lastdate < strtotime($item->published))
|
|
||||||
$lastdate = strtotime($item->published);
|
|
||||||
|
|
||||||
PConfig::set($uid,'fromgplus','lastdate', $lastdate);
|
|
||||||
|
|
||||||
if ($first_time)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if ($item->access->description == "Public") {
|
|
||||||
|
|
||||||
// Loop prevention through the special blank from the googleplus connector
|
|
||||||
//if (strstr($item->object->content, $blank))
|
|
||||||
if (strrpos($item->object->content, $blank) >= strlen($item->object->content) - 5)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
switch($item->object->objectType) {
|
|
||||||
case "note":
|
|
||||||
$post = fromgplus_html2bbcode($item->object->content);
|
|
||||||
|
|
||||||
if (!empty($item->object->attachments)) {
|
|
||||||
$post .= fromgplus_handleattachments($a, $uid, $item, $item->object->content, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
$coord = "";
|
|
||||||
$location = "";
|
|
||||||
if (isset($item->location)) {
|
|
||||||
if (isset($item->location->address->formatted))
|
|
||||||
$location = $item->location->address->formatted;
|
|
||||||
|
|
||||||
if (isset($item->location->displayName))
|
|
||||||
$location = $item->location->displayName;
|
|
||||||
|
|
||||||
if (isset($item->location->position->latitude) &&
|
|
||||||
isset($item->location->position->longitude))
|
|
||||||
$coord = $item->location->position->latitude." ".$item->location->position->longitude;
|
|
||||||
|
|
||||||
} elseif (isset($item->address))
|
|
||||||
$location = $item->address;
|
|
||||||
|
|
||||||
fromgplus_post($a, $uid, $item->provider->title, $post, $location, $coord, $item->id);
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "activity":
|
|
||||||
$post = fromgplus_html2bbcode($item->annotation)."\n";
|
|
||||||
|
|
||||||
if (!intval(Config::get('system','old_share'))) {
|
|
||||||
|
|
||||||
if (function_exists("share_header"))
|
|
||||||
$post .= share_header($item->object->actor->displayName, $item->object->actor->url,
|
|
||||||
$item->object->actor->image->url, "",
|
|
||||||
DateTimeFormat::utc($item->published),$item->object->url);
|
|
||||||
else
|
|
||||||
$post .= "[share author='".str_replace("'", "'",$item->object->actor->displayName).
|
|
||||||
"' profile='".$item->object->actor->url.
|
|
||||||
"' avatar='".$item->object->actor->image->url.
|
|
||||||
"' posted='".DateTimeFormat::utc($item->published).
|
|
||||||
"' link='".$item->object->url."']";
|
|
||||||
|
|
||||||
$post .= fromgplus_html2bbcode($item->object->content);
|
|
||||||
|
|
||||||
if (is_array($item->object->attachments))
|
|
||||||
$post .= "\n".trim(fromgplus_handleattachments($a, $uid, $item, $item->object->content, true));
|
|
||||||
|
|
||||||
$post .= "[/share]";
|
|
||||||
} else {
|
|
||||||
$post .= fromgplus_html2bbcode("♲");
|
|
||||||
$post .= " [url=".$item->object->actor->url."]".$item->object->actor->displayName."[/url] \n";
|
|
||||||
$post .= fromgplus_html2bbcode($item->object->content);
|
|
||||||
|
|
||||||
if (is_array($item->object->attachments))
|
|
||||||
$post .= "\n".trim(fromgplus_handleattachments($a, $uid, $item, $item->object->content, true));
|
|
||||||
}
|
|
||||||
|
|
||||||
$coord = "";
|
|
||||||
$location = "";
|
|
||||||
if (isset($item->location)) {
|
|
||||||
if (isset($item->location->address->formatted))
|
|
||||||
$location = $item->location->address->formatted;
|
|
||||||
|
|
||||||
if (isset($item->location->displayName))
|
|
||||||
$location = $item->location->displayName;
|
|
||||||
|
|
||||||
if (isset($item->location->position->latitude) &&
|
|
||||||
isset($item->location->position->longitude))
|
|
||||||
$coord = $item->location->position->latitude." ".$item->location->position->longitude;
|
|
||||||
|
|
||||||
} elseif (isset($item->address))
|
|
||||||
$location = $item->address;
|
|
||||||
|
|
||||||
fromgplus_post($a, $uid, $item->provider->title, $post, $location, $coord, $item->id);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($lastdate != 0)
|
|
||||||
PConfig::set($uid,'fromgplus','lastdate', $lastdate);
|
|
||||||
}
|
|
|
@ -1,50 +0,0 @@
|
||||||
# ADDON fromgplus
|
|
||||||
# Copyright (C)
|
|
||||||
# This file is distributed under the same license as the Friendica fromgplus addon package.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#, fuzzy
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: \n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2018-04-01 11:14-0400\n"
|
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|
||||||
"Language: \n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
|
|
||||||
#: fromgplus.php:55 fromgplus.php:59
|
|
||||||
msgid "Google+ Mirror"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: fromgplus.php:64
|
|
||||||
msgid "Enable Google+ Import"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: fromgplus.php:67
|
|
||||||
msgid "Google Account ID"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: fromgplus.php:70
|
|
||||||
msgid "Add keywords to post"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: fromgplus.php:75 fromgplus.php:105
|
|
||||||
msgid "Save Settings"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: fromgplus.php:96
|
|
||||||
msgid "Google+ Import Settings saved."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: fromgplus.php:106
|
|
||||||
msgid "Key"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: fromgplus.php:114
|
|
||||||
msgid "Settings updated."
|
|
||||||
msgstr ""
|
|
|
@ -1,7 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
$a->strings["Google+ Import Settings"] = "Ajustos Google+ Import";
|
|
||||||
$a->strings["Enable Google+ Import"] = "Habilita Google+ Import";
|
|
||||||
$a->strings["Google Account ID"] = "ID del compte Google";
|
|
||||||
$a->strings["Submit"] = "Enviar";
|
|
||||||
$a->strings["Google+ Import Settings saved."] = "Ajustos Google+ Import guardats.";
|
|
|
@ -1,54 +0,0 @@
|
||||||
# ADDON fromgplus
|
|
||||||
# Copyright (C)
|
|
||||||
# This file is distributed under the same license as the Friendica fromgplus addon package.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Translators:
|
|
||||||
# Aditoo, 2018
|
|
||||||
# Aditoo, 2018
|
|
||||||
# michal_s <msupler@gmail.com>, 2014-2015
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: friendica\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2018-04-01 11:14-0400\n"
|
|
||||||
"PO-Revision-Date: 2018-06-11 19:37+0000\n"
|
|
||||||
"Last-Translator: Aditoo\n"
|
|
||||||
"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"Language: cs\n"
|
|
||||||
"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
|
|
||||||
|
|
||||||
#: fromgplus.php:55 fromgplus.php:59
|
|
||||||
msgid "Google+ Mirror"
|
|
||||||
msgstr "Zrcadlení Google+"
|
|
||||||
|
|
||||||
#: fromgplus.php:64
|
|
||||||
msgid "Enable Google+ Import"
|
|
||||||
msgstr "Povolit Import z Google+"
|
|
||||||
|
|
||||||
#: fromgplus.php:67
|
|
||||||
msgid "Google Account ID"
|
|
||||||
msgstr "ID účtu Google "
|
|
||||||
|
|
||||||
#: fromgplus.php:70
|
|
||||||
msgid "Add keywords to post"
|
|
||||||
msgstr "Přidat k příspěvku klíčová slova"
|
|
||||||
|
|
||||||
#: fromgplus.php:75 fromgplus.php:105
|
|
||||||
msgid "Save Settings"
|
|
||||||
msgstr "Uložit nastavení"
|
|
||||||
|
|
||||||
#: fromgplus.php:96
|
|
||||||
msgid "Google+ Import Settings saved."
|
|
||||||
msgstr "Nastavení importu z Google+ uloženo."
|
|
||||||
|
|
||||||
#: fromgplus.php:106
|
|
||||||
msgid "Key"
|
|
||||||
msgstr "Klíč"
|
|
||||||
|
|
||||||
#: fromgplus.php:114
|
|
||||||
msgid "Settings updated."
|
|
||||||
msgstr "Nastavení aktualizována"
|
|
|
@ -1,16 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_cs")) {
|
|
||||||
function string_plural_select_cs($n){
|
|
||||||
$n = intval($n);
|
|
||||||
return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;;
|
|
||||||
}}
|
|
||||||
;
|
|
||||||
$a->strings["Google+ Mirror"] = "Zrcadlení Google+";
|
|
||||||
$a->strings["Enable Google+ Import"] = "Povolit Import z Google+";
|
|
||||||
$a->strings["Google Account ID"] = "ID účtu Google ";
|
|
||||||
$a->strings["Add keywords to post"] = "Přidat k příspěvku klíčová slova";
|
|
||||||
$a->strings["Save Settings"] = "Uložit nastavení";
|
|
||||||
$a->strings["Google+ Import Settings saved."] = "Nastavení importu z Google+ uloženo.";
|
|
||||||
$a->strings["Key"] = "Klíč";
|
|
||||||
$a->strings["Settings updated."] = "Nastavení aktualizována";
|
|
|
@ -1,53 +0,0 @@
|
||||||
# ADDON fromgplus
|
|
||||||
# Copyright (C)
|
|
||||||
# This file is distributed under the same license as the Friendica fromgplus addon package.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Translators:
|
|
||||||
# Andreas H., 2014
|
|
||||||
# Tobias Diekershoff <tobias.diekershoff@gmx.net>, 2016
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: friendica\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2016-11-12 16:52+0000\n"
|
|
||||||
"PO-Revision-Date: 2016-11-17 06:41+0000\n"
|
|
||||||
"Last-Translator: Tobias Diekershoff <tobias.diekershoff@gmx.net>\n"
|
|
||||||
"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"Language: de\n"
|
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
||||||
|
|
||||||
#: fromgplus.php:46 fromgplus.php:50
|
|
||||||
msgid "Google+ Mirror"
|
|
||||||
msgstr "Google+ Spiegel"
|
|
||||||
|
|
||||||
#: fromgplus.php:55
|
|
||||||
msgid "Enable Google+ Import"
|
|
||||||
msgstr "Aktiviere Google+ Import"
|
|
||||||
|
|
||||||
#: fromgplus.php:58
|
|
||||||
msgid "Google Account ID"
|
|
||||||
msgstr "Google Account ID"
|
|
||||||
|
|
||||||
#: fromgplus.php:61
|
|
||||||
msgid "Add keywords to post"
|
|
||||||
msgstr "Schlüsselwörter zum Beitrag hinzufügen"
|
|
||||||
|
|
||||||
#: fromgplus.php:66 fromgplus.php:95
|
|
||||||
msgid "Save Settings"
|
|
||||||
msgstr "Einstellungen speichern"
|
|
||||||
|
|
||||||
#: fromgplus.php:87
|
|
||||||
msgid "Google+ Import Settings saved."
|
|
||||||
msgstr "Google+ Import Einstellungen gespeichert."
|
|
||||||
|
|
||||||
#: fromgplus.php:96
|
|
||||||
msgid "Key"
|
|
||||||
msgstr "Schlüssel"
|
|
||||||
|
|
||||||
#: fromgplus.php:103
|
|
||||||
msgid "Settings updated."
|
|
||||||
msgstr "Einstellungen aktualisiert."
|
|
|
@ -1,15 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_de")) {
|
|
||||||
function string_plural_select_de($n){
|
|
||||||
return ($n != 1);;
|
|
||||||
}}
|
|
||||||
;
|
|
||||||
$a->strings["Google+ Mirror"] = "Google+ Spiegel";
|
|
||||||
$a->strings["Enable Google+ Import"] = "Aktiviere Google+ Import";
|
|
||||||
$a->strings["Google Account ID"] = "Google Account ID";
|
|
||||||
$a->strings["Add keywords to post"] = "Schlüsselwörter zum Beitrag hinzufügen";
|
|
||||||
$a->strings["Save Settings"] = "Einstellungen speichern";
|
|
||||||
$a->strings["Google+ Import Settings saved."] = "Google+ Import Einstellungen gespeichert.";
|
|
||||||
$a->strings["Key"] = "Schlüssel";
|
|
||||||
$a->strings["Settings updated."] = "Einstellungen aktualisiert.";
|
|
|
@ -1,52 +0,0 @@
|
||||||
# ADDON fromgplus
|
|
||||||
# Copyright (C)
|
|
||||||
# This file is distributed under the same license as the Friendica fromgplus addon package.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Translators:
|
|
||||||
# Kris, 2018
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: friendica\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2018-04-01 11:14-0400\n"
|
|
||||||
"PO-Revision-Date: 2018-04-13 19:45+0000\n"
|
|
||||||
"Last-Translator: Kris\n"
|
|
||||||
"Language-Team: English (United Kingdom) (http://www.transifex.com/Friendica/friendica/language/en_GB/)\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"Language: en_GB\n"
|
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
||||||
|
|
||||||
#: fromgplus.php:55 fromgplus.php:59
|
|
||||||
msgid "Google+ Mirror"
|
|
||||||
msgstr "Google+ Mirror"
|
|
||||||
|
|
||||||
#: fromgplus.php:64
|
|
||||||
msgid "Enable Google+ Import"
|
|
||||||
msgstr "Enable Google+ Import"
|
|
||||||
|
|
||||||
#: fromgplus.php:67
|
|
||||||
msgid "Google Account ID"
|
|
||||||
msgstr "Google Account ID"
|
|
||||||
|
|
||||||
#: fromgplus.php:70
|
|
||||||
msgid "Add keywords to post"
|
|
||||||
msgstr "Add keywords to post"
|
|
||||||
|
|
||||||
#: fromgplus.php:75 fromgplus.php:105
|
|
||||||
msgid "Save Settings"
|
|
||||||
msgstr "Save Settings"
|
|
||||||
|
|
||||||
#: fromgplus.php:96
|
|
||||||
msgid "Google+ Import Settings saved."
|
|
||||||
msgstr "Google+ Import Settings saved."
|
|
||||||
|
|
||||||
#: fromgplus.php:106
|
|
||||||
msgid "Key"
|
|
||||||
msgstr "Key"
|
|
||||||
|
|
||||||
#: fromgplus.php:114
|
|
||||||
msgid "Settings updated."
|
|
||||||
msgstr "Settings updated."
|
|
|
@ -1,15 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_en_gb")) {
|
|
||||||
function string_plural_select_en_gb($n){
|
|
||||||
return ($n != 1);;
|
|
||||||
}}
|
|
||||||
;
|
|
||||||
$a->strings["Google+ Mirror"] = "Google+ Mirror";
|
|
||||||
$a->strings["Enable Google+ Import"] = "Enable Google+ Import";
|
|
||||||
$a->strings["Google Account ID"] = "Google Account ID";
|
|
||||||
$a->strings["Add keywords to post"] = "Add keywords to post";
|
|
||||||
$a->strings["Save Settings"] = "Save Settings";
|
|
||||||
$a->strings["Google+ Import Settings saved."] = "Google+ Import Settings saved.";
|
|
||||||
$a->strings["Key"] = "Key";
|
|
||||||
$a->strings["Settings updated."] = "Settings updated.";
|
|
|
@ -1,7 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
$a->strings["Google+ Import Settings"] = "Google+ Importo";
|
|
||||||
$a->strings["Enable Google+ Import"] = "Aktivigi Ĝoogle+ Importon";
|
|
||||||
$a->strings["Google Account ID"] = "Google Konto ID";
|
|
||||||
$a->strings["Submit"] = "Sendi";
|
|
||||||
$a->strings["Google+ Import Settings saved."] = "Konservis Agordojn por Google+ Importo.";
|
|
|
@ -1,53 +0,0 @@
|
||||||
# ADDON fromgplus
|
|
||||||
# Copyright (C)
|
|
||||||
# This file is distributed under the same license as the Friendica fromgplus addon package.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Translators:
|
|
||||||
# Albert, 2016
|
|
||||||
# Albert, 2016
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: friendica\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2016-11-12 16:52+0000\n"
|
|
||||||
"PO-Revision-Date: 2016-11-16 16:34+0000\n"
|
|
||||||
"Last-Translator: Albert\n"
|
|
||||||
"Language-Team: Spanish (http://www.transifex.com/Friendica/friendica/language/es/)\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"Language: es\n"
|
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
||||||
|
|
||||||
#: fromgplus.php:46 fromgplus.php:50
|
|
||||||
msgid "Google+ Mirror"
|
|
||||||
msgstr "Reflector de Google+"
|
|
||||||
|
|
||||||
#: fromgplus.php:55
|
|
||||||
msgid "Enable Google+ Import"
|
|
||||||
msgstr "Habilitar importación de Google+"
|
|
||||||
|
|
||||||
#: fromgplus.php:58
|
|
||||||
msgid "Google Account ID"
|
|
||||||
msgstr "ID de cuenta de Google"
|
|
||||||
|
|
||||||
#: fromgplus.php:61
|
|
||||||
msgid "Add keywords to post"
|
|
||||||
msgstr "Añadir palabras clave a la entrada"
|
|
||||||
|
|
||||||
#: fromgplus.php:66 fromgplus.php:95
|
|
||||||
msgid "Save Settings"
|
|
||||||
msgstr "Guardar Ajustes"
|
|
||||||
|
|
||||||
#: fromgplus.php:87
|
|
||||||
msgid "Google+ Import Settings saved."
|
|
||||||
msgstr "Ajustes de importación de Google+ guardados."
|
|
||||||
|
|
||||||
#: fromgplus.php:96
|
|
||||||
msgid "Key"
|
|
||||||
msgstr "Clave"
|
|
||||||
|
|
||||||
#: fromgplus.php:103
|
|
||||||
msgid "Settings updated."
|
|
||||||
msgstr "Ajustes actualizados."
|
|
|
@ -1,15 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_es")) {
|
|
||||||
function string_plural_select_es($n){
|
|
||||||
return ($n != 1);;
|
|
||||||
}}
|
|
||||||
;
|
|
||||||
$a->strings["Google+ Mirror"] = "Reflector de Google+";
|
|
||||||
$a->strings["Enable Google+ Import"] = "Habilitar importación de Google+";
|
|
||||||
$a->strings["Google Account ID"] = "ID de cuenta de Google";
|
|
||||||
$a->strings["Add keywords to post"] = "Añadir palabras clave a la entrada";
|
|
||||||
$a->strings["Save Settings"] = "Guardar Ajustes";
|
|
||||||
$a->strings["Google+ Import Settings saved."] = "Ajustes de importación de Google+ guardados.";
|
|
||||||
$a->strings["Key"] = "Clave";
|
|
||||||
$a->strings["Settings updated."] = "Ajustes actualizados.";
|
|
|
@ -1,53 +0,0 @@
|
||||||
# ADDON fromgplus
|
|
||||||
# Copyright (C)
|
|
||||||
# This file is distributed under the same license as the Friendica fromgplus addon package.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Translators:
|
|
||||||
# Kris, 2018
|
|
||||||
# Kris, 2018
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: friendica\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2018-04-01 11:14-0400\n"
|
|
||||||
"PO-Revision-Date: 2018-05-12 12:52+0000\n"
|
|
||||||
"Last-Translator: Kris\n"
|
|
||||||
"Language-Team: Finnish (Finland) (http://www.transifex.com/Friendica/friendica/language/fi_FI/)\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"Language: fi_FI\n"
|
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
||||||
|
|
||||||
#: fromgplus.php:55 fromgplus.php:59
|
|
||||||
msgid "Google+ Mirror"
|
|
||||||
msgstr "Google+ peilaus"
|
|
||||||
|
|
||||||
#: fromgplus.php:64
|
|
||||||
msgid "Enable Google+ Import"
|
|
||||||
msgstr "Ota Google+ tuonti käyttöön"
|
|
||||||
|
|
||||||
#: fromgplus.php:67
|
|
||||||
msgid "Google Account ID"
|
|
||||||
msgstr "Google -tilin tunnus"
|
|
||||||
|
|
||||||
#: fromgplus.php:70
|
|
||||||
msgid "Add keywords to post"
|
|
||||||
msgstr "Lisää avainsanoja julkaisuun"
|
|
||||||
|
|
||||||
#: fromgplus.php:75 fromgplus.php:105
|
|
||||||
msgid "Save Settings"
|
|
||||||
msgstr "Tallenna asetukset"
|
|
||||||
|
|
||||||
#: fromgplus.php:96
|
|
||||||
msgid "Google+ Import Settings saved."
|
|
||||||
msgstr "Google+ tuontiasetukset tallennettu."
|
|
||||||
|
|
||||||
#: fromgplus.php:106
|
|
||||||
msgid "Key"
|
|
||||||
msgstr "Avain"
|
|
||||||
|
|
||||||
#: fromgplus.php:114
|
|
||||||
msgid "Settings updated."
|
|
||||||
msgstr "Asetukset päivitetty."
|
|
|
@ -1,16 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_fi_fi")) {
|
|
||||||
function string_plural_select_fi_fi($n){
|
|
||||||
$n = intval($n);
|
|
||||||
return ($n != 1);;
|
|
||||||
}}
|
|
||||||
;
|
|
||||||
$a->strings["Google+ Mirror"] = "Google+ peilaus";
|
|
||||||
$a->strings["Enable Google+ Import"] = "Ota Google+ tuonti käyttöön";
|
|
||||||
$a->strings["Google Account ID"] = "Google -tilin tunnus";
|
|
||||||
$a->strings["Add keywords to post"] = "Lisää avainsanoja julkaisuun";
|
|
||||||
$a->strings["Save Settings"] = "Tallenna asetukset";
|
|
||||||
$a->strings["Google+ Import Settings saved."] = "Google+ tuontiasetukset tallennettu.";
|
|
||||||
$a->strings["Key"] = "Avain";
|
|
||||||
$a->strings["Settings updated."] = "Asetukset päivitetty.";
|
|
|
@ -1,7 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
$a->strings["Google+ Import Settings"] = "Réglages G+";
|
|
||||||
$a->strings["Enable Google+ Import"] = "Activer l'import G+";
|
|
||||||
$a->strings["Google Account ID"] = "ID du compte Google";
|
|
||||||
$a->strings["Submit"] = "Envoyer";
|
|
||||||
$a->strings["Google+ Import Settings saved."] = "Réglages G+ sauvés.";
|
|
|
@ -1,7 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
$a->strings["Google+ Import Settings"] = "";
|
|
||||||
$a->strings["Enable Google+ Import"] = "";
|
|
||||||
$a->strings["Google Account ID"] = "";
|
|
||||||
$a->strings["Submit"] = "Senda inn";
|
|
||||||
$a->strings["Google+ Import Settings saved."] = "";
|
|
|
@ -1,53 +0,0 @@
|
||||||
# ADDON fromgplus
|
|
||||||
# Copyright (C)
|
|
||||||
# This file is distributed under the same license as the Friendica fromgplus addon package.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Translators:
|
|
||||||
# fabrixxm <fabrix.xm@gmail.com>, 2014-2015,2017
|
|
||||||
# Tobias Diekershoff <tobias.diekershoff@gmx.net>, 2016
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: friendica\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2016-11-12 16:52+0000\n"
|
|
||||||
"PO-Revision-Date: 2017-09-20 06:07+0000\n"
|
|
||||||
"Last-Translator: fabrixxm <fabrix.xm@gmail.com>\n"
|
|
||||||
"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"Language: it\n"
|
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
||||||
|
|
||||||
#: fromgplus.php:46 fromgplus.php:50
|
|
||||||
msgid "Google+ Mirror"
|
|
||||||
msgstr "Mirror Goggle+"
|
|
||||||
|
|
||||||
#: fromgplus.php:55
|
|
||||||
msgid "Enable Google+ Import"
|
|
||||||
msgstr "Abilita Importa da Google+"
|
|
||||||
|
|
||||||
#: fromgplus.php:58
|
|
||||||
msgid "Google Account ID"
|
|
||||||
msgstr "ID Google Account"
|
|
||||||
|
|
||||||
#: fromgplus.php:61
|
|
||||||
msgid "Add keywords to post"
|
|
||||||
msgstr "Aggiungi parole chiave ai post"
|
|
||||||
|
|
||||||
#: fromgplus.php:66 fromgplus.php:95
|
|
||||||
msgid "Save Settings"
|
|
||||||
msgstr "Salva Impostazioni"
|
|
||||||
|
|
||||||
#: fromgplus.php:87
|
|
||||||
msgid "Google+ Import Settings saved."
|
|
||||||
msgstr "Impostazioni Importa Google+ salvate"
|
|
||||||
|
|
||||||
#: fromgplus.php:96
|
|
||||||
msgid "Key"
|
|
||||||
msgstr "Chiave"
|
|
||||||
|
|
||||||
#: fromgplus.php:103
|
|
||||||
msgid "Settings updated."
|
|
||||||
msgstr "Impostazioni aggiornate."
|
|
|
@ -1,15 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_it")) {
|
|
||||||
function string_plural_select_it($n){
|
|
||||||
return ($n != 1);;
|
|
||||||
}}
|
|
||||||
;
|
|
||||||
$a->strings["Google+ Mirror"] = "Mirror Goggle+";
|
|
||||||
$a->strings["Enable Google+ Import"] = "Abilita Importa da Google+";
|
|
||||||
$a->strings["Google Account ID"] = "ID Google Account";
|
|
||||||
$a->strings["Add keywords to post"] = "Aggiungi parole chiave ai post";
|
|
||||||
$a->strings["Save Settings"] = "Salva Impostazioni";
|
|
||||||
$a->strings["Google+ Import Settings saved."] = "Impostazioni Importa Google+ salvate";
|
|
||||||
$a->strings["Key"] = "Chiave";
|
|
||||||
$a->strings["Settings updated."] = "Impostazioni aggiornate.";
|
|
|
@ -1,7 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
$a->strings["Google+ Import Settings"] = "";
|
|
||||||
$a->strings["Enable Google+ Import"] = "";
|
|
||||||
$a->strings["Google Account ID"] = "";
|
|
||||||
$a->strings["Submit"] = "Lagre";
|
|
||||||
$a->strings["Google+ Import Settings saved."] = "";
|
|
|
@ -1,52 +0,0 @@
|
||||||
# ADDON fromgplus
|
|
||||||
# Copyright (C)
|
|
||||||
# This file is distributed under the same license as the Friendica fromgplus addon package.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Translators:
|
|
||||||
# Jeroen De Meerleer <me@jeroened.be>, 2018
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: friendica\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2018-04-01 11:14-0400\n"
|
|
||||||
"PO-Revision-Date: 2018-08-24 13:51+0000\n"
|
|
||||||
"Last-Translator: Jeroen De Meerleer <me@jeroened.be>\n"
|
|
||||||
"Language-Team: Dutch (http://www.transifex.com/Friendica/friendica/language/nl/)\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"Language: nl\n"
|
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
||||||
|
|
||||||
#: fromgplus.php:55 fromgplus.php:59
|
|
||||||
msgid "Google+ Mirror"
|
|
||||||
msgstr "Google+ mirror"
|
|
||||||
|
|
||||||
#: fromgplus.php:64
|
|
||||||
msgid "Enable Google+ Import"
|
|
||||||
msgstr "Google+ import inschakelen"
|
|
||||||
|
|
||||||
#: fromgplus.php:67
|
|
||||||
msgid "Google Account ID"
|
|
||||||
msgstr "Google Account id"
|
|
||||||
|
|
||||||
#: fromgplus.php:70
|
|
||||||
msgid "Add keywords to post"
|
|
||||||
msgstr "Voer sleutelwoorden toe aan je bericht"
|
|
||||||
|
|
||||||
#: fromgplus.php:75 fromgplus.php:105
|
|
||||||
msgid "Save Settings"
|
|
||||||
msgstr "Instellingen opslaan"
|
|
||||||
|
|
||||||
#: fromgplus.php:96
|
|
||||||
msgid "Google+ Import Settings saved."
|
|
||||||
msgstr "Google+ Import instellingen opgeslagen."
|
|
||||||
|
|
||||||
#: fromgplus.php:106
|
|
||||||
msgid "Key"
|
|
||||||
msgstr "Key"
|
|
||||||
|
|
||||||
#: fromgplus.php:114
|
|
||||||
msgid "Settings updated."
|
|
||||||
msgstr "Instellingen opgeslagen"
|
|
|
@ -1,16 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_nl")) {
|
|
||||||
function string_plural_select_nl($n){
|
|
||||||
$n = intval($n);
|
|
||||||
return ($n != 1);;
|
|
||||||
}}
|
|
||||||
;
|
|
||||||
$a->strings["Google+ Mirror"] = "Google+ mirror";
|
|
||||||
$a->strings["Enable Google+ Import"] = "Google+ import inschakelen";
|
|
||||||
$a->strings["Google Account ID"] = "Google Account id";
|
|
||||||
$a->strings["Add keywords to post"] = "Voer sleutelwoorden toe aan je bericht";
|
|
||||||
$a->strings["Save Settings"] = "Instellingen opslaan";
|
|
||||||
$a->strings["Google+ Import Settings saved."] = "Google+ Import instellingen opgeslagen.";
|
|
||||||
$a->strings["Key"] = "Key";
|
|
||||||
$a->strings["Settings updated."] = "Instellingen opgeslagen";
|
|
|
@ -1,52 +0,0 @@
|
||||||
# ADDON fromgplus
|
|
||||||
# Copyright (C)
|
|
||||||
# This file is distributed under the same license as the Friendica fromgplus addon package.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Translators:
|
|
||||||
# Waldemar Stoczkowski <waldemar.stoczkowski@gmail.com>, 2018
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: friendica\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2016-11-12 16:52+0000\n"
|
|
||||||
"PO-Revision-Date: 2018-03-30 17:52+0000\n"
|
|
||||||
"Last-Translator: Waldemar Stoczkowski <waldemar.stoczkowski@gmail.com>\n"
|
|
||||||
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"Language: pl\n"
|
|
||||||
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
|
|
||||||
|
|
||||||
#: fromgplus.php:46 fromgplus.php:50
|
|
||||||
msgid "Google+ Mirror"
|
|
||||||
msgstr "Lustro Google+"
|
|
||||||
|
|
||||||
#: fromgplus.php:55
|
|
||||||
msgid "Enable Google+ Import"
|
|
||||||
msgstr "Włącz importowanie Google+"
|
|
||||||
|
|
||||||
#: fromgplus.php:58
|
|
||||||
msgid "Google Account ID"
|
|
||||||
msgstr "Identyfikator konta Google"
|
|
||||||
|
|
||||||
#: fromgplus.php:61
|
|
||||||
msgid "Add keywords to post"
|
|
||||||
msgstr "Dodaj słowa kluczowe do opublikowania"
|
|
||||||
|
|
||||||
#: fromgplus.php:66 fromgplus.php:95
|
|
||||||
msgid "Save Settings"
|
|
||||||
msgstr "Zapisz ustawienia"
|
|
||||||
|
|
||||||
#: fromgplus.php:87
|
|
||||||
msgid "Google+ Import Settings saved."
|
|
||||||
msgstr "Zapisano ustawienia importu Google+."
|
|
||||||
|
|
||||||
#: fromgplus.php:96
|
|
||||||
msgid "Key"
|
|
||||||
msgstr "Klucz"
|
|
||||||
|
|
||||||
#: fromgplus.php:103
|
|
||||||
msgid "Settings updated."
|
|
||||||
msgstr "Ustawienia zaktualizowane."
|
|
|
@ -1,15 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_pl")) {
|
|
||||||
function string_plural_select_pl($n){
|
|
||||||
return ($n==1 ? 0 : ($n%10>=2 && $n%10<=4) && ($n%100<12 || $n%100>14) ? 1 : $n!=1 && ($n%10>=0 && $n%10<=1) || ($n%10>=5 && $n%10<=9) || ($n%100>=12 && $n%100<=14) ? 2 : 3);;
|
|
||||||
}}
|
|
||||||
;
|
|
||||||
$a->strings["Google+ Mirror"] = "Lustro Google+";
|
|
||||||
$a->strings["Enable Google+ Import"] = "Włącz importowanie Google+";
|
|
||||||
$a->strings["Google Account ID"] = "Identyfikator konta Google";
|
|
||||||
$a->strings["Add keywords to post"] = "Dodaj słowa kluczowe do opublikowania";
|
|
||||||
$a->strings["Save Settings"] = "Zapisz ustawienia";
|
|
||||||
$a->strings["Google+ Import Settings saved."] = "Zapisano ustawienia importu Google+.";
|
|
||||||
$a->strings["Key"] = "Klucz";
|
|
||||||
$a->strings["Settings updated."] = "Ustawienia zaktualizowane.";
|
|
|
@ -1,7 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
$a->strings["Google+ Import Settings"] = "Configurações de importação do Google+";
|
|
||||||
$a->strings["Enable Google+ Import"] = "Habilitar a importação do Google+";
|
|
||||||
$a->strings["Google Account ID"] = "ID da conta do Google";
|
|
||||||
$a->strings["Submit"] = "Enviar";
|
|
||||||
$a->strings["Google+ Import Settings saved."] = "As configurações de importação do Google+ foram salvas.";
|
|
|
@ -1,40 +0,0 @@
|
||||||
# ADDON fromgplus
|
|
||||||
# Copyright (C)
|
|
||||||
# This file is distributed under the same license as the Friendica fromgplus addon package.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Translators:
|
|
||||||
# Doru DEACONU <dumitrudeaconu@yahoo.com>, 2014
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: friendica\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
|
|
||||||
"PO-Revision-Date: 2014-11-27 14:14+0000\n"
|
|
||||||
"Last-Translator: Doru DEACONU <dumitrudeaconu@yahoo.com>\n"
|
|
||||||
"Language-Team: Romanian (Romania) (http://www.transifex.com/projects/p/friendica/language/ro_RO/)\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"Language: ro_RO\n"
|
|
||||||
"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n"
|
|
||||||
|
|
||||||
#: fromgplus.php:33
|
|
||||||
msgid "Google+ Import Settings"
|
|
||||||
msgstr "Google + Configurările de Importare "
|
|
||||||
|
|
||||||
#: fromgplus.php:36
|
|
||||||
msgid "Enable Google+ Import"
|
|
||||||
msgstr "Permitere Import Google+"
|
|
||||||
|
|
||||||
#: fromgplus.php:39
|
|
||||||
msgid "Google Account ID"
|
|
||||||
msgstr "ID Cont Google"
|
|
||||||
|
|
||||||
#: fromgplus.php:44
|
|
||||||
msgid "Submit"
|
|
||||||
msgstr "Trimite"
|
|
||||||
|
|
||||||
#: fromgplus.php:59
|
|
||||||
msgid "Google+ Import Settings saved."
|
|
||||||
msgstr "Configurările de Importare Google+ au fost salvate. "
|
|
|
@ -1,12 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_ro")) {
|
|
||||||
function string_plural_select_ro($n){
|
|
||||||
return ($n==1?0:((($n%100>19)||(($n%100==0)&&($n!=0)))?2:1));;
|
|
||||||
}}
|
|
||||||
;
|
|
||||||
$a->strings["Google+ Import Settings"] = "Google + Configurările de Importare ";
|
|
||||||
$a->strings["Enable Google+ Import"] = "Permitere Import Google+";
|
|
||||||
$a->strings["Google Account ID"] = "ID Cont Google";
|
|
||||||
$a->strings["Submit"] = "Trimite";
|
|
||||||
$a->strings["Google+ Import Settings saved."] = "Configurările de Importare Google+ au fost salvate. ";
|
|
|
@ -1,7 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
$a->strings["Google+ Import Settings"] = "";
|
|
||||||
$a->strings["Enable Google+ Import"] = "";
|
|
||||||
$a->strings["Google Account ID"] = "";
|
|
||||||
$a->strings["Submit"] = "Подтвердить";
|
|
||||||
$a->strings["Google+ Import Settings saved."] = "";
|
|
|
@ -1,3 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
$a->strings["Submit"] = "Spara";
|
|
|
@ -1,7 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
$a->strings["Google+ Import Settings"] = "Google+进口设置";
|
|
||||||
$a->strings["Enable Google+ Import"] = "使Google+进口可用";
|
|
||||||
$a->strings["Google Account ID"] = "Google+用户名";
|
|
||||||
$a->strings["Submit"] = "提交";
|
|
||||||
$a->strings["Google+ Import Settings saved."] = "把Google+进口设置保存了";
|
|
|
@ -1,2 +0,0 @@
|
||||||
{{include file="field_input.tpl" field=$key}}
|
|
||||||
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
|
|
Loading…
Reference in a new issue