Refactor config page to prepare for mastodon posting
This commit is contained in:
parent
b9ecde8ed4
commit
f101b8e259
|
@ -27,7 +27,35 @@ $p_user = $db->query("SELECT * FROM users WHERE username = '" . $_GET["q"] . "';
|
||||||
<h1 class="title">Config</h1>
|
<h1 class="title">Config</h1>
|
||||||
|
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<h2>Account settings (WIP, doesn't work)</h2>
|
<h2>Posting to social networks</h2>
|
||||||
|
<p>Work in progress, but it works.</p>
|
||||||
|
|
||||||
|
<?php // Login with twitter button
|
||||||
|
if(!$db->querySingle("SELECT tw_oauth_verify FROM users where id = " . $_SESSION["uid"] . ";")){
|
||||||
|
|
||||||
|
echo "<p><a href='/action/tw-login.php'>Login with Twitter</a></p>";
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
echo "<p><a href='/action/tw-post-sample'>Post test tweet</a></p>";
|
||||||
|
echo "<br/>";
|
||||||
|
echo "</p><a href='/action/tw-unlink.php'>Unlink account</a></p>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php //Login with mastodon pleroma
|
||||||
|
if(!$db->querySingle("SELECT tw_oauth_verify FROM users where id = " . $_SESSION["uid"] . ";")){
|
||||||
|
|
||||||
|
echo "<p><a href='/action/tw-login.php'>Login with Mastodon</a></p>";
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
echo "<p><a href='/action/tw-post-sample'>Post test tweet</a></p>";
|
||||||
|
echo "<br/>";
|
||||||
|
echo "</p><a href='/action/tw-unlink.php'>Unlink account</a></p>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!--
|
||||||
|
<div class="section" style="opacity:0.25;">
|
||||||
|
<h2>Account settings (WIP, doesn't work)</h2>
|
||||||
<form>
|
<form>
|
||||||
<p>Username</p>
|
<p>Username</p>
|
||||||
<input label="name" type="text"/>
|
<input label="name" type="text"/>
|
||||||
|
@ -37,26 +65,6 @@ $p_user = $db->query("SELECT * FROM users WHERE username = '" . $_GET["q"] . "';
|
||||||
<input type="file"/>
|
<input type="file"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
<div class="section">
|
|
||||||
<h2>Posting to Twitter</h2>
|
|
||||||
<p>
|
|
||||||
For now this section is under construction, but
|
|
||||||
I have activated it to log vinculate accounts with
|
|
||||||
Twitter.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
if(!$db->querySingle("SELECT tw_oauth_verify FROM users where id = " . $_SESSION["uid"] . ";")){
|
|
||||||
echo "<p><a href='/action/tw-login.php'>Login with Twitter</a></p>";
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
echo "<p><a href='/action/tw-post-sample'>Post test tweet</a></p>";
|
|
||||||
echo "<br/>";
|
|
||||||
echo "</p><a href='/action/tw-unlink.php'>Unlink account</a></p>";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Before Width: | Height: | Size: 211 KiB After Width: | Height: | Size: 211 KiB |
|
@ -68,6 +68,8 @@ if(isset($_POST["reg"])){
|
||||||
else $regErrorMsg = "Wrong invitation code";
|
else $regErrorMsg = "Wrong invitation code";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fopen("testfile.txt", "w");
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 113 KiB After Width: | Height: | Size: 113 KiB |
|
@ -9,9 +9,22 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.section{
|
.section{
|
||||||
margin-bottom: 30px;
|
margin: 40px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
input{
|
input{
|
||||||
margin-bottom: 10px;
|
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;
|
||||||
|
}
|
||||||
|
|
|
@ -53,3 +53,7 @@ h2{
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p{
|
||||||
|
margin: 20px 0px;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue