]> 91.132.146.200 Git - scientia.git/commitdiff
fixed i18n and updated changelog
authorBanana <mail@bananas-playground.net>
Tue, 3 Jan 2023 20:13:38 +0000 (21:13 +0100)
committerBanana <mail@bananas-playground.net>
Tue, 3 Jan 2023 20:13:38 +0000 (21:13 +0100)
CHANGELOG
webroot/lib/i18n.class.php
webroot/view/_foot.php
webroot/view/entry/entry.html
webroot/view/list/list.html

index 08f75edff5ff1f9813cfd310efd33e665cbf4160..1e70197524b71a01dcfbf4f10cf0f6bc6ab23f77 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
 1.x Atlas -
        + i18n. See upgrade-from-1.0.txt for more details.
        + PHP 8.1 stuff
+       + Search
 
 
 1.0 Lykos - 2022-11-12
index 1bebd806ae4560644fcde59c83d523f5d01d4c06..a7c63e3344d6c73b89354e9053340c42dd061f49 100644 (file)
@@ -30,9 +30,9 @@ class I18n {
         * i18n constructor.
         */
        public function __construct() {
-               $_langFile = ABSOLUTE_PATH.'/lib/i18n/'.$this->_defaultLangToUse.'.ini';
+               $_langFile = PATH_ABSOLUTE.'/lib/i18n/'.$this->_defaultLangToUse.'.ini';
                if(defined('FRONTEND_LANGUAGE')) {
-                       $_langFile = ABSOLUTE_PATH.'/lib/i18n/'.FRONTEND_LANGUAGE.'.ini';
+                       $_langFile = PATH_ABSOLUTE.'/lib/i18n/'.FRONTEND_LANGUAGE.'.ini';
                        if(file_exists($_langFile)) {
                                $_langData = parse_ini_file($_langFile);
                                if($_langData !== false) {
index 308b1d01b6ca1e7ab1b1fa896e6a8497bbcd1a37..45716f31618ae161922d5208ae2540379cfc8929 100644 (file)
@@ -1,2 +1,5 @@
+       <footer>
+               <small><a href="https://www.bananas-playground.net/projekt/scientia/" target=_blank>scientia</small>
+       </footer>
 </body>
 </html>
index a4802127094b9e78d5aeff5d5171867602c6b383..e8f5c9557b55f2b773c3a0d156f348f7d29a171d 100644 (file)
@@ -1,21 +1,21 @@
-<?php if(!empty($TemplateData['data'])) { ?>
-<p>Created: <?php echo Summoner::ifset($TemplateData['data'],'created'); ?>, Updated: <?php echo Summoner::ifset($TemplateData['data'],'modified'); ?></p>
-<?php } ?>
-<form method="post">
-       <textarea rows="25" placeholder="write here" name="fdata[entry]"><?php echo Summoner::ifset($TemplateData['data'],'body'); ?></textarea>
-       <input type="submit" name="submitForm" value="<?php echo $i18n->('form.button.save'); ?>">
-       <input type="checkbox" name="deleteEntry" value="yes" /> <small style="color: indianred"><?php echo $i18n->('form.checkbox.deleteentry'); ?></small>
-</form>
 <p>
-<a href="<?php echo PATH_WEBROOT; ?>"><?php echo $i18n->('text.home'); ?></a>
-<?php if(!empty($TemplateData['data'])) {
+       <a href="<?php echo PATH_WEBROOT; ?>"><?php echo $i18n->t('text.home'); ?></a>
+       <?php if(!empty($TemplateData['data'])) {
        echo ' | ';
        $_link = '';
        foreach($TemplateData['data']['breadcrumb'] as $be) {
                $_link .= '/'.$be;
                echo '<a href="'.PATH_WEBROOT.$_link.'">'.$be.'</a> | ';
        }
-?>
-       <a href="<?php echo PATH_WEBROOT; ?>/new"><?php echo $i18n->('text.new'); ?></a>
-<?php } ?>
+       ?>
+       <a href="<?php echo PATH_WEBROOT; ?>/new"><?php echo $i18n->t('text.new'); ?></a>
+       <?php } ?>
 </p>
+<?php if(!empty($TemplateData['data'])) { ?>
+<p>Created: <?php echo Summoner::ifset($TemplateData['data'],'created'); ?>, Updated: <?php echo Summoner::ifset($TemplateData['data'],'modified'); ?></p>
+<?php } ?>
+<form method="post">
+       <textarea rows="25" placeholder="write here" name="fdata[entry]"><?php echo Summoner::ifset($TemplateData['data'],'body'); ?></textarea>
+       <input type="submit" name="submitForm" value="<?php echo $i18n->t('form.button.save'); ?>">
+       <input type="checkbox" name="deleteEntry" value="yes" /> <small style="color: indianred"><?php echo $i18n->t('form.checkbox.deleteentry'); ?></small>
+</form>
index 5caf8391ff0cdc13ea2075af7cc75685b6d29d53..4c8111b6e49e4f704d4a3e7b482d592bfd1531ab 100644 (file)
@@ -1,19 +1,20 @@
 <form method="post">
        <input type="text" name="searchInput" size="50" />
-       <input type="submit" name="submitForm" value="<?php echo $i18n->('form.button.search'); ?>">
+       <input type="submit" name="submitForm" value="<?php echo $i18n->t('form.button.search'); ?>">
 </form>
-<p>
-       <a href="<?php echo PATH_WEBROOT; ?>/"><?php echo $i18n->('text.home'); ?></a> | <a href="<?php echo PATH_WEBROOT; ?>/new"><?php echo $i18n->('text.new'); ?></a>
-</p>
 <?php if(!empty($TemplateData['entries'])) { ?>
+<p>
+       <a href="<?php echo PATH_WEBROOT; ?>/"><?php echo $i18n->t('text.home'); ?></a> |
 <?php
        foreach($TemplateData['entries'] as $k=>$v) {
                $_link = '';
                foreach($v['breadcrumb'] as $be) {
                        $_link .= '/'.$be;
-                       echo '<a href="'.PATH_WEBROOT.$_link.'">'.$be.'</a> ';
+                       echo '<a href="'.PATH_WEBROOT.$_link.'">'.$be.'</a> ';
                }
 ?>
+       <a href="<?php echo PATH_WEBROOT; ?>/new"><?php echo $i18n->t('text.new'); ?></a>
+<p>
 <ul>
        <?php foreach($v['e'] as $e) { ?>
        <li><a href="<?php echo PATH_WEBROOT; ?>/<?php echo $e['link']; ?>"><?php echo $e['ident']; ?></a> <?php echo $e['date']; ?> <?php echo htmlspecialchars($e['body'],ENT_HTML5); ?></li>
@@ -22,5 +23,5 @@
 <?php
        }
 } else { ?>
-<p><?php echo $i18n->('text.noentries'); ?></p>
+<p><?php echo $i18n->t('text.noentries'); ?></p>
 <?php } ?>