';
@@ -214,70 +214,12 @@ function gpluspost_init() {
killme();
}
-function gpluspost_original_url($url, $depth=1) {
-
- if ($depth > 10)
- return($url);
-
- $siteinfo = array();
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_HEADER, 1);
- curl_setopt($ch, CURLOPT_NOBODY, 0);
- curl_setopt($ch, CURLOPT_TIMEOUT, 3);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Firefox/24.0');
-
- $header = curl_exec($ch);
- $curl_info = @curl_getinfo($ch);
- $http_code = $curl_info['http_code'];
- curl_close($ch);
-
- if ((($curl_info['http_code'] == "301") OR ($curl_info['http_code'] == "302"))
- AND (($curl_info['redirect_url'] != "") OR ($curl_info['location'] != ""))) {
- if ($curl_info['redirect_url'] != "")
- return(gpluspost_original_url($curl_info['redirect_url'], ++$depth));
- else
- return(gpluspost_original_url($curl_info['location'], ++$depth));
- }
-
- $pos = strpos($header, "\r\n\r\n");
-
- if ($pos)
- $body = trim(substr($header, $pos));
- else
- $body = $header;
-
- $doc = new DOMDocument();
- @$doc->loadHTML($body);
-
- $xpath = new DomXPath($doc);
-
- $list = $xpath->query("//meta[@content]");
- foreach ($list as $node) {
- $attr = array();
- if ($node->attributes->length)
- foreach ($node->attributes as $attribute)
- $attr[$attribute->name] = $attribute->value;
-
- if (@$attr["http-equiv"] == 'refresh') {
- $path = $attr["content"];
- $pathinfo = explode(";", $path);
- $content = "";
- foreach ($pathinfo AS $value)
- if (substr(strtolower($value), 0, 4) == "url=")
- return(gpluspost_original_url(substr($value, 4), ++$depth));
- }
- }
-
- return($url);
-}
-
function gpluspost_feeditem($pid, $uid) {
global $a;
require_once('include/bbcode.php');
require_once("include/html2plain.php");
+ require_once("include/network.php");
$skipwithoutlink = get_pconfig($uid,'gpluspost','skip_without_link');
@@ -365,7 +307,7 @@ function gpluspost_feeditem($pid, $uid) {
$title = trim(str_replace($msglink, "", $title));
- $msglink = gpluspost_original_url($msglink);
+ $msglink = original_url($msglink);
if ($uid == 0)
$title = $item["author-name"].": ".$title;
diff --git a/libertree/libertree.php b/libertree/libertree.php
index dec85ddb..b064c6bc 100755
--- a/libertree/libertree.php
+++ b/libertree/libertree.php
@@ -64,11 +64,11 @@ function libertree_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '';
- $s .= '
' . t('libertree') . '
';
+ $s .= '
' . t('libertree Export') . '
';
$s .= '';
$s .= '
';
$s .= '';
- $s .= '
' . t('libertree') . '
';
+ $s .= '
' . t('libertree Export') . '
';
$s .= '';
$s .= '
';
diff --git a/privacy_image_cache/privacy_image_cache.php b/privacy_image_cache/privacy_image_cache.php
index 1fa6c5e6..b7c8fc7a 100644
--- a/privacy_image_cache/privacy_image_cache.php
+++ b/privacy_image_cache/privacy_image_cache.php
@@ -288,11 +288,11 @@ function privacy_image_cache_img_cb($matches) {
// if the picture seems to be from another picture cache then take the original source
$queryvar = privacy_image_cache_parse_query($matches[2]);
- if ($queryvar['url'] != "")
+ if (($queryvar['url'] != "") AND (substr($queryvar['url'], 0, 4) == "http"))
$matches[2] = urldecode($queryvar['url']);
// if fetching facebook pictures don't fetch the thumbnail but the big one
- if (strpos($matches[2], ".fbcdn.net/") and (substr($matches[2], -6) == "_s.jpg"))
+ if (((strpos($matches[2], ".fbcdn.net/") OR strpos($matches[2], "/fbcdn-photos-"))) and (substr($matches[2], -6) == "_s.jpg"))
$matches[2] = substr($matches[2], 0, -6)."_n.jpg";
// following line changed per bug #431
diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php
index 0280b517..1575f14b 100755
--- a/pumpio/pumpio.php
+++ b/pumpio/pumpio.php
@@ -219,11 +219,11 @@ function pumpio_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '';
- $s .= '
' . t('Pump.io') . '
';
+ $s .= '
' . t('Pump.io Import/Export/Mirror') . '
';
$s .= '';
$s .= '
';
$s .= '';
- $s .= '
' . t('Pump.io') . '
';
+ $s .= '
' . t('Pump.io Import/Export/Mirror') . '
';
$s .= '';
$s .= '
';
diff --git a/statusnet/statusnet.css b/statusnet/statusnet.css
index 81c38d98..f50d9c05 100755
--- a/statusnet/statusnet.css
+++ b/statusnet/statusnet.css
@@ -24,6 +24,8 @@
#statusnet-sendtaglinks-label,
#statusnet-shortening-label,
#statusnet-mirror-label,
+#statusnet-import-label,
+#statusnet-create_user-label,
#statusnet-pin-label,
#statusnet-enable-label {
float: left;
diff --git a/statusnet/statusnet.php b/statusnet/statusnet.php
old mode 100755
new mode 100644
index d4120aaf..6b7d35ab
--- a/statusnet/statusnet.php
+++ b/statusnet/statusnet.php
@@ -32,7 +32,7 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-
+
/***
* We have to alter the TwitterOAuth class a little bit to work with any StatusNet
@@ -47,16 +47,16 @@ require_once('library/twitteroauth.php');
class StatusNetOAuth extends TwitterOAuth {
function get_maxlength() {
- $config = $this->get($this->host . 'statusnet/config.json');
- return $config->site->textlimit;
+ $config = $this->get($this->host . 'statusnet/config.json');
+ return $config->site->textlimit;
}
function accessTokenURL() { return $this->host.'oauth/access_token'; }
- function authenticateURL() { return $this->host.'oauth/authenticate'; }
+ function authenticateURL() { return $this->host.'oauth/authenticate'; }
function authorizeURL() { return $this->host.'oauth/authorize'; }
function requestTokenURL() { return $this->host.'oauth/request_token'; }
function __construct($apipath, $consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL) {
- parent::__construct($consumer_key, $consumer_secret, $oauth_token, $oauth_token_secret);
- $this->host = $apipath;
+ parent::__construct($consumer_key, $consumer_secret, $oauth_token, $oauth_token_secret);
+ $this->host = $apipath;
}
/**
* Make an HTTP request
@@ -71,11 +71,11 @@ class StatusNetOAuth extends TwitterOAuth {
/* Curl settings */
$prx = get_config('system','proxy');
if(strlen($prx)) {
- curl_setopt($ci, CURLOPT_HTTPPROXYTUNNEL, 1);
- curl_setopt($ci, CURLOPT_PROXY, $prx);
- $prxusr = get_config('system','proxyuser');
- if(strlen($prxusr))
- curl_setopt($ci, CURLOPT_PROXYUSERPWD, $prxusr);
+ curl_setopt($ci, CURLOPT_HTTPPROXYTUNNEL, 1);
+ curl_setopt($ci, CURLOPT_PROXY, $prx);
+ $prxusr = get_config('system','proxyuser');
+ if(strlen($prxusr))
+ curl_setopt($ci, CURLOPT_PROXYUSERPWD, $prxusr);
}
curl_setopt($ci, CURLOPT_USERAGENT, $this->useragent);
curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);
@@ -88,16 +88,16 @@ class StatusNetOAuth extends TwitterOAuth {
switch ($method) {
case 'POST':
- curl_setopt($ci, CURLOPT_POST, TRUE);
- if (!empty($postfields)) {
- curl_setopt($ci, CURLOPT_POSTFIELDS, $postfields);
- }
- break;
+ curl_setopt($ci, CURLOPT_POST, TRUE);
+ if (!empty($postfields)) {
+ curl_setopt($ci, CURLOPT_POSTFIELDS, $postfields);
+ }
+ break;
case 'DELETE':
- curl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE');
- if (!empty($postfields)) {
- $url = "{$url}?{$postfields}";
- }
+ curl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE');
+ if (!empty($postfields)) {
+ $url = "{$url}?{$postfields}";
+ }
}
curl_setopt($ci, CURLOPT_URL, $url);
@@ -112,7 +112,7 @@ class StatusNetOAuth extends TwitterOAuth {
function statusnet_install() {
// we need some hooks, for the configuration and for sending tweets
- register_hook('connector_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
+ register_hook('connector_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
register_hook('connector_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post');
register_hook('notifier_normal', 'addon/statusnet/statusnet.php', 'statusnet_post_hook');
register_hook('post_local', 'addon/statusnet/statusnet.php', 'statusnet_post_local');
@@ -123,7 +123,7 @@ function statusnet_install() {
function statusnet_uninstall() {
- unregister_hook('connector_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
+ unregister_hook('connector_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
unregister_hook('connector_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post');
unregister_hook('notifier_normal', 'addon/statusnet/statusnet.php', 'statusnet_post_hook');
unregister_hook('post_local', 'addon/statusnet/statusnet.php', 'statusnet_post_local');
@@ -132,7 +132,7 @@ function statusnet_uninstall() {
// old setting - remove only
unregister_hook('post_local_end', 'addon/statusnet/statusnet.php', 'statusnet_post_hook');
- unregister_hook('plugin_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
+ unregister_hook('plugin_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
unregister_hook('plugin_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post');
}
@@ -152,116 +152,122 @@ function statusnet_jot_nets(&$a,&$b) {
function statusnet_settings_post ($a,$post) {
if(! local_user())
- return;
+ return;
// don't check statusnet settings if statusnet submit button is not clicked
- if (!x($_POST,'statusnet-submit')) return;
+ if (!x($_POST,'statusnet-submit'))
+ return;
if (isset($_POST['statusnet-disconnect'])) {
- /***
- * if the statusnet-disconnect checkbox is set, clear the statusnet configuration
- */
- del_pconfig(local_user(), 'statusnet', 'consumerkey');
- del_pconfig(local_user(), 'statusnet', 'consumersecret');
- del_pconfig(local_user(), 'statusnet', 'post');
- del_pconfig(local_user(), 'statusnet', 'post_by_default');
- del_pconfig(local_user(), 'statusnet', 'oauthtoken');
- del_pconfig(local_user(), 'statusnet', 'oauthsecret');
- del_pconfig(local_user(), 'statusnet', 'baseapi');
- del_pconfig(local_user(), 'statusnet', 'post_taglinks');
- del_pconfig(local_user(), 'statusnet', 'lastid');
- del_pconfig(local_user(), 'statusnet', 'mirror_posts');
- del_pconfig(local_user(), 'statusnet', 'intelligent_shortening');
+ /***
+ * if the statusnet-disconnect checkbox is set, clear the statusnet configuration
+ */
+ del_pconfig(local_user(), 'statusnet', 'consumerkey');
+ del_pconfig(local_user(), 'statusnet', 'consumersecret');
+ del_pconfig(local_user(), 'statusnet', 'post');
+ del_pconfig(local_user(), 'statusnet', 'post_by_default');
+ del_pconfig(local_user(), 'statusnet', 'oauthtoken');
+ del_pconfig(local_user(), 'statusnet', 'oauthsecret');
+ del_pconfig(local_user(), 'statusnet', 'baseapi');
+ del_pconfig(local_user(), 'statusnet', 'post_taglinks');
+ del_pconfig(local_user(), 'statusnet', 'lastid');
+ del_pconfig(local_user(), 'statusnet', 'mirror_posts');
+ del_pconfig(local_user(), 'statusnet', 'intelligent_shortening');
+ del_pconfig(local_user(), 'statusnet', 'import');
+ del_pconfig(local_user(), 'statusnet', 'create_user');
+ del_pconfig(local_user(), 'statusnet', 'own_id');
} else {
- if (isset($_POST['statusnet-preconf-apiurl'])) {
- /***
- * If the user used one of the preconfigured StatusNet server credentials
- * use them. All the data are available in the global config.
- * Check the API Url never the less and blame the admin if it's not working ^^
- */
- $globalsn = get_config('statusnet', 'sites');
- foreach ( $globalsn as $asn) {
- if ($asn['apiurl'] == $_POST['statusnet-preconf-apiurl'] ) {
- $apibase = $asn['apiurl'];
- $c = fetch_url( $apibase . 'statusnet/version.xml' );
- if (strlen($c) > 0) {
- set_pconfig(local_user(), 'statusnet', 'consumerkey', $asn['consumerkey'] );
- set_pconfig(local_user(), 'statusnet', 'consumersecret', $asn['consumersecret'] );
- set_pconfig(local_user(), 'statusnet', 'baseapi', $asn['apiurl'] );
- set_pconfig(local_user(), 'statusnet', 'application_name', $asn['applicationname'] );
- } else {
- notice( t('Please contact your site administrator. The provided API URL is not valid.').EOL.$asn['apiurl'].EOL );
- }
- }
- }
- goaway($a->get_baseurl().'/settings/connectors');
- } else {
- if (isset($_POST['statusnet-consumersecret'])) {
- // check if we can reach the API of the StatusNet server
- // we'll check the API Version for that, if we don't get one we'll try to fix the path but will
- // resign quickly after this one try to fix the path ;-)
- $apibase = $_POST['statusnet-baseapi'];
- $c = fetch_url( $apibase . 'statusnet/version.xml' );
- if (strlen($c) > 0) {
- // ok the API path is correct, let's save the settings
- set_pconfig(local_user(), 'statusnet', 'consumerkey', $_POST['statusnet-consumerkey']);
- set_pconfig(local_user(), 'statusnet', 'consumersecret', $_POST['statusnet-consumersecret']);
- set_pconfig(local_user(), 'statusnet', 'baseapi', $apibase );
- set_pconfig(local_user(), 'statusnet', 'application_name', $_POST['statusnet-applicationname'] );
- } else {
- // the API path is not correct, maybe missing trailing / ?
- $apibase = $apibase . '/';
- $c = fetch_url( $apibase . 'statusnet/version.xml' );
- if (strlen($c) > 0) {
- // ok the API path is now correct, let's save the settings
- set_pconfig(local_user(), 'statusnet', 'consumerkey', $_POST['statusnet-consumerkey']);
- set_pconfig(local_user(), 'statusnet', 'consumersecret', $_POST['statusnet-consumersecret']);
- set_pconfig(local_user(), 'statusnet', 'baseapi', $apibase );
- } else {
- // still not the correct API base, let's do noting
- notice( t('We could not contact the StatusNet API with the Path you entered.').EOL );
- }
- }
- goaway($a->get_baseurl().'/settings/connectors');
- } else {
- if (isset($_POST['statusnet-pin'])) {
- // if the user supplied us with a PIN from StatusNet, let the magic of OAuth happen
- $api = get_pconfig(local_user(), 'statusnet', 'baseapi');
- $ckey = get_pconfig(local_user(), 'statusnet', 'consumerkey' );
- $csecret = get_pconfig(local_user(), 'statusnet', 'consumersecret' );
- // the token and secret for which the PIN was generated were hidden in the settings
- // form as token and token2, we need a new connection to Twitter using these token
- // and secret to request a Access Token with the PIN
- $connection = new StatusNetOAuth($api, $ckey, $csecret, $_POST['statusnet-token'], $_POST['statusnet-token2']);
- $token = $connection->getAccessToken( $_POST['statusnet-pin'] );
- // ok, now that we have the Access Token, save them in the user config
- set_pconfig(local_user(),'statusnet', 'oauthtoken', $token['oauth_token']);
- set_pconfig(local_user(),'statusnet', 'oauthsecret', $token['oauth_token_secret']);
- set_pconfig(local_user(),'statusnet', 'post', 1);
- set_pconfig(local_user(),'statusnet', 'post_taglinks', 1);
- // reload the Addon Settings page, if we don't do it see Bug #42
- goaway($a->get_baseurl().'/settings/connectors');
+ if (isset($_POST['statusnet-preconf-apiurl'])) {
+ /***
+ * If the user used one of the preconfigured StatusNet server credentials
+ * use them. All the data are available in the global config.
+ * Check the API Url never the less and blame the admin if it's not working ^^
+ */
+ $globalsn = get_config('statusnet', 'sites');
+ foreach ( $globalsn as $asn) {
+ if ($asn['apiurl'] == $_POST['statusnet-preconf-apiurl'] ) {
+ $apibase = $asn['apiurl'];
+ $c = fetch_url( $apibase . 'statusnet/version.xml' );
+ if (strlen($c) > 0) {
+ set_pconfig(local_user(), 'statusnet', 'consumerkey', $asn['consumerkey'] );
+ set_pconfig(local_user(), 'statusnet', 'consumersecret', $asn['consumersecret'] );
+ set_pconfig(local_user(), 'statusnet', 'baseapi', $asn['apiurl'] );
+ set_pconfig(local_user(), 'statusnet', 'application_name', $asn['applicationname'] );
} else {
- // if no PIN is supplied in the POST variables, the user has changed the setting
- // to post a dent for every new __public__ posting to the wall
- set_pconfig(local_user(),'statusnet','post',intval($_POST['statusnet-enable']));
- set_pconfig(local_user(),'statusnet','post_by_default',intval($_POST['statusnet-default']));
- set_pconfig(local_user(),'statusnet','post_taglinks',intval($_POST['statusnet-sendtaglinks']));
- set_pconfig(local_user(), 'statusnet', 'mirror_posts', intval($_POST['statusnet-mirror']));
- set_pconfig(local_user(), 'statusnet', 'intelligent_shortening', intval($_POST['statusnet-shortening']));
- info( t('StatusNet settings updated.') . EOL);
- }}}}
+ notice( t('Please contact your site administrator. The provided API URL is not valid.').EOL.$asn['apiurl'].EOL );
+ }
+ }
+ }
+ goaway($a->get_baseurl().'/settings/connectors');
+ } else {
+ if (isset($_POST['statusnet-consumersecret'])) {
+ // check if we can reach the API of the StatusNet server
+ // we'll check the API Version for that, if we don't get one we'll try to fix the path but will
+ // resign quickly after this one try to fix the path ;-)
+ $apibase = $_POST['statusnet-baseapi'];
+ $c = fetch_url( $apibase . 'statusnet/version.xml' );
+ if (strlen($c) > 0) {
+ // ok the API path is correct, let's save the settings
+ set_pconfig(local_user(), 'statusnet', 'consumerkey', $_POST['statusnet-consumerkey']);
+ set_pconfig(local_user(), 'statusnet', 'consumersecret', $_POST['statusnet-consumersecret']);
+ set_pconfig(local_user(), 'statusnet', 'baseapi', $apibase );
+ set_pconfig(local_user(), 'statusnet', 'application_name', $_POST['statusnet-applicationname'] );
+ } else {
+ // the API path is not correct, maybe missing trailing / ?
+ $apibase = $apibase . '/';
+ $c = fetch_url( $apibase . 'statusnet/version.xml' );
+ if (strlen($c) > 0) {
+ // ok the API path is now correct, let's save the settings
+ set_pconfig(local_user(), 'statusnet', 'consumerkey', $_POST['statusnet-consumerkey']);
+ set_pconfig(local_user(), 'statusnet', 'consumersecret', $_POST['statusnet-consumersecret']);
+ set_pconfig(local_user(), 'statusnet', 'baseapi', $apibase );
+ } else {
+ // still not the correct API base, let's do noting
+ notice( t('We could not contact the StatusNet API with the Path you entered.').EOL );
+ }
+ }
+ goaway($a->get_baseurl().'/settings/connectors');
+ } else {
+ if (isset($_POST['statusnet-pin'])) {
+ // if the user supplied us with a PIN from StatusNet, let the magic of OAuth happen
+ $api = get_pconfig(local_user(), 'statusnet', 'baseapi');
+ $ckey = get_pconfig(local_user(), 'statusnet', 'consumerkey' );
+ $csecret = get_pconfig(local_user(), 'statusnet', 'consumersecret' );
+ // the token and secret for which the PIN was generated were hidden in the settings
+ // form as token and token2, we need a new connection to StatusNet using these token
+ // and secret to request a Access Token with the PIN
+ $connection = new StatusNetOAuth($api, $ckey, $csecret, $_POST['statusnet-token'], $_POST['statusnet-token2']);
+ $token = $connection->getAccessToken( $_POST['statusnet-pin'] );
+ // ok, now that we have the Access Token, save them in the user config
+ set_pconfig(local_user(),'statusnet', 'oauthtoken', $token['oauth_token']);
+ set_pconfig(local_user(),'statusnet', 'oauthsecret', $token['oauth_token_secret']);
+ set_pconfig(local_user(),'statusnet', 'post', 1);
+ set_pconfig(local_user(),'statusnet', 'post_taglinks', 1);
+ // reload the Addon Settings page, if we don't do it see Bug #42
+ goaway($a->get_baseurl().'/settings/connectors');
+ } else {
+ // if no PIN is supplied in the POST variables, the user has changed the setting
+ // to post a dent for every new __public__ posting to the wall
+ set_pconfig(local_user(),'statusnet','post',intval($_POST['statusnet-enable']));
+ set_pconfig(local_user(),'statusnet','post_by_default',intval($_POST['statusnet-default']));
+ set_pconfig(local_user(),'statusnet','post_taglinks',intval($_POST['statusnet-sendtaglinks']));
+ set_pconfig(local_user(), 'statusnet', 'mirror_posts', intval($_POST['statusnet-mirror']));
+ set_pconfig(local_user(), 'statusnet', 'intelligent_shortening', intval($_POST['statusnet-shortening']));
+ set_pconfig(local_user(), 'statusnet', 'import', intval($_POST['statusnet-import']));
+ set_pconfig(local_user(), 'statusnet', 'create_user', intval($_POST['statusnet-create_user']));
+ info( t('StatusNet settings updated.') . EOL);
+ }}}}
}
function statusnet_settings(&$a,&$s) {
- if(! local_user())
- return;
- $a->page['htmlhead'] .= '' . "\r\n";
+ if(! local_user())
+ return;
+ $a->page['htmlhead'] .= '' . "\r\n";
/***
* 1) Check that we have a base api url and a consumer key & secret
* 2) If no OAuthtoken & stuff is present, generate button to get some
- * allow the user to cancel the connection process at this step
+ * allow the user to cancel the connection process at this step
* 3) Checkbox for "Send public notices (respect size limitation)
*/
- $api = get_pconfig(local_user(), 'statusnet', 'baseapi');
+ $api = get_pconfig(local_user(), 'statusnet', 'baseapi');
$ckey = get_pconfig(local_user(), 'statusnet', 'consumerkey' );
$csecret = get_pconfig(local_user(), 'statusnet', 'consumersecret' );
$otoken = get_pconfig(local_user(), 'statusnet', 'oauthtoken' );
@@ -269,61 +275,67 @@ function statusnet_settings(&$a,&$s) {
$enabled = get_pconfig(local_user(), 'statusnet', 'post');
$checked = (($enabled) ? ' checked="checked" ' : '');
$defenabled = get_pconfig(local_user(),'statusnet','post_by_default');
- $defchecked = (($defenabled) ? ' checked="checked" ' : '');
- $linksenabled = get_pconfig(local_user(),'statusnet','post_taglinks');
- $linkschecked = (($linksenabled) ? ' checked="checked" ' : '');
-
+ $defchecked = (($defenabled) ? ' checked="checked" ' : '');
+ $linksenabled = get_pconfig(local_user(),'statusnet','post_taglinks');
+ $linkschecked = (($linksenabled) ? ' checked="checked" ' : '');
$mirrorenabled = get_pconfig(local_user(),'statusnet','mirror_posts');
$mirrorchecked = (($mirrorenabled) ? ' checked="checked" ' : '');
$shorteningenabled = get_pconfig(local_user(),'statusnet','intelligent_shortening');
$shorteningchecked = (($shorteningenabled) ? ' checked="checked" ' : '');
+ $importenabled = get_pconfig(local_user(),'statusnet','import');
+ $importchecked = (($importenabled) ? ' checked="checked" ' : '');
+ $create_userenabled = get_pconfig(local_user(),'statusnet','create_user');
+ $create_userchecked = (($create_userenabled) ? ' checked="checked" ' : '');
+
+ $globalshortening = get_config('statusnet','intelligent_shortening');
+
$s .= '';
- $s .= '
'. t('StatusNet').'
';
+ $s .= '
'. t('StatusNet Import/Export/Mirror').'
';
$s .= '';
$s .= '
';
$s .= '';
- $s .= '
'. t('StatusNet').'
';
+ $s .= '
'. t('StatusNet Import/Export/Mirror').'
';
$s .= '';
if ( (!$ckey) && (!$csecret) ) {
/***
* no consumer keys
- */
- $globalsn = get_config('statusnet', 'sites');
- /***
- * lets check if we have one or more globally configured StatusNet
- * server OAuth credentials in the configuration. If so offer them
- * with a little explanation to the user as choice - otherwise
- * ignore this option entirely.
- */
- if (! $globalsn == null) {
- $s .= '
' . t('Globally Available StatusNet OAuthKeys') . '
';
- $s .= '
'. t("There are preconfigured OAuth key pairs for some StatusNet servers available. If you are useing one of them, please use these credentials. If not feel free to connect to any other StatusNet instance \x28see below\x29.") .'
'. t('No consumer key pair for StatusNet found. Register your Friendica Account as an desktop client on your StatusNet account, copy the consumer key pair here and enter the API base root. Before you register your own OAuth key pair ask the administrator if there is already a key pair for this Friendica installation at your favorited StatusNet installation.') .'
';
+ */
+ $globalsn = get_config('statusnet', 'sites');
+ /***
+ * lets check if we have one or more globally configured StatusNet
+ * server OAuth credentials in the configuration. If so offer them
+ * with a little explanation to the user as choice - otherwise
+ * ignore this option entirely.
+ */
+ if (! $globalsn == null) {
+ $s .= '
' . t('Globally Available StatusNet OAuthKeys') . '
';
+ $s .= '
'. t("There are preconfigured OAuth key pairs for some StatusNet servers available. If you are useing one of them, please use these credentials. If not feel free to connect to any other StatusNet instance \x28see below\x29.") .'
'. t('No consumer key pair for StatusNet found. Register your Friendica Account as an desktop client on your StatusNet account, copy the consumer key pair here and enter the API base root. Before you register your own OAuth key pair ask the administrator if there is already a key pair for this Friendica installation at your favorited StatusNet installation.') .'
';
} else {
/***
* ok we have a consumer key pair now look into the OAuth stuff
@@ -366,9 +378,9 @@ function statusnet_settings(&$a,&$s) {
$details = $connection->get('account/verify_credentials');
$s .= '
'. t('If enabled all your public postings can be posted to the associated StatusNet account. You can choose to do so by default (here) or for every posting separately in the posting options when writing the entry.') .'
';
- if ($a->user['hidewall']) {
- $s .= '
'. t('Note: Due your privacy settings (Hide your profile details from unknown viewers?) the link potentially included in public postings relayed to StatusNet will lead the visitor to a blank page informing the visitor that the access to your profile has been restricted.') .'
';
- }
+ if ($a->user['hidewall']) {
+ $s .= '
'. t('Note: Due your privacy settings (Hide your profile details from unknown viewers?) the link potentially included in public postings relayed to StatusNet will lead the visitor to a blank page informing the visitor that the access to your profile has been restricted.') .'