Merge branch 'rambutan'
Conflicts: assets/min/main.js
This commit is contained in:
commit
c655fd0ee4
5
README
Normal file
5
README
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
Experimental fork of Lychee, a photo management system, that features a number of improvements, including:
|
||||||
|
|
||||||
|
* Faster photo browsing thanks to caching.
|
||||||
|
* Default sort order of albums is changed from new to old.
|
||||||
|
* Preserves scroll position when changing from albums to album and vice versa
|
@ -290,6 +290,8 @@ album = {
|
|||||||
listed = false,
|
listed = false,
|
||||||
downloadable = false;
|
downloadable = false;
|
||||||
|
|
||||||
|
albums.refresh();
|
||||||
|
|
||||||
if (!visible.message()&&album.json.public==0) {
|
if (!visible.message()&&album.json.public==0) {
|
||||||
|
|
||||||
modal.show("Share Album", "This album will be shared with the following properties:</p><form><div class='choice'><input type='checkbox' name='listed' value='listed' checked><h2>Visible</h2><p>Listed to visitors of your Lychee.</p></div><div class='choice'><input type='checkbox' name='downloadable' value='downloadable'><h2>Downloadable</h2><p>Visitors of your Lychee can download this album.</p></div><div class='choice'><input type='checkbox' name='password' value='password'><h2>Password protected</h2><p>Only accessible with a valid password.<input class='text' type='password' placeholder='password' value='' style='display: none;'></p></div></form><p style='display: none;'>", [["Share Album", function() { album.setPublic(album.getID(), e) }], ["Cancel", function() {}]], -170);
|
modal.show("Share Album", "This album will be shared with the following properties:</p><form><div class='choice'><input type='checkbox' name='listed' value='listed' checked><h2>Visible</h2><p>Listed to visitors of your Lychee.</p></div><div class='choice'><input type='checkbox' name='downloadable' value='downloadable'><h2>Downloadable</h2><p>Visitors of your Lychee can download this album.</p></div><div class='choice'><input type='checkbox' name='password' value='password'><h2>Password protected</h2><p>Only accessible with a valid password.<input class='text' type='password' placeholder='password' value='' style='display: none;'></p></div></form><p style='display: none;'>", [["Share Album", function() { album.setPublic(album.getID(), e) }], ["Cancel", function() {}]], -170);
|
||||||
|
@ -18,68 +18,72 @@ albums = {
|
|||||||
lychee.animate(".album:nth-child(-n+50), .photo:nth-child(-n+50)", "contentZoomOut");
|
lychee.animate(".album:nth-child(-n+50), .photo:nth-child(-n+50)", "contentZoomOut");
|
||||||
lychee.animate(".divider", "fadeOut");
|
lychee.animate(".divider", "fadeOut");
|
||||||
|
|
||||||
startTime = new Date().getTime();
|
startTime = new Date().getTime();
|
||||||
|
|
||||||
lychee.api("getAlbums", function(data) {
|
|
||||||
|
|
||||||
/* Smart Albums */
|
if(this.json == null) {
|
||||||
data.unsortedAlbum = {
|
lychee.api("getAlbums", function(data) {
|
||||||
id: 0,
|
|
||||||
title: "Unsorted",
|
|
||||||
sysdate: data.unsortedNum + " photos",
|
|
||||||
unsorted: 1,
|
|
||||||
thumb0: data.unsortedThumb0,
|
|
||||||
thumb1: data.unsortedThumb1,
|
|
||||||
thumb2: data.unsortedThumb2
|
|
||||||
};
|
|
||||||
|
|
||||||
data.starredAlbum = {
|
/* Smart Albums */
|
||||||
id: "f",
|
data.unsortedAlbum = {
|
||||||
title: "Starred",
|
id: 0,
|
||||||
sysdate: data.starredNum + " photos",
|
title: "Unsorted",
|
||||||
star: 1,
|
sysdate: data.unsortedNum + " photos",
|
||||||
thumb0: data.starredThumb0,
|
unsorted: 1,
|
||||||
thumb1: data.starredThumb1,
|
thumb0: data.unsortedThumb0,
|
||||||
thumb2: data.starredThumb2
|
thumb1: data.unsortedThumb1,
|
||||||
};
|
thumb2: data.unsortedThumb2
|
||||||
|
};
|
||||||
|
|
||||||
data.publicAlbum = {
|
data.starredAlbum = {
|
||||||
id: "s",
|
id: "f",
|
||||||
title: "Public",
|
title: "Starred",
|
||||||
sysdate: data.publicNum + " photos",
|
sysdate: data.starredNum + " photos",
|
||||||
public: 1,
|
star: 1,
|
||||||
thumb0: data.publicThumb0,
|
thumb0: data.starredThumb0,
|
||||||
thumb1: data.publicThumb1,
|
thumb1: data.starredThumb1,
|
||||||
thumb2: data.publicThumb2
|
thumb2: data.starredThumb2
|
||||||
};
|
};
|
||||||
|
|
||||||
data.recentAlbum = {
|
data.publicAlbum = {
|
||||||
id: "r",
|
id: "s",
|
||||||
title: "Recent",
|
title: "Public",
|
||||||
sysdate: data.recentNum + " photos",
|
sysdate: data.publicNum + " photos",
|
||||||
recent: 1,
|
public: 1,
|
||||||
thumb0: data.recentThumb0,
|
thumb0: data.publicThumb0,
|
||||||
thumb1: data.recentThumb1,
|
thumb1: data.publicThumb1,
|
||||||
thumb2: data.recentThumb2
|
thumb2: data.publicThumb2
|
||||||
};
|
};
|
||||||
|
|
||||||
albums.json = data;
|
data.recentAlbum = {
|
||||||
|
id: "r",
|
||||||
|
title: "Recent",
|
||||||
|
sysdate: data.recentNum + " photos",
|
||||||
|
recent: 1,
|
||||||
|
thumb0: data.recentThumb0,
|
||||||
|
thumb1: data.recentThumb1,
|
||||||
|
thumb2: data.recentThumb2
|
||||||
|
};
|
||||||
|
|
||||||
durationTime = (new Date().getTime() - startTime);
|
albums.json = data;
|
||||||
if (durationTime>300) waitTime = 0; else waitTime = 300 - durationTime;
|
|
||||||
if (!visible.albums()&&!visible.photo()&&!visible.album()) waitTime = 0;
|
|
||||||
if (visible.album()&&lychee.content.html()==="") waitTime = 0;
|
|
||||||
|
|
||||||
setTimeout(function() {
|
durationTime = (new Date().getTime() - startTime);
|
||||||
|
if (durationTime>300) waitTime = 0; else waitTime = 300 - durationTime;
|
||||||
|
if (!visible.albums()&&!visible.photo()&&!visible.album()) waitTime = 0;
|
||||||
|
if (visible.album()&&lychee.content.html()==="") waitTime = 0;
|
||||||
|
|
||||||
|
setTimeout(function() {
|
||||||
|
view.header.mode("albums");
|
||||||
|
view.albums.init();
|
||||||
|
lychee.animate(".album:nth-child(-n+50), .photo:nth-child(-n+50)", "contentZoomIn");
|
||||||
|
|
||||||
|
}, waitTime);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
view.header.mode("albums");
|
view.header.mode("albums");
|
||||||
view.albums.init();
|
view.albums.init();
|
||||||
lychee.animate(".album:nth-child(-n+50), .photo:nth-child(-n+50)", "contentZoomIn");
|
lychee.animate(".album:nth-child(-n+50), .photo:nth-child(-n+50)", "contentZoomIn");
|
||||||
|
}
|
||||||
}, waitTime);
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
parse: function(album) {
|
parse: function(album) {
|
||||||
@ -94,6 +98,10 @@ albums = {
|
|||||||
if (!album.thumb2) album.thumb2 = "assets/img/no_images.svg";
|
if (!album.thumb2) album.thumb2 = "assets/img/no_images.svg";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
},
|
||||||
|
|
||||||
|
refresh: function() {
|
||||||
|
this.json = null;
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
@ -34,7 +34,7 @@ build = {
|
|||||||
title = albumJSON.title,
|
title = albumJSON.title,
|
||||||
typeThumb = "";
|
typeThumb = "";
|
||||||
|
|
||||||
if (title.length>18) {
|
if (title != null && title.length>18) {
|
||||||
title = albumJSON.title.substr(0, 18) + "...";
|
title = albumJSON.title.substr(0, 18) + "...";
|
||||||
longTitle = albumJSON.title;
|
longTitle = albumJSON.title;
|
||||||
}
|
}
|
||||||
@ -76,7 +76,7 @@ build = {
|
|||||||
longTitle = "",
|
longTitle = "",
|
||||||
title = photoJSON.title;
|
title = photoJSON.title;
|
||||||
|
|
||||||
if (title.length>18) {
|
if (title != null && title.length>18) {
|
||||||
title = photoJSON.title.substr(0, 18) + "...";
|
title = photoJSON.title.substr(0, 18) + "...";
|
||||||
longTitle = photoJSON.title;
|
longTitle = photoJSON.title;
|
||||||
}
|
}
|
||||||
@ -195,8 +195,8 @@ build = {
|
|||||||
modal += "<h1><a class='icon-lock'></a> Sign In</h1>";
|
modal += "<h1><a class='icon-lock'></a> Sign In</h1>";
|
||||||
modal += "<a class='close icon-remove-sign'></a>";
|
modal += "<a class='close icon-remove-sign'></a>";
|
||||||
modal += "<div class='sign_in'>";
|
modal += "<div class='sign_in'>";
|
||||||
modal += "<input id='username' type='text' name='' value='' placeholder='username'>";
|
modal += "<input id='username' type='text' name='username' value='' placeholder='username'>";
|
||||||
modal += "<input id='password' type='password' name='' value='' placeholder='password'>";
|
modal += "<input id='password' type='password' name='password' value='' placeholder='password'>";
|
||||||
modal += "</div>";
|
modal += "</div>";
|
||||||
modal += "<div id='version'>Version " + lychee.version + "<span> – <a target='_blank' href='" + lychee.updateURL + "'>Update available!</a><span></div>";
|
modal += "<div id='version'>Version " + lychee.version + "<span> – <a target='_blank' href='" + lychee.updateURL + "'>Update available!</a><span></div>";
|
||||||
modal += "<a onclick='lychee.login()' class='button active'>Sign in</a>";
|
modal += "<a onclick='lychee.login()' class='button active'>Sign in</a>";
|
||||||
|
@ -181,7 +181,7 @@ var lychee = {
|
|||||||
if (albumID&&photoID) {
|
if (albumID&&photoID) {
|
||||||
|
|
||||||
// Trash data
|
// Trash data
|
||||||
albums.json = null;
|
//albums.json = null;
|
||||||
photo.json = null;
|
photo.json = null;
|
||||||
|
|
||||||
// Show Photo
|
// Show Photo
|
||||||
@ -190,11 +190,12 @@ var lychee = {
|
|||||||
album.load(albumID, true);
|
album.load(albumID, true);
|
||||||
}
|
}
|
||||||
photo.load(photoID, albumID);
|
photo.load(photoID, albumID);
|
||||||
|
photo.preloadNext(photoID,albumID);
|
||||||
|
|
||||||
} else if (albumID) {
|
} else if (albumID) {
|
||||||
|
|
||||||
// Trash data
|
// Trash data
|
||||||
albums.json = null;
|
//albums.json = null;
|
||||||
photo.json = null;
|
photo.json = null;
|
||||||
|
|
||||||
// Show Album
|
// Show Album
|
||||||
@ -205,7 +206,7 @@ var lychee = {
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Trash data
|
// Trash data
|
||||||
albums.json = null;
|
//albums.json = null;
|
||||||
album.json = null;
|
album.json = null;
|
||||||
photo.json = null;
|
photo.json = null;
|
||||||
search.code = "";
|
search.code = "";
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
* @copyright 2014 by Tobias Reich
|
* @copyright 2014 by Tobias Reich
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
cache = null;
|
||||||
photo = {
|
photo = {
|
||||||
|
|
||||||
json: null,
|
json: null,
|
||||||
@ -49,6 +50,20 @@ photo = {
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//preload the next photo for better response time
|
||||||
|
preloadNext: function(photoID) {
|
||||||
|
if(album.json &&
|
||||||
|
album.json.content &&
|
||||||
|
album.json.content[photoID] &&
|
||||||
|
album.json.content[photoID].nextPhoto!="") {
|
||||||
|
|
||||||
|
var nextPhoto = album.json.content[photoID].nextPhoto;
|
||||||
|
var url = album.json.content[nextPhoto].url;
|
||||||
|
cache = new Image();
|
||||||
|
cache.src = url;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
parse: function() {
|
parse: function() {
|
||||||
|
|
||||||
if (!photo.json.title) photo.json.title = "Untitled";
|
if (!photo.json.title) photo.json.title = "Untitled";
|
||||||
@ -297,6 +312,8 @@ photo = {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
albums.refresh();
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
setPublic: function(photoID, e) {
|
setPublic: function(photoID, e) {
|
||||||
@ -304,12 +321,14 @@ photo = {
|
|||||||
var params;
|
var params;
|
||||||
|
|
||||||
if (photo.json.public==2) {
|
if (photo.json.public==2) {
|
||||||
|
|
||||||
modal.show("Public Album", "This photo is located in a public album. To make this photo private or public, edit the visibility of the associated album.", [["Show Album", function() { lychee.goto(photo.json.original_album) }], ["Close", function() {}]]);
|
modal.show("Public Album", "This photo is located in a public album. To make this photo private or public, edit the visibility of the associated album.", [["Show Album", function() { lychee.goto(photo.json.original_album) }], ["Close", function() {}]]);
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
albums.refresh();
|
||||||
|
|
||||||
|
|
||||||
if (visible.photo()) {
|
if (visible.photo()) {
|
||||||
|
|
||||||
photo.json.public = (photo.json.public==0) ? 1 : 0;
|
photo.json.public = (photo.json.public==0) ? 1 : 0;
|
||||||
|
@ -122,6 +122,8 @@ view = {
|
|||||||
|
|
||||||
content: {
|
content: {
|
||||||
|
|
||||||
|
scroll_pos: 0,
|
||||||
|
|
||||||
init: function() {
|
init: function() {
|
||||||
|
|
||||||
var smartData = "",
|
var smartData = "",
|
||||||
@ -135,14 +137,16 @@ view = {
|
|||||||
if (!lychee.publicMode) smartData = build.divider("Smart Albums") + build.album(albums.json.unsortedAlbum) + build.album(albums.json.starredAlbum) + build.album(albums.json.publicAlbum) + build.album(albums.json.recentAlbum);
|
if (!lychee.publicMode) smartData = build.divider("Smart Albums") + build.album(albums.json.unsortedAlbum) + build.album(albums.json.starredAlbum) + build.album(albums.json.publicAlbum) + build.album(albums.json.recentAlbum);
|
||||||
|
|
||||||
/* Albums */
|
/* Albums */
|
||||||
if (albums.json.content) {
|
|
||||||
|
|
||||||
if (!lychee.publicMode) albumsData = build.divider("Albums");
|
if (albums.json.content) {
|
||||||
$.each(albums.json.content, function() {
|
$.each(albums.json.content, function() {
|
||||||
albums.parse(this);
|
albums.parse(this);
|
||||||
albumsData += build.album(this);
|
|
||||||
|
//display albums in reverse order
|
||||||
|
albumsData = build.album(this) + albumsData;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!lychee.publicMode) albumsData = build.divider("Albums") + albumsData;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (smartData===""&&albumsData==="") {
|
if (smartData===""&&albumsData==="") {
|
||||||
@ -154,6 +158,12 @@ view = {
|
|||||||
|
|
||||||
$("img[data-type!='nonretina']").retina();
|
$("img[data-type!='nonretina']").retina();
|
||||||
|
|
||||||
|
//restore scroll
|
||||||
|
if (view.albums.content.scroll_pos != null) {
|
||||||
|
//$("html, body").setanimate({ scrollTop: view.albums.content.scroll_pos }, "slow");
|
||||||
|
$("html, body").scrollTop(view.albums.content.scroll_pos);
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
title: function(albumID) {
|
title: function(albumID) {
|
||||||
@ -163,7 +173,7 @@ view = {
|
|||||||
title = albums.json.content[albumID].title;
|
title = albums.json.content[albumID].title;
|
||||||
|
|
||||||
if (albums.json.content[albumID].password) prefix = "<span class='icon-lock'></span> ";
|
if (albums.json.content[albumID].password) prefix = "<span class='icon-lock'></span> ";
|
||||||
if (title.length>18) {
|
if (title != null && title.length>18) {
|
||||||
longTitle = title;
|
longTitle = title;
|
||||||
title = title.substr(0, 18) + "...";
|
title = title.substr(0, 18) + "...";
|
||||||
}
|
}
|
||||||
@ -251,6 +261,10 @@ view = {
|
|||||||
|
|
||||||
$("img[data-type!='svg']").retina();
|
$("img[data-type!='svg']").retina();
|
||||||
|
|
||||||
|
view.albums.content.scroll_pos = $(document).scrollTop();
|
||||||
|
//scroll to top
|
||||||
|
$("html, body").animate({ scrollTop: 0 }, "slow");
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
title: function(photoID) {
|
title: function(photoID) {
|
||||||
@ -258,7 +272,7 @@ view = {
|
|||||||
var longTitle = "",
|
var longTitle = "",
|
||||||
title = album.json.content[photoID].title;
|
title = album.json.content[photoID].title;
|
||||||
|
|
||||||
if (title.length>18) {
|
if (title != null && title.length>18) {
|
||||||
longTitle = title;
|
longTitle = title;
|
||||||
title = title.substr(0, 18) + "...";
|
title = title.substr(0, 18) + "...";
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
4279
assets/min/main.js
4279
assets/min/main.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -31,7 +31,7 @@ gulp.task('view', function () {
|
|||||||
.pipe(gulp.dest('../assets/min/'));
|
.pipe(gulp.dest('../assets/min/'));
|
||||||
|
|
||||||
});
|
});
|
||||||
|
/*
|
||||||
gulp.task('js', function () {
|
gulp.task('js', function () {
|
||||||
|
|
||||||
gulp.src(paths.js)
|
gulp.src(paths.js)
|
||||||
@ -39,6 +39,15 @@ gulp.task('js', function () {
|
|||||||
.pipe(plugins.uglify())
|
.pipe(plugins.uglify())
|
||||||
.pipe(gulp.dest('../assets/min/'));
|
.pipe(gulp.dest('../assets/min/'));
|
||||||
|
|
||||||
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
|
gulp.task('js', function () {
|
||||||
|
|
||||||
|
gulp.src(paths.js)
|
||||||
|
.pipe(plugins.concat('main.js', {newLine: "\n"}))
|
||||||
|
.pipe(gulp.dest('../assets/min/'));
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('css', function () {
|
gulp.task('css', function () {
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
if (!defined('LYCHEE')) exit('Error: Direct access is not allowed!');
|
if (!defined('LYCHEE')) exit('Error: Direct access is not allowed!');
|
||||||
if (!defined('LYCHEE_ACCESS_ADMIN')) exit('Error: You are not allowed to access this area!');
|
if (!defined('LYCHEE_ACCESS_ADMIN')) exit('Error: You are not allowed to access this area!');
|
||||||
|
|
||||||
|
|
||||||
class Admin extends Access {
|
class Admin extends Access {
|
||||||
|
|
||||||
public function check($fn) {
|
public function check($fn) {
|
||||||
@ -72,7 +73,6 @@ class Admin extends Access {
|
|||||||
|
|
||||||
$album = new Album($this->database, $this->plugins, $this->settings, null);
|
$album = new Album($this->database, $this->plugins, $this->settings, null);
|
||||||
echo json_encode($album->getAll(false));
|
echo json_encode($album->getAll(false));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getAlbum() {
|
private function getAlbum() {
|
||||||
|
@ -8,6 +8,17 @@
|
|||||||
|
|
||||||
if (!defined('LYCHEE')) exit('Error: Direct access is not allowed!');
|
if (!defined('LYCHEE')) exit('Error: Direct access is not allowed!');
|
||||||
|
|
||||||
|
|
||||||
|
function debug_to_console( $data ) {
|
||||||
|
|
||||||
|
if ( is_array( $data ) )
|
||||||
|
$output = "<script>console.log( 'Debug Objects: " . implode( ',', $data) . "' );</script>";
|
||||||
|
else
|
||||||
|
$output = "<script>console.log( 'Debug Objects: " . $data . "' );</script>";
|
||||||
|
|
||||||
|
echo $output;
|
||||||
|
}
|
||||||
|
|
||||||
class Album extends Module {
|
class Album extends Module {
|
||||||
|
|
||||||
private $database = null;
|
private $database = null;
|
||||||
@ -64,26 +75,26 @@ class Album extends Module {
|
|||||||
switch ($this->albumIDs) {
|
switch ($this->albumIDs) {
|
||||||
|
|
||||||
case 'f': $return['public'] = false;
|
case 'f': $return['public'] = false;
|
||||||
$query = "SELECT id, title, tags, public, star, album, thumbUrl, takestamp FROM lychee_photos WHERE star = 1 " . $this->settings['sorting'];
|
$query = "SELECT id, title, tags, public, star, album, thumbUrl, takestamp, url FROM lychee_photos WHERE star = 1 " . $this->settings['sorting'];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 's': $return['public'] = false;
|
case 's': $return['public'] = false;
|
||||||
$query = "SELECT id, title, tags, public, star, album, thumbUrl, takestamp FROM lychee_photos WHERE public = 1 " . $this->settings['sorting'];
|
$query = "SELECT id, title, tags, public, star, album, thumbUrl, takestamp, url FROM lychee_photos WHERE public = 1 " . $this->settings['sorting'];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'r': $return['public'] = false;
|
case 'r': $return['public'] = false;
|
||||||
$query = "SELECT id, title, tags, public, star, album, thumbUrl, takestamp FROM lychee_photos WHERE LEFT(id, 10) >= unix_timestamp(DATE_SUB(NOW(), INTERVAL 1 DAY)) " . $this->settings['sorting'];
|
$query = "SELECT id, title, tags, public, star, album, thumbUrl, takestamp, url FROM lychee_photos WHERE LEFT(id, 10) >= unix_timestamp(DATE_SUB(NOW(), INTERVAL 1 DAY)) " . $this->settings['sorting'];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '0': $return['public'] = false;
|
case '0': $return['public'] = false;
|
||||||
$query = "SELECT id, title, tags, public, star, album, thumbUrl, takestamp FROM lychee_photos WHERE album = 0 " . $this->settings['sorting'];
|
$query = "SELECT id, title, tags, public, star, album, thumbUrl, takestamp, url FROM lychee_photos WHERE album = 0 " . $this->settings['sorting'];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default: $albums = $this->database->query("SELECT * FROM lychee_albums WHERE id = '$this->albumIDs' LIMIT 1;");
|
default: $albums = $this->database->query("SELECT * FROM lychee_albums WHERE id = '$this->albumIDs' LIMIT 1;");
|
||||||
$return = $albums->fetch_assoc();
|
$return = $albums->fetch_assoc();
|
||||||
$return['sysdate'] = date('d M. Y', $return['sysstamp']);
|
$return['sysdate'] = date('d M. Y', $return['sysstamp']);
|
||||||
$return['password'] = ($return['password']=='' ? false : true);
|
$return['password'] = ($return['password']=='' ? false : true);
|
||||||
$query = "SELECT id, title, tags, public, star, album, thumbUrl, takestamp FROM lychee_photos WHERE album = '$this->albumIDs' " . $this->settings['sorting'];
|
$query = "SELECT id, title, tags, public, star, album, thumbUrl, takestamp, url FROM lychee_photos WHERE album = '$this->albumIDs' " . $this->settings['sorting'];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -99,6 +110,9 @@ class Album extends Module {
|
|||||||
$photo['nextPhoto'] = '';
|
$photo['nextPhoto'] = '';
|
||||||
$photo['thumbUrl'] = LYCHEE_URL_UPLOADS_THUMB . $photo['thumbUrl'];
|
$photo['thumbUrl'] = LYCHEE_URL_UPLOADS_THUMB . $photo['thumbUrl'];
|
||||||
|
|
||||||
|
# Parse url
|
||||||
|
$photo['url'] = LYCHEE_URL_UPLOADS_BIG . $photo['url'];
|
||||||
|
|
||||||
if (isset($photo['takestamp'])&&$photo['takestamp']!=='0') {
|
if (isset($photo['takestamp'])&&$photo['takestamp']!=='0') {
|
||||||
$photo['cameraDate'] = 1;
|
$photo['cameraDate'] = 1;
|
||||||
$photo['sysdate'] = date('d F Y', $photo['takestamp']);
|
$photo['sysdate'] = date('d F Y', $photo['takestamp']);
|
||||||
|
Loading…
Reference in New Issue
Block a user