+ Config change. Important breaking changes. See upgrade-from-1.1.md for more details.
+ Updated: README.md
+ Updated: upgrade-from-1.0.md file for better reading
+ + Fixed: Search. Works now everywhere.
+ + Added: Simple page title to see where it is at.
1.1 Atlas - 2024-06-29
+ Config change: i18n. See upgrade-from-1.0.md for more details.
Install it and access it with a browser.
After login you can browse and search every note. They are sorted by date and grouped by year. Selecting a year
-does limit the view to this year only. After selecting an entry you are able to filter by day and month by using the `breadcrumb`.
+does limit the view to this year only. After selecting an entry you are able to filter by day and month by using the `Breadcrumb`.
Adding, with the action `New`, does create it with the current date and creates a uniq url.
/**
* scientia
*
- * Copyright 2023 - 2024 Johannes Keßler
+ * Copyright 2023 - 2026 Johannes Keßler
*
* https://www.bananas-playground.net/projekt/scientia/
*
*/
# set to true if you need debug messages in error log file
-const DEBUG = true;
+const DEBUG = false;
# set to ture if you need query log messages in error log file.
-const QUERY_DEBUG = true;
+const QUERY_DEBUG = false;
# timezone settings
const TIMEZONE = 'Europe/Berlin';
/**
* scientia
*
- * Copyright 2023 - 2024 Johannes Keßler
+ * Copyright 2023 - 2026 Johannes Keßler
*
* https://www.bananas-playground.net/projekt/scientia/
*
$ret = array();
$queryStr = "SELECT e.ident, e.date, SUBSTRING(e.body,1,100) AS body
- FROM `".DB_PREFIX."_entry` AS e";
- if(!empty($intervalStart) && !empty($intervalEnd)) {
- $queryStr .= " WHERE e.date >= '".$intervalStart."' AND e.date <= '".$intervalEnd."'";
+ FROM `".DB_PREFIX."_entry` AS e ";
+ $queryWhere = array();
+ if(!empty($intervalStart) || !empty($intervalEnd) || !empty($searchTerm)) {
+ if(!empty($intervalStart) && !empty($intervalEnd)) {
+ $queryWhere[] = "(e.date BETWEEN '".$intervalStart."' AND '".$intervalEnd."')";
+ }
+ if(!empty($searchTerm)) {
+ $queryWhere[] = "MATCH(e.words) AGAINST('".$this->_DB->real_escape_string($searchTerm)."' IN NATURAL LANGUAGE MODE)";
+ }
}
- if(!empty($searchTerm)) {
- $queryStr .= " AND MATCH(e.words) AGAINST('".$this->_DB->real_escape_string($searchTerm)."' IN BOOLEAN MODE)";
+ if(!empty($queryWhere)) {
+ $queryStr .= "WHERE ".implode(" AND ",$queryWhere);
}
+
$queryStr .= " ORDER BY `created` DESC";
$queryStr .= " LIMIT $limit";
max-width: 90%;
}
</style>
+ <title><?php echo $TemplateData['title'] ?? ''; ?> scientia</title>
</head>
<body>
/**
* scientia
*
- * Copyright 2023 - 2024 Johannes Keßler
+ * Copyright 2023 - 2026 Johannes Keßler
*
* https://www.bananas-playground.net/projekt/scientia/
*
if(!empty($_id)) {
$TemplateData['data'] = $Entry->load($_year,$_month,$_day,$_id);
$TemplateData['data']['breadcrumb'] = array($_year,$_month,$_day);
+ $TemplateData['title'] = implode(" | ",array($_year,$_month,$_day));
}
if(isset($_POST['submitForm']) && isset($_POST['fdata'])) {
<?php
}
} else { ?>
+<p><a href="<?php echo PATH_WEBROOT; ?>/"><?php echo $i18n->t('text.home'); ?></a></p>
<p><?php echo $i18n->t('text.noentries'); ?></p>
<?php } ?>
/**
* scientia
*
- * Copyright 2023 - 2024 Johannes Keßler
+ * Copyright 2023 - 2026 Johannes Keßler
*
* https://www.bananas-playground.net/projekt/scientia/
*
$breadcrumb = array('Y');
$_intervalStart = '';
$_intervalEnd = '';
+$_hasTitle = false;
if(!empty($_requestDateProvided)) {
if($_requestDateProvided === 'Y-m-d') {
$queryLimit = "";
$_intervalStart = $_groupByFormat.'-01-01';
$_intervalEnd = $_groupByFormat.'-12-31';
}
+ $_hasTitle = true;
} else {
$_requestDateProvided = 'Y';
}
$TemplateData['entries'][$_d->format($_requestDateProvided)]['breadcrumb'] = $_breadcrumb;
$TemplateData['entries'][$_d->format($_requestDateProvided)]['e'][$entry['ident']] = $entry;
$TemplateData['entries'][$_d->format($_requestDateProvided)]['e'][$entry['ident']]['link'] = str_replace('-','/',$entry['date']).'/'.$entry['ident'];
+ if($_hasTitle) $TemplateData['title'] = implode(" | ", $_breadcrumb);
}