From 0b7033a1ba4e002961b38e6cebe2dc175e894773 Mon Sep 17 00:00:00 2001 From: Kim Huebel Date: Sat, 22 Jun 2019 12:34:06 +0200 Subject: [PATCH] Made the whole thing configurable with application/config/cloudlog.php --- application/config/autoload.php | 2 +- application/config/cloudlog.php | 13 ++++++++++++- application/views/dashboard/index.php | 2 +- application/views/view_log/qso.php | 4 ++-- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/application/config/autoload.php b/application/config/autoload.php index 7fe52ac03..64ea515d5 100644 --- a/application/config/autoload.php +++ b/application/config/autoload.php @@ -80,7 +80,7 @@ $autoload['helper'] = array('url'); | */ -$autoload['config'] = array(); +$autoload['config'] = array('cloudlog'); /* diff --git a/application/config/cloudlog.php b/application/config/cloudlog.php index e41f7e4b9..aa1286655 100644 --- a/application/config/cloudlog.php +++ b/application/config/cloudlog.php @@ -5,4 +5,15 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * Config file for storing fixed variables * -*/ \ No newline at end of file +*/ + +/* +|-------------------------------------------------------------------------- +| Show time on dashboard and QSO-details if not logged in +|-------------------------------------------------------------------------- +| +| If you want to show QSO-times (additional to the date) on the dashboard +| and on QSO-detail-view, set this to TRUE, otherwise set it to FALSE +| +*/ +$config['show_time'] = FALSE; \ No newline at end of file diff --git a/application/views/dashboard/index.php b/application/views/dashboard/index.php index 3ca63a9ca..a38241656 100644 --- a/application/views/dashboard/index.php +++ b/application/views/dashboard/index.php @@ -38,7 +38,7 @@ foreach ($last_five_qsos->result() as $row) { ?> '; ?> COL_TIME_ON); echo date('d/m/y', $timestamp); ?> - config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) { ?> + config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?> COL_TIME_ON); echo date('H:i', $timestamp); ?> **:** diff --git a/application/views/view_log/qso.php b/application/views/view_log/qso.php index a72f6d43e..e3dd08d4e 100644 --- a/application/views/view_log/qso.php +++ b/application/views/view_log/qso.php @@ -1,7 +1,7 @@ num_rows() > 0) { foreach ($query->result() as $row) { ?> - config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) { ?> + config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?>

QSO with COL_CALL; ?> on the COL_TIME_ON); echo date('d/m/y', $timestamp); $timestamp = strtotime($row->COL_TIME_ON); echo " at ".date('H:i', $timestamp); ?>

QSO with COL_CALL; ?> on the COL_TIME_ON); echo date('d/m/y', $timestamp); $timestamp = strtotime($row->COL_TIME_ON); echo " at **:**"?>

@@ -13,7 +13,7 @@ - config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) { ?> + config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?>
Date/TimeCOL_TIME_ON); echo date('d/m/y', $timestamp); $timestamp = strtotime($row->COL_TIME_ON); echo " at ".date('H:i', $timestamp); ?> COL_TIME_ON); echo date('d/m/y', $timestamp); $timestamp = strtotime($row->COL_TIME_ON); echo " at **:**"; ?>