gpluspost/tumblr: Some small optical changes to the settings of the connectors
authorMichael Vogel <icarus@dabo.de>
Thu, 3 Oct 2013 12:14:26 +0000 (14:14 +0200)
committerMichael Vogel <icarus@dabo.de>
Thu, 3 Oct 2013 12:14:26 +0000 (14:14 +0200)
gpluspost/gpluspost.css [new file with mode: 0755]
gpluspost/gpluspost.php
tumblr/tumblr.css
tumblr/tumblr.php

diff --git a/gpluspost/gpluspost.css b/gpluspost/gpluspost.css
new file mode 100755 (executable)
index 0000000..a9bfb2b
--- /dev/null
@@ -0,0 +1,15 @@
+
+#gpluspost-enable-label, #gpluspost-bydefault-label, #gpluspost-noloopprevention-label, #gpluspost-skipwithoutlink-label {
+       float: left;
+       width: 200px;
+       margin-top: 10px;
+}
+
+#gpluspost-checkbox, #gpluspost-bydefault, #gpluspost-noloopprevention, #gpluspost-skipwithoutlink {
+       float: left;
+       margin-top: 10px;
+}
+
+#gpluspost-submit {
+       margin-top: 15px;
+}
index dae59ef..0880a42 100644 (file)
@@ -42,6 +42,10 @@ function gpluspost_settings(&$a,&$s) {
        if(! local_user())
                return;
 
+       /* 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/gpluspost/gpluspost.css' . '" media="all" />' . "\r\n";
+
        $enabled = get_pconfig(local_user(),'gpluspost','post');
        $checked = (($enabled) ? ' checked="checked" ' : '');
 
@@ -79,8 +83,8 @@ function gpluspost_settings(&$a,&$s) {
        /* provide a submit button */
 
        $s .= '<div class="settings-submit-wrapper" ><input type="submit" id="gpluspost-submit" name="gpluspost-submit" class="settings-submit" value="' . t('Submit') . '" /></div>';
-       $s .= 'Register an account at <a href="https://hootsuite.com">Hootsuite</a>, add your G+ page and add the feed-url there.<br />';
-       $s .= 'Feed-url: '.$a->get_baseurl().'/gpluspost/'.urlencode($a->user["nickname"]).'</div>';
+       $s .= '<p>Register an account at <a href="https://hootsuite.com">Hootsuite</a>, add your G+ page and add the feed-url there.<br />';
+       $s .= 'Feed-url: '.$a->get_baseurl().'/gpluspost/'.urlencode($a->user["nickname"]).'</p></div>';
 }
 
 function gpluspost_settings_post(&$a,&$b) {
index bdb3904..c76fb61 100755 (executable)
@@ -1,11 +1,11 @@
 
-#tumblr-enable-label, #tumblr-username-label, #tumblr-password-label, #tumblr-bydefault-label {
+#tumblr-enable-label, #tumblr-username-label, #tumblr-page-label, #tumblr-bydefault-label {
        float: left;
        width: 200px;
        margin-top: 10px;
 }
 
-#tumblr-checkbox, #tumblr-username, #tumblr-password, #tumblr-bydefault {
+#tumblr-checkbox, #tumblr-username, #tumblr-page, #tumblr-bydefault {
        float: left;
        margin-top: 10px;
 }
index 4bbae8e..3500403 100755 (executable)
@@ -201,7 +201,7 @@ function tumblr_settings(&$a,&$s) {
     $oauth_token = get_pconfig(local_user(), "tumblr", "oauth_token");
     $oauth_token_secret = get_pconfig(local_user(), "tumblr", "oauth_token_secret");
 
-    $s .= '<div id="tumblr-password-wrapper">';
+    $s .= '<div id="tumblr-page-wrapper">';
     if (($oauth_token != "") and ($oauth_token_secret != "")) {
 
        $page = get_pconfig(local_user(),'tumblr','page');
@@ -214,7 +214,8 @@ function tumblr_settings(&$a,&$s) {
 
        $blogs = array();
 
-       $s .= t("Post to page:")."<select name='tumblr_page'>";
+       $s .= '<label id="tumblr-page-label" for="tumblr-page">' . t('Post to page:') . '</label>';
+       $s .= '<select name="tumblr_page" id="tumblr-page">';
        foreach($userinfo->response->user->blogs as $blog) {
                $blogurl = substr(str_replace(array("http://", "https://"), array("", ""), $blog->url), 0, -1);
                if ($page == $blogurl)