Preview: http://4.ii.gl/4VnAws.png Added changelog ticker system in front page.

Optional enable/disable it in config.php
Only refreshes the cache when any changes are being done to it.
This looks way more practical than a stupid news ticker. Inspiration from: http://nelvara.com/
This commit is contained in:
Stefan Brannfjell
2014-05-05 23:12:37 +02:00
parent f3efa41baf
commit 05a1509358
5 changed files with 45 additions and 2 deletions

View File

@@ -54,7 +54,7 @@ if (user_logged_in()) {
<h1>Changelog</h1>
<?php
$cache = new Cache('engine/cache/changelog');
if ($cache->hasExpired() || $updateCache === true) {
if ($updateCache === true) {
$changelogs = mysql_select_multi("SELECT `id`, `text`, `time`, `report_id`, `status` FROM `znote_changelog` ORDER BY `id` DESC;");
$cache->setContent($changelogs);
@@ -64,7 +64,7 @@ if ($cache->hasExpired() || $updateCache === true) {
}
if (isset($changelogs) && !empty($changelogs) && $changelogs !== false) {
?>
<table>
<table id="changelogTable">
<tr class="yellow">
<td>Changelogs</td>
<?php