Archived
1
0

Database refactoring and improving blog comments, blog post history and more

This commit is contained in:
Marcel
2019-01-08 22:42:54 +01:00
parent 56aed78b00
commit 7f887a99b0
67 changed files with 3076 additions and 1755 deletions

View File

@@ -49,8 +49,8 @@
<form method="post" enctype="multipart/form-data">
<!-- Username -->
<div class="form-group">
<label for="username">Nutzername</label>
<input name="username" id="username" class="form-control"
<label for="displayname">Nutzername</label>
<input name="displayname" id="displayname" class="form-control"
value="<?= isset($data['displayname']) ? $data['displayname'] : '' ?>">
<span class="error-message" id="usernameErrorLength">
<b>Dein Nutzername ist zu kurz!</b> Er muss mindestens 4 Zeichen lang sein
@@ -1093,26 +1093,24 @@
</div>
<!-- Bio -->
<div class="form-group">
<label for="biography">Profilbeschreibung/Biographie</label>
<textarea class="form-control" name="biography" id="biography">
<?= isset($data['about']) ? $data['about'] : "" ?>
</textarea>
<label for="about">Profilbeschreibung/Biographie</label>
<textarea class="form-control" name="about" id="about"><?= isset($data['about']) ? $data['about'] : "" ?></textarea>
</div>
<!-- Avatar -->
<div class="form-group">
<label for="avatar">Avatar</label>
<?php if (isset($data['profile_picture']) || $data['profile_picture'] != ""): ?>
<?php if (isset($data['profilePicture']) || $data['profilePicture'] != ""): ?>
<img class="img-fluid img-thumbnail picture-preview d-block"
src="<?= $data['profile_picture'] ?>">
src="<?= $data['profilePicture'] ?>">
<?php endif; ?>
<input type="file" name="avatar" id="avatar">
</div>
<!-- Header -->
<div class="form-group">
<label for="header">Header</label>
<?php if (isset($data['header_image']) || $data['header_image'] != ""): ?>
<?php if (isset($data['headerImage']) || $data['headerImage'] != ""): ?>
<img class="img-fluid img-thumbnail picture-preview d-block"
src="<?= $data['header_image'] ?>">
src="<?= $data['headerImage'] ?>">
<?php endif; ?>
<input type="file" name="header" id="header">
</div>

View File

@@ -2,14 +2,14 @@
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<section id="profile-header" class="container-fluid" data-type="background" data-speed="2.14"
style="background-image: url('<?= $data['header_image'] ?>?w=1920')">
style="background-image: url('<?= $data['headerImage'] ?>?w=1920')">
</section>
<div id="scroll-trigger"></div>
<section id="profile-sub-header" data-type="foreground" data-speed="10">
<div class="container">
<div class="row">
<div class="col-xs-3 col-sm-2 col-md-4 col-lg-4 profile-card profile-picture-container">
<img src="<?= $data['profile_picture'] ?>?w=300" class="img-fluid rounded-circle profile-picture">
<img src="<?= $data['profilePicture'] ?>?w=300" class="img-fluid rounded-circle profile-picture">
<?php if (isset($_SESSION['user']) && $_SESSION['user']['username'] == $data['username']): ?>
<div class="avatar-upload-overlay">
<i class="fa fa-upload"></i>

View File

@@ -7,8 +7,8 @@ $dateFollowing = strtotime($data['followedSince']);
?>
<li>
<a href="<?= base_url('user/' . $data['username']) ?>">
<div style="background-image: url(<?= $data['header_image'] ?>)" class="header-image"></div>
<img src="<?= $data['profile_picture'] ?>" alt="" class="img-fluid rounded-circle profile-picture">
<div style="background-image: url(<?= $data['headerImage'] ?>)" class="header-image"></div>
<img src="<?= $data['profilePicture'] ?>" alt="" class="img-fluid rounded-circle profile-picture">
<div class="user-card-content">
<h3><?= $data['displayname'] ?></h3>
<small><?= $data['followerCount'] ?> Follower | folgt

View File

@@ -6,10 +6,10 @@
<?php endif; ?>
<div class="card">
<a href="<?= base_url('user/' . $username) ?>">
<img src="<?= $header_image ?>?w=350" class="card-img-top" alt="Header Image">
<img src="<?= $headerImage ?>?w=350" class="card-img-top" alt="Header Image">
</a>
<a href="<?= base_url('user/' . $username) ?>">
<img src="<?= $profile_picture ?>?w=100" class="img-fluid rounded-circle card-profile-picture" alt="Profile Picture">
<img src="<?= $profilePicture ?>?w=100" class="img-fluid rounded-circle card-profile-picture" alt="Profile Picture">
</a>
<div class="card-body">
<a href="<?= base_url('user/' . $username) ?>">