Added fancy text to posts and comments
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
|
||||
session_start();
|
||||
|
||||
require("../../queries/post.php");
|
||||
require_once("../../queries/post.php");
|
||||
require_once("../../queries/connect.php");
|
||||
require("../../queries/checkInput.php");
|
||||
print_r($_POST);
|
||||
require_once("../../queries/checkInput.php");
|
||||
|
||||
if ($_POST['button'] == 'reaction') {
|
||||
if (empty($_POST['newcomment-content'])) {
|
||||
echo 0;
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
session_start();
|
||||
|
||||
require("../../queries/post.php");
|
||||
require("../../queries/connect.php");
|
||||
require("../../queries/checkInput.php");
|
||||
require_once("../../queries/post.php");
|
||||
require_once("../../queries/connect.php");
|
||||
require_once("../../queries/checkInput.php");
|
||||
|
||||
if (empty($_POST['newpost-title'])) {
|
||||
} else {
|
||||
|
||||
@@ -3,7 +3,7 @@ var months = ["januari", "februari", "maart", "april", "mei", "juni", "juli", "a
|
||||
|
||||
function fancyText(text) {
|
||||
// Add links, images, gifs and (youtube) video's.
|
||||
var regex = /(https?:\/\/.[^ ]*)/ig;
|
||||
var regex = /(https?:\/\/.[^ <>"]*)/ig;
|
||||
text = text.replace(regex, function(link) {
|
||||
// Add images
|
||||
if (link.match(/(https?:\/\/.[^ ]*\.(?:png|jpg|jpeg|gif))/ig)) {
|
||||
|
||||
@@ -19,7 +19,7 @@ function requestPost(postID) {
|
||||
var scrollBarWidth = window.innerWidth - document.body.offsetWidth;
|
||||
scrollbarMargin(scrollBarWidth, 'hidden');
|
||||
$('#modal-response').show();
|
||||
$('#modal-response').html(data);
|
||||
$('#modal-response').html(fancyText(data));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ function masonry(mode) {
|
||||
* Initialise columns.
|
||||
*/
|
||||
var columns = new Array(columnCount);
|
||||
var $columns = new Array(columnCount);
|
||||
|
||||
for (i = 0; i < columnCount; i++) {
|
||||
$column = $("<div class=\"column\">");
|
||||
$column.width(100/columnCount + "%");
|
||||
@@ -100,7 +100,7 @@ function masonry(mode) {
|
||||
$.each(posts, function() {
|
||||
$post = $("<div class=\"post platform\" onclick=\"requestPost(\'"+this['postID']+"\')\">");
|
||||
$post.append($("<h2>").html(this["title"]));
|
||||
$post.append($("<p>").html(this["content"]));
|
||||
$post.append($("<p>").html(fancyText(this["content"])));
|
||||
$post.append($("<p class=\"subscript\">").text(this["nicetime"]));
|
||||
$post.append($("<p class=\"subscript\">").text("comments: " + this["comments"] + ", niet slechts: " + this["niet_slechts"]));
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
.admin-panel input[type="radio"], input[type="checkbox"] {
|
||||
vertical-align: middle;
|
||||
height: auto;
|
||||
height: 28px;
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
|
||||
@@ -307,9 +307,16 @@ div[data-title]:hover:after {
|
||||
body {
|
||||
font-size: 28px!important;
|
||||
}
|
||||
button, input {
|
||||
button, input, select {
|
||||
font-size: 28px;
|
||||
height: 42px;
|
||||
}
|
||||
textarea {
|
||||
font-size: 28px;
|
||||
}
|
||||
input[type="checkbox"], input[type="radio"] {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,6 +16,8 @@ function getOldChatMessages($user2ID) {
|
||||
`destination` = :user1
|
||||
ORDER BY
|
||||
`creationdate` ASC
|
||||
LIMIT
|
||||
100
|
||||
");
|
||||
|
||||
$stmt->bindParam(":user1", $user1ID);
|
||||
|
||||
Reference in New Issue
Block a user