$appnet_enable = (($appnet_post && x($_REQUEST,'appnet_enable')) ? intval($_REQUEST['appnet_enable']) : 0);
// if API is used, default to the chosen settings
- if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'appnet','post_by_default')))
+ if($b['api_source'] && intval(get_pconfig(local_user(),'appnet','post_by_default')))
$appnet_enable = 1;
if(! $appnet_enable)
$bl_enable = (($bl_post && x($_REQUEST,'blogger_enable')) ? intval($_REQUEST['blogger_enable']) : 0);
- if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'blogger','post_by_default')))
+ if($b['api_source'] && intval(get_pconfig(local_user(),'blogger','post_by_default')))
$bl_enable = 1;
if(! $bl_enable)
function buffer_post_local(&$a,&$b) {
- if((! local_user()) || (local_user() != $b['uid']))
+ if (!local_user() || (local_user() != $b['uid'])) {
return;
+ }
$buffer_post = intval(get_pconfig(local_user(),'buffer','post'));
$buffer_enable = (($buffer_post && x($_REQUEST,'buffer_enable')) ? intval($_REQUEST['buffer_enable']) : 0);
- if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'buffer','post_by_default')))
+ if ($b['api_source'] && intval(get_pconfig(local_user(),'buffer','post_by_default'))) {
$buffer_enable = 1;
+ }
- if(! $buffer_enable)
+ if (!$buffer_enable) {
return;
+ }
- if(strlen($b['postopts']))
+ if (strlen($b['postopts'])) {
$b['postopts'] .= ',';
+ }
$b['postopts'] .= 'buffer';
}
function diaspora_post_local(&$a,&$b) {
- if($b['edit'])
+ if ($b['edit']) {
return;
+ }
- if((! local_user()) || (local_user() != $b['uid']))
+ if (!local_user() || (local_user() != $b['uid'])) {
return;
+ }
- if($b['private'] || $b['parent'])
+ if ($b['private'] || $b['parent']) {
return;
+ }
$diaspora_post = intval(get_pconfig(local_user(),'diaspora','post'));
$diaspora_enable = (($diaspora_post && x($_REQUEST,'diaspora_enable')) ? intval($_REQUEST['diaspora_enable']) : 0);
- if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'diaspora','post_by_default')))
+ if ($b['api_source'] && intval(get_pconfig(local_user(),'diaspora','post_by_default'))) {
$diaspora_enable = 1;
+ }
- if(! $diaspora_enable)
- return;
+ if (!$diaspora_enable) {
+ return;
+ }
+
+ if (strlen($b['postopts'])) {
+ $b['postopts'] .= ',';
+ }
- if(strlen($b['postopts']))
- $b['postopts'] .= ',';
- $b['postopts'] .= 'diaspora';
+ $b['postopts'] .= 'diaspora';
}
// This can probably be changed to allow editing by pointing to a different API endpoint
- if($b['edit'])
+ if ($b['edit']) {
return;
+ }
- if((! local_user()) || (local_user() != $b['uid']))
+ if ((! local_user()) || (local_user() != $b['uid'])) {
return;
+ }
- if($b['private'] || $b['parent'])
+ if ($b['private'] || $b['parent']) {
return;
+ }
$ltree_post = intval(get_pconfig(local_user(),'libertree','post'));
$ltree_enable = (($ltree_post && x($_REQUEST,'libertree_enable')) ? intval($_REQUEST['libertree_enable']) : 0);
- if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'libertree','post_by_default')))
+ if ($b['api_source'] && intval(get_pconfig(local_user(),'libertree','post_by_default'))) {
$ltree_enable = 1;
+ }
- if(! $ltree_enable)
- return;
+ if (!$ltree_enable) {
+ return;
+ }
+
+ if (strlen($b['postopts'])) {
+ $b['postopts'] .= ',';
+ }
- if(strlen($b['postopts']))
- $b['postopts'] .= ',';
- $b['postopts'] .= 'libertree';
+ $b['postopts'] .= 'libertree';
}
}
}
-function pumpio_post_local(&$a,&$b) {
+function pumpio_post_local(&$a, &$b) {
- if((! local_user()) || (local_user() != $b['uid']))
+ if (!local_user() || (local_user() != $b['uid'])) {
return;
+ }
- $pumpio_post = intval(get_pconfig(local_user(),'pumpio','post'));
+ $pumpio_post = intval(get_pconfig(local_user(), 'pumpio', 'post'));
$pumpio_enable = (($pumpio_post && x($_REQUEST,'pumpio_enable')) ? intval($_REQUEST['pumpio_enable']) : 0);
- if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'pumpio','post_by_default')))
+ if ($b['api_source'] && intval(get_pconfig(local_user(), 'pumpio', 'post_by_default'))) {
$pumpio_enable = 1;
+ }
- if(! $pumpio_enable)
+ if (!$pumpio_enable) {
return;
+ }
- if(strlen($b['postopts']))
+ if (strlen($b['postopts'])) {
$b['postopts'] .= ',';
+ }
$b['postopts'] .= 'pumpio';
}
}
-function statusnet_post_local(&$a,&$b) {
- if($b['edit'])
+function statusnet_post_local(&$a, &$b) {
+ if ($b['edit']) {
return;
+ }
- if((local_user()) && (local_user() == $b['uid']) && (! $b['private'])) {
+ if (!local_user() || (local_user() != $b['uid'])) {
+ return;
+ }
- $statusnet_post = get_pconfig(local_user(),'statusnet','post');
- $statusnet_enable = (($statusnet_post && x($_REQUEST,'statusnet_enable')) ? intval($_REQUEST['statusnet_enable']) : 0);
+ $statusnet_post = get_pconfig(local_user(),'statusnet','post');
+ $statusnet_enable = (($statusnet_post && x($_REQUEST,'statusnet_enable')) ? intval($_REQUEST['statusnet_enable']) : 0);
- // if API is used, default to the chosen settings
- if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'statusnet','post_by_default')))
- $statusnet_enable = 1;
+ // if API is used, default to the chosen settings
+ if ($b['api_source'] && intval(get_pconfig(local_user(),'statusnet','post_by_default'))) {
+ $statusnet_enable = 1;
+ }
- if(! $statusnet_enable)
- return;
+ if (!$statusnet_enable) {
+ return;
+ }
- if(strlen($b['postopts']))
- $b['postopts'] .= ',';
- $b['postopts'] .= 'statusnet';
+ if (strlen($b['postopts'])) {
+ $b['postopts'] .= ',';
}
+
+ $b['postopts'] .= 'statusnet';
}
function statusnet_action($a, $uid, $pid, $action) {
}
-function tumblr_post_local(&$a,&$b) {
+function tumblr_post_local(&$a, &$b) {
// This can probably be changed to allow editing by pointing to a different API endpoint
- if($b['edit'])
+ if ($b['edit']) {
return;
+ }
- if((! local_user()) || (local_user() != $b['uid']))
+ if (!local_user() || (local_user() != $b['uid'])) {
return;
+ }
- if($b['private'] || $b['parent'])
+ if ($b['private'] || $b['parent']) {
return;
+ }
$tmbl_post = intval(get_pconfig(local_user(),'tumblr','post'));
$tmbl_enable = (($tmbl_post && x($_REQUEST,'tumblr_enable')) ? intval($_REQUEST['tumblr_enable']) : 0);
- if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'tumblr','post_by_default')))
+ if ($b['api_source'] && intval(get_pconfig(local_user(),'tumblr','post_by_default'))) {
$tmbl_enable = 1;
+ }
- if(! $tmbl_enable)
+ if (!$tmbl_enable) {
return;
+ }
- if(strlen($b['postopts']))
+ if (strlen($b['postopts'])) {
$b['postopts'] .= ',';
+ }
+
$b['postopts'] .= 'tumblr';
}
}
-function twitter_post_local(&$a,&$b) {
+function twitter_post_local(&$a, &$b) {
- if($b['edit'])
+ if ($b['edit']) {
return;
+ }
- if((local_user()) && (local_user() == $b['uid']) && (! $b['private']) && (! $b['parent']) ) {
+ if (!local_user() || (local_user() != $b['uid'])) {
+ return;
+ }
- $twitter_post = intval(get_pconfig(local_user(),'twitter','post'));
- $twitter_enable = (($twitter_post && x($_REQUEST,'twitter_enable')) ? intval($_REQUEST['twitter_enable']) : 0);
+ $twitter_post = intval(get_pconfig(local_user(), 'twitter', 'post'));
+ $twitter_enable = (($twitter_post && x($_REQUEST, 'twitter_enable')) ? intval($_REQUEST['twitter_enable']) : 0);
- // if API is used, default to the chosen settings
- if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'twitter','post_by_default')))
- $twitter_enable = 1;
+ // if API is used, default to the chosen settings
+ if ($b['api_source'] && intval(get_pconfig(local_user(), 'twitter', 'post_by_default'))) {
+ $twitter_enable = 1;
+ }
- if(! $twitter_enable)
+ if (!$twitter_enable) {
return;
+ }
- if(strlen($b['postopts']))
+ if (strlen($b['postopts'])) {
$b['postopts'] .= ',';
- $b['postopts'] .= 'twitter';
}
+
+ $b['postopts'] .= 'twitter';
}
function twitter_action($a, $uid, $pid, $action) {
<?php
/*
* Name: Unicode Smilies
- * Description: Smilies based on the unicode emojis
+ * Description: Smilies based on the unicode emojis - On Linux use https://github.com/eosrei/emojione-color-font to see them in color
* Version: 1.0
* Author: Michael Vogel <http://pirati.ca/profile/heluecht>
*/
}
-function wppost_post_local(&$a,&$b) {
+function wppost_post_local(&$a, &$b) {
// This can probably be changed to allow editing by pointing to a different API endpoint
- if($b['edit']) {
+ if ($b['edit']) {
return;
}
- if((! local_user()) || (local_user() != $b['uid'])) {
+ if (!local_user() || (local_user() != $b['uid'])) {
return;
}
- if($b['private'] || $b['parent']) {
+ if ($b['private'] || $b['parent']) {
return;
}
- $wp_post = intval(get_pconfig(local_user(),'wppost','post'));
+ $wp_post = intval(get_pconfig(local_user(),'wppost','post'));
$wp_enable = (($wp_post && x($_REQUEST,'wppost_enable')) ? intval($_REQUEST['wppost_enable']) : 0);
- if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'wppost','post_by_default'))) {
+ if ($b['api_source'] && intval(get_pconfig(local_user(),'wppost','post_by_default'))) {
$wp_enable = 1;
}
- if(! $wp_enable) {
- return;
- }
+ if (!$wp_enable) {
+ return;
+ }
- if(strlen($b['postopts'])) {
- $b['postopts'] .= ',';
- }
- $b['postopts'] .= 'wppost';
+ if (strlen($b['postopts'])) {
+ $b['postopts'] .= ',';
+ }
+
+ $b['postopts'] .= 'wppost';
}