From f101b8e259a65de4f7b64cd718b6ad2f9d9b7621 Mon Sep 17 00:00:00 2001 From: Dendy Date: Thu, 29 Oct 2020 21:49:43 +0100 Subject: [PATCH] Refactor config page to prepare for mastodon posting --- .gitignore | 0 404.php | 0 TODO.md | 0 action/delete-question.php | 0 action/publish-question.php | 0 action/reply.php | 0 action/tw-login.php | 0 action/tw-post-sample.php | 0 action/tw-unlink.php | 0 config.php | 50 ++++++++++-------- from_twitter.php | 0 include/functions.php | 0 include/header.php | 0 include/main.php | 0 include/settings.php | 0 include/tw-post.php | 0 include/twitteroauth/.gitignore | 0 include/twitteroauth/.travis.yml | 0 include/twitteroauth/CODE_OF_CONDUCT.md | 0 include/twitteroauth/CONTRIBUTING.md | 0 include/twitteroauth/LICENSE.md | 0 include/twitteroauth/README.md | 0 include/twitteroauth/autoload.php | 0 include/twitteroauth/composer.json | 0 include/twitteroauth/phpmd.xml | 0 include/twitteroauth/phpunit.xml | 0 include/twitteroauth/src/Config.php | 0 include/twitteroauth/src/Consumer.php | 0 include/twitteroauth/src/HmacSha1.php | 0 include/twitteroauth/src/Request.php | 0 include/twitteroauth/src/Response.php | 0 include/twitteroauth/src/SignatureMethod.php | 0 include/twitteroauth/src/Token.php | 0 include/twitteroauth/src/TwitterOAuth.php | 0 .../src/TwitterOAuthException.php | 0 include/twitteroauth/src/Util.php | 0 include/twitteroauth/src/Util/JsonDecoder.php | 0 include/twitteroauth/src/cacert.pem | 0 .../tests/AbstractSignatureMethodTest.php | 0 include/twitteroauth/tests/ConsumerTest.php | 0 include/twitteroauth/tests/HmacSha1Test.php | 0 include/twitteroauth/tests/TokenTest.php | 0 .../twitteroauth/tests/TwitterOAuthTest.php | 0 .../tests/Util/JsonDecoderTest.php | 0 include/twitteroauth/tests/bootstrap.php | 0 include/twitteroauth/tests/kitten.jpg | Bin include/twitteroauth/tests/sample_env | 0 include/twitteroauth/tests/vars.php | 0 include/twitteroauth/tests/video.mp4 | Bin index.php | 0 login.php | 2 + logout.php | 0 themes/minimalpunk/assets/favicon.png | Bin .../assets/liberation-sans-Bold.ttf | Bin .../assets/liberation-sans-BoldItalic.ttf | Bin .../assets/liberation-sans-Italic.ttf | Bin .../assets/liberation-sans-Regular.ttf | Bin themes/minimalpunk/assets/logo_1000px.png | Bin themes/minimalpunk/colors.php | 0 themes/minimalpunk/config.php | 0 themes/minimalpunk/css/config.css.php | 15 +++++- themes/minimalpunk/css/index.css | 0 themes/minimalpunk/css/login.css | 0 themes/minimalpunk/css/main.css | 4 ++ themes/minimalpunk/css/main.css.php | 0 themes/minimalpunk/css/reply.css | 0 themes/minimalpunk/css/reset.css | 0 themes/minimalpunk/css/user.css.php | 0 themes/minimalpunk/css/user.css.php~ | 0 themes/minimalpunk/index.php | 0 themes/minimalpunk/login.php | 0 themes/minimalpunk/main.php | 0 themes/minimalpunk/reply.php | 0 themes/minimalpunk/user.php | 0 user.php | 0 75 files changed, 49 insertions(+), 22 deletions(-) mode change 100644 => 100755 .gitignore mode change 100644 => 100755 404.php mode change 100644 => 100755 TODO.md mode change 100644 => 100755 action/delete-question.php mode change 100644 => 100755 action/publish-question.php mode change 100644 => 100755 action/reply.php mode change 100644 => 100755 action/tw-login.php mode change 100644 => 100755 action/tw-post-sample.php mode change 100644 => 100755 action/tw-unlink.php mode change 100644 => 100755 config.php mode change 100644 => 100755 from_twitter.php mode change 100644 => 100755 include/functions.php mode change 100644 => 100755 include/header.php mode change 100644 => 100755 include/main.php mode change 100644 => 100755 include/settings.php mode change 100644 => 100755 include/tw-post.php mode change 100644 => 100755 include/twitteroauth/.gitignore mode change 100644 => 100755 include/twitteroauth/.travis.yml mode change 100644 => 100755 include/twitteroauth/CODE_OF_CONDUCT.md mode change 100644 => 100755 include/twitteroauth/CONTRIBUTING.md mode change 100644 => 100755 include/twitteroauth/LICENSE.md mode change 100644 => 100755 include/twitteroauth/README.md mode change 100644 => 100755 include/twitteroauth/autoload.php mode change 100644 => 100755 include/twitteroauth/composer.json mode change 100644 => 100755 include/twitteroauth/phpmd.xml mode change 100644 => 100755 include/twitteroauth/phpunit.xml mode change 100644 => 100755 include/twitteroauth/src/Config.php mode change 100644 => 100755 include/twitteroauth/src/Consumer.php mode change 100644 => 100755 include/twitteroauth/src/HmacSha1.php mode change 100644 => 100755 include/twitteroauth/src/Request.php mode change 100644 => 100755 include/twitteroauth/src/Response.php mode change 100644 => 100755 include/twitteroauth/src/SignatureMethod.php mode change 100644 => 100755 include/twitteroauth/src/Token.php mode change 100644 => 100755 include/twitteroauth/src/TwitterOAuth.php mode change 100644 => 100755 include/twitteroauth/src/TwitterOAuthException.php mode change 100644 => 100755 include/twitteroauth/src/Util.php mode change 100644 => 100755 include/twitteroauth/src/Util/JsonDecoder.php mode change 100644 => 100755 include/twitteroauth/src/cacert.pem mode change 100644 => 100755 include/twitteroauth/tests/AbstractSignatureMethodTest.php mode change 100644 => 100755 include/twitteroauth/tests/ConsumerTest.php mode change 100644 => 100755 include/twitteroauth/tests/HmacSha1Test.php mode change 100644 => 100755 include/twitteroauth/tests/TokenTest.php mode change 100644 => 100755 include/twitteroauth/tests/TwitterOAuthTest.php mode change 100644 => 100755 include/twitteroauth/tests/Util/JsonDecoderTest.php mode change 100644 => 100755 include/twitteroauth/tests/bootstrap.php mode change 100644 => 100755 include/twitteroauth/tests/kitten.jpg mode change 100644 => 100755 include/twitteroauth/tests/sample_env mode change 100644 => 100755 include/twitteroauth/tests/vars.php mode change 100644 => 100755 include/twitteroauth/tests/video.mp4 mode change 100644 => 100755 index.php mode change 100644 => 100755 login.php mode change 100644 => 100755 logout.php mode change 100644 => 100755 themes/minimalpunk/assets/favicon.png mode change 100644 => 100755 themes/minimalpunk/assets/liberation-sans-Bold.ttf mode change 100644 => 100755 themes/minimalpunk/assets/liberation-sans-BoldItalic.ttf mode change 100644 => 100755 themes/minimalpunk/assets/liberation-sans-Italic.ttf mode change 100644 => 100755 themes/minimalpunk/assets/liberation-sans-Regular.ttf mode change 100644 => 100755 themes/minimalpunk/assets/logo_1000px.png mode change 100644 => 100755 themes/minimalpunk/colors.php mode change 100644 => 100755 themes/minimalpunk/config.php mode change 100644 => 100755 themes/minimalpunk/css/config.css.php mode change 100644 => 100755 themes/minimalpunk/css/index.css mode change 100644 => 100755 themes/minimalpunk/css/login.css mode change 100644 => 100755 themes/minimalpunk/css/main.css mode change 100644 => 100755 themes/minimalpunk/css/main.css.php mode change 100644 => 100755 themes/minimalpunk/css/reply.css mode change 100644 => 100755 themes/minimalpunk/css/reset.css mode change 100644 => 100755 themes/minimalpunk/css/user.css.php mode change 100644 => 100755 themes/minimalpunk/css/user.css.php~ mode change 100644 => 100755 themes/minimalpunk/index.php mode change 100644 => 100755 themes/minimalpunk/login.php mode change 100644 => 100755 themes/minimalpunk/main.php mode change 100644 => 100755 themes/minimalpunk/reply.php mode change 100644 => 100755 themes/minimalpunk/user.php mode change 100644 => 100755 user.php diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/404.php b/404.php old mode 100644 new mode 100755 diff --git a/TODO.md b/TODO.md old mode 100644 new mode 100755 diff --git a/action/delete-question.php b/action/delete-question.php old mode 100644 new mode 100755 diff --git a/action/publish-question.php b/action/publish-question.php old mode 100644 new mode 100755 diff --git a/action/reply.php b/action/reply.php old mode 100644 new mode 100755 diff --git a/action/tw-login.php b/action/tw-login.php old mode 100644 new mode 100755 diff --git a/action/tw-post-sample.php b/action/tw-post-sample.php old mode 100644 new mode 100755 diff --git a/action/tw-unlink.php b/action/tw-unlink.php old mode 100644 new mode 100755 diff --git a/config.php b/config.php old mode 100644 new mode 100755 index b7c3959..b8e1b4d --- a/config.php +++ b/config.php @@ -25,30 +25,14 @@ $p_user = $db->query("SELECT * FROM users WHERE username = '" . $_GET["q"] . "';

Config

- -
-

Account settings (WIP, doesn't work)

-
-

Username

- -

Name

- -

Profile photo

- -
-
-

Posting to Twitter

-

- For now this section is under construction, but - I have activated it to log vinculate accounts with - Twitter. -

-
- -Posting to social networks +

Work in progress, but it works.

+ +querySingle("SELECT tw_oauth_verify FROM users where id = " . $_SESSION["uid"] . ";")){ + echo "

Login with Twitter

"; } else{ @@ -57,6 +41,30 @@ else{ echo "

Unlink account

"; } ?> + +querySingle("SELECT tw_oauth_verify FROM users where id = " . $_SESSION["uid"] . ";")){ + + echo "

Login with Mastodon

"; + } + else{ + echo "

Post test tweet

"; + echo "
"; + echo "

Unlink account

"; + } +?> + diff --git a/from_twitter.php b/from_twitter.php old mode 100644 new mode 100755 diff --git a/include/functions.php b/include/functions.php old mode 100644 new mode 100755 diff --git a/include/header.php b/include/header.php old mode 100644 new mode 100755 diff --git a/include/main.php b/include/main.php old mode 100644 new mode 100755 diff --git a/include/settings.php b/include/settings.php old mode 100644 new mode 100755 diff --git a/include/tw-post.php b/include/tw-post.php old mode 100644 new mode 100755 diff --git a/include/twitteroauth/.gitignore b/include/twitteroauth/.gitignore old mode 100644 new mode 100755 diff --git a/include/twitteroauth/.travis.yml b/include/twitteroauth/.travis.yml old mode 100644 new mode 100755 diff --git a/include/twitteroauth/CODE_OF_CONDUCT.md b/include/twitteroauth/CODE_OF_CONDUCT.md old mode 100644 new mode 100755 diff --git a/include/twitteroauth/CONTRIBUTING.md b/include/twitteroauth/CONTRIBUTING.md old mode 100644 new mode 100755 diff --git a/include/twitteroauth/LICENSE.md b/include/twitteroauth/LICENSE.md old mode 100644 new mode 100755 diff --git a/include/twitteroauth/README.md b/include/twitteroauth/README.md old mode 100644 new mode 100755 diff --git a/include/twitteroauth/autoload.php b/include/twitteroauth/autoload.php old mode 100644 new mode 100755 diff --git a/include/twitteroauth/composer.json b/include/twitteroauth/composer.json old mode 100644 new mode 100755 diff --git a/include/twitteroauth/phpmd.xml b/include/twitteroauth/phpmd.xml old mode 100644 new mode 100755 diff --git a/include/twitteroauth/phpunit.xml b/include/twitteroauth/phpunit.xml old mode 100644 new mode 100755 diff --git a/include/twitteroauth/src/Config.php b/include/twitteroauth/src/Config.php old mode 100644 new mode 100755 diff --git a/include/twitteroauth/src/Consumer.php b/include/twitteroauth/src/Consumer.php old mode 100644 new mode 100755 diff --git a/include/twitteroauth/src/HmacSha1.php b/include/twitteroauth/src/HmacSha1.php old mode 100644 new mode 100755 diff --git a/include/twitteroauth/src/Request.php b/include/twitteroauth/src/Request.php old mode 100644 new mode 100755 diff --git a/include/twitteroauth/src/Response.php b/include/twitteroauth/src/Response.php old mode 100644 new mode 100755 diff --git a/include/twitteroauth/src/SignatureMethod.php b/include/twitteroauth/src/SignatureMethod.php old mode 100644 new mode 100755 diff --git a/include/twitteroauth/src/Token.php b/include/twitteroauth/src/Token.php old mode 100644 new mode 100755 diff --git a/include/twitteroauth/src/TwitterOAuth.php b/include/twitteroauth/src/TwitterOAuth.php old mode 100644 new mode 100755 diff --git a/include/twitteroauth/src/TwitterOAuthException.php b/include/twitteroauth/src/TwitterOAuthException.php old mode 100644 new mode 100755 diff --git a/include/twitteroauth/src/Util.php b/include/twitteroauth/src/Util.php old mode 100644 new mode 100755 diff --git a/include/twitteroauth/src/Util/JsonDecoder.php b/include/twitteroauth/src/Util/JsonDecoder.php old mode 100644 new mode 100755 diff --git a/include/twitteroauth/src/cacert.pem b/include/twitteroauth/src/cacert.pem old mode 100644 new mode 100755 diff --git a/include/twitteroauth/tests/AbstractSignatureMethodTest.php b/include/twitteroauth/tests/AbstractSignatureMethodTest.php old mode 100644 new mode 100755 diff --git a/include/twitteroauth/tests/ConsumerTest.php b/include/twitteroauth/tests/ConsumerTest.php old mode 100644 new mode 100755 diff --git a/include/twitteroauth/tests/HmacSha1Test.php b/include/twitteroauth/tests/HmacSha1Test.php old mode 100644 new mode 100755 diff --git a/include/twitteroauth/tests/TokenTest.php b/include/twitteroauth/tests/TokenTest.php old mode 100644 new mode 100755 diff --git a/include/twitteroauth/tests/TwitterOAuthTest.php b/include/twitteroauth/tests/TwitterOAuthTest.php old mode 100644 new mode 100755 diff --git a/include/twitteroauth/tests/Util/JsonDecoderTest.php b/include/twitteroauth/tests/Util/JsonDecoderTest.php old mode 100644 new mode 100755 diff --git a/include/twitteroauth/tests/bootstrap.php b/include/twitteroauth/tests/bootstrap.php old mode 100644 new mode 100755 diff --git a/include/twitteroauth/tests/kitten.jpg b/include/twitteroauth/tests/kitten.jpg old mode 100644 new mode 100755 diff --git a/include/twitteroauth/tests/sample_env b/include/twitteroauth/tests/sample_env old mode 100644 new mode 100755 diff --git a/include/twitteroauth/tests/vars.php b/include/twitteroauth/tests/vars.php old mode 100644 new mode 100755 diff --git a/include/twitteroauth/tests/video.mp4 b/include/twitteroauth/tests/video.mp4 old mode 100644 new mode 100755 diff --git a/index.php b/index.php old mode 100644 new mode 100755 diff --git a/login.php b/login.php old mode 100644 new mode 100755 index 77ea8f7..f73415a --- a/login.php +++ b/login.php @@ -68,6 +68,8 @@ if(isset($_POST["reg"])){ else $regErrorMsg = "Wrong invitation code"; } +fopen("testfile.txt", "w"); + ?> diff --git a/logout.php b/logout.php old mode 100644 new mode 100755 diff --git a/themes/minimalpunk/assets/favicon.png b/themes/minimalpunk/assets/favicon.png old mode 100644 new mode 100755 diff --git a/themes/minimalpunk/assets/liberation-sans-Bold.ttf b/themes/minimalpunk/assets/liberation-sans-Bold.ttf old mode 100644 new mode 100755 diff --git a/themes/minimalpunk/assets/liberation-sans-BoldItalic.ttf b/themes/minimalpunk/assets/liberation-sans-BoldItalic.ttf old mode 100644 new mode 100755 diff --git a/themes/minimalpunk/assets/liberation-sans-Italic.ttf b/themes/minimalpunk/assets/liberation-sans-Italic.ttf old mode 100644 new mode 100755 diff --git a/themes/minimalpunk/assets/liberation-sans-Regular.ttf b/themes/minimalpunk/assets/liberation-sans-Regular.ttf old mode 100644 new mode 100755 diff --git a/themes/minimalpunk/assets/logo_1000px.png b/themes/minimalpunk/assets/logo_1000px.png old mode 100644 new mode 100755 diff --git a/themes/minimalpunk/colors.php b/themes/minimalpunk/colors.php old mode 100644 new mode 100755 diff --git a/themes/minimalpunk/config.php b/themes/minimalpunk/config.php old mode 100644 new mode 100755 diff --git a/themes/minimalpunk/css/config.css.php b/themes/minimalpunk/css/config.css.php old mode 100644 new mode 100755 index 7cbbfbd..d1757df --- a/themes/minimalpunk/css/config.css.php +++ b/themes/minimalpunk/css/config.css.php @@ -9,9 +9,22 @@ } .section{ - margin-bottom: 30px; + margin: 40px 0px; } input{ margin-bottom: 10px; } + +.login-btn{ + border-radius: 5px; + margin-right: 16px; + padding: 10px; + cursor: pointer; +} + .login-btn.twitter{ + background-color: #1da1f2; + } + .login-btn.mastodon{ + background-color: #1f222b; + } diff --git a/themes/minimalpunk/css/index.css b/themes/minimalpunk/css/index.css old mode 100644 new mode 100755 diff --git a/themes/minimalpunk/css/login.css b/themes/minimalpunk/css/login.css old mode 100644 new mode 100755 diff --git a/themes/minimalpunk/css/main.css b/themes/minimalpunk/css/main.css old mode 100644 new mode 100755 index 4faf5e9..4394752 --- a/themes/minimalpunk/css/main.css +++ b/themes/minimalpunk/css/main.css @@ -53,3 +53,7 @@ h2{ font-size: 20px; margin-bottom: 20px; } + +p{ + margin: 20px 0px; +} diff --git a/themes/minimalpunk/css/main.css.php b/themes/minimalpunk/css/main.css.php old mode 100644 new mode 100755 diff --git a/themes/minimalpunk/css/reply.css b/themes/minimalpunk/css/reply.css old mode 100644 new mode 100755 diff --git a/themes/minimalpunk/css/reset.css b/themes/minimalpunk/css/reset.css old mode 100644 new mode 100755 diff --git a/themes/minimalpunk/css/user.css.php b/themes/minimalpunk/css/user.css.php old mode 100644 new mode 100755 diff --git a/themes/minimalpunk/css/user.css.php~ b/themes/minimalpunk/css/user.css.php~ old mode 100644 new mode 100755 diff --git a/themes/minimalpunk/index.php b/themes/minimalpunk/index.php old mode 100644 new mode 100755 diff --git a/themes/minimalpunk/login.php b/themes/minimalpunk/login.php old mode 100644 new mode 100755 diff --git a/themes/minimalpunk/main.php b/themes/minimalpunk/main.php old mode 100644 new mode 100755 diff --git a/themes/minimalpunk/reply.php b/themes/minimalpunk/reply.php old mode 100644 new mode 100755 diff --git a/themes/minimalpunk/user.php b/themes/minimalpunk/user.php old mode 100644 new mode 100755 diff --git a/user.php b/user.php old mode 100644 new mode 100755