diff --git a/blogger/blogger.php b/blogger/blogger.php
index 563d0ce42..5c03e760e 100644
--- a/blogger/blogger.php
+++ b/blogger/blogger.php
@@ -41,19 +41,21 @@ function blogger_uninstall()
}
-function blogger_jot_nets(App $a, &$b)
+function blogger_jot_nets(App $a, array &$jotnets_fields)
{
if (!local_user()) {
return;
}
- $bl_post = PConfig::get(local_user(), 'blogger', 'post');
-
- if (intval($bl_post) == 1) {
- $bl_defpost = PConfig::get(local_user(), 'blogger', 'post_by_default');
- $selected = ((intval($bl_defpost) == 1) ? ' checked="checked" ' : '');
- $b .= '
'
- . L10n::t('Post to blogger') . '
';
+ if (PConfig::get(local_user(), 'blogger', 'post')) {
+ $jotnets_fields[] = [
+ 'type' => 'checkbox',
+ 'field' => [
+ 'blogger_enable',
+ L10n::t('Post to blogger'),
+ PConfig::get(local_user(), 'blogger', 'post_by_default')
+ ]
+ ];
}
}
diff --git a/buffer/buffer.php b/buffer/buffer.php
index 84ea0be85..4705260c2 100644
--- a/buffer/buffer.php
+++ b/buffer/buffer.php
@@ -125,19 +125,21 @@ function buffer_connect(App $a)
return $o;
}
-function buffer_jot_nets(App $a, &$b)
+function buffer_jot_nets(App $a, array &$jotnets_fields)
{
if (!local_user()) {
return;
}
- $buffer_post = PConfig::get(local_user(), 'buffer', 'post');
-
- if (intval($buffer_post) == 1) {
- $buffer_defpost = PConfig::get(local_user(), 'buffer', 'post_by_default');
- $selected = ((intval($buffer_defpost) == 1) ? ' checked="checked" ' : '');
- $b .= ' '
- . L10n::t('Post to Buffer') . '
';
+ if (PConfig::get(local_user(), 'buffer', 'post')) {
+ $jotnets_fields[] = [
+ 'type' => 'checkbox',
+ 'field' => [
+ 'buffer_enable',
+ L10n::t('Post to Buffer'),
+ PConfig::get(local_user(), 'buffer', 'post_by_default')
+ ]
+ ];
}
}
diff --git a/diaspora/diaspora.php b/diaspora/diaspora.php
index 75256fffc..88630fe0a 100644
--- a/diaspora/diaspora.php
+++ b/diaspora/diaspora.php
@@ -41,21 +41,21 @@ function diaspora_uninstall()
Hook::unregister('queue_predeliver', 'addon/diaspora/diaspora.php', 'diaspora_queue_hook');
}
-function diaspora_jot_nets(App $a, &$b)
+function diaspora_jot_nets(App $a, array &$jotnets_fields)
{
if (!local_user()) {
return;
}
- $diaspora_post = PConfig::get(local_user(), 'diaspora', 'post');
-
- if (intval($diaspora_post) == 1) {
- $diaspora_defpost = PConfig::get(local_user(), 'diaspora', 'post_by_default');
-
- $selected = ((intval($diaspora_defpost) == 1) ? ' checked="checked" ' : '');
-
- $b .= ' '
- . L10n::t('Post to Diaspora') . '
';
+ if (PConfig::get(local_user(), 'diaspora', 'post')) {
+ $jotnets_fields[] = [
+ 'type' => 'checkbox',
+ 'field' => [
+ 'diaspora_enable',
+ L10n::t('Post to Diaspora'),
+ PConfig::get(local_user(), 'diaspora', 'post_by_default')
+ ]
+ ];
}
}
diff --git a/dwpost/dwpost.php b/dwpost/dwpost.php
index 1fdf003de..ebba02327 100644
--- a/dwpost/dwpost.php
+++ b/dwpost/dwpost.php
@@ -37,20 +37,21 @@ function dwpost_uninstall()
Hook::unregister('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
}
-function dwpost_jot_nets(App $a, &$b)
+function dwpost_jot_nets(App $a, array &$jotnets_fields)
{
if (!local_user()) {
return;
}
- $dw_post = PConfig::get(local_user(), 'dwpost', 'post');
-
- if (intval($dw_post) == 1) {
- $dw_defpost = PConfig::get(local_user(), 'dwpost', 'post_by_default');
- $selected = ((intval($dw_defpost) == 1) ? ' checked="checked" ' : '');
-
- $b .= ' '
- . L10n::t('Post to Dreamwidth') . '
';
+ if (PConfig::get(local_user(), 'dwpost', 'post')) {
+ $jotnets_fields[] = [
+ 'type' => 'checkbox',
+ 'field' => [
+ 'dwpost_enable',
+ L10n::t('Post to Dreamwidth'),
+ PConfig::get(local_user(), 'dwpost', 'post_by_default')
+ ]
+ ];
}
}
diff --git a/ijpost/ijpost.php b/ijpost/ijpost.php
index b3ae2ed9a..020dd2219 100644
--- a/ijpost/ijpost.php
+++ b/ijpost/ijpost.php
@@ -35,18 +35,21 @@ function ijpost_uninstall()
Hook::unregister('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
}
-function ijpost_jot_nets(&$a, &$b)
+function ijpost_jot_nets(\Friendica\App &$a, array &$jotnets_fields)
{
if (!local_user()) {
return;
}
- $ij_post = PConfig::get(local_user(), 'ijpost', 'post');
- if (intval($ij_post) == 1) {
- $ij_defpost = PConfig::get(local_user(), 'ijpost', 'post_by_default');
- $selected = ((intval($ij_defpost) == 1) ? ' checked="checked" ' : '');
- $b .= ' '
- . L10n::t('Post to Insanejournal') . '
';
+ if (PConfig::get(local_user(), 'ijpost', 'post')) {
+ $jotnets_fields[] = [
+ 'type' => 'checkbox',
+ 'field' => [
+ 'ijpost_enable',
+ L10n::t('Post to Insanejournal'),
+ PConfig::get(local_user(), 'ijpost', 'post_by_default')
+ ]
+ ];
}
}
diff --git a/libertree/libertree.php b/libertree/libertree.php
index a864b9ebd..034833e8f 100644
--- a/libertree/libertree.php
+++ b/libertree/libertree.php
@@ -35,17 +35,22 @@ function libertree_uninstall()
Hook::unregister('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
}
-function libertree_jot_nets(&$a,&$b) {
- if(! local_user())
+function libertree_jot_nets(App &$a, array &$jotnets_fields)
+{
+ if(! local_user()) {
return;
-
- $ltree_post = PConfig::get(local_user(),'libertree','post');
- if(intval($ltree_post) == 1) {
- $ltree_defpost = PConfig::get(local_user(),'libertree','post_by_default');
- $selected = ((intval($ltree_defpost) == 1) ? ' checked="checked" ' : '');
- $b .= ' '
- . L10n::t('Post to libertree') . '
';
}
+
+ if (PConfig::get(local_user(), 'libertree', 'post')) {
+ $jotnets_fields[] = [
+ 'type' => 'checkbox',
+ 'field' => [
+ 'libertree_enable',
+ L10n::t('Post to libertree'),
+ PConfig::get(local_user(), 'libertree', 'post_by_default')
+ ]
+ ];
+ }
}
diff --git a/ljpost/ljpost.php b/ljpost/ljpost.php
index e8977b515..8bc33fc77 100644
--- a/ljpost/ljpost.php
+++ b/ljpost/ljpost.php
@@ -35,16 +35,21 @@ function ljpost_uninstall() {
}
-function ljpost_jot_nets(&$a,&$b) {
- if(! local_user())
+function ljpost_jot_nets(\Friendica\App &$a, array &$jotnets_fields)
+{
+ if(! local_user()) {
return;
+ }
- $lj_post = PConfig::get(local_user(),'ljpost','post');
- if(intval($lj_post) == 1) {
- $lj_defpost = PConfig::get(local_user(),'ljpost','post_by_default');
- $selected = ((intval($lj_defpost) == 1) ? ' checked="checked" ' : '');
- $b .= ' '
- . L10n::t('Post to LiveJournal') . '
';
+ if (PConfig::get(local_user(),'ljpost','post')) {
+ $jotnets_fields[] = [
+ 'type' => 'checkbox',
+ 'field' => [
+ 'ljpost_enable',
+ L10n::t('Post to LiveJournal'),
+ PConfig::get(local_user(),'ljpost','post_by_default')
+ ]
+ ];
}
}
diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php
index d7b3adb45..319c109ad 100644
--- a/pumpio/pumpio.php
+++ b/pumpio/pumpio.php
@@ -214,19 +214,21 @@ function pumpio_connect(App $a)
return $o;
}
-function pumpio_jot_nets(App $a, &$b)
+function pumpio_jot_nets(App $a, array &$jotnets_fields)
{
if (! local_user()) {
return;
}
- $pumpio_post = PConfig::get(local_user(), 'pumpio', 'post');
-
- if (intval($pumpio_post) == 1) {
- $pumpio_defpost = PConfig::get(local_user(), 'pumpio', 'post_by_default');
- $selected = ((intval($pumpio_defpost) == 1) ? ' checked="checked" ' : '');
- $b .= ' '
- . L10n::t('Post to pumpio') . '
';
+ if (PConfig::get(local_user(), 'pumpio', 'post')) {
+ $jotnets_fields[] = [
+ 'type' => 'checkbox',
+ 'field' => [
+ 'pumpio_enable',
+ L10n::t('Post to pumpio'),
+ PConfig::get(local_user(), 'pumpio', 'post_by_default')
+ ]
+ ];
}
}
diff --git a/statusnet/statusnet.php b/statusnet/statusnet.php
index bc4ef3630..ab4cceb74 100644
--- a/statusnet/statusnet.php
+++ b/statusnet/statusnet.php
@@ -101,18 +101,21 @@ function statusnet_check_item_notification(App $a, &$notification_data)
}
}
-function statusnet_jot_nets(App $a, &$b)
+function statusnet_jot_nets(App $a, array &$jotnets_fields)
{
if (!local_user()) {
return;
}
- $statusnet_post = PConfig::get(local_user(), 'statusnet', 'post');
- if (intval($statusnet_post) == 1) {
- $statusnet_defpost = PConfig::get(local_user(), 'statusnet', 'post_by_default');
- $selected = ((intval($statusnet_defpost) == 1) ? ' checked="checked" ' : '');
- $b .= ' '
- . L10n::t('Post to GNU Social') . '
';
+ if (PConfig::get(local_user(), 'statusnet', 'post')) {
+ $jotnets_fields[] = [
+ 'type' => 'checkbox',
+ 'field' => [
+ 'statusnet_enable',
+ L10n::t('Post to GNU Social'),
+ PConfig::get(local_user(), 'statusnet', 'post_by_default')
+ ]
+ ];
}
}
diff --git a/tumblr/tumblr.php b/tumblr/tumblr.php
index 62f711325..3bf258b39 100644
--- a/tumblr/tumblr.php
+++ b/tumblr/tumblr.php
@@ -193,19 +193,21 @@ function tumblr_callback(App $a)
return $o;
}
-function tumblr_jot_nets(App $a, &$b)
+function tumblr_jot_nets(App $a, array &$jotnets_fields)
{
if (! local_user()) {
return;
}
- $tmbl_post = PConfig::get(local_user(), 'tumblr', 'post');
-
- if (intval($tmbl_post) == 1) {
- $tmbl_defpost = PConfig::get(local_user(), 'tumblr', 'post_by_default');
- $selected = ((intval($tmbl_defpost) == 1) ? ' checked="checked" ' : '');
- $b .= ' '
- . L10n::t('Post to Tumblr') . '
';
+ if (PConfig::get(local_user(),'tumblr','post')) {
+ $jotnets_fields[] = [
+ 'type' => 'checkbox',
+ 'field' => [
+ 'tumblr_enable',
+ L10n::t('Post to Tumblr'),
+ PConfig::get(local_user(),'tumblr','post_by_default')
+ ]
+ ];
}
}
diff --git a/twitter/twitter.php b/twitter/twitter.php
index 3dbaf37bd..99bed6e27 100644
--- a/twitter/twitter.php
+++ b/twitter/twitter.php
@@ -194,21 +194,25 @@ function twitter_follow(App $a, array &$contact)
}
}
-function twitter_jot_nets(App $a, &$b)
+function twitter_jot_nets(App $a, array &$jotnets_fields)
{
if (!local_user()) {
return;
}
- $tw_post = PConfig::get(local_user(), 'twitter', 'post');
- if (intval($tw_post) == 1) {
- $tw_defpost = PConfig::get(local_user(), 'twitter', 'post_by_default');
- $selected = ((intval($tw_defpost) == 1) ? ' checked="checked" ' : '');
- $b .= ' '
- . L10n::t('Post to Twitter') . '
';
+ if (PConfig::get(local_user(), 'twitter', 'post')) {
+ $jotnets_fields[] = [
+ 'type' => 'checkbox',
+ 'field' => [
+ 'twitter_enable',
+ L10n::t('Post to Twitter'),
+ PConfig::get(local_user(), 'twitter', 'post_by_default')
+ ]
+ ];
}
}
+
function twitter_settings_post(App $a)
{
if (!local_user()) {
diff --git a/wppost/wppost.php b/wppost/wppost.php
index 4e4ae7138..c3840d523 100644
--- a/wppost/wppost.php
+++ b/wppost/wppost.php
@@ -43,18 +43,21 @@ function wppost_uninstall()
}
-function wppost_jot_nets(&$a, &$b)
+function wppost_jot_nets(\Friendica\App &$a, array &$jotnets_fields)
{
if (!local_user()) {
return;
}
- $wp_post = PConfig::get(local_user(), 'wppost', 'post');
- if (intval($wp_post) == 1) {
- $wp_defpost = PConfig::get(local_user(),'wppost','post_by_default');
- $selected = ((intval($wp_defpost) == 1) ? ' checked="checked" ' : '');
- $b .= ' '
- . L10n::t('Post to Wordpress') . '
';
+ if (PConfig::get(local_user(),'wppost','post')) {
+ $jotnets_fields[] = [
+ 'type' => 'checkbox',
+ 'field' => [
+ 'wppost_enable',
+ L10n::t('Post to Wordpress'),
+ PConfig::get(local_user(),'wppost','post_by_default')
+ ]
+ ];
}
}