aboutsummaryrefslogtreecommitdiffstats
path: root/addon
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-05-26 06:46:55 -0700
committerFriendika <info@friendika.com>2011-05-26 06:46:55 -0700
commit5a0690d9407588b7ed2c312c56290e4a9917597d (patch)
tree0c2f7c1f141b60113fac75d643d8959ab173e05b /addon
parent61b730d567ac4bb648a8d4399f35ca0d32328d40 (diff)
downloadvolse-hubzilla-5a0690d9407588b7ed2c312c56290e4a9917597d.tar.gz
volse-hubzilla-5a0690d9407588b7ed2c312c56290e4a9917597d.tar.bz2
volse-hubzilla-5a0690d9407588b7ed2c312c56290e4a9917597d.zip
add attachments to FB posts, fix paren string in statusnet, do not insert attach div into post if no attachments
Diffstat (limited to 'addon')
-rw-r--r--addon/facebook/facebook.php15
-rw-r--r--addon/statusnet/statusnet.php2
2 files changed, 16 insertions, 1 deletions
diff --git a/addon/facebook/facebook.php b/addon/facebook/facebook.php
index 17cc8bf56..d5544601a 100644
--- a/addon/facebook/facebook.php
+++ b/addon/facebook/facebook.php
@@ -505,6 +505,21 @@ function facebook_post_hook(&$a,&$b) {
$msg = trim(strip_tags(bbcode($msg)));
$msg = html_entity_decode($msg,ENT_QUOTES,'UTF-8');
+ // add any attachments as text urls
+
+ $arr = explode(',',$b['attach']);
+
+ if(count($arr)) {
+ $msg .= "\n";
+ foreach($arr as $r) {
+ $matches = false;
+ $cnt = preg_match('|\[attach\]href=\"(.+?)\" size=\"(.+?)\" type=\"(.+?)\" title=\"(.+?)\"\[\/attach\]|',$r,$matches);
+ if($cnt) {
+ $msg .= $matches[1];
+ }
+ }
+ }
+
if (strlen($msg) > FACEBOOK_MAXPOSTLEN) {
$shortlink = "";
require_once('library/slinky.php');
diff --git a/addon/statusnet/statusnet.php b/addon/statusnet/statusnet.php
index bd40f78d8..39df7d962 100644
--- a/addon/statusnet/statusnet.php
+++ b/addon/statusnet/statusnet.php
@@ -207,7 +207,7 @@ function statusnet_settings(&$a,&$s) {
*/
if (! $globalsn == null) {
$s .= '<h4>' . t('Globally Available StatusNet OAuthKeys') . '</h4>';
- $s .= '<p>'. 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 (see below).') .'</p>';
+ $s .= '<p>'. 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.") .'</p>';
$s .= '<div id="statusnet-preconf-wrapper">';
foreach ($globalsn as $asn) {
$s .= '<input type="radio" name="statusnet-preconf-apiurl" value="'. $asn['apiurl'] .'">'. $asn['sitename'] .'<br />';