Add config option for qrz.com image display

pull/1450/head
phl0 2022-04-03 14:05:05 +02:00
rodzic f67ef05f81
commit ddf745645a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 48EA1E640798CA9A
3 zmienionych plików z 31 dodań i 12 usunięć

Wyświetl plik

@ -139,3 +139,18 @@ $config['map_6digit_grids'] = FALSE;
*/
$config['qso_auto_qth'] = FALSE;
/*
|--------------------------------------------------------------------------
| Pull qrz.com image on logging
|--------------------------------------------------------------------------
|
| Setting this to TRUE allows Cloudlog to pull and show
| the profile picture of the qrz.com profile of your QSO
| partner upon QSO logging.
|
| Default is: FALSE
|
*/
$config['show_qrz_image'] = FALSE;

Wyświetl plik

@ -151,14 +151,16 @@ class Logbook extends CI_Controller {
$return['callsign_state'] = $this->logbook_model->call_state($callsign);
$return['bearing'] = $this->bearing($return['callsign_qra'], $measurement_base, $station_id);
$return['workedBefore'] = $this->worked_grid_before($return['callsign_qra'], $type, $band, $mode);
if (isset($callbook)) {
if ($callbook['image'] == "") {
$return['image'] = "n/a";
if ($this->config->item('show_qrz_image')) {
if (isset($callbook)) {
if ($callbook['image'] == "") {
$return['image'] = "n/a";
} else {
$return['image'] = $callbook['image'];
}
} else {
$return['image'] = $callbook['image'];
$return['image'] = "n/a";
}
} else {
$return['image'] = "n/a";
}
if ($return['callsign_qra'] != "") {
@ -169,8 +171,6 @@ class Logbook extends CI_Controller {
return;
}
//$callbook = $this->logbook_model->loadCallBook($callsign, $this->config->item('use_fullname'));
if (isset($callbook))
{
$return['callsign_name'] = $callbook['name'];
@ -179,10 +179,12 @@ class Logbook extends CI_Controller {
$return['callsign_iota'] = $callbook['iota'];
$return['callsign_state'] = $callbook['state'];
$return['callsign_us_county'] = $callbook['us_county'];
if ($callbook['image'] == "") {
$return['image'] = "n/a";
} else {
$return['image'] = $callbook['image'];
if ($this->config->item('show_qrz_image')) {
if ($callbook['image'] == "") {
$return['image'] = "n/a";
} else {
$return['image'] = $callbook['image'];
}
}
if(isset($callbook['qslmgr'])) {

Wyświetl plik

@ -521,6 +521,7 @@
<div class="card-body callsign-suggestions"></div>
</div>
<?php if ($this->config->item('show_qrz_image')) { ?>
<div class="card callsign-image" id="callsign-image" style="display: none;">
<div class="card-header"><h4 style="font-size: 16px; font-weight: bold;" class="card-title"><?php echo $this->lang->line('qso_title_image'); ?></h4></div>
@ -529,6 +530,7 @@
</div>
</div>
</div>
<?php } ?>
<div class="card previous-qsos">
<div class="card-header"><h4 class="card-title" style="font-size: 16px; font-weight: bold;"><?php echo $this->lang->line('qso_title_pervious_contacts'); ?></h4></div>