diff --git a/blackout/blackout.php b/blackout/blackout.php index 83495611..e629b7a3 100644 --- a/blackout/blackout.php +++ b/blackout/blackout.php @@ -4,7 +4,7 @@ * Description: Blackout your ~friendica node during a given period, requires PHP >= 5.3 * License: MIT * Version: 1.0 - * Author: Tobias Diekershoff + * Author: Tobias Diekershoff * * About * ===== diff --git a/fromgplus/fromgplus.php b/fromgplus/fromgplus.php index 5d0e86c3..05cc8ec2 100644 --- a/fromgplus/fromgplus.php +++ b/fromgplus/fromgplus.php @@ -212,7 +212,7 @@ function fromgplus_cleanupgoogleproxy($fullImage, $image) { return($cleaned); } -function fromgplus_handleattachments($item, $displaytext) { +function fromgplus_handleattachments($item) { $post = ""; $quote = ""; @@ -251,7 +251,7 @@ function fromgplus_handleattachments($item, $displaytext) { elseif ($images["full"] != "") $post .= "\n[img]".$images["full"]."[/img]\n"; - if (($attachment->displayName != "") AND ($attachment->displayName != $displaytext)) + if ($attachment->displayName != "") $post .= fromgplus_html2bbcode($attachment->displayName)."\n"; break; @@ -319,7 +319,7 @@ function fromgplus_fetch($a, $uid) { $post = fromgplus_html2bbcode($item->object->content); if (is_array($item->object->attachments)) - $post .= fromgplus_handleattachments($item, $item->object->content); + $post .= fromgplus_handleattachments($item); // geocode, placeName if (isset($item->address)) @@ -346,7 +346,7 @@ function fromgplus_fetch($a, $uid) { $post .= fromgplus_html2bbcode($item->object->content); if (is_array($item->object->attachments)) - $post .= "\n".trim(fromgplus_handleattachments($item, $item->object->content)); + $post .= "\n".trim(fromgplus_handleattachments($item)); $post .= "[/share]"; } else { @@ -355,7 +355,7 @@ function fromgplus_fetch($a, $uid) { $post .= fromgplus_html2bbcode($item->object->content); if (is_array($item->object->attachments)) - $post .= "\n".trim(fromgplus_handleattachments($item, $item->object->content)); + $post .= "\n".trim(fromgplus_handleattachments($item)); } if (isset($item->address)) diff --git a/gpluspost/gpluspost.php b/gpluspost/gpluspost.php index 35278495..db240aa3 100644 --- a/gpluspost/gpluspost.php +++ b/gpluspost/gpluspost.php @@ -51,9 +51,6 @@ function gpluspost_settings(&$a,&$s) { $noloop_enabled = get_pconfig(local_user(),'gpluspost','no_loop_prevention'); $noloop_checked = (($noloop_enabled) ? ' checked="checked" ' : ''); - $skip_enabled = get_pconfig(local_user(),'gpluspost','skip_without_link'); - $skip_checked = (($skip_enabled) ? ' checked="checked" ' : ''); - $s .= '
'; $s .= '

' . t('Google+ Post Settings') . '

'; $s .= '
'; @@ -71,11 +68,6 @@ function gpluspost_settings(&$a,&$s) { $s .= ''; $s .= '
'; - $s .= '
'; - /* provide a submit button */ $s .= '
'; @@ -89,7 +81,6 @@ function gpluspost_settings_post(&$a,&$b) { set_pconfig(local_user(),'gpluspost','post',intval($_POST['gpluspost'])); set_pconfig(local_user(),'gpluspost','post_by_default',intval($_POST['gpluspost_bydefault'])); set_pconfig(local_user(),'gpluspost','no_loop_prevention',intval($_POST['gpluspost_noloopprevention'])); - set_pconfig(local_user(),'gpluspost','skip_without_link',intval($_POST['gpluspost_skipwithoutlink'])); } } @@ -295,7 +286,7 @@ function gpluspost_feeditem($pid, $uid) { require_once('include/bbcode.php'); require_once("include/html2plain.php"); - $skipwithoutlink = get_pconfig($uid,'gpluspost','skip_without_link'); + $max_char = 140; $items = q("SELECT `uri`, `plink`, `author-link`, `author-name`, `created`, `edited`, `id`, `title`, `body` from `item` WHERE id=%d", intval($pid)); foreach ($items AS $item) { @@ -358,9 +349,7 @@ function gpluspost_feeditem($pid, $uid) { else if ($image != "") $msglink = $image; - if (($msglink == "") AND $skipwithoutlink) - continue; - else if ($msglink == "") + if ($msglink == "") $msglink = $item["plink"]; // Fetching the title - or the first line diff --git a/impressum/impressum.php b/impressum/impressum.php index 3c1106c9..8bcc8b7d 100755 --- a/impressum/impressum.php +++ b/impressum/impressum.php @@ -3,7 +3,7 @@ * Name: Impressum * Description: Plugin to add contact information to the about page (/friendica) * Version: 1.2 - * Author: Tobias Diekershoff + * Author: Tobias Diekershoff * License: 3-clause BSD license */ diff --git a/mathjax/mathjax.php b/mathjax/mathjax.php index ccc6ca0c..d97e9649 100644 --- a/mathjax/mathjax.php +++ b/mathjax/mathjax.php @@ -4,7 +4,7 @@ * Name: MathJax * Description: Addon for Friendika to include MathJax (LaTeX math syntax) * Version: 1.0 - * Author: Tobias Diekershoff + * Author: Tobias Diekershoff * License: 3-clause BSD license */ diff --git a/piwik/piwik.php b/piwik/piwik.php index 3501b2c8..a2086bdc 100755 --- a/piwik/piwik.php +++ b/piwik/piwik.php @@ -3,7 +3,7 @@ * Name: Piwik Analytics * Description: Piwik Analytics Plugin for Friendica * Version: 1.1 - * Author: Tobias Diekershoff + * Author: Tobias Diekershoff * Author: Klaus Weidenbach */ @@ -26,8 +26,6 @@ * installation has. Alter the baseurl to fit your needs, don't care * about http/https but beware to put the trailing / at the end of your * setting. - * - * Documentation see http://diekershoff.homeunix.net/redmine/wiki/friendikaplugin/Piwik_Plugin */ function piwik_install() { diff --git a/pumpio/README b/pumpio/README deleted file mode 100644 index f658d52c..00000000 --- a/pumpio/README +++ /dev/null @@ -1,5 +0,0 @@ -To let the connector work properly you should define an application name in the .htconfig: - -$a->config['pumpio']['application_name'] = "Name of you site"; - -This name appears at pump.io and is mportant for not mirroring back posts that came from friendica. diff --git a/statusnet/statusnet.php b/statusnet/statusnet.php index 3a5ceb8a..eeca3d60 100755 --- a/statusnet/statusnet.php +++ b/statusnet/statusnet.php @@ -3,7 +3,7 @@ * Name: StatusNet Connector * Description: Relay public postings to a connected StatusNet account * Version: 1.0.5 - * Author: Tobias Diekershoff + * Author: Tobias Diekershoff * Author: Michael Vogel * * Copyright (c) 2011-2013 Tobias Diekershoff, Michael Vogel diff --git a/twitter/twitter.php b/twitter/twitter.php index 71fed1aa..8b4dec99 100755 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -3,7 +3,7 @@ * Name: Twitter Connector * Description: Relay public postings to a connected Twitter account * Version: 1.0.4 - * Author: Tobias Diekershoff + * Author: Tobias Diekershoff * Author: Michael Vogel * * Copyright (c) 2011-2013 Tobias Diekershoff, Michael Vogel @@ -58,8 +58,6 @@ * from "Settings -> Plugin Settings". * * Requirements: PHP5, curl [Slinky library] - * - * Documentation: http://diekershoff.homeunix.net/redmine/wiki/friendikaplugin/Twitter_Plugin */ define('TWITTER_DEFAULT_POLL_INTERVAL', 5); // given in minutes @@ -311,7 +309,7 @@ function twitter_shortenmsg($b) { require_once("include/bbcode.php"); require_once("include/html2plain.php"); - $max_char = 140; + $max_char = 130; // Looking for the first image $image = ''; @@ -414,20 +412,15 @@ function twitter_shortenmsg($b) { if (($msglink == "") and strlen($msg) > $max_char) $msglink = $b["plink"]; - // If the message is short enough then don't modify it. - if ((strlen(trim($origmsg)) <= $max_char) AND ($msglink == "")) - return(trim($origmsg)); - - // If the message is short enough and the link exists in the original message don't modify it as well - // -3 because of the bad shortener of twitter - if ((strlen(trim($origmsg)) <= ($max_char - 3)) AND strpos($origmsg, $msglink)) + // If the message is short enough then don't modify it. (if the link exists in the original message) + if ((strlen(trim($origmsg)) <= $max_char) AND (strpos($origmsg, $msglink) OR ($msglink == ""))) return(trim($origmsg)); if (strlen($msglink) > 20) $msglink = short_link($msglink); - if (strlen(trim($msg." ".$msglink)) > ($max_char - 3)) { - $msg = substr($msg, 0, ($max_char - 3) - (strlen($msglink))); + if (strlen(trim($msg." ".$msglink)) > $max_char) { + $msg = substr($msg, 0, $max_char - (strlen($msglink))); $lastchar = substr($msg, -1); $msg = substr($msg, 0, -1); $pos = strrpos($msg, "\n"); diff --git a/webrtc/webrtc.php b/webrtc/webrtc.php index 7a4e8cf7..e0d33393 100644 --- a/webrtc/webrtc.php +++ b/webrtc/webrtc.php @@ -3,8 +3,8 @@ * Name: WebRTC Application * Description: add a webrtc instance for video/audio * Version: 1.0 - * Author: stephen mahood - * Author: Tobias Diekershoff + * Author: Stephen Mahood + * Author: Tobias Diekershoff */ function webrtc_install() {