290420 New theme, personal settings and bugfixes
This commit is contained in:
@ -382,68 +382,68 @@ $query = http_build_query(array_filter(array(
|
||||
});
|
||||
|
||||
|
||||
document.onpaste = function (event) {
|
||||
var items = (event.clipboardData || event.originalEvent.clipboardData).items;
|
||||
/*Make Sure Only One File is Copied*/
|
||||
if (items.length != 1) {
|
||||
return;
|
||||
}
|
||||
var item = items[0];
|
||||
/*Verify If The Copied Item is File*/
|
||||
if (item.kind === 'file') {
|
||||
var file = item.getAsFile();
|
||||
var filename = file.name;
|
||||
/*Get File Extension*/
|
||||
var ext = filename.split('.').reverse()[0].toLowerCase();
|
||||
/*Check Image File Extensions*/
|
||||
if (jQuery.inArray(ext, ['jpg', 'png']) > -1) {
|
||||
/*Create FormData Instance*/
|
||||
var data = new FormData();
|
||||
data.append('file', file);
|
||||
/*Request Ajax With File*/
|
||||
request_ajax_file('upload.php', data, file_uploaded);
|
||||
} else {
|
||||
alert('Invalid File');
|
||||
}
|
||||
}
|
||||
};
|
||||
document.onpaste = function (event) {
|
||||
var items = (event.clipboardData || event.originalEvent.clipboardData).items;
|
||||
/*Make Sure Only One File is Copied*/
|
||||
if (items.length != 1) {
|
||||
return;
|
||||
}
|
||||
var item = items[0];
|
||||
/*Verify If The Copied Item is File*/
|
||||
if (item.kind === 'file') {
|
||||
var file = item.getAsFile();
|
||||
var filename = file.name;
|
||||
/*Get File Extension*/
|
||||
var ext = filename.split('.').reverse()[0].toLowerCase();
|
||||
/*Check Image File Extensions*/
|
||||
if (jQuery.inArray(ext, ['jpg', 'png']) > -1) {
|
||||
/*Create FormData Instance*/
|
||||
var data = new FormData();
|
||||
data.append('file', file);
|
||||
/*Request Ajax With File*/
|
||||
request_ajax_file('upload.php', data, file_uploaded);
|
||||
} else {
|
||||
alert('Invalid File');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function file_uploaded(data) {
|
||||
if ($("#postform .uploadBox").length < 1){
|
||||
$("#postform #status").before('<div class="uploadBox"><ul id="files" style="margin:0px;"></ul></div>');
|
||||
$( function() {
|
||||
$( "#files" ).sortable();
|
||||
$( "#files" ).disableSelection();
|
||||
} );
|
||||
function file_uploaded(data) {
|
||||
if ($("#postform .uploadBox").length < 1){
|
||||
$("#postform #status").before('<div class="uploadBox"><ul id="files" style="margin:0px;"></ul></div>');
|
||||
$( function() {
|
||||
$( "#files" ).sortable();
|
||||
$( "#files" ).disableSelection();
|
||||
} );
|
||||
}
|
||||
var files = JSON.parse(data);
|
||||
$.each(files, function( index, elem ) {
|
||||
$("#files").append('<li class="uploadedImage" id="'+elem[0]+'" style="position:relative; background-image:url('+elem[1]+')"><div class="fontello delpic"></div></li>');
|
||||
});
|
||||
var nfiles = $("#postform .uploadBox").children().length;
|
||||
$("#postform .status").html('');
|
||||
}
|
||||
|
||||
/*Function to Make AJAX Request With File*/
|
||||
function request_ajax_file(ajax_url, ajax_data, ajax_callback) {
|
||||
$("#postform .status").html('<span id="loading" class="animate-spin fontello"></span>');
|
||||
jQuery.ajax({
|
||||
url: ajax_url,
|
||||
data: ajax_data,
|
||||
type: 'POST',
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function (response) {
|
||||
if (typeof ajax_callback == 'function') {
|
||||
ajax_callback(response);
|
||||
} else if (typeof ajax_callback == 'string') {
|
||||
if (ajax_callback != '') {
|
||||
eval(ajax_callback + '(response)');
|
||||
}
|
||||
}
|
||||
var files = JSON.parse(data);
|
||||
$.each(files, function( index, elem ) {
|
||||
$("#files").append('<li class="uploadedImage" id="'+elem[0]+'" style="position:relative; background-image:url('+elem[1]+')"><div class="fontello delpic"></div></li>');
|
||||
});
|
||||
var nfiles = $("#postform .uploadBox").children().length;
|
||||
$("#postform .status").html('');
|
||||
}
|
||||
|
||||
/*Function to Make AJAX Request With File*/
|
||||
function request_ajax_file(ajax_url, ajax_data, ajax_callback) {
|
||||
$("#postform .status").html('<span id="loading" class="animate-spin fontello"></span>');
|
||||
jQuery.ajax({
|
||||
url: ajax_url,
|
||||
data: ajax_data,
|
||||
type: 'POST',
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function (response) {
|
||||
if (typeof ajax_callback == 'function') {
|
||||
ajax_callback(response);
|
||||
} else if (typeof ajax_callback == 'string') {
|
||||
if (ajax_callback != '') {
|
||||
eval(ajax_callback + '(response)');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function upload_files() {
|
||||
$("#postform .status").html('<span id="loading" class="animate-spin fontello"></span>');
|
||||
|
@ -1,12 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<title><?php echo $setting['appname']; ?></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" media='screen and (min-width: 801px)' href='./<?php echo themes("file","css/style.css")?>?id=<?php echo mt_rand(1000, 2500); ?>' />
|
||||
<link rel="stylesheet" media='screen and (max-width: 800px)' href='./<?php echo themes("file","css/mobile.css")?>?id=<?php echo mt_rand(1000, 2500); ?>' />
|
||||
<link rel="stylesheet" href='./<?php echo ($user_settings['theme'] == "custom" ? themes("file","css/color.php") : themes("file","css/color.css"))?>?id=<?php echo mt_rand(1000, 2500); ?>' />
|
||||
<link rel="stylesheet" href="./css/animation.css"><!--[if IE 7]><link rel="stylesheet" href="css/" + font.fontname + "-ie7.css"><![endif]-->
|
||||
<link rel="stylesheet" href="./css/animate.css">
|
||||
<style type="text/css">
|
||||
@font-face {
|
||||
font-family: 'fontello';
|
||||
@ -53,7 +47,7 @@
|
||||
.nte_type span{
|
||||
font-family:fontello;
|
||||
font-size:8px;
|
||||
color:white;
|
||||
color:white !important;
|
||||
margin-top:4px;
|
||||
display:block;
|
||||
}
|
||||
@ -61,7 +55,21 @@
|
||||
#emojisearch {
|
||||
border:0;
|
||||
}
|
||||
|
||||
.loadingImage{
|
||||
width:100px;
|
||||
height:100px;
|
||||
background-image: url("./img/loadingb.gif");
|
||||
background-repeat:no-repeat;
|
||||
}
|
||||
</style>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" media='screen and (min-width: 801px)' href='./<?php echo themes("file","css/style.css")?>?id=<?php echo mt_rand(1000, 2500); ?>' />
|
||||
<link rel="stylesheet" media='screen and (max-width: 800px)' href='./<?php echo themes("file","css/mobile.css")?>?id=<?php echo mt_rand(1000, 2500); ?>' />
|
||||
<link rel="stylesheet" href='./<?php echo ($user_settings['theme'] == "custom" ? themes("file","css/color.php") : themes("file","css/color.css"))?>?id=<?php echo mt_rand(1000, 2500); ?>' />
|
||||
<link rel="stylesheet" href="./css/animation.css"><!--[if IE 7]><link rel="stylesheet" href="css/" + font.fontname + "-ie7.css"><![endif]-->
|
||||
<link rel="stylesheet" href="./css/animate.css">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
@ -74,8 +82,8 @@ if ($logedin) {
|
||||
<div class='gotop'><a href='#top'>▲</a></div>
|
||||
<div class="topbar" style='text-align:center; background-color:none;'>
|
||||
<div class="topbar" style='position:fixed; top:0px; left:0px; height:45px; z-index:99;'>
|
||||
<span style='float:left; line-height:45px;margin-left:10px;'>
|
||||
<a href="./<?php echo ($logedin ? "?mode=home" : ""); ?>" style="font-family: 'patua', serif; font-weight:bold; color:white; font-size:20px; text-decoration:none"><?php echo $setting['appname']; ?></a>
|
||||
<span style='float:left; line-height:45px;padding-left:10px;' class='appname'>
|
||||
<a href="./<?php echo ($logedin ? "?mode=home" : ""); ?>" style="font-family: 'patua', serif; font-weight:bold; color:white; font-size:20px; text-decoration:none" ><?php echo $setting['appname']; ?></a>
|
||||
</span>
|
||||
|
||||
<?php if ($logedin): ?>
|
||||
|
@ -1,14 +1,12 @@
|
||||
<aside>
|
||||
<?php
|
||||
$info = api_get("accounts/verify_credentials");
|
||||
|
||||
if ($logedin || $tl['mode'] == 'user') {
|
||||
echo "
|
||||
<div class='side_element' style='margin:0px; width:100%;'>
|
||||
<div style='width:100%; height:120px; display:block; background-color:#" . averageColor($info['avatar']) . "; background-size:cover; background-image:url(" . $info['header_static'] . "); '></div>
|
||||
<div style='width:100%; height:120px; display:block; background-color:#" . averageColor($info['avatar']) . "; background-size:cover; background-image:url(" . $info['header_static'] . "); ' class='profileheader'></div>
|
||||
<div class='avatar' style='background-color:white; background-image:url(" . $info['avatar'] . "); text-align:center; float:none; display:inline-block; border:3px solid white; margin-top:-50px; border-radius:90px;'></div>
|
||||
<div style='clear:both; margin-top:-15px; padding-bottom:10px;'>" . ($logedin ? "<a href='?mode=account' class='ldr'>" : "") . "<span style='font-weight:bold; font-size:22px;'>
|
||||
" . $info['display_name'] . "</span>" . ($logedin ? "</a>" : "") . "
|
||||
" . emojify($info['display_name'], $info['emojis'], 20). "</span>" . ($logedin ? "</a>" : "") . "
|
||||
<br><span>(@" . $info['acct'] . ")</span>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user