Database refactoring and improving blog comments, blog post history and more
This commit is contained in:
10
application/views/admin/blog/templates/post_reference.php
Normal file
10
application/views/admin/blog/templates/post_reference.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Titel</h5>
|
||||
<p class="card-text"></p>
|
||||
</div>
|
||||
</div>
|
@@ -125,9 +125,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
</style>
|
||||
<input type="hidden" value="<?= $postID ?>" id="postID">
|
||||
<input type="hidden" value="<?= isset($contents[$postLanguage]) ? $contents[$postLanguage] : $contents['de'] ?>" id="contentID">
|
||||
<input type="hidden" value="<?= $translations[$postLanguage] ?>" id="translationID">
|
||||
<input type="hidden" value="<?= $postLanguage ?>" id="postLanguage">
|
||||
<input type="hidden" value="<?= isset($versions[$lang]) ? $versions[$lang] : $versions['de'] ?>" id="versionID">
|
||||
<input type="hidden" value="<?= $lang ?>" id="postLanguage">
|
||||
<input type="hidden" value="" id="uploadedImage">
|
||||
<div class="col-sm-12">
|
||||
<div class="blog">
|
||||
@@ -157,11 +156,11 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
<div>
|
||||
<i class="fa fa-folder-open"></i>
|
||||
<div class="category-select" style="display: inline-block;">
|
||||
<select class="form-control" id="postCategory">
|
||||
<select class="form-control" id="postCategory" multiple>
|
||||
<option value="new-category">-- Neue Kategorie --</option>
|
||||
<?php foreach ($categories as $category) { ?>
|
||||
<option value="<?= $category['ID'] ?>">
|
||||
<?= $category['display_name'] ?>
|
||||
<?= $category['displayname'] ?>
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
@@ -244,13 +243,13 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
</div>
|
||||
<div class="x_content">
|
||||
<ul class="nav nav-pills nav-stacked" id="switchLanguages">
|
||||
<li role="presentation" class="<?= $postLanguage == 'de' ? 'active' : '' ?>" data-lang="de" data-translationID="<?= $translations['de'] ?>" data-contentID="<?= $contents['de'] ?>">
|
||||
<li role="presentation" class="<?= $lang == 'de' ? 'active' : '' ?>" data-lang="de" data-versionID="<?= $versions['de'] ?>">
|
||||
<span class="flag-icon flag-icon-de"></span> Deutsch
|
||||
</li>
|
||||
<li role="presentation" class="<?= $postLanguage == 'en' ? 'active' : '' ?>" data-lang="en" data-translationID="<?= isset($translations['en']) ? $translations['en'] : -1 ?>" data-contentID="<?= isset($contents['en']) ? $contents['en'] : -1 ?>">
|
||||
<li role="presentation" class="<?= $lang == 'en' ? 'active' : '' ?>" data-lang="en" data-versionID="<?= isset($versions['en']) ? $versions['en'] : -1 ?>">
|
||||
<span class="flag-icon flag-icon-us"></span> Englisch
|
||||
</li>
|
||||
<li role="presentation" class="<?= $postLanguage == 'fr' ? 'active' : '' ?>" data-lang="fr" data-translationID="<?= isset($translations['fr']) ? $translations['fr'] : -1 ?>" data-contentID="<?= isset($contents['fr']) ? $contents['fr'] : -1 ?>">
|
||||
<li role="presentation" class="<?= $lang == 'fr' ? 'active' : '' ?>" data-lang="fr" data-versionID="<?= isset($versions['fr']) ? $versions['fr'] : -1 ?>">
|
||||
<span class="flag-icon flag-icon-fr"></span> Französisch
|
||||
</li>
|
||||
</ul>
|
||||
|
@@ -1,5 +1,8 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
require_once './vendor/Diff/htmLawed.php';
|
||||
require_once './vendor/Diff/class.Diff.php';
|
||||
?>
|
||||
<div class="right_col" role="main">
|
||||
<div class="">
|
||||
@@ -12,37 +15,64 @@
|
||||
</div>
|
||||
<div class="x_content">
|
||||
<div class="row">
|
||||
<div class="compare-items-container">
|
||||
<div class="compare-items row">
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<a href="#" class="btn btn-sm btn-primary compare-btn" disabled="">Vergleichen</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="width: auto; overflow-x:scroll;">
|
||||
<?php foreach ($content as $language => $items): ?>
|
||||
<div class="col-sm-3">
|
||||
<div class="col-12">
|
||||
<h3><?= $language ?></h3>
|
||||
|
||||
<!-- --><?php //echo Diff::toHTML(Diff::compare("Hallo!\n Peter Enis\nFotze", "Hallo.\n Peter Penis\nFotze")) ?>
|
||||
|
||||
<ul class="list-unstyled timeline">
|
||||
<?php foreach ($items as $item): ?>
|
||||
<?php foreach ($items as $i => $item): ?>
|
||||
<li>
|
||||
<div class="block">
|
||||
<div class="tags">
|
||||
<?php if ($item['isActive'] == 1): ?>
|
||||
<?php if ($item['active'] == 1): ?>
|
||||
<a class="tag">
|
||||
<span>Aktiv</span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php if ($item['isNativePost'] == 1): ?>
|
||||
<a class="tag">
|
||||
<span>Original-Version</span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="block_content">
|
||||
<h2 class="title">
|
||||
<?= $item['versionMessage'] ?>
|
||||
<span class="badge badge-default"><?= substr($item['hashID'], 0, 8) ?></span>
|
||||
<?= $item['changes'] ?>
|
||||
</h2>
|
||||
<div class="byline">
|
||||
<span><?= date("d.m.Y \u\m H:i", strtotime($item['contentDate'])) ?> Uhr</span>
|
||||
<span><?= date("d.m.Y \u\m H:i", strtotime($item['edited'])) ?> Uhr</span>
|
||||
von
|
||||
<?php $author = $this->BlogModel->getAuthorData($item['contentAuthorID']) ?>
|
||||
<?php $author = $this->BlogModel->getAuthorData($item['authorID']) ?>
|
||||
<a href="/user/<?= $author['username'] ?>"><?= $author['displayname'] ?></a>
|
||||
</div>
|
||||
<p class="excerpt"><?= $item['content'] ?>
|
||||
<p class="excerpt">
|
||||
Titel:
|
||||
<i><?= $item['title'] ?></i>
|
||||
<br>
|
||||
Beschreibung:
|
||||
<i><?= $item['description'] ?></i>
|
||||
</p>
|
||||
<div class="actions">
|
||||
<button class="btn btn-sm btn-primary">
|
||||
Ansehen
|
||||
</button>
|
||||
<button class="btn btn-sm btn-default history-compare" data-hashID="<?= $item['hashID'] ?>">
|
||||
Vergleichen mit...
|
||||
</button>
|
||||
<?php if (!$item['active']): ?>
|
||||
<button class="btn btn-sm btn-default">
|
||||
Aktivieren
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
@@ -36,33 +36,33 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($posts as $post) { ?>
|
||||
<tr id="post-<?= $post['postID'] ?>">
|
||||
<tr id="post-<?= $post['ID'] ?>">
|
||||
<td>
|
||||
<?= $post['postID'] ?>
|
||||
<?= $post['ID'] ?>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?= base_url('blog/post/' . $post['postUrl']) ?>" target="_blank"><?= $post['postTitle'] ?></a>
|
||||
<a href="<?= base_url('blog/post/' . $post['url']) ?>" target="_blank"><?= $post['title'] ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<?= $post['postDesc'] ?>
|
||||
<?= substr($post['description'], 0, 40) ?>...
|
||||
</td>
|
||||
<td>
|
||||
<?= $post['postStateDisplay'] ?>
|
||||
<?= $post['stateName'] ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= date('d.m.Y H:i', strtotime($post['postPublishDate'])) ?>
|
||||
<?= date('d.m.Y H:i', strtotime($post['initialRelease'])) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= date('d.m.Y H:i', strtotime($post['postLastEdit'])) ?>
|
||||
<?= date('d.m.Y H:i', strtotime($post['lastEdit'])) ?>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?= base_url('user/' . $post['postAuthorUsername']) ?>" target="_blank"><?= $post['postAuthorDisplayname'] ?></a>
|
||||
<a href="<?= base_url('user/' . $post['author']['displayname']) ?>" target="_blank"><?= $post['author']['displayname'] ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?= base_url('blog/category/' . $post['categoryName']) ?>" target="_blank"><?= $post['categoryDisplayName'] ?></a>
|
||||
<!-- <a href="--><?//= base_url('blog/category/' . $post['categoryName']) ?><!--" target="_blank">--><?//= $post['categoryDisplayName'] ?><!--</a>-->
|
||||
</td>
|
||||
<td>
|
||||
<?= $post['postViews'] ?>
|
||||
<?= $post['views'] ?>
|
||||
<i class="fa fa-eye"></i>
|
||||
</td>
|
||||
<td>
|
||||
@@ -75,30 +75,30 @@
|
||||
</td>
|
||||
<?php if (isset($trashbin) && $trashbin): ?>
|
||||
<td>
|
||||
<a data-toggle="tooltip" data-placement="top" title="" data-original-title="Bearbeiten" href="<?= base_url('admin/blog/edit/' . $post['postID']) ?>" target="_blank" class="btn btn-xs btn-default">
|
||||
<a data-toggle="tooltip" data-placement="top" title="" data-original-title="Bearbeiten" href="<?= base_url('admin/blog/edit/' . $post['ID']) ?>" target="_blank" class="btn btn-xs btn-default">
|
||||
<i class="fa fa-edit"></i>
|
||||
</a>
|
||||
<a data-toggle="tooltip" data-placement="top" title="" data-original-title="History" href="<?= base_url('admin/blog/history/' . $post['postID']) ?>" target="_blank" class="btn btn-xs btn-default">
|
||||
<a data-toggle="tooltip" data-placement="top" title="" data-original-title="History" href="<?= base_url('admin/blog/history/' . $post['ID']) ?>" target="_blank" class="btn btn-xs btn-default">
|
||||
<i class="fa fa-history"></i>
|
||||
</a>
|
||||
<a data-toggle="tooltip" data-placement="top" title="" data-original-title="Wiederherstellen" onclick="restorePost(<?= $post['postID'] ?>)" class="btn btn-xs btn-green">
|
||||
<a data-toggle="tooltip" data-placement="top" title="" data-original-title="Wiederherstellen" onclick="restorePost(<?= $post['ID'] ?>)" class="btn btn-xs btn-green">
|
||||
<i class="fa fa-undo"></i>
|
||||
</a>
|
||||
<a href="" data-toggle="tooltip" data-placement="top" title="Endgültig löschen">
|
||||
<button type="button" class="btn btn-xs btn-red" data-toggle="modal" data-target="#deleteModal" data-type="Blog-Post" data-title="<?= $post['postTitle'] ?>" data-id="<?= $post['postID'] ?>">
|
||||
<button type="button" class="btn btn-xs btn-red" data-toggle="modal" data-target="#deleteModal" data-type="Blog-Post" data-title="<?= $post['title'] ?>" data-id="<?= $post['ID'] ?>">
|
||||
<i class="fa fa-trash"></i>
|
||||
</button>
|
||||
</a>
|
||||
</td>
|
||||
<?php else: ?>
|
||||
<td>
|
||||
<a data-toggle="tooltip" data-placement="top" title="" data-original-title="Bearbeiten" href="<?= base_url('admin/blog/edit/' . $post['postID'] . '/') ?>" target="_blank" class="btn btn-xs btn-default">
|
||||
<a data-toggle="tooltip" data-placement="top" title="" data-original-title="Bearbeiten" href="<?= base_url('admin/blog/edit/' . $post['ID'] . '/') ?>" target="_blank" class="btn btn-xs btn-default">
|
||||
<i class="fa fa-edit"></i>
|
||||
</a>
|
||||
<a data-toggle="tooltip" data-placement="top" title="" data-original-title="History" href="<?= base_url('admin/blog/history/' . $post['postID']) ?>" target="_blank" class="btn btn-xs btn-default">
|
||||
<a data-toggle="tooltip" data-placement="top" title="" data-original-title="History" href="<?= base_url('admin/blog/history/' . $post['ID']) ?>" target="_blank" class="btn btn-xs btn-default">
|
||||
<i class="fa fa-history"></i>
|
||||
</a>
|
||||
<a data-toggle="tooltip" data-placement="top" title="" data-original-title="Löschen" onclick="deletePost(<?= $post['postID'] ?>)" class="btn btn-xs btn-red">
|
||||
<a data-toggle="tooltip" data-placement="top" title="" data-original-title="Löschen" onclick="deletePost(<?= $post['ID'] ?>)" class="btn btn-xs btn-red">
|
||||
<i class="fa fa-trash"></i>
|
||||
</a>
|
||||
</td>
|
||||
|
@@ -90,23 +90,37 @@
|
||||
<table id="datatable-fixed-header" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Name</th>
|
||||
<th>Titel - Deutsch</th>
|
||||
<th>Titel - English</th>
|
||||
<th>Titel - Französisch</th>
|
||||
<th>Anzahl Einträge</th>
|
||||
<th>Tools</th>
|
||||
<th rowspan="2">ID</th>
|
||||
<th colspan="3">Name</th>
|
||||
<th colspan="3">Titel</th>
|
||||
<th rowspan="2">Anzahl Einträge</th>
|
||||
<th rowspan="2">Tools</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Deutsch</th>
|
||||
<th>Englisch</th>
|
||||
<th>Französisch</th>
|
||||
<th>Deutsch</th>
|
||||
<th>Englisch</th>
|
||||
<th>Französisch</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($categories as $c) { ?>
|
||||
<?php foreach ($categories as $c) {
|
||||
$names = explode(',', $c['name']);
|
||||
$displaynames = explode(',', $c['displayname']);
|
||||
?>
|
||||
<tr id="category-<?= $c['ID'] ?>">
|
||||
<td><?= $c['ID'] ?></td>
|
||||
<td><?= $c['collection'] ?></td>
|
||||
<td><?= $c['displayname'] ?></td>
|
||||
<td><?= $c['displaynameEnglish'] ?></td>
|
||||
<td><?= $c['displaynameFrench'] ?></td>
|
||||
|
||||
<td><?= isset($names[0]) ? $names[0] : '' ?></td>
|
||||
<td><?= isset($names[1]) ? $names[1] : '' ?></td>
|
||||
<td><?= isset($names[2]) ? $names[2] : '' ?></td>
|
||||
|
||||
<td><?= isset($displaynames[0]) ? $displaynames[0] : '' ?></td>
|
||||
<td><?= isset($displaynames[1]) ? $displaynames[1] : '' ?></td>
|
||||
<td><?= isset($displaynames[2]) ? $displaynames[2] : '' ?></td>
|
||||
|
||||
<td><?= $c['count'] ?></td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-xs btn-red" data-toggle="modal" data-target="#deleteModal" data-type="Projekt-Kategorie" data-title="<?= $c['displayname'] ?>" data-id="<?= $c['ID'] ?>">
|
||||
|
@@ -16,18 +16,18 @@ use Coduo\PHPHumanizer\DateTimeHumanizer;
|
||||
<div class="x_content">
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<img src="<?= $user['profile_picture'] ?>" class="img-fluid">
|
||||
<img src="<?= $user['profilePicture'] ?>" class="img-fluid">
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
<h3><a href="<?= base_url('user/' . $user['username']) ?>"
|
||||
target="_blank"><?= $user['displayname'] ?></a></h3>
|
||||
<?php $created_at = strtotime($user['date_created']); ?>
|
||||
<?php $created_at = strtotime($user['dateCreated']); ?>
|
||||
<p>
|
||||
<b>Account erstellt: </b>
|
||||
<?= DateTimeHumanizer::difference(new \DateTime(), new \DateTime("@$created_at"), "de_DE") ?>
|
||||
<i>(<?= date("d.m.Y H:i", $created_at) ?>)</i>
|
||||
</p>
|
||||
<p><b>Originaler Name:</b> <?= $user['original_name'] ?></p>
|
||||
<p><b>Originaler Name:</b> <?= $user['originalName'] ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row col-sm-12">
|
||||
@@ -55,7 +55,7 @@ use Coduo\PHPHumanizer\DateTimeHumanizer;
|
||||
</p>
|
||||
<p>
|
||||
<b>Aktiviert?</b>
|
||||
<?= $user['is_activated'] ? '<i class="fa fa-check-circle-o"></i> Ja' : '<i class="fa fa-times-circle-o"></i>Nein' ?>
|
||||
<?= $user['activated'] ? '<i class="fa fa-check-circle-o"></i> Ja' : '<i class="fa fa-times-circle-o"></i>Nein' ?>
|
||||
</p>
|
||||
<p>
|
||||
<b>Zeige Werbung?</b>
|
||||
|
@@ -53,9 +53,9 @@
|
||||
2 => "Twitter",
|
||||
3 => "GitHub"
|
||||
];
|
||||
$loginMethod = $loginMethods[$user['login_method']];
|
||||
$loginMethod = $loginMethods[$user['loginMethod']];
|
||||
|
||||
$dateCreated = strtotime($user['date_created']);
|
||||
$dateCreated = strtotime($user['dateCreated']);
|
||||
$lastLogin = strtotime($user['lastLogin']);
|
||||
$dateCreatedStr = DateTimeHumanizer::difference(new \DateTime(), new \DateTime("@$dateCreated"), "de_DE");
|
||||
if($lastLogin)
|
||||
@@ -82,12 +82,12 @@
|
||||
(<?= date("d.m.Y H:i", $dateCreated) ?>)
|
||||
</td>
|
||||
<td>
|
||||
<img src="<?= $user['profile_picture'] ?>?w=50" class="img-fluid rounded"
|
||||
<img src="<?= $user['profilePicture'] ?>?w=50" class="img-fluid rounded"
|
||||
alt="Profilbild"
|
||||
style="max-height: 50px;">
|
||||
</td>
|
||||
<td>
|
||||
<?= $user['is_activated'] ? "<i class='fa fa-check-circle'></i> Ja" : "<i class='fa fa-times-circle'></i> Nein" ?>
|
||||
<?= $user['activated'] ? "<i class='fa fa-check-circle'></i> Ja" : "<i class='fa fa-times-circle'></i> Nein" ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $user['showAds'] ? '<i class="fa fa-check-circle"></i> Ja' : '<i class="fa fa-times-circle"></i> Nein' ?>
|
||||
@@ -128,7 +128,7 @@
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(get_instance()->hasPermission('user.ban')): ?>
|
||||
<a data-toggle="tooltip" data-placement="top" title="" data-original-title="Account löschen" onclick="showDeleteModal(<?= $user['ID'] ?>. <?= $user['username'] ?>)" target="_blank" class="btn btn-xs btn-red">
|
||||
<a data-toggle="tooltip" data-placement="top" title="" data-original-title="Account löschen" onclick="showDeleteModal(<?= $user['ID'] ?>.; <?= $user['username'] ?>)" target="_blank" class="btn btn-xs btn-red">
|
||||
<i class="fas fa-user-slash"></i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
@@ -5,7 +5,7 @@
|
||||
<div class="well comment-well">
|
||||
<div class="d-inline-block mr-2">
|
||||
<a href="<?= base_url('user/' . $author['username']) ?>" target="_blank">
|
||||
<img src="<?= $author['profile_picture'] ?>" alt="">
|
||||
<img src="<?= $author['profilePicture'] ?>" alt="">
|
||||
</a>
|
||||
</div>
|
||||
<div class="d-inline-block mr-2">
|
||||
@@ -16,7 +16,7 @@
|
||||
<?= $author['displayname'] ?>
|
||||
</a>
|
||||
/
|
||||
<?= date('d.m.Y H:i \\U\\h\\r', strtotime($date_created)) ?></small>
|
||||
<?= date('d.m.Y H:i \\U\\h\\r', strtotime($date)) ?></small>
|
||||
</h3>
|
||||
<p class="comment">
|
||||
<?= $comment ?>
|
||||
|
25
application/views/blog/delete_modal.php
Normal file
25
application/views/blog/delete_modal.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?>
|
||||
|
||||
<form id="postDeleteForm">
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<p>
|
||||
<b>Bist du dir wirklich sicher, dass du deinen Kommentar löschen willst?</b>
|
||||
</p>
|
||||
<p>
|
||||
<i>Diese Aktion kann nicht rückgängig gemacht werden!</i>
|
||||
</p>
|
||||
<ul class="comment-list" style="pointer-events: none">
|
||||
<?php
|
||||
$this->load->view('network/blog/comment_item', ['data' => $author, 'c' => $comment, 'hideActionBtns' => true]) ?>
|
||||
</ul>
|
||||
<!-- --><?php //var_dump($post) ?>
|
||||
</div>
|
||||
<button type="reset" class="btn btn-sm btn-primary round float-right" data-dismiss="modal">
|
||||
Nein, Kommentar behalten
|
||||
</button>
|
||||
<button type="submit" class="btn btn-sm btn-red outline round float-right" onclick="deleteComment(<?= $comment['ID'] ?>)">
|
||||
Ja, endgültig löschen
|
||||
</button>
|
||||
</form>
|
@@ -5,7 +5,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
<div class="container">
|
||||
<div class="notice-container navbar-fixed-bottom"></div>
|
||||
<div class="row">
|
||||
<aside class="col-sm-4 col-sm-push-8">
|
||||
<aside class="col-lg-4 order-lg-last">
|
||||
<div class="widget search">
|
||||
<form role="form" action="/blog/search">
|
||||
<div class="input-group">
|
||||
@@ -35,15 +35,15 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
<?php foreach ($categoryPosts as $post) { ?>
|
||||
<div class="media">
|
||||
<div class="media-body">
|
||||
<?php if (!empty($post['postImage'])): ?>
|
||||
<a href="<?= base_url('blog/post/' . $post['postUrl']); ?>">
|
||||
<img src="<?= $post['postImage']; ?>?w=300" class="img-fluid rounded post-image">
|
||||
<?php if (!empty($post['image'])): ?>
|
||||
<a href="<?= base_url('blog/post/' . $post['url']); ?>">
|
||||
<img src="<?= $post['image']; ?>?w=300" class="img-fluid rounded post-image">
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<div class="overlay">
|
||||
<div class="media-heading">
|
||||
<a href="<?= base_url('blog/post/' . $post['postUrl']); ?>">
|
||||
<strong><?= $post['postTitle']; ?></strong>
|
||||
<a href="<?= base_url('blog/post/' . $post['url']); ?>">
|
||||
<strong><?= $post['title']; ?></strong>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -58,7 +58,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
<?php foreach ($categories as $category) { ?>
|
||||
<li>
|
||||
<a href="<?= base_url('blog/category/' . $category['name']) ?>">
|
||||
<?= lang('blog_category_' . $category['name']) != '' ? lang('blog_category_' . $category['name']) : $category['display_name'] ?>
|
||||
<?= lang('blog_category_' . $category['name']) != '' ? lang('blog_category_' . $category['name']) : $category['displayname'] ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
@@ -5,41 +5,44 @@
|
||||
|
||||
?>
|
||||
|
||||
<div class="col-sm-8 col-sm-pull-4">
|
||||
<div class="col-lg-8 order-lg-first">
|
||||
<div class="like-toggle-icon-container floating">
|
||||
<button class="like-toggle-icon <?= $hasLiked ? '-checked' : '' ?>" title="❤ Toggle Like!" onclick="likeDislike(<?= $postID ?>)"></button>
|
||||
<button class="like-toggle-icon <?= $hasLiked ? '-checked' : '' ?>" title="❤ Toggle Like!" onclick="likeDislike(<?= $ID ?>)"></button>
|
||||
<span class="like-count"><?= $likeCount ?></span>
|
||||
</div>
|
||||
|
||||
<div class="blog">
|
||||
<div class="blog-item">
|
||||
<?php if ($postIsDeleted): ?>
|
||||
<?php // TODO: Add notice if post was deleted
|
||||
if (false): ?>
|
||||
<h2 class="text-error">
|
||||
<i class="fa fa-warning"></i>
|
||||
</h2>
|
||||
<?php else: ?>
|
||||
<?php if ($postImage != '') { ?>
|
||||
<img class="img-fluid img-blog" src="<?= $postImage; ?>?w=800" width="100%" alt="" />
|
||||
<?php if ($image != '') { ?>
|
||||
<img class="img-fluid img-blog" src="<?= $image; ?>?w=800" width="100%" alt="" />
|
||||
<?php } ?>
|
||||
<div class="blog-content">
|
||||
<div class="entry-meta">
|
||||
<span>
|
||||
<a href="<?= base_url('user/' . $postAuthorUsername) ?>">
|
||||
<a href="<?= base_url('user/' . $author['username']) ?>">
|
||||
<i class="far fa-user"></i>
|
||||
<?= $postAuthorDisplayname ?>
|
||||
<?= $author['displayname'] ?>
|
||||
</a>
|
||||
</span>
|
||||
<?php
|
||||
$publishDate = strtotime($postPublishDate);
|
||||
$lastEdit = strtotime($postLastEdit);
|
||||
$initialRelease = strtotime($initialRelease);
|
||||
if (isset($lastEdit)) {
|
||||
$lastEdit = strtotime($lastEdit);
|
||||
}
|
||||
?>
|
||||
<span style="cursor:pointer" data-toggle="tooltip" data-placement="bottom"
|
||||
title="<?= strftime("%d. %B %Y", $publishDate) ?>">
|
||||
title="<?= strftime("%d. %B %Y", $initialRelease) ?>">
|
||||
<i class="far fa-calendar"></i>
|
||||
<?= DateTimeHumanizer::difference(new \DateTime(), new \DateTime("@$publishDate"), $_SESSION['site_lang']) ?>
|
||||
<?= DateTimeHumanizer::difference(new \DateTime(), new \DateTime("@$initialRelease"), $_SESSION['site_lang']) ?>
|
||||
</span>
|
||||
|
||||
<?php if (isset($postLastEdit) && $postLastEdit !== null): ?>
|
||||
<?php if (isset($lastEdit) && $lastEdit !== null): ?>
|
||||
<span style="cursor:pointer" data-toggle="tooltip" data-placement="bottom"
|
||||
title="<?= strftime("%d. %B %Y", $lastEdit) ?>">
|
||||
<i class="far fa-edit"></i>
|
||||
@@ -47,16 +50,9 @@
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<span>
|
||||
<a href="<?= base_url('blog/category/' . $categoryName) ?>">
|
||||
<i class="far fa-folder-open"></i>
|
||||
<?= lang('blog_category_' . $categoryName) != '' ? lang('blog_category_' . $categoryName) : $categoryDisplayName ?>
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<span style="cursor:pointer" data-toggle="tooltip" data-placement="bottom" title="<?= lang('blog_approximate_reading_time') ?>">
|
||||
<i class="far fa-clock"></i>
|
||||
<?= $this->BlogModel->getReadingTime($postID) ?> min
|
||||
<?= $this->BlogModel->getReadingTime($wordCount) ?> min
|
||||
</span>
|
||||
|
||||
<span>
|
||||
@@ -67,40 +63,60 @@
|
||||
</span>
|
||||
|
||||
<span>
|
||||
<a href="#" style="cursor:pointer" onclick="likeDislike(<?= $postID ?>)">
|
||||
<a href="#" style="cursor:pointer" onclick="likeDislike(<?= $ID ?>)">
|
||||
<i class="far fa-heart"></i>
|
||||
<span class="like-count"><?= $likeCount ?></span>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<h1 class="post-title"><?= $postTitle ?></h1>
|
||||
<h2 class="post-subtitle"><?= $postDesc ?></h2>
|
||||
<h1 class="post-title"><?= $title ?></h1>
|
||||
<h2 class="post-subtitle"><?= $description ?></h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="blog-item">
|
||||
<div class="blog-content">
|
||||
<div class="blog-post">
|
||||
<?= isset($postContent) ? $postContent : "" ?>
|
||||
<?= isset($content) ? $content : "" ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="blog-item">
|
||||
<div class="blog-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="blog-item">
|
||||
<div class="blog-content">
|
||||
<h3>
|
||||
<i class="far fa-folder-open"></i>
|
||||
Kategorien
|
||||
</h3>
|
||||
<?php foreach ($categories as $category): ?>
|
||||
<a href="<?= base_url('blog/category/' . $category['name']) ?>">
|
||||
<span class="badge badge-primary">
|
||||
<?= lang('blog_category_' . $category['name']) != '' ? lang('blog_category_' . $category['name']) : $category['displayname'] ?>
|
||||
</span>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="blog-item">
|
||||
<div class="blog-content">
|
||||
<h3>
|
||||
<i class="fa fa-tags"></i>
|
||||
Tags
|
||||
</h3>
|
||||
<div class="tags">
|
||||
<?php foreach ($tags as $tag) { ?>
|
||||
<a href="<?= base_url('blog/tag/' . $tag['name']) ?>"><span
|
||||
class="label label-primary"><?= $tag['display_name'] ?></span>
|
||||
<a href="<?= base_url('blog/tag/' . $tag['name']) ?>">
|
||||
<span class="badge badge-primary"><?= $tag['displayname'] ?></span>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="blog-item">
|
||||
<div class="blog-content">
|
||||
<h3>
|
||||
<i class="far fa-user"></i> <?= lang('blog_about') ?>
|
||||
</h3>
|
||||
@@ -108,11 +124,11 @@
|
||||
<?php
|
||||
$this->load->view('network/user/user_overview_card', [
|
||||
'noContainer' => true,
|
||||
'username' => $postAuthorUsername,
|
||||
'displayname' => $postAuthorDisplayname,
|
||||
'profile_picture' => $postAuthorProfilePicture,
|
||||
'header_image' => $postAuthorHeaderImage,
|
||||
'about' => $postAuthorAbout])
|
||||
'username' => $author['username'],
|
||||
'displayname' => $author['displayname'],
|
||||
'profilePicture' => $author['profilePicture'],
|
||||
'headerImage' => $author['headerImage'],
|
||||
'about' => $author['about']])
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -128,19 +144,19 @@
|
||||
<?php foreach ($randomPosts as $item) { ?>
|
||||
<div class="col-sm-4">
|
||||
<div class="card">
|
||||
<?php if ($item['postImage'] != ''): ?>
|
||||
<a href="<?= base_url('blog/post/' . $item['postUrl']) ?>">
|
||||
<img src="<?= $item['postImage'] ?>?w=200" alt="<?= $item['postTitle'] ?>" class="card-img-top">
|
||||
<?php if ($item['image'] != ''): ?>
|
||||
<a href="<?= base_url('blog/post/' . $item['url']) ?>">
|
||||
<img src="<?= $item['image'] ?>?w=200" alt="<?= $item['title'] ?>" class="card-img-top">
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<div class="card-body">
|
||||
<a href="<?= base_url('blog/post/' . $item['postUrl']) ?>">
|
||||
<h5 class="card-title"><?= $item['postTitle'] ?></h5>
|
||||
<a href="<?= base_url('blog/post/' . $item['url']) ?>">
|
||||
<h5 class="card-title"><?= $item['title'] ?></h5>
|
||||
</a>
|
||||
<small class="card-text">
|
||||
<i class="far fa-user"></i>
|
||||
<a href="<?= base_url('user/' . $item['postAuthorUsername']) ?>">
|
||||
<?= $item['postAuthorDisplayname'] ?>
|
||||
<a href="<?= base_url('user/' . $item['author']['username']) ?>">
|
||||
<?= $item['author']['displayname'] ?>
|
||||
</a>
|
||||
</small>
|
||||
</div>
|
||||
@@ -152,20 +168,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="blog-item">
|
||||
<div class="blog-content">
|
||||
<div class="container">
|
||||
<div id="comments">
|
||||
<h3>
|
||||
<i class="far fa-comments"></i> <?= lang('blog_comments') ?> (<span class="comment-count"><?= $commentCount; ?></span>)
|
||||
</h3>
|
||||
<ul class="comment-list" id="comment-list">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="blog-item">
|
||||
<div class="blog-content">
|
||||
<div id="comment-form">
|
||||
@@ -196,35 +198,57 @@
|
||||
</div>
|
||||
<!--/#comments-->
|
||||
</div>
|
||||
<?php if (!empty($prevPost)):
|
||||
$prevPost = $prevPost[0]; ?>
|
||||
<div class="blog-item col-xs-6" style="width:calc(50% - 5px);">
|
||||
<a href="<?= base_url('blog/post/' . $prevPost['postUrl']) ?>">
|
||||
<div class="pull-left"
|
||||
style="background: url(<?= $prevPost['postImage'] ?>?w=150) center;background-size:cover;width:100px;height:100px;border-radius: 4px;margin:10px 0;"></div>
|
||||
<div class="float-right" style="width: calc(100% - 110px)">
|
||||
<h5>
|
||||
<i class="fa fa-arrow-left"></i> <?= lang('blog_previous_article') ?></h5>
|
||||
<h4 style="font-size:20px"><?= $prevPost['postTitle'] ?></h4>
|
||||
|
||||
<div class="blog-item">
|
||||
<div class="blog-content">
|
||||
<div class="container">
|
||||
<div id="comments">
|
||||
<h3>
|
||||
<i class="far fa-comments"></i> <?= lang('blog_comments') ?> (
|
||||
<span class="comment-count"><?= $commentCount; ?></span>
|
||||
)
|
||||
</h3>
|
||||
<ul class="comment-list" id="comment-list">
|
||||
</ul>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($nextPost)):
|
||||
$nextPost = $nextPost[0]; ?>
|
||||
<div class="blog-item col-xs-6 float-right" style="width:calc(50% - 5px);">
|
||||
<a href="<?= base_url('blog/post/' . $nextPost['postUrl']) ?>">
|
||||
<div class="float-right"
|
||||
style="background: url(<?= $nextPost['postImage'] ?>?w=150) center;background-size:cover;width:100px;height:100px;border-radius: 4px;margin:10px 0;"></div>
|
||||
<div class="pull-left" style="width: calc(100% - 110px);text-align:right;">
|
||||
<h5><?= lang('blog_next_article') ?>
|
||||
<i class="fa fa-arrow-right"></i>
|
||||
</h5>
|
||||
<h4 style="font-size:20px"><?= $nextPost['postTitle'] ?></h4>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<?php if (!empty($prevPost)):
|
||||
$prevPost = $prevPost[0]; ?>
|
||||
<div class="col-6">
|
||||
<div class="blog-item following-post left">
|
||||
<a href="<?= base_url('blog/post/' . $prevPost['url']) ?>">
|
||||
<div class="following-post-image"
|
||||
style="background-image: url(<?= $prevPost['image'] ?>?w=150)"></div>
|
||||
<div style="width: calc(100% - 110px);display: inline-block;margin:10px 0;">
|
||||
<h5>
|
||||
<i class="fa fa-arrow-left"></i> <?= lang('blog_previous_article') ?></h5>
|
||||
<h4 style="font-size:20px"><?= $prevPost['title'] ?></h4>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($nextPost)):
|
||||
$nextPost = $nextPost[0]; ?>
|
||||
<div class="col-6">
|
||||
<div class="blog-item following-post right">
|
||||
<a href="<?= base_url('blog/post/' . $nextPost['url']) ?>">
|
||||
<div class="following-post-image" style="background-image: url(<?= $nextPost['image'] ?>?w=150)"></div>
|
||||
<div style="width: calc(100% - 110px);text-align:right;display: inline-block;margin:10px 0;">
|
||||
<h5><?= lang('blog_next_article') ?>
|
||||
<i class="fa fa-arrow-right"></i>
|
||||
</h5>
|
||||
<h4 style="font-size:20px"><?= $nextPost['title'] ?></h4>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<!--/.blog-item-->
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
@@ -3,35 +3,40 @@
|
||||
|
||||
use Coduo\PHPHumanizer\DateTimeHumanizer;
|
||||
|
||||
$postPublishDate = strtotime($postPublishDate);
|
||||
$initialRelease = strtotime($initialRelease);
|
||||
?>
|
||||
<div class="blog-item">
|
||||
<?php if ($postImage != NULL && $postImage != ''): ?>
|
||||
<a href="<?= base_url('blog/post/' . $postUrl) ?>">
|
||||
<div class="img-blog-entry" style="background-image: url('<?= $postImage ?>?w=750');"></div>
|
||||
<?php if ($image != NULL && $image != ''): ?>
|
||||
<a href="<?= base_url('blog/post/' . $url) ?>">
|
||||
<div class="img-blog-entry" style="background-image: url('<?= $image ?>?w=750');"></div>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<div class="blog-content">
|
||||
<div class="entry-meta">
|
||||
<span><a target="_blank" href="<?= base_url('user/' . $postAuthorUsername) ?>"><i class="fa fa-user"></i> <?= $postAuthorDisplayname ?></a></span>
|
||||
<span><i class="fa fa-calendar"></i> <?= DateTimeHumanizer::difference(new \DateTime(), new \DateTime("@$postPublishDate"), $_SESSION['site_lang']) ?></span>
|
||||
<span><a href="<?= base_url("blog/category/" . $categoryName) ?>"><i class="fa fa-folder-open"></i> <?= $categoryDisplayName ?></a></span>
|
||||
<span><a target="_blank" href="<?= base_url('user/' . $author['username']) ?>"><i class="fa fa-user"></i> <?= $author['displayname'] ?></a></span>
|
||||
<span><i class="fa fa-calendar"></i> <?= DateTimeHumanizer::difference(new \DateTime(), new \DateTime("@$initialRelease"), $_SESSION['site_lang']) ?></span>
|
||||
<span>
|
||||
<i class="fa fa-folder-open"></i>
|
||||
<?php foreach ($categories as $category) { ?>
|
||||
<a href="<?= base_url('blog/category/' . $category['name']) ?>"><?= $category['displayname'] ?></a>
|
||||
<?php } ?>
|
||||
</span>
|
||||
<span style="cursor: pointer;" data-toggle="tooltip" data-placement="left" title="Geschätzte Lesedauer">
|
||||
<i class="fa fa-clock"></i>
|
||||
<?= $this->BlogModel->getReadingTime($postID) ?> min
|
||||
<?= $this->BlogModel->getReadingTime($wordCount) ?> min
|
||||
</span>
|
||||
<span><a href="<?= base_url('blog/post/' . $postUrl . '#comments') ?>"><i class="fa fa-comment"></i> <?= $commentCount ?></a></span>
|
||||
<span><a href="<?= base_url('blog/post/' . $url . '#comments') ?>"><i class="fa fa-comment"></i> <?= $commentCount ?></a></span>
|
||||
<span><i class="fa fa-heart"></i> <?= $likeCount ?></span>
|
||||
</div>
|
||||
<a href="<?= base_url('blog/post/' . $postUrl) ?>">
|
||||
<h3><?= $postTitle ?></h3>
|
||||
<a href="<?= base_url('blog/post/' . $url) ?>">
|
||||
<h3><?= $title ?></h3>
|
||||
</a>
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<p><?= $postDesc ?></p>
|
||||
<p><?= $description ?></p>
|
||||
</div>
|
||||
<div class="col-md-3" style="padding:0">
|
||||
<a class="btn btn-primary outline" href="<?= base_url('blog/post/' . $postUrl) ?>"><?= lang('blog_read') ?>
|
||||
<a class="btn btn-primary outline" href="<?= base_url('blog/post/' . $url) ?>"><?= lang('blog_read') ?>
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
?>
|
||||
|
||||
<div class="col-sm-8 col-sm-pull-4">
|
||||
<div class="col-lg-8 order-lg-first">
|
||||
<div class="blog">
|
||||
<ul class="page-selection pagination-lg blog-pagination"></ul>
|
||||
<div id="content">
|
||||
|
28
application/views/blog/report_modal.php
Normal file
28
application/views/blog/report_modal.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?>
|
||||
|
||||
<form id="commentReportForm">
|
||||
<div class="form-group">
|
||||
<label for="commentReportReason">Grund für deine Meldung</label>
|
||||
<select name="reason" id="commentReportReason" class="form-control" required>
|
||||
<option value="">Bitte auswählen</option>
|
||||
<option value="hatespeech">Hasserfüllte Inhalte</option>
|
||||
<option value="racism">Rassistische, diskriminierende oder bewusst ausgrenzende Inhalte</option>
|
||||
<option value="terrorism">Unterstützung von Terrorismus</option>
|
||||
<option value="abuse">(Kindes-)Missbrauch</option>
|
||||
<option value="violence">Gewaltverherrlichende Inhalte</option>
|
||||
<option value="copyright">Verletzung meiner (Urheber-)Rechte</option>
|
||||
<option value="spam">Spam oder irreführende Inhalte</option>
|
||||
<option value="technical-issue">Technische Fehler</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="commentReportText">Weitere Anmerkungen (optional)</label>
|
||||
<textarea name="reportText" id="commentReportText" class="form-control"></textarea>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary float-right">
|
||||
Absenden
|
||||
</button>
|
||||
</form>
|
||||
|
@@ -119,7 +119,7 @@
|
||||
<?= lang('header_edit_profile') ?>
|
||||
</a>
|
||||
<?php if (get_instance()->hasPermission('dashboard.view')): ?>
|
||||
<a href="<? //= base_url('admin') ?>" class="dropdown-item">
|
||||
<a href="<?= base_url('admin') ?>" class="dropdown-item">
|
||||
<i class="fa fa-tachometer-alt"></i>
|
||||
<?= lang('header_admin_panel') ?>
|
||||
</a>
|
||||
|
@@ -221,7 +221,7 @@
|
||||
<?php foreach ($currentlyActiveUsers as $activeUser):
|
||||
$loginTime = strtotime($activeUser['lastLogin']); ?>
|
||||
<div class="user-item">
|
||||
<img src="<?= $activeUser['profile_picture'] ?>?w=50" alt="" class="img-fluid rounded-circle">
|
||||
<img src="<?= $activeUser['profilePicture'] ?>?w=50" alt="" class="img-fluid rounded-circle">
|
||||
<div class="user-info">
|
||||
<a href="<?= base_url('user/' . $activeUser['username']) ?>">
|
||||
<h2><?= $activeUser['displayname'] ?></h2>
|
||||
@@ -236,9 +236,9 @@
|
||||
<h2><?= lang('home_newest_users') ?></h2>
|
||||
<?php
|
||||
foreach ($newestUsers as $newestUser):
|
||||
$registeredDate = strtotime($newestUser['date_created']); ?>
|
||||
$registeredDate = strtotime($newestUser['dateCreated']); ?>
|
||||
<div class="user-item">
|
||||
<img src="<?= $newestUser['profile_picture'] ?>?w=50" alt="" class="img-fluid rounded-circle">
|
||||
<img src="<?= $newestUser['profilePicture'] ?>?w=50" alt="" class="img-fluid rounded-circle">
|
||||
<div class="user-info">
|
||||
<a href="<?= base_url('user/' . $newestUser['username']) ?>">
|
||||
<h2><?= $newestUser['displayname'] ?></h2>
|
||||
|
@@ -18,7 +18,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
</div>
|
||||
|
||||
<div class="loading-msg">
|
||||
<i class="fa fa-cog fa-spin"></i>
|
||||
.loadingSpinner
|
||||
</div>
|
||||
|
||||
<div class="success-msg">
|
||||
|
@@ -3,22 +3,22 @@ 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 href="<?= base_url('blog/post/' . $post['url']) ?>" target="_blank">
|
||||
<div class="entry-image" style="background-image:url(<?= $post['image'] ?>?w=150"></div>
|
||||
</a>
|
||||
<div class="content">
|
||||
<h3>
|
||||
<a href="<?= base_url('blog/post/' . $post['postUrl']) ?>" target="_blank">
|
||||
<?= $post['postTitle'] ?>
|
||||
<a href="<?= base_url('blog/post/' . $post['url']) ?>" target="_blank">
|
||||
<?= $post['title'] ?>
|
||||
</a>
|
||||
|
||||
<small><?= lang('person_by') ?> <a
|
||||
href="<?= base_url('user/' . $data['username']) ?>"
|
||||
target="_blank"><?= $data['displayname'] ?></a>
|
||||
/ <?= date(lang('date'), strtotime($post['postPublishDate'])) ?>
|
||||
/ <?= date(lang('date'), strtotime($post['initialRelease'])) ?>
|
||||
</small>
|
||||
</h3>
|
||||
<p class="comment"><?= $post['postDesc'] ?></p>
|
||||
<p class="comment"><?= $post['description'] ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
@@ -1,47 +1,64 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
use Coduo\PHPHumanizer\DateTimeHumanizer;
|
||||
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">
|
||||
<li id="comment-<?= $c['ID'] ?>">
|
||||
<div class="user-post-item">
|
||||
<a href="<?= base_url('user/' . $data['username']) ?>" class="item-avatar-container">
|
||||
<img src="<?= $data['profilePicture'] ?>?w=100" alt="<?= $data['username'] ?>" class="item-avatar">
|
||||
</a>
|
||||
<h3 class="item-user">
|
||||
<a href="<?= base_url('user/' . $data['username']) ?>">
|
||||
<?= $data['displayname'] ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="content-container">
|
||||
<div class="content">
|
||||
<h3>
|
||||
<a href="<?= base_url('user/' . $data['username']) ?>" target="_blank">
|
||||
<?= $data['displayname'] ?>
|
||||
</h3>
|
||||
<h4 class="item-meta">
|
||||
<?php
|
||||
$locale = isset($_SESSION['site_lang']) ? $_SESSION['site_lang'] : 'en';
|
||||
$dateCreated = strtotime($c['date']);
|
||||
echo DateTimeHumanizer::difference(new \DateTime(), new \DateTime("@$dateCreated"), $locale);
|
||||
?>
|
||||
<?php if (isset($c['url'])): ?>
|
||||
unter
|
||||
<a href="<?= base_url('blog/post/' . $c['url']) ?>">
|
||||
<?= $c['title'] ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</h4>
|
||||
<p class="item-content">
|
||||
<?= $c['comment'] ?>
|
||||
</p>
|
||||
<?php if(!isset($hideActionBtns) || $hideActionBtns == false): ?>
|
||||
<div class="item-actions">
|
||||
<a href="#" class="item-btn" data-toggle="tooltip" data-placement="top" title="Antworten">
|
||||
<i class="far fa-comment"></i>
|
||||
<span>0</span>
|
||||
</a>
|
||||
<a href="#" class="item-btn" data-toggle="tooltip" data-placement="top" title="Gefällt mir">
|
||||
<i class="far fa-heart"></i>
|
||||
<span>0</span>
|
||||
</a>
|
||||
<div class="item-btn dropdown">
|
||||
<a href="#" class="" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fa fa-ellipsis-h"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu">
|
||||
<a onclick="openCommentReportModal(<?= $c['ID'] ?>)" class="dropdown-item">
|
||||
<i class="fa fa-flag"></i>
|
||||
Kommentar melden
|
||||
</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'] ?>
|
||||
|
||||
<?php if(isset($_SESSION['user']) && $_SESSION['user']['username'] == $data['username']): ?>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a onclick="openCommentDeleteModal(<?= $c['ID'] ?>)" class="dropdown-item text-danger">
|
||||
<i class="fa fa-trash"></i>
|
||||
Kommentar löschen
|
||||
</a>
|
||||
</small>
|
||||
</h3>
|
||||
<p class="comment"><?= $c['comment'] ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</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>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</li>
|
||||
</li>
|
@@ -15,7 +15,7 @@
|
||||
<button type="reset" class="btn btn-sm btn-primary round float-right" data-dismiss="modal">
|
||||
Nein, Post behalten
|
||||
</button>
|
||||
<button type="submit" class="btn btn-sm btn-red outline round float-right" onclick="deletePost('<?= $post['uuid'] ?>')">
|
||||
<button type="submit" class="btn btn-sm btn-red outline round float-right" onclick="deletePost('<?= $post['hashID'] ?>')">
|
||||
Ja, endgültig löschen
|
||||
</button>
|
||||
</form>
|
||||
|
@@ -4,11 +4,11 @@
|
||||
use Coduo\PHPHumanizer\DateTimeHumanizer;
|
||||
|
||||
?>
|
||||
<li class="post-item is-reply% my-2" data-uuid="<?= $uuid ?>" data-username="<?= $username ?>">
|
||||
<li class="post-item is-reply% my-2" data-uuid="<?= $hashID ?>" data-username="<?= $username ?>">
|
||||
<div class="comment-well" <?= isset($hideShadows) && $hideShadows ? 'style="box-shadow: none;padding:0"' : '' ?>>
|
||||
<div class="post-non-content">
|
||||
<a href="<?= base_url('user/' . $username) ?>" target="_blank">
|
||||
<img src="<?= $profile_picture ?>?w=100" class="img-fluid">
|
||||
<img src="<?= $profilePicture ?>?w=100" class="img-fluid">
|
||||
</a>
|
||||
</div>
|
||||
<div class="content-container">
|
||||
@@ -18,13 +18,13 @@
|
||||
<?= $displayname ?>
|
||||
</a>
|
||||
<small><?php
|
||||
$date_created = strtotime($date);
|
||||
echo DateTimeHumanizer::difference(new \DateTime(), new \DateTime("@$date_created"), $_SESSION['site_lang']); ?></small>
|
||||
<?php if ($reply_to != NULL): ?>
|
||||
$dateCreated = strtotime($date);
|
||||
echo DateTimeHumanizer::difference(new \DateTime(), new \DateTime("@$dateCreated"), $_SESSION['site_lang']); ?></small>
|
||||
<?php if ($replyToPostID != NULL): ?>
|
||||
<small>
|
||||
<i class="fa fa-reply"></i>
|
||||
<?= lang('post_reply_to') ?>
|
||||
<a href="#" onclick="showFullPost('<?= $replyToPost['uuid'] ?>', '<?= $replyToPost['username'] ?>')">@<?= $replyToPost['displayname'] ?></a>
|
||||
<a href="#" onclick="showFullPost('<?= $replyToPost['hashID'] ?>', '<?= $replyToPost['username'] ?>')">@<?= $replyToPost['displayname'] ?></a>
|
||||
</small>
|
||||
<?php endif; ?>
|
||||
</h3>
|
||||
@@ -80,31 +80,31 @@
|
||||
</div>
|
||||
<?php if (!isset($hideActionBtns) || !$hideActionBtns): ?>
|
||||
<div class="action-btns">
|
||||
<a href="#" data-uuid="<?= $uuid ?>" class="action-btn reply-button" data-toggle="tooltip" data-placement="top" title="<?= lang('post_reply') ?>">
|
||||
<a href="#" data-uuid="<?= $hashID ?>" class="action-btn reply-button" data-toggle="tooltip" data-placement="top" title="<?= lang('post_reply') ?>">
|
||||
<i class="far fa-comment"></i>
|
||||
<span><?= $replyCount ?></span>
|
||||
</a>
|
||||
<a href="#" data-uuid="<?= $uuid ?>" class="action-btn like-button <?= isset($userHasLiked) && $userHasLiked ? 'active' : '' ?>" data-toggle="tooltip" data-placement="top" title="<?= lang('post_like') ?>">
|
||||
<a href="#" data-uuid="<?= $hashID ?>" class="action-btn like-button <?= isset($userHasLiked) && $userHasLiked ? 'active' : '' ?>" data-toggle="tooltip" data-placement="top" title="<?= lang('post_like') ?>">
|
||||
<i class="<?= isset($userHasLiked) && $userHasLiked ? 'fas' : 'far' ?> fa-heart"></i>
|
||||
<span><?= $likeCount ?></span>
|
||||
</a>
|
||||
<div class="action-btn dropdown">
|
||||
<a href="#" class="action-btn more-options-button" id="postMoreOptionsButton<?= $uuid ?>" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<a href="#" class="action-btn more-options-button" id="postMoreOptionsButton<?= $hashID ?>" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fa fa-ellipsis-h"></i>
|
||||
</a>
|
||||
|
||||
<div class="dropdown-menu" aria-labelledby="postMoreOptionsButton<?= $uuid ?>">
|
||||
<a href="#" onclick="copyToClipboard('<?= base_url('user/' . $username . '/post/' . $uuid) ?>')" class="dropdown-item">
|
||||
<div class="dropdown-menu" aria-labelledby="postMoreOptionsButton<?= $hashID ?>">
|
||||
<a href="#" onclick="copyToClipboard('<?= base_url('user/' . $username . '/post/' . $hashID) ?>')" class="dropdown-item">
|
||||
<i class="fa fa-copy"></i>
|
||||
<?= lang('post_copy_link') ?>
|
||||
</a>
|
||||
<a href="#" onclick="openPostReportModal('<?= $uuid ?>')" class="dropdown-item">
|
||||
<a href="#" onclick="openPostReportModal('<?= $hashID ?>')" class="dropdown-item">
|
||||
<i class="fa fa-flag"></i>
|
||||
<?= lang('post_report') ?>
|
||||
</a>
|
||||
<?php if (isset($_SESSION['user']) && $_SESSION['user']['username'] == $username): ?>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a href="#" onclick="openDeletePostModal('<?= $uuid ?>')" class="dropdown-item text-danger">
|
||||
<a href="#" onclick="openDeletePostModal('<?= $hashID ?>')" class="dropdown-item text-danger">
|
||||
<i class="fa fa-trash"></i>
|
||||
<?= lang('post_delete') ?>
|
||||
</a>
|
||||
|
@@ -5,21 +5,21 @@
|
||||
|
||||
?>
|
||||
|
||||
<?= $message; ?>
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<ul class="comment-list">
|
||||
<?php
|
||||
$post['replyToPost']['hideShadows'] = true;
|
||||
$this->load->view('network/posts/post_item', $post['replyToPost'])
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php if (isset($post['replyToPost'])): ?>
|
||||
<div class="row justify-content-center">
|
||||
<ul class="comment-list">
|
||||
<?php
|
||||
$post['replyToPost']['hideShadows'] = true;
|
||||
$this->load->view('network/posts/post_item', $post['replyToPost'])
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="post-non-content">
|
||||
<a href="<?= base_url('user/' . $post['username']) ?>">
|
||||
<img src="<?= $post['profile_picture'] ?>?w=75" alt="" class="img-fluid rounded-circle">
|
||||
<img src="<?= $post['profilePicture'] ?>?w=75" alt="" class="img-fluid rounded-circle">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
<?= $post['displayname'] ?>
|
||||
</a>
|
||||
<?php
|
||||
$date_created = strtotime($post['date']);
|
||||
$time_passed = DateTimeHumanizer::difference(new \DateTime(), new \DateTime("@$date_created"), $_SESSION['site_lang']);
|
||||
$dateCreated = strtotime($post['date']);
|
||||
$time_passed = DateTimeHumanizer::difference(new \DateTime(), new \DateTime("@$dateCreated"), $_SESSION['site_lang']);
|
||||
?>
|
||||
<small>
|
||||
<?= $time_passed ?>
|
||||
@@ -51,20 +51,20 @@
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="action-btns">
|
||||
<a href="#" data-uuid="<?= $post['uuid'] ?>" class="action-btn reply-button" data-toggle="tooltip" data-placement="top" title="Antworten">
|
||||
<a href="#" data-uuid="<?= $post['hashID'] ?>" class="action-btn reply-button" data-toggle="tooltip" data-placement="top" title="Antworten">
|
||||
<span><i class="far fa-comment"></i></span>
|
||||
<?= $post['replyCount'] ?>
|
||||
</a>
|
||||
<a href="#" data-uuid="<?= $post['uuid'] ?>" class="action-btn like-button <?= isset($post['userHasLiked']) && $post['userHasLiked'] ? 'active' : '' ?>" data-toggle="tooltip" data-placement="top" title="Gefällt mir">
|
||||
<a href="#" data-uuid="<?= $post['hashID'] ?>" class="action-btn like-button <?= isset($post['userHasLiked']) && $post['userHasLiked'] ? 'active' : '' ?>" data-toggle="tooltip" data-placement="top" title="Gefällt mir">
|
||||
<i class="<?= isset($post['userHasLiked']) && $post['userHasLiked'] ? 'fas' : 'far' ?> fa-heart"></i>
|
||||
<span><?= $post['likeCount'] ?></span>
|
||||
</a>
|
||||
<div class="dropdown d-inline-block">
|
||||
<a href="#" class="action-btn more-options-button" id="postMoreOptionsButton<?= $post['uuid'] ?>" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<a href="#" class="action-btn more-options-button" id="postMoreOptionsButton<?= $post['hashID'] ?>" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fa fa-ellipsis-h"></i>
|
||||
</a>
|
||||
|
||||
<div class="dropdown-menu" aria-labelledby="postMoreOptionsButton<?= $post['uuid'] ?>">
|
||||
<div class="dropdown-menu" aria-labelledby="postMoreOptionsButton<?= $post['hashID'] ?>">
|
||||
<a href="#" class="dropdown-item">
|
||||
<i class="fa fa-copy"></i>
|
||||
Link zum Post kopieren
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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
|
||||
|
@@ -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) ?>">
|
||||
|
@@ -2,33 +2,33 @@
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?>
|
||||
|
||||
<li class="col-4 p-2 <?= strtolower($post_plattform) ?>">
|
||||
<li class="col-4 p-2 <?= strtolower($origin) ?>">
|
||||
<div class="card">
|
||||
<a href="<?= $post_url ?>">
|
||||
<div class="card-header bg-<?= strtolower($post_plattform) ?> text-white">
|
||||
<i class="fab fa-<?= strtolower($post_plattform) ?>"></i>
|
||||
<?= $post_plattform ?>
|
||||
<a href="<?= $url ?>">
|
||||
<div class="card-header bg-<?= strtolower($origin) ?> text-white">
|
||||
<i class="fab fa-<?= strtolower($origin) ?>"></i>
|
||||
<?= $origin ?>
|
||||
</div>
|
||||
<?php if (!empty($post_img_source)): ?>
|
||||
<div style="height: 200px; background: url(<?= $post_img_source ?>) center; background-size: cover;">
|
||||
<?php if (!empty($imageSource)): ?>
|
||||
<div style="height: 200px; background: url(<?= $imageSource ?>) center; background-size: cover;">
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
<div class="card-body">
|
||||
<a href="<?= $post_url ?>">
|
||||
<a href="<?= $url ?>">
|
||||
<p class="card-text">
|
||||
<?= $post_content ?>
|
||||
<?= $content ?>
|
||||
</p>
|
||||
</a>
|
||||
<p class="card-text">
|
||||
<small class="text-muted">
|
||||
<i class="far fa-clock"></i>
|
||||
<?= $post_date ?>
|
||||
<?= $date ?>
|
||||
<br>
|
||||
<i class="far fa-user"></i>
|
||||
<?= lang('person_by') ?>
|
||||
<a href="<?= $post_author_url ?>" target="_blank">
|
||||
<?= $post_author ?>
|
||||
<a href="<?= $authorUrl ?>" target="_blank">
|
||||
<?= $authorName ?>
|
||||
</a>
|
||||
</small>
|
||||
</p>
|
||||
|
@@ -39,30 +39,11 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
<?= lang('projects_all'); ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
$categoryList = [];
|
||||
$categoryNames = [];
|
||||
$siteLang = isset($_SESSION['site_lang']) ? $_SESSION['site_lang'] : 'en';
|
||||
$languageName = 'displayname';
|
||||
if($siteLang == 'en') {
|
||||
$languageName = 'displaynameEnglish';
|
||||
} elseif($siteLang == 'fr') {
|
||||
$languageName = 'displaynameFrench';
|
||||
}
|
||||
|
||||
foreach($collections as $item) {
|
||||
$categoryName = $item[$languageName];
|
||||
$categoryList[] = $categoryName;
|
||||
$categoryNames[$categoryName] = $item['collection'];
|
||||
}
|
||||
|
||||
sort($categoryList);
|
||||
?>
|
||||
|
||||
<?php foreach($categoryList as $category): ?>
|
||||
<?php foreach($categories as $category): ?>
|
||||
<li>
|
||||
<a href="#" class="btn btn-default btn-sm <?= $album == $categoryNames[$category] ? 'active' : '' ?>" data-filter=".<?= $categoryNames[$category] ?>">
|
||||
<?= $category ?>
|
||||
<a href="#" class="btn btn-default btn-sm <?= $album == $category['name'] ? 'active' : '' ?>" data-filter=".<?= $category['name'] ?>">
|
||||
<?= $category['displayname'] ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
|
@@ -5,26 +5,26 @@
|
||||
$categoryUrls = [];
|
||||
$lang = isset($_SESSION['site_lang']) ? $_SESSION['site_lang'] : 'de';
|
||||
|
||||
foreach ($pCategories as $pCategory) {
|
||||
if ($lang == 'fr' && $pCategory['displaynameFrench'] != NULL) {
|
||||
$pCategoriesList[] = $pCategory['displaynameFrench'];
|
||||
$categoryUrls[$pCategory['displaynameFrench']] = $pCategory['collection'];
|
||||
} else if ($lang == 'en' && $pCategory['displaynameEnglish'] != NULL) {
|
||||
$pCategoriesList[] = $pCategory['displaynameEnglish'];
|
||||
$categoryUrls[$pCategory['displaynameEnglish']] = $pCategory['collection'];
|
||||
} else {
|
||||
$pCategoriesList[] = $pCategory['displayname'];
|
||||
$categoryUrls[$pCategory['displayname']] = $pCategory['collection'];
|
||||
}
|
||||
}
|
||||
sort($pCategoriesList);
|
||||
|
||||
$pCategoriesListUrls = [];
|
||||
foreach ($pCategoriesList as $pCategory) {
|
||||
$pCategoriesListUrls[] = '<a href="' . base_url('projects/' . $categoryUrls[$pCategory]) . '">' . $pCategory . '</a>';
|
||||
}
|
||||
|
||||
$pCategoriesListUrls = implode(', ', $pCategoriesListUrls);
|
||||
// foreach ($pCategories as $pCategory) {
|
||||
// if ($lang == 'fr' && $pCategory['displaynameFrench'] != NULL) {
|
||||
// $pCategoriesList[] = $pCategory['displaynameFrench'];
|
||||
// $categoryUrls[$pCategory['displaynameFrench']] = $pCategory['collection'];
|
||||
// } else if ($lang == 'en' && $pCategory['displaynameEnglish'] != NULL) {
|
||||
// $pCategoriesList[] = $pCategory['displaynameEnglish'];
|
||||
// $categoryUrls[$pCategory['displaynameEnglish']] = $pCategory['collection'];
|
||||
// } else {
|
||||
// $pCategoriesList[] = $pCategory['displayname'];
|
||||
// $categoryUrls[$pCategory['displayname']] = $pCategory['collection'];
|
||||
// }
|
||||
// }
|
||||
// sort($pCategoriesList);
|
||||
//
|
||||
// $pCategoriesListUrls = [];
|
||||
// foreach ($pCategoriesList as $pCategory) {
|
||||
// $pCategoriesListUrls[] = '<a href="' . base_url('projects/' . $categoryUrls[$pCategory]) . '">' . $pCategory . '</a>';
|
||||
// }
|
||||
//
|
||||
// $pCategoriesListUrls = implode(', ', $pCategoriesListUrls);
|
||||
?>
|
||||
<section class="container">
|
||||
<div class="vote-container" data-id="<?= $data['ID'] ?>">
|
||||
@@ -89,7 +89,13 @@
|
||||
</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
|
||||
<span data-toggle="tooltip" data-placement="top" title="Kategorien">
|
||||
<i class="fa fa-folder-open"></i> <?= $pCategoriesListUrls ?>
|
||||
<i class="fa fa-folder-open"></i>
|
||||
<?php foreach ($pCategories as $i => $category): ?>
|
||||
<?= $i != 0 ? ' | ' : '' ?>
|
||||
<a href="<?= base_url('projects/' . $category['name']) ?>">
|
||||
<?= $category['displayname'] ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</span>
|
||||
<span data-toggle="tooltip" data-placement="top"
|
||||
title="Datum: <?= strftime("%d. %B %Y", strtotime($data['datetime'])) ?>"
|
||||
|
@@ -4,7 +4,7 @@
|
||||
$categories = $this->projectsModel->getEntryCategories($ID);
|
||||
$categoriesClasses = "";
|
||||
foreach ($categories as $category) {
|
||||
$categoriesClasses .= $category['collection'] . " ";
|
||||
$categoriesClasses .= $category['name'] . " ";
|
||||
}
|
||||
if ($isDownloadable) {
|
||||
$categoriesClasses .= 'downloadable ';
|
||||
|
Reference in New Issue
Block a user