]> 91.132.146.200 Git - bibliotheca-php.git/commitdiff
features. Some cleanup. Save number. Clickable image
authorBanana <mail@bananas-playground.net>
Sun, 3 Jan 2021 14:48:09 +0000 (15:48 +0100)
committerBanana <mail@bananas-playground.net>
Sun, 3 Jan 2021 14:48:09 +0000 (15:48 +0100)
TODO
documentation/features.txt [new file with mode: 0644]
webclient/lib/manageentry.class.php
webclient/lib/summoner.class.php
webclient/view/default/collections/collections.html
webclient/view/default/dashboard/dashboard.html

diff --git a/TODO b/TODO
index c5d0862331d28c4a60e8e23511b173530477730e..89d07a4676ac84eb42526d768702ac245f1820e0 100644 (file)
--- a/TODO
+++ b/TODO
@@ -9,5 +9,6 @@
 * responsive and breakpoints
 * tag management. Edit, update and unused ones.
 * imdb collector. Number storage -> runtime
-* clickable image in card view
 * stats overview page. amount of entries. file and db storage.
+* Export of an entry, collection or everything. Stored on disk.
+* Import of the export
diff --git a/documentation/features.txt b/documentation/features.txt
new file mode 100644 (file)
index 0000000..a640b07
--- /dev/null
@@ -0,0 +1,8 @@
+Self hosted media management. Runs on a raspberry or any webserver (see requirements).
+Supports multiple collections. Eg. movies, games and music.
+Each collection has their own fields, which can freely arranged.
+Multiple user accounts and rights on collection and each entry.
+Theme support.
+Export and import of everything, collection or only selective entries.
+Search within default field and advanced search in every field.
+Lightwight.
index 97b1040d78a9a453ae051029fcb230f66bc22b9b..2e4661e47128324da48ba312d7df25f888ebdd18 100644 (file)
@@ -572,6 +572,8 @@ class Manageentry {
 
        /**
         * Create part of the insert statement for field type number
+        * Strips everything what is not a digit from it.
+        *
         * @param array $data
         * @param array $queryData
         * @return mixed
@@ -581,6 +583,7 @@ class Manageentry {
                if(empty($data['valueToSave'])) {
                                $data['valueToSave'] = 0;
                }
+               $data['valueToSave'] = preg_replace('/[^\p{N}]/u', '', $data['valueToSave']);
                $queryData['init'][] = "`".$data['identifier']."` = '".$this->_DB->real_escape_string($data['valueToSave'])."'";
                return $queryData;
        }
index 6ab6d2603be944ebadb9ef4fb794835f4288e261..123c7cdfb092e7689c693432a274c57bed8f099c 100644 (file)
@@ -105,7 +105,7 @@ class Summoner {
                        case 'digit':
                                // only numbers and digit
                                // warning with negative numbers...
-                               $pattern = '/[\p{N}\-]/';
+                               $pattern = '/[\p{N}\-]/u';
                        break;
 
                        case 'pageTitle':
index 2eb04bb1a264de78f54061585ef0910f67aa1c23..23a16bc74569d14ab1962b7a85942b0e178b7a23 100644 (file)
                <div class="uk-card uk-card-default uk-card-small">
                        <div class="uk-card-media-top">
                                <?php if(Summoner::ifset($entry['fields'], 'coverimage')) { ?>
+                               <a href="<?php echo $TemplateData['entryLinkPrefix']; ?>&id=<?php echo $entryK; ?>">
                                <img src="<?php echo $TemplateData['storagePath'].'/'.$entryK.'/'.$entry['fields']['coverimage']['value']; ?>"
                                         alt="<?php echo $entry['fields']['coverimage']['displayname']; ?>">
-
+                               </a>
                                <?php } ?>
                        </div>
                        <div class="uk-card-body uk-visible@l">
index 0c2b314ace57db050b77d41223271f3380c37a4d..196cadef451569c30f97353ddf3db2243bad650c 100644 (file)
                <div class="uk-card uk-card-default uk-grid-collapse uk-child-width-1-2@s uk-margin" uk-grid>
                        <div class="uk-card-media-left uk-cover-container">
                                <?php if(Summoner::ifset($entry['fields'], 'coverimage')) { ?>
+                               <a href="index.php?p=entry&collection=<?php echo $k ?>&id=<?php echo $entryK; ?>">
                                <img src="<?php echo PATH_WEB_STORAGE.'/'.$k.'/'.$entryK.'/'.$entry['fields']['coverimage']['value']; ?>"
                                         alt="<?php echo $entry['fields']['coverimage']['displayname']; ?>" uk-cover>
                                <canvas width="600" height="400"></canvas>
+                               </a>
                                <?php } ?>
                        </div>
                        <div>