From: Keith Fernie Date: Thu, 9 Feb 2012 22:08:15 +0000 (+0000) Subject: modified: statusnet.tgz Set up tabs in code correctly. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=772c58ce9a45fb4ae2117a033da7464ed65f5908;p=friendica-addons.git modified: statusnet.tgz Set up tabs in code correctly. modified: statusnet/statusnet.php Set up tabs in code correctly. modified: twitter.tgz Set up tabs in code correctly. modified: twitter/twitter.php Set up tabs in code correctly. modified: yourls.tgz Set up tabs in code correctly. modified: yourls/yourls.css Set up tabs in code correctly. modified: yourls/yourls.php Set up tabs in code correctly. --- diff --git a/statusnet.tgz b/statusnet.tgz index 5865f151..3d7c9f58 100755 Binary files a/statusnet.tgz and b/statusnet.tgz differ diff --git a/statusnet/statusnet.php b/statusnet/statusnet.php index bf606cba..f558cbec 100755 --- a/statusnet/statusnet.php +++ b/statusnet/statusnet.php @@ -407,19 +407,19 @@ function statusnet_post_hook(&$a,&$b) { $shortlink = ""; require_once('library/slinky.php'); $slinky = new Slinky( $b['plink'] ); - $yourls_url = get_config('yourls','url1'); - if ($yourls_url) { - $yourls_username = get_config('yourls','username1'); - $yourls_password = get_config('yourls', 'password1'); + $yourls_url = get_config('yourls','url1'); + if ($yourls_url) { + $yourls_username = get_config('yourls','username1'); + $yourls_password = get_config('yourls', 'password1'); $yourls_ssl = get_config('yourls', 'ssl1'); - $yourls = new Slinky_YourLS(); - $yourls->set( 'username', $yourls_username ); - $yourls->set( 'password', $yourls_password ); + $yourls = new Slinky_YourLS(); + $yourls->set( 'username', $yourls_username ); + $yourls->set( 'password', $yourls_password ); $yourls->set( 'ssl', $yourls_ssl ); - $yourls->set( 'yourls-url', $yourls_url ); - $slinky->set_cascade( array( $yourls, new Slinky_UR1ca(), new Slinky_Trim(), new Slinky_IsGd(), new Slinky_TinyURL() ) ); - } - else { + $yourls->set( 'yourls-url', $yourls_url ); + $slinky->set_cascade( array( $yourls, new Slinky_UR1ca(), new Slinky_Trim(), new Slinky_IsGd(), new Slinky_TinyURL() ) ); + } + else { // setup a cascade of shortening services // try to get a short link from these services // in the order ur1.ca, trim, id.gd, tinyurl @@ -429,9 +429,9 @@ function statusnet_post_hook(&$a,&$b) { // the new message will be shortened such that "... $shortlink" // will fit into the character limit $msg = substr($msg, 0, $max_char-strlen($shortlink)-4); - $msg .= '... ' . $shortlink; + $msg .= '... ' . $shortlink; } - // and now tweet it :-) + // and now tweet it :-) if(strlen($msg)) $dent->post('statuses/update', array('status' => $msg)); } diff --git a/twitter.tgz b/twitter.tgz index ee5caa89..25b54d85 100755 Binary files a/twitter.tgz and b/twitter.tgz differ diff --git a/twitter/twitter.php b/twitter/twitter.php index 11b92d4e..ef590839 100755 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -269,20 +269,20 @@ function twitter_post_hook(&$a,&$b) { $shortlink = ""; require_once('library/slinky.php'); $slinky = new Slinky( $b['plink'] ); - $yourls_url = get_config('yourls','url1'); - if ($yourls_url) { + $yourls_url = get_config('yourls','url1'); + if ($yourls_url) { $max_char = 135; - $yourls_username = get_config('yourls','username1'); - $yourls_password = get_config('yourls', 'password1'); - $yourls_ssl = get_config('yourls', 'ssl1'); - $yourls = new Slinky_YourLS(); - $yourls->set( 'username', $yourls_username ); - $yourls->set( 'password', $yourls_password ); - $yourls->set( 'ssl', $yourls_ssl ); - $yourls->set( 'yourls-url', $yourls_url ); - $slinky->set_cascade( array( $yourls, new Slinky_UR1ca(), new Slinky_Trim(), new Slinky_IsGd(), new Slinky_TinyURL() ) ); - } - else { + $yourls_username = get_config('yourls','username1'); + $yourls_password = get_config('yourls', 'password1'); + $yourls_ssl = get_config('yourls', 'ssl1'); + $yourls = new Slinky_YourLS(); + $yourls->set( 'username', $yourls_username ); + $yourls->set( 'password', $yourls_password ); + $yourls->set( 'ssl', $yourls_ssl ); + $yourls->set( 'yourls-url', $yourls_url ); + $slinky->set_cascade( array( $yourls, new Slinky_UR1ca(), new Slinky_Trim(), new Slinky_IsGd(), new Slinky_TinyURL() ) ); + } + else { // setup a cascade of shortening services // try to get a short link from these services // in the order ur1.ca, trim, id.gd, tinyurl diff --git a/yourls.tgz b/yourls.tgz index 6778dfbc..bf723440 100755 Binary files a/yourls.tgz and b/yourls.tgz differ diff --git a/yourls/yourls.css b/yourls/yourls.css index 07a73d3a..cfd09c97 100755 --- a/yourls/yourls.css +++ b/yourls/yourls.css @@ -14,7 +14,7 @@ yourls-url { } .yourls { - text-align: left; + text-align: left; width 100%; margin-top: 25px; font-size: 20px; diff --git a/yourls/yourls.php b/yourls/yourls.php index bbaa96b9..babfc2c5 100755 --- a/yourls/yourls.php +++ b/yourls/yourls.php @@ -19,10 +19,10 @@ function yourls_install() { function yourls_uninstall() { unregister_hook('plugin_settings', 'addon/yourls/yourls.php', 'yourls_addon_settings'); unregister_hook('plugin_settings_post', 'addon/yourls/yourls.php', 'yourls_addon_settings_post'); - set_config('yourls','url1',trim($_POST[''])); - set_config('yourls','username1',trim($_POST[''])); - set_config('yourls','password1',trim($_POST[''])); - set_config('yourls','ssl1',trim($_POST[''])); + set_config('yourls','url1',trim($_POST[''])); + set_config('yourls','username1',trim($_POST[''])); + set_config('yourls','password1',trim($_POST[''])); + set_config('yourls','ssl1',trim($_POST[''])); } @@ -38,42 +38,42 @@ function yourls_addon_settings(&$a,&$s) { /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; $yourls_url = get_config('yourls','url1'); - $yourls_username = get_config('yourls','username1'); - $yourls_password = get_config('yourls', 'password1'); - $ssl_enabled = get_config('yourls','ssl1'); - $ssl_checked = (($ssl_enabled) ? ' checked="checked" ' : ''); + $yourls_username = get_config('yourls','username1'); + $yourls_password = get_config('yourls', 'password1'); + $ssl_enabled = get_config('yourls','ssl1'); + $ssl_checked = (($ssl_enabled) ? ' checked="checked" ' : ''); $yourls_ssl = get_config('yourls', 'ssl1'); - $s .= '
'; - $s .= '

' . t('YourLS Settings') . '

'; - $s .= '
'; + $s .= '
'; + $s .= '

' . t('YourLS Settings') . '

'; + $s .= '
'; $s .= ''; - $s .= ''; - $s .= '
'; + $s .= ''; + $s .= '
'; - $s .= '
'; - $s .= ''; - $s .= ''; - $s .= '
'; + $s .= '
'; + $s .= ''; + $s .= ''; + $s .= '
'; - $s .= '
'; - $s .= ''; - $s .= ''; - $s .= '
'; + $s .= '
'; + $s .= ''; + $s .= ''; + $s .= '
'; $s .= '
'; - $s .= ''; - $s .= ''; - $s .= '
'; + $s .= ''; + $s .= ''; + $s .= '
'; - $s .= '
'; + $s .= '
'; return; @@ -86,9 +86,9 @@ function yourls_addon_settings_post(&$a,&$b) { if($_POST['yourls-submit']) { set_config('yourls','url1',trim($_POST['yourls_url'])); - set_config('yourls','username1',trim($_POST['yourls_username'])); - set_config('yourls','password1',trim($_POST['yourls_password'])); - set_config('yourls','ssl1',intval($_POST['yourls_ssl'])); + set_config('yourls','username1',trim($_POST['yourls_username'])); + set_config('yourls','password1',trim($_POST['yourls_password'])); + set_config('yourls','ssl1',intval($_POST['yourls_ssl'])); info( t('yourls Settings saved.') . EOL); } }