Archived
1
0

Initial commit as of 2018-10-16

This commit is contained in:
Marcel
2018-10-16 18:28:42 +02:00
commit 29d7c2ffdc
3601 changed files with 358427 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<li class="blog-post-item">
<div class="well comment-well">
<a href="<?= base_url('blog/post/' . $post['postUrl']) ?>" target="_blank">
<div class="entry-image" style="background-image:url(<?= $post['postImage'] ?>?w=150"></div>
</a>
<div class="content">
<h3>
<a href="<?= base_url('blog/post/' . $post['postUrl']) ?>" target="_blank">
<?= $post['postTitle'] ?>
</a>
<small><?= lang('person_by') ?> <a
href="<?= base_url('user/' . $data['username']) ?>"
target="_blank"><?= $data['displayname'] ?></a>
/ <?= date("d.m.Y H:i \\U\\h\\r ", strtotime($post['postPublishDate'])) ?>
</small>
</h3>
<p class="comment"><?= $post['postDesc'] ?></p>
</div>
</div>
</li>

View File

@@ -0,0 +1,47 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
use Coduo\PHPHumanizer\DateTimeHumanizer;
?>
<li>
<div class="well comment-well">
<div class="post-non-content">
<a href="<?= base_url('user/' . $data['username']) ?>" target="_blank">
<img src="<?= $data['profile_picture'] ?>?w=100" class="img-fluid">
</a>
</div>
<div class="content-container">
<div class="content">
<h3>
<a href="<?= base_url('user/' . $data['username']) ?>" target="_blank">
<?= $data['displayname'] ?>
</a>
<small>
<?php
$locale = isset($_SESSION['site_lang']) ? $_SESSION['site_lang'] : 'en';
$date_created = strtotime($c['date_created']);
echo DateTimeHumanizer::difference(new \DateTime(), new \DateTime("@$date_created"), $locale);
?>
unter
<a href="<?= base_url('blog/post/' . $c['postUrl']) ?>">
<?= $c['postTitle'] ?>
</a>
</small>
</h3>
<p class="comment"><?= $c['comment'] ?></p>
</div>
</div>
<div class="action-btns">
<a href="#" class="action-btn" data-toggle="tooltip" data-placement="top" title="Antworten">
<i class="far fa-comment"></i>
</a>
<a href="#" class="action-btn" data-toggle="tooltip" data-placement="top" title="Gefällt mir">
<i class="far fa-heart"></i>
</a>
<a href="#" class="action-btn" data-toggle="tooltip" data-placement="top" title="Mehr Optionen">
<i class="fa fa-ellipsis-h"></i>
</a>
</div>
</div>
</li>

View File

@@ -0,0 +1,21 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
$this->load->view('network/user/profile_page_header', ['active' => 'blog-posts']);
?>
<section id="profile-content" data-type="foreground" data-speed="10">
<div class="container">
<div class="row">
<?php $this->load->view('network/user/user_profile_card', ['data' => $data]) ?>
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8" id="profile-content-container">
<h1><?= lang('profile_all_blog_posts') ?></h1>
<div class="post-container">
<ul class="comment-list">
</ul>
<i class="fa fa-cog fa-spin fa-5x loading-spinner"></i>
</div>
</div>
</div>
</div>
</section>

View File

@@ -0,0 +1,46 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<script>
var offset = 0;
var amount = 10;
var firstRun = true;
var itemsLeft = true;
var running = false;
loadEntries();
function loadEntries() {
if(!running && itemsLeft) {
$.ajax({
url: 'http://192.168.178.39/user/getBlogPosts',
data: {
user: <?= $data['ID'] ?>,
amount: amount,
offset: offset
},
beforeSend: function () {
$('.loading-spinner').show();
running = true;
},
success: function (data) {
$('.loading-spinner').hide();
$('.post-container .comment-list').append(data);
offset++;
if (data === "") {
$('.post-container').append("<p>Es konnten keine weiteren Blog-Posts gefunden werden. Bitte schaue später nochmal vorbei!</p>");
itemsLeft = false;
}
firstRun = false;
running = false;
}
});
}
}
$(window).scroll(function() {
if($(document).scrollTop() + 360 + $(window).height() >= $('.comment-list').position().top + $('.comment-list').outerHeight()) {
loadEntries();
}
});
</script>

View File

@@ -0,0 +1,20 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<?php $this->load->view('network/user/profile_page_header', ['active' => 'blog-comments']); ?>
<section id="profile-content" data-type="foreground" data-speed="10">
<div class="container">
<div class="row">
<?php $this->load->view('network/user/user_profile_card', ['data' => $data]) ?>
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8" id="profile-content-container">
<h1><?= lang('profile_all_blog_comments') ?></h1>
<div class="post-container">
<ul class="comment-list">
</ul>
<i class="fa fa-cog fa-spin fa-5x loading-spinner"></i>
</div>
</div>
</div>
</div>
</section>

View File

@@ -0,0 +1,46 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<script>
var offset = 0;
var amount = 10;
var firstRun = true;
var itemsLeft = true;
var running = false;
loadEntries();
function loadEntries() {
if(!running && itemsLeft) {
$.ajax({
url: 'http://192.168.178.39/user/getComments',
data: {
user: <?= $data['ID'] ?>,
amount: amount,
offset: offset
},
beforeSend: function () {
$('.loading-spinner').show();
running = true;
},
success: function (data) {
$('.loading-spinner').hide();
$('.post-container .comment-list').append(data);
offset++;
if (data === "") {
$('.post-container').append("<p>Es konnten keine weiteren Kommentare gefunden werden. Bitte schaue später nochmal vorbei!</p>");
itemsLeft = false;
}
firstRun = false;
running = false;
}
});
}
}
$(window).scroll(function() {
if($(document).scrollTop() + 360 + $(window).height() >= $('.comment-list').position().top + $('.comment-list').outerHeight()) {
loadEntries();
}
});
</script>