mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-14 11:26:26 +00:00
Empty commit
This commit is contained in:
parent
b5fd54d1d2
commit
f20fe4b1aa
@ -221,6 +221,7 @@
|
|||||||
$JsonPosts[] = array(
|
$JsonPosts[] = array(
|
||||||
'postId' => (int) $PostID,
|
'postId' => (int) $PostID,
|
||||||
'addedTime' => $AddedTime,
|
'addedTime' => $AddedTime,
|
||||||
|
'bbBody' => $Body,
|
||||||
'body' => $Text->full_format($Body),
|
'body' => $Text->full_format($Body),
|
||||||
'editedUserId' => (int) $EditedUserID,
|
'editedUserId' => (int) $EditedUserID,
|
||||||
'editedTime' => $EditedTime,
|
'editedTime' => $EditedTime,
|
||||||
|
@ -71,6 +71,7 @@
|
|||||||
'senderId' => (int) $SenderID,
|
'senderId' => (int) $SenderID,
|
||||||
'senderName' => $Users[(int)$SenderID]['Username'],
|
'senderName' => $Users[(int)$SenderID]['Username'],
|
||||||
'sentDate' => $SentDate,
|
'sentDate' => $SentDate,
|
||||||
|
'bbBody' => $Body,
|
||||||
'body' => $Text->full_format($Body)
|
'body' => $Text->full_format($Body)
|
||||||
);
|
);
|
||||||
$JsonMessages[] = $JsonMessage;
|
$JsonMessages[] = $JsonMessage;
|
||||||
|
@ -47,6 +47,32 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// News
|
||||||
|
$MyNews = $LoggedUser['LastReadNews'];
|
||||||
|
$CurrentNews = $Cache->get_value('news_latest_id');
|
||||||
|
if ($CurrentNews === false) {
|
||||||
|
$DB->query("SELECT ID FROM news ORDER BY Time DESC LIMIT 1");
|
||||||
|
if ($DB->record_count() == 1) {
|
||||||
|
list($CurrentNews) = $DB->next_record();
|
||||||
|
} else {
|
||||||
|
$CurrentNews = -1;
|
||||||
|
}
|
||||||
|
$Cache->cache_value('news_latest_id', $CurrentNews, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Blog
|
||||||
|
$MyBlog = $LoggedUser['LastReadBlog'];
|
||||||
|
$CurrentBlog = $Cache->get_value('blog_latest_id');
|
||||||
|
if ($CurrentBlog === false) {
|
||||||
|
$DB->query("SELECT ID FROM blog WHERE Important = 1 ORDER BY Time DESC LIMIT 1");
|
||||||
|
if ($DB->record_count() == 1) {
|
||||||
|
list($CurrentBlog) = $DB->next_record();
|
||||||
|
} else {
|
||||||
|
$CurrentBlog = -1;
|
||||||
|
}
|
||||||
|
$Cache->cache_value('blog_latest_id', $CurrentBlog, 0);
|
||||||
|
}
|
||||||
|
|
||||||
print json_encode(
|
print json_encode(
|
||||||
array(
|
array(
|
||||||
'status' => 'success',
|
'status' => 'success',
|
||||||
@ -57,7 +83,9 @@
|
|||||||
'passkey'=> $LoggedUser['torrent_pass'],
|
'passkey'=> $LoggedUser['torrent_pass'],
|
||||||
'notifications' => array(
|
'notifications' => array(
|
||||||
'messages'=> (int) $NewMessages,
|
'messages'=> (int) $NewMessages,
|
||||||
'notifications' => (int) $NewNotifications
|
'notifications' => (int) $NewNotifications,
|
||||||
|
'newAnnouncement' => $MyNews < $CurrentNews,
|
||||||
|
'newBlog' => $MyBlog < $CurrentBlog
|
||||||
),
|
),
|
||||||
'userstats' => array(
|
'userstats' => array(
|
||||||
'uploaded' => (int) $LoggedUser['BytesUploaded'],
|
'uploaded' => (int) $LoggedUser['BytesUploaded'],
|
||||||
@ -65,7 +93,7 @@
|
|||||||
'ratio' => (float) $Ratio,
|
'ratio' => (float) $Ratio,
|
||||||
'requiredratio' => (float) $LoggedUser['RequiredRatio'],
|
'requiredratio' => (float) $LoggedUser['RequiredRatio'],
|
||||||
'class' => $ClassLevels[$LoggedUser['Class']]['Name']
|
'class' => $ClassLevels[$LoggedUser['Class']]['Name']
|
||||||
),
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -62,6 +62,7 @@
|
|||||||
$JsonComments[] = array(
|
$JsonComments[] = array(
|
||||||
'postId' => (int) $PostID,
|
'postId' => (int) $PostID,
|
||||||
'addedTime' => $AddedTime,
|
'addedTime' => $AddedTime,
|
||||||
|
'bbBody' => $Body,
|
||||||
'body' => $Text->full_format($Body),
|
'body' => $Text->full_format($Body),
|
||||||
'editedUserId' => (int) $EditedUserID,
|
'editedUserId' => (int) $EditedUserID,
|
||||||
'editedTime' => $EditedTime,
|
'editedTime' => $EditedTime,
|
||||||
|
@ -8,11 +8,23 @@ function toggleChecks(formElem,masterElem) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Lightbox stuff
|
//Lightbox stuff
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If loading from a thumbnail the lightbox is shown first with a "loading" screen
|
||||||
|
* while the full size image loads, then the html of the lightbox is replaced with the image.
|
||||||
|
*/
|
||||||
|
|
||||||
var lightbox = {
|
var lightbox = {
|
||||||
init: function (image, size) {
|
init: function (image, size) {
|
||||||
if(typeof(image)=='string') {
|
if(typeof(image)=='string') {
|
||||||
|
$('#lightbox').show().listen('click',lightbox.unbox).raw().innerHTML =
|
||||||
|
'<p size="7" style="color:gray;font-size:50px">Loading...<p>';
|
||||||
|
$('#curtain').show().listen('click',lightbox.unbox);
|
||||||
var src = image;
|
var src = image;
|
||||||
image = new Image();
|
image = new Image();
|
||||||
|
image.onload = function() {
|
||||||
|
lightbox.box_async(image);
|
||||||
|
}
|
||||||
image.src = src;
|
image.src = src;
|
||||||
}
|
}
|
||||||
if (image.naturalWidth === undefined) {
|
if (image.naturalWidth === undefined) {
|
||||||
@ -36,6 +48,15 @@ var lightbox = {
|
|||||||
$('#curtain').show().listen('click',lightbox.unbox);
|
$('#curtain').show().listen('click',lightbox.unbox);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
box_async: function (image) {
|
||||||
|
var hasA = false;
|
||||||
|
if(image.parentNode != null && image.parentNode.tagName.toUpperCase() == 'A') {
|
||||||
|
hasA = true;
|
||||||
|
}
|
||||||
|
if(!hasA) {
|
||||||
|
$('#lightbox').raw().innerHTML = '<img src="' + image.src + '" />';
|
||||||
|
}
|
||||||
|
},
|
||||||
unbox: function (data) {
|
unbox: function (data) {
|
||||||
$('#curtain').hide();
|
$('#curtain').hide();
|
||||||
$('#lightbox').hide().raw().innerHTML = '';
|
$('#lightbox').hide().raw().innerHTML = '';
|
||||||
|
Loading…
Reference in New Issue
Block a user