290420 New theme, personal settings and bugfixes

This commit is contained in:
Daisuke
2020-04-29 12:29:25 -05:00
parent 16e39ffbe8
commit 687ddc7068
48 changed files with 1986 additions and 369 deletions

View File

@ -3,11 +3,39 @@
<div class='post' style='text-align:left;'>
<div style='padding:15px; width:90%; text-align:left; display:inline-block;' id="settings">
<h1><span class='fontello' style='font-size:inherit;'>&#xe82e;</span> Settings</h1>
<form method='GET'>
<form method='post' enctype="multipart/form-data">
<input type='hidden' name='action' value='settings'>
<br>
<fieldset style='width:100%'>
<?php if ($logedin): ?>
<fieldset>
<legend>Account</legend>
<h2>Username</h2>
<div class='setting'>
<input type='text' name='username' value='<?php echo $info['display_name']; ?>'>
</div>
<h2>Bio</h2>
<div class='setting'>
<textarea name='bio' style='width:85%; height:100px'><?php
echo trim(strip_tags(str_replace("<br/>","\n",$info['note'])));
?></textarea>
</div>
<h2>Avatar</h2>
<div class='setting'>
<div class='avatar' style='height:80px; background-image:url("<?php echo $info['avatar']; ?>"); background-size:80px; margin-top:0px !important; margin-left:0px !important;'></div><input type='file' name='avatar'>
</div>
<div style='clear:both;'></div>
<h2>Header</h2>
<div class='setting' style='clear:both;'>
<div style='height:150px; width:300px; max-width:85%; background-image:url("<?php echo $info['header']; ?>"); background-size:cover; background-repeat: no-repeat; margin-top:0px !important; margin-left:0px !important;'></div><input type='file' name='header'>
</div>
</fieldset>
<?php endif; ?>
<fieldset>
<legend>Timeline</legend>
<?php if ($logedin): ?>
<h2>Show replies</h2>
<div class='setting'>
<select name="replies">
@ -15,7 +43,7 @@
<option value="off" <?php echo ($user_settings['replies'] == 'off' ? "selected" : ""); ?>>Only to people i follow</option>
</select>
</div>
<?php endif; ?>
<h2>Show text-only posts</h2>
<div class='setting'>
<input type='radio' name='text' id='textOn' value='on' style='display:none;' <?php echo ($user_settings['text'] == 'on' ? "checked" : ""); ?>>
@ -35,7 +63,7 @@
<h2>Muted words</h2>
<span>One per line</span>
<div class='setting'>
<textarea name='mtwords' style='width:300px'><?php
<textarea name='mtwords' style='width:85%;'><?php
foreach($user_settings['mtwords'] as $word){
echo (empty($word) ? "" : trim($word)."\n");
}
@ -43,7 +71,7 @@
</div>
</fieldset>
<fieldset style='width:100%'>
<fieldset>
<legend>Attachments</legend>
<h2>Hide Attachments, show a link instead.</h2>
<div class='setting'>
@ -72,7 +100,7 @@
</div>
</fieldset>
<fieldset style='width:100%'>
<fieldset>
<legend>User Interface</legend>
<h2>Theme.</h2>
<select name='theme' onChange='themecheck(this)'>
@ -107,7 +135,7 @@
</fieldset>
<br><br>
<br><br>
<input type="submit" value="Save" id="send" onClick='return false;'>
<input type="submit" value="Save" id="send">
</form>
</div>
</div>

View File

@ -293,7 +293,7 @@ if ((!isset($thread[0]['id']) && !empty($thread)) || !is_array($thread)) {
/* the code of the post footer (date, visibility and like/reblog buttons */
$post['footer'] = "<div style='float:left;'>
<a style='text-decoration:none;' class='ldr postAge' id='".strtotime($elem['created_at'])."' target='_blank' href='?thread=" . $elem['id'] . "&instance=$srv" . "' title='".gmdate("d/m/y H:i", strtotime($elem['created_at']))."'>" .time_elapsed_string($elem['created_at']) . "</a> - <span class='fontello'>" . $$elem['visibility'] . " </span>
<a style='text-decoration:none;' class='ldr postAge' id='".strtotime($elem['created_at'])."' target='_blank' href='?thread=" . $elem['id'] . "' title='".gmdate("d/m/y H:i", strtotime($elem['created_at']))."'>" .time_elapsed_string($elem['created_at']) . "</a> - <span class='fontello ".$elem['visibility']."'> </span>
</div>
<div class='post_buttons' id='" . $elem['id'] . "'>
" . ($logedin ? "<div class='felem'><a onClick='return false' class='replyform' href='?thread=" . $elem['id'] . "' style='font-family:fontello; vertical-align:middle;' alt='reply'>&#xf112;</a></div>" : "") . "