';
+ $s .= '
' . t('LiveJournal Post Settings') . ' ';
+ $s .= '
';
+ $s .= '' . t('Enable LiveJournal Post Plugin') . ' ';
+ $s .= ' ';
+ $s .= '
';
+
+ $s .= '
';
+ $s .= '' . t('LiveJournal username') . ' ';
+ $s .= ' ';
+ $s .= '
';
+
+ $s .= '
';
+ $s .= '' . t('LiveJournal password') . ' ';
+ $s .= ' ';
+ $s .= '
';
+
+ $s .= '
';
+ $s .= '' . t('Post to LiveJournal by default') . ' ';
+ $s .= ' ';
+ $s .= '
';
+
+ /* provide a submit button */
+
+ $s .= '
';
+
+}
+
+
+function ljpost_settings_post(&$a,&$b) {
+
+ if(x($_POST,'ljpost-submit')) {
+
+ set_pconfig(local_user(),'ljpost','post',intval($_POST['ljpost']));
+ set_pconfig(local_user(),'ljpost','post_by_default',intval($_POST['lj_bydefault']));
+ set_pconfig(local_user(),'ljpost','lj_username',trim($_POST['lj_username']));
+ set_pconfig(local_user(),'ljpost','lj_password',trim($_POST['lj_password']));
+
+ }
+
+}
+
+function ljpost_post_local(&$a,&$b) {
+
+ // This can probably be changed to allow editing by pointing to a different API endpoint
+
+ if($b['edit'])
+ return;
+
+ if((! local_user()) || (local_user() != $b['uid']))
+ return;
+
+ if($b['private'] || $b['parent'])
+ return;
+
+ $lj_post = intval(get_pconfig(local_user(),'ljpost','post'));
+
+ $lj_enable = (($lj_post && x($_REQUEST,'ljpost_enable')) ? intval($_REQUEST['ljpost_enable']) : 0);
+
+ if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'ljpost','post_by_default')))
+ $lj_enable = 1;
+
+ if(! $lj_enable)
+ return;
+
+ if(strlen($b['postopts']))
+ $b['postopts'] .= ',';
+ $b['postopts'] .= 'ljpost';
+}
+
+
+
+
+function ljpost_send(&$a,&$b) {
+
+ if($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited']))
+ return;
+
+ if(! strstr($b['postopts'],'ljpost'))
+ return;
+
+ if($b['parent'] != $b['id'])
+ return;
+
+ // LiveJournal post in the LJ user's timezone.
+ // Hopefully the person's Friendica account
+ // will be set to the same thing.
+
+ $tz = 'UTC';
+
+ $x = q("select timezone from user where uid = %d limit 1",
+ intval($b['uid'])
+ );
+ if($x && strlen($x[0]['timezone']))
+ $tz = $x[0]['timezone'];
+
+ $lj_username = xmlify(get_pconfig($b['uid'],'ljpost','lj_username'));
+ $lj_password = xmlify(get_pconfig($b['uid'],'ljpost','lj_password'));
+ $lj_journal = xmlify(get_pconfig($b['uid'],'ljpost','lj_journal'));
+// if(! $lj_journal)
+// $lj_journal = $lj_username;
+
+ $lj_blog = xmlify(get_pconfig($b['uid'],'ljpost','lj_blog'));
+ if(! strlen($lj_blog))
+ $lj_blog = xmlify('http://www.livejournal.com/interface/xmlrpc');
+
+ if($lj_username && $lj_password && $lj_blog) {
+
+ require_once('include/bbcode.php');
+ require_once('include/datetime.php');
+
+ $title = xmlify($b['title']);
+ $post = bbcode($b['body']);
+ $post = xmlify($post);
+ $tags = ljpost_get_tags($b['tag']);
+
+ $date = datetime_convert('UTC',$tz,$b['created'],'Y-m-d H:i:s');
+ $year = intval(substr($date,0,4));
+ $mon = intval(substr($date,5,2));
+ $day = intval(substr($date,8,2));
+ $hour = intval(substr($date,11,2));
+ $min = intval(substr($date,14,2));
+
+ $xml = <<< EOT
+
+';
$s .= '
' . t('Quick Comment Settings') . ' ';
$s .= '
';
diff --git a/statusnet.tgz b/statusnet.tgz
index 3f248156..05d56d88 100755
Binary files a/statusnet.tgz and b/statusnet.tgz differ
diff --git a/statusnet/statusnet.php b/statusnet/statusnet.php
index a7639926..8f2fbf81 100755
--- a/statusnet/statusnet.php
+++ b/statusnet/statusnet.php
@@ -327,6 +327,9 @@ function statusnet_settings(&$a,&$s) {
$details = $connection->get('account/verify_credentials');
$s .= '
';
$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.') .'
';
+ }
$s .= '
';
$s .= '
'. t('Allow posting to StatusNet') .' ';
$s .= '
';
diff --git a/twitter.tgz b/twitter.tgz
index 1b93943c..e3fbdec5 100755
Binary files a/twitter.tgz and b/twitter.tgz differ
diff --git a/twitter/twitter.php b/twitter/twitter.php
index 3b816e3b..fd032463 100755
--- a/twitter/twitter.php
+++ b/twitter/twitter.php
@@ -183,6 +183,9 @@ function twitter_settings(&$a,&$s) {
$details = $connection->get('account/verify_credentials');
$s .= '';
$s .= '
'. t('If enabled all your public postings can be posted to the associated Twitter 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 Twitter will lead the visitor to a blank page informing the visitor that the access to your profile has been restricted.') .'
';
+ }
$s .= '