]> git.mxchange.org Git - friendica-addons.git/commitdiff
modified: statusnet.tgz Set up tabs in code correctly.
authorKeith Fernie <keith@fernie.eu>
Thu, 9 Feb 2012 22:08:15 +0000 (22:08 +0000)
committerKeith Fernie <keith@fernie.eu>
Thu, 9 Feb 2012 22:08:15 +0000 (22:08 +0000)
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.

statusnet.tgz
statusnet/statusnet.php
twitter.tgz
twitter/twitter.php
yourls.tgz
yourls/yourls.css
yourls/yourls.php

index 5865f1513301106336edef626e7791cdd74710c8..3d7c9f58518d03997a85d1620d655763e36f14d8 100755 (executable)
Binary files a/statusnet.tgz and b/statusnet.tgz differ
index bf606cba0b5811b7759a8c881404bc19c000d309..f558cbec07ec5a467608988df7dfe8f2e8ea0060 100755 (executable)
@@ -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));
        }
index ee5caa899bc5ed51a996f997528e2c5707ce46bd..25b54d85b8dc09f3d8e82979a86e30f7b7b40d2f 100755 (executable)
Binary files a/twitter.tgz and b/twitter.tgz differ
index 11b92d4eefd87a3d348974e9a9471ce478710657..ef5908396cb393cac3db1bfd88242ea73fa96aa1 100755 (executable)
@@ -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
index 6778dfbcc45c4dbb6f7f135a8faba6c3ade3dc77..bf723440dd5f26d8e005a5926b055750747fbc11 100755 (executable)
Binary files a/yourls.tgz and b/yourls.tgz differ
index 07a73d3a1bbdf1cdc44a5e4d83986c54b131b157..cfd09c97f5d3f4d1f2960977b6c0078a0222eda4 100755 (executable)
@@ -14,7 +14,7 @@ yourls-url {
 }
 
 .yourls {
-    text-align: left;
+       text-align: left;
        width 100%;
        margin-top: 25px;
        font-size: 20px;
index bbaa96b9ef10c2c1d2ec0914483aefa43ccd6ffd..babfc2c5a8ace6b07e7a72cf65d58c42304a9661 100755 (executable)
@@ -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'] .= '<link rel="stylesheet"  type="text/css" href="' . $a->get_baseurl() . '/addon/yourls/yourls.css' . '" media="all" />' . "\r\n";
+       $a->page['htmlhead'] .= '<link rel="stylesheet"  type="text/css" href="' . $a->get_baseurl() . '/addon/yourls/yourls.css' . '" media="all" />' . "\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 .= '<div class="settings-block">';
-    $s .= '<h3>' . t('YourLS Settings') . '</h3>';
-    $s .= '<div id="yourls-url-wrapper">';
+       $s .= '<div class="settings-block">';
+       $s .= '<h3>' . t('YourLS Settings') . '</h3>';
+       $s .= '<div id="yourls-url-wrapper">';
        $s .= '<label id="yourls-url-label" for="yourls-url">' . t('URL: http://') . '</label>';
-    $s .= '<input id="yourls-url" type="text" name="yourls_url" value="' . $yourls_url .'" />';
-    $s .= '</div><div class="clear"></div>';
+       $s .= '<input id="yourls-url" type="text" name="yourls_url" value="' . $yourls_url .'" />';
+       $s .= '</div><div class="clear"></div>';
 
-    $s .= '<div id="yourls-username-wrapper">';
-    $s .= '<label id="yourls-username-label" for="yourls-username">' . t('Username:') . '</label>';
-    $s .= '<input id="yourls-username" type="text" name="yourls_username" value="' . $yourls_username .'" />';
-    $s .= '</div><div class="clear"></div>';
+       $s .= '<div id="yourls-username-wrapper">';
+       $s .= '<label id="yourls-username-label" for="yourls-username">' . t('Username:') . '</label>';
+       $s .= '<input id="yourls-username" type="text" name="yourls_username" value="' . $yourls_username .'" />';
+       $s .= '</div><div class="clear"></div>';
 
-    $s .= '<div id="yourls-password-wrapper">';
-    $s .= '<label id="yourls-password-label" for="yourls-password">' . t('Password:') . '</label>';
-    $s .= '<input id="yourls-password" type="password" name="yourls_password" value="' . $yourls_password .'" />';
-    $s .= '</div><div class="clear"></div>';
+       $s .= '<div id="yourls-password-wrapper">';
+       $s .= '<label id="yourls-password-label" for="yourls-password">' . t('Password:') . '</label>';
+       $s .= '<input id="yourls-password" type="password" name="yourls_password" value="' . $yourls_password .'" />';
+       $s .= '</div><div class="clear"></div>';
 
        $s .= '<div id="yourls-ssl-wrapper">';
-    $s .= '<label id="yourls-ssl-label" for="yourls-ssl">' . t('Use SSL ') . '</label>';
-    $s .= '<input id="yourls-ssl" type="checkbox" name="yourls_ssl" value="1" ' . $ssl_checked . '"/>';
-    $s .= '</div><div class="clear"></div>';
+       $s .= '<label id="yourls-ssl-label" for="yourls-ssl">' . t('Use SSL ') . '</label>';
+       $s .= '<input id="yourls-ssl" type="checkbox" name="yourls_ssl" value="1" ' . $ssl_checked . '"/>';
+       $s .= '</div><div class="clear"></div>';
 
-    $s .= '<div class="settings-submit-wrapper" ><input type="submit" id="yourls-submit" name="yourls-submit" class="settings-submit" value="' . t('Submit') . '" /></div></div>';
+       $s .= '<div class="settings-submit-wrapper" ><input type="submit" id="yourls-submit" name="yourls-submit" class="settings-submit" value="' . t('Submit') . '" /></div></div>';
 
        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);
        }
 }