diff --git a/config/admin.yaml b/config/admin.yaml
index 9f870d6..2125e8f 100644
--- a/config/admin.yaml
+++ b/config/admin.yaml
@@ -1 +1 @@
-passhash: tKi4GQ+TZyOM1qSzTYfd+1CQg5zutKPhLNKV6IufPM0=
+passhash: jGl25bVBBBW96Qi9Te4V37Fnqchz/Eu4qB9vKrRIqRg=
diff --git a/html/js/entry.js b/html/js/entry.js
index 77ccd46..56bdafe 100644
--- a/html/js/entry.js
+++ b/html/js/entry.js
@@ -38,7 +38,7 @@ class entry {
element.innerHTML +=
`
${this.title}
-
+
${this.desc}
diff --git a/html/js/search.js b/html/js/search.js
new file mode 100644
index 0000000..cc1e6ef
--- /dev/null
+++ b/html/js/search.js
@@ -0,0 +1,16 @@
+$(document).ready(() => {
+ results = []
+ for ( let i = 0 ; i < searchDATA.length ; i++ ) {
+ // generate shorted description:
+ let desc = ""
+ let d = searchDATA[i].desc.split(" ")
+ for( let i = 0 ; i < 10 ; i ++ ) {
+ desc += d[i] + " "
+ }
+ desc += "..."
+
+ results.push( new entry( searchDATA[i].title, searchDATA[i].author, desc, "", searchDATA[i].tags, searchDATA[i].id, searchDATA[i].rating ) )
+ results[results.length-1].appendto(".content")
+ console.log("loop")
+ }
+})
diff --git a/html/search/index.html b/html/search/index.html
new file mode 100644
index 0000000..be829eb
--- /dev/null
+++ b/html/search/index.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
derzombiiie.com - home
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
search
+
placeholder for search params
+
+
+
+
+
+
+
+
+
diff --git a/html/style/dark.css b/html/style/dark.css
index f9d672b..060ec00 100644
--- a/html/style/dark.css
+++ b/html/style/dark.css
@@ -55,7 +55,7 @@ body, html {
.entrybox > .metaentry > .title:hover {
text-decoration: none;
}
-.entrybox > .entry > .author {
+.entrybox > .entry > .subtitle {
font-style: italic;
font-family: slkscr;
font-size: 1em;
diff --git a/html/style/light.css b/html/style/light.css
index 65eb35c..e1bd523 100644
--- a/html/style/light.css
+++ b/html/style/light.css
@@ -50,7 +50,7 @@
.entrybox > .metaentry > .title:hover {
text-decoration: none;
}
-.entrybox > .entry > .author {
+.entrybox > .entry > .subtitle {
font-style: italic;
font-family: slkscr;
font-size: 1em;
@@ -217,4 +217,3 @@
display: flex;
justify-content: left;
}
-
diff --git a/html/style/main.css b/html/style/main.css
index 5229e53..d7aba8f 100644
--- a/html/style/main.css
+++ b/html/style/main.css
@@ -108,7 +108,6 @@ textarea.comment {
width: calc( 100% - 0.5em);
height: 5em;
}
-
.comments > .comment {
position: relative;
width: calc( 100% - 4em );
@@ -118,10 +117,11 @@ textarea.comment {
padding-right: 0.5em;
margin-bottom: 1em;
}
-.comments > .comment > .author {
+.comments > .comment > .subtitle {
position: relative;
left: 0px;
}
+
.comments > .comment > .seperator {
position: relative;
top: 0.2em;
@@ -210,4 +210,3 @@ textarea.comment {
top: 0.1em;
left: 0.1em;
}
-
diff --git a/logs/log.log b/logs/log.log
index 184adc5..071338c 100644
--- a/logs/log.log
+++ b/logs/log.log
@@ -1409,3 +1409,194 @@ err, crashed!"
--- SEPERATOR ---
--- SEPERATOR ---
--- SEPERATOR ---
+--- SEPERATOR ---
+1629306246326 | Dumping config:
+1629306246333 | {"debug":false,"logging":1337,"logfile":"logs/log.log","ipget_endpoint_set":"//derzombiiie.com/getip.php?settoken=${TOKEN}","ipget_endpoint_get":"//derzombiiie.com/getip.php?token=${TOKEN}","cl":true,"site_name":"blog.derzombiiie.com","search_enable":false,"search_only_tags":true,"commenting_enabled":true,"post_ranking_auto":43200,"index_post_sort":"new","comment_sync_on_write":false,"comment_auto_sync":360}
+1629306252094 | Reading posts sorted by "new" with a length of 10
+1629373879812 | Reading posts sorted by "new" with a length of 10
+1629373889829 | Reading post 0
+1629373890195 | Reading comments from post "0", with length: undefined
+1629373891354 | Trying to vote on post: 0; and vote: +; iptkn: 2383825147775950; ip: 94.134.179.144;
+1629373892779 | Trying to vote on post: 0; and vote: -; iptkn: 2054701222640405; ip: 94.134.179.144;
+1629373893432 | Trying to vote on post: 0; and vote: +; iptkn: 4439234544853926; ip: 94.134.179.144;
+1629373894017 | Trying to vote on post: 0; and vote: +; iptkn: 5619401935745137; ip: 94.134.179.144;
+1629373897038 | Reading post 0
+1629373917421 | Trying to vote on post: 0; and vote: -; iptkn: 4134206592697756; ip: 94.134.179.144;
+1629373943402 | Reading comments from post "0", with length: undefined
+1629373943454 | Trying to comment to post "0", from ip "94.134.179.144" (tkn: 8449268963154284) with content: "fgaW "
+--- SEPERATOR ---
+--- SEPERATOR ---
+1629472893008 | Dumping config:
+1629472893014 | {"debug":false,"logging":1337,"logfile":"logs/log.log","ipget_endpoint_set":"//derzombiiie.com/getip.php?settoken=${TOKEN}","ipget_endpoint_get":"//derzombiiie.com/getip.php?token=${TOKEN}","cl":true,"site_name":"blog.derzombiiie.com","search_enable":false,"search_only_tags":true,"commenting_enabled":true,"post_ranking_auto":43200,"index_post_sort":"new","comment_sync_on_write":false,"comment_auto_sync":360}
+1629472906193 | Reading posts sorted by "new" with a length of 10
+1629474001767 | Reading posts sorted by "new" with a length of 10
+--- SEPERATOR ---
+1629475097464 | Dumping config:
+1629475097470 | {"debug":false,"logging":1337,"logfile":"logs/log.log","ipget_endpoint_set":"//derzombiiie.com/getip.php?settoken=${TOKEN}","ipget_endpoint_get":"//derzombiiie.com/getip.php?token=${TOKEN}","cl":true,"site_name":"blog.derzombiiie.com","search_enable":false,"search_only_tags":true,"commenting_enabled":true,"post_ranking_auto":43200,"index_post_sort":"new","comment_sync_on_write":false,"comment_auto_sync":360}
+1629475138252 | Reading posts sorted by "new" with a length of 10
+--- SEPERATOR ---
+1629475158832 | Dumping config:
+1629475158846 | {"debug":false,"logging":1337,"logfile":"logs/log.log","ipget_endpoint_set":"//derzombiiie.com/getip.php?settoken=${TOKEN}","ipget_endpoint_get":"//derzombiiie.com/getip.php?token=${TOKEN}","cl":true,"site_name":"blog.derzombiiie.com","search_enable":false,"search_only_tags":true,"commenting_enabled":true,"post_ranking_auto":43200,"index_post_sort":"new","comment_sync_on_write":false,"comment_auto_sync":360}
+1629475224268 | Reading post 0
+1629475224908 | Reading comments from post "0", with length: undefined
+1629475226966 | Trying to vote on post: 0; and vote: +; iptkn: 8157706522672703; ip: 87.123.198.188;
+1629477544653 | Reading post 0
+1629477545200 | Reading comments from post "0", with length: undefined
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+1629478842932 | Dumping config:
+1629478842937 | {"debug":false,"logging":1337,"logfile":"logs/log.log","ipget_endpoint_set":"//derzombiiie.com/getip.php?settoken=${TOKEN}","ipget_endpoint_get":"//derzombiiie.com/getip.php?token=${TOKEN}","cl":true,"site_name":"blog.derzombiiie.com","search_enable":false,"search_only_tags":true,"commenting_enabled":true,"post_ranking_auto":43200,"index_post_sort":"new","comment_sync_on_write":false,"comment_auto_sync":360}
+1629478844300 | Reading posts sorted by "new" with a length of 10
+1629478849346 | Reading post 0
+1629478849884 | Reading comments from post "0", with length: undefined
+1629478852676 | Reading post 1
+--- SEPERATOR ---
+--- SEPERATOR ---
+1629479415775 | Dumping config:
+1629479415781 | {"debug":false,"logging":1337,"logfile":"logs/log.log","ipget_endpoint_set":"//derzombiiie.com/getip.php?settoken=${TOKEN}","ipget_endpoint_get":"//derzombiiie.com/getip.php?token=${TOKEN}","cl":true,"site_name":"blog.derzombiiie.com","search_enable":false,"search_only_tags":true,"commenting_enabled":true,"post_ranking_auto":43200,"index_post_sort":"new","comment_sync_on_write":false,"comment_auto_sync":360}
+1629479438454 | Reading posts sorted by "new" with a length of 10
+1629479440140 | Reading posts sorted by "new" with a length of 10
+1629479441307 | Reading posts sorted by "new" with a length of 10
+1629479445001 | Reading posts sorted by "new" with a length of 10
+1629479446892 | Reading posts sorted by "new" with a length of 10
+1629479449146 | Reading posts sorted by "new" with a length of 10
+1629479451290 | Reading posts sorted by "new" with a length of 10
+1629479454618 | Reading post 1
+1629479456232 | Reading post 1
+1629479457937 | Reading posts sorted by "new" with a length of 10
+1629479459127 | Reading posts sorted by "new" with a length of 10
+1629479460135 | Reading posts sorted by "new" with a length of 10
+1629479461156 | Reading posts sorted by "new" with a length of 10
+1629479461988 | Reading posts sorted by "new" with a length of 10
+1629479462904 | Reading posts sorted by "new" with a length of 10
+1629479463718 | Reading posts sorted by "new" with a length of 10
+1629479464604 | Reading posts sorted by "new" with a length of 10
+1629479465375 | Reading posts sorted by "new" with a length of 10
+1629479466383 | Reading posts sorted by "new" with a length of 10
+1629479467214 | Reading posts sorted by "new" with a length of 10
+1629479467972 | Reading posts sorted by "new" with a length of 10
+1629479469168 | Reading posts sorted by "new" with a length of 10
+1629479470066 | Reading posts sorted by "new" with a length of 10
+1629479470802 | Reading posts sorted by "new" with a length of 10
+1629479471542 | Reading posts sorted by "new" with a length of 10
+1629479473068 | Reading posts sorted by "new" with a length of 10
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+1629554668615 | Dumping config:
+1629554668621 | {"debug":false,"logging":1337,"logfile":"logs/log.log","ipget_endpoint_set":"//derzombiiie.com/getip.php?settoken=${TOKEN}","ipget_endpoint_get":"//derzombiiie.com/getip.php?token=${TOKEN}","cl":true,"site_name":"blog.derzombiiie.com","search_enable":false,"search_only_tags":true,"commenting_enabled":true,"post_ranking_auto":43200,"index_post_sort":"new","comment_sync_on_write":false,"comment_auto_sync":360}
+1629554672833 | Reading posts sorted by "new" with a length of 10
+--- SEPERATOR ---
+1629556175766 | Dumping config:
+1629556175772 | {"debug":false,"logging":1337,"logfile":"logs/log.log","ipget_endpoint_set":"//derzombiiie.com/getip.php?settoken=${TOKEN}","ipget_endpoint_get":"//derzombiiie.com/getip.php?token=${TOKEN}","cl":true,"site_name":"blog.derzombiiie.com","search_enable":false,"search_only_tags":true,"commenting_enabled":true,"post_ranking_auto":43200,"index_post_sort":"new","comment_sync_on_write":false,"comment_auto_sync":360}
+1629556262727 | Reading posts sorted by "new" with a length of 10
+1629559886977 | Reading posts sorted by "new" with a length of 10
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+1629561256346 | Dumping config:
+1629561256352 | {"debug":false,"logging":1337,"logfile":"logs/log.log","ipget_endpoint_set":"//derzombiiie.com/getip.php?settoken=${TOKEN}","ipget_endpoint_get":"//derzombiiie.com/getip.php?token=${TOKEN}","cl":true,"site_name":"blog.derzombiiie.com","search_enable":false,"search_only_tags":true,"commenting_enabled":true,"post_ranking_auto":43200,"index_post_sort":"new","comment_sync_on_write":false,"comment_auto_sync":360}
+1629561285920 | Reading posts sorted by "new" with a length of 10
+1629561375819 | Trying to set post "undefined", as name "testing for tagz"
+1629561375820 | Contents: {"author":"deinz mudda","content":"\thier könnte ihre werbung stehen","create":1629561375819,"desc":"hier nicht","id":-1,"rating":{"+":0,"-":0},"tags":["$$$","othertag"],"title":"testing for tagz"}
+1629561412303 | Reading posts sorted by "new" with a length of 10
+1629561433206 | Trying to set post "undefined", as name "testing for tagz"
+1629561433207 | Contents: {"author":"deinz mudda","content":"\thier könnte ihre werbung stehen","create":1629561433206,"desc":"hier nicht","id":-1,"rating":{"+":0,"-":0},"tags":["$$$","othertag"],"title":"testing for tagz"}
+1629561436203 | Reading posts sorted by "new" with a length of 10
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+1629562139411 | Dumping config:
+1629562139417 | {"debug":false,"logging":1337,"logfile":"logs/log.log","ipget_endpoint_set":"//derzombiiie.com/getip.php?settoken=${TOKEN}","ipget_endpoint_get":"//derzombiiie.com/getip.php?token=${TOKEN}","cl":true,"site_name":"blog.derzombiiie.com","search_enable":false,"search_only_tags":true,"commenting_enabled":true,"post_ranking_auto":43200,"index_post_sort":"new","comment_sync_on_write":false,"comment_auto_sync":360}
+1629562148042 | Reading posts sorted by "new" with a length of 10
+1629562159432 | Trying to set post "undefined", as name "testing for tagz"
+1629562159432 | Contents: {"author":"deinz mudda","content":"\thier könnte ihre werbung stehen","create":1629562159432,"desc":"hier nicht","id":-1,"rating":{"+":0,"-":0},"tags":["$$$","othertag"],"title":"testing for tagz"}
+1629562186165 | Trying to set post "undefined", as name "testing for tagz1"
+1629562186166 | Contents: {"author":"deinz mudda","content":"\thier könnte ihre werbung stehen","create":1629562186156,"desc":"hier nicht","id":-1,"rating":{"+":0,"-":0},"tags":["$$$","othertag","othertag0"],"title":"testing for tagz1"}
+1629562190529 | Reading posts sorted by "new" with a length of 10
+--- SEPERATOR ---
+1629562432556 | Dumping config:
+1629562432562 | {"debug":false,"logging":1337,"logfile":"logs/log.log","ipget_endpoint_set":"//derzombiiie.com/getip.php?settoken=${TOKEN}","ipget_endpoint_get":"//derzombiiie.com/getip.php?token=${TOKEN}","cl":true,"site_name":"blog.derzombiiie.com","search_enable":false,"search_only_tags":true,"commenting_enabled":true,"post_ranking_auto":43200,"index_post_sort":"new","comment_sync_on_write":false,"comment_auto_sync":360}
+1629564737518 | Reading posts sorted by "new" with a length of 10
+1629564753711 | Reading posts sorted by "new" with a length of 10
+1629565127882 | Reading posts sorted by "new" with a length of 10
+1629565280896 | Reading posts sorted by "new" with a length of 10
+--- SEPERATOR ---
+1629565491865 | Dumping config:
+1629565491871 | {"debug":false,"logging":1337,"logfile":"logs/log.log","ipget_endpoint_set":"//derzombiiie.com/getip.php?settoken=${TOKEN}","ipget_endpoint_get":"//derzombiiie.com/getip.php?token=${TOKEN}","cl":true,"site_name":"blog.derzombiiie.com","search_enable":false,"search_only_tags":true,"commenting_enabled":true,"post_ranking_auto":43200,"index_post_sort":"new","comment_sync_on_write":false,"comment_auto_sync":360}
+1629565492440 | searching stuff by tags "$$$" and sorting "undefined"
+--- SEPERATOR ---
+1629565531401 | Dumping config:
+1629565531407 | {"debug":false,"logging":1337,"logfile":"logs/log.log","ipget_endpoint_set":"//derzombiiie.com/getip.php?settoken=${TOKEN}","ipget_endpoint_get":"//derzombiiie.com/getip.php?token=${TOKEN}","cl":true,"site_name":"blog.derzombiiie.com","search_enable":false,"search_only_tags":true,"commenting_enabled":true,"post_ranking_auto":43200,"index_post_sort":"new","comment_sync_on_write":false,"comment_auto_sync":360}
+1629565533680 | searching stuff by tags "$$$" and sorting "undefined"
+--- SEPERATOR ---
+1629565550028 | Dumping config:
+1629565550034 | {"debug":false,"logging":1337,"logfile":"logs/log.log","ipget_endpoint_set":"//derzombiiie.com/getip.php?settoken=${TOKEN}","ipget_endpoint_get":"//derzombiiie.com/getip.php?token=${TOKEN}","cl":true,"site_name":"blog.derzombiiie.com","search_enable":false,"search_only_tags":true,"commenting_enabled":true,"post_ranking_auto":43200,"index_post_sort":"new","comment_sync_on_write":false,"comment_auto_sync":360}
+1629565552397 | searching stuff by tags "$$$" and sorting "undefined"
+--- SEPERATOR ---
+1629565563542 | Dumping config:
+1629565563548 | {"debug":false,"logging":1337,"logfile":"logs/log.log","ipget_endpoint_set":"//derzombiiie.com/getip.php?settoken=${TOKEN}","ipget_endpoint_get":"//derzombiiie.com/getip.php?token=${TOKEN}","cl":true,"site_name":"blog.derzombiiie.com","search_enable":false,"search_only_tags":true,"commenting_enabled":true,"post_ranking_auto":43200,"index_post_sort":"new","comment_sync_on_write":false,"comment_auto_sync":360}
+1629565565389 | searching stuff by tags "$$$" and sorting "undefined"
+1629565581774 | searching stuff by tags "othertag" and sorting "undefined"
+1629565586640 | searching stuff by tags "othertag $$$" and sorting "undefined"
+1629565845597 | Reading posts sorted by "new" with a length of 10
+1629565966893 | Reading posts sorted by "new" with a length of 10
+1629565992667 | Reading posts sorted by "new" with a length of 10
+1629566309698 | Reading posts sorted by "new" with a length of 10
+1629566460490 | searching stuff by tags "$$$" and sorting "undefined"
+1629582948025 | Reading posts sorted by "new" with a length of 10
+1629582965937 | searching stuff by tags "$$$" and sorting "undefined"
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+--- SEPERATOR ---
+1629586094251 | Dumping config:
+1629586094256 | {"debug":false,"logging":1337,"logfile":"logs/log.log","ipget_endpoint_set":"//derzombiiie.com/getip.php?settoken=${TOKEN}","ipget_endpoint_get":"//derzombiiie.com/getip.php?token=${TOKEN}","cl":true,"site_name":"blog.derzombiiie.com","search_enable":false,"search_only_tags":true,"commenting_enabled":true,"post_ranking_auto":43200,"index_post_sort":"new","comment_sync_on_write":false,"comment_auto_sync":360}
+1629586109664 | searching stuff by tags "$$$" and sorting "undefined"
+1629586140819 | searching stuff by tags "$$$" and sorting "undefined"
+--- SEPERATOR ---
+1629586146024 | Dumping config:
+1629586146030 | {"debug":false,"logging":1337,"logfile":"logs/log.log","ipget_endpoint_set":"//derzombiiie.com/getip.php?settoken=${TOKEN}","ipget_endpoint_get":"//derzombiiie.com/getip.php?token=${TOKEN}","cl":true,"site_name":"blog.derzombiiie.com","search_enable":false,"search_only_tags":true,"commenting_enabled":true,"post_ranking_auto":43200,"index_post_sort":"new","comment_sync_on_write":false,"comment_auto_sync":360}
+1629586146724 | searching stuff by tags "$$$" and sorting "undefined"
+1629586156977 | searching stuff by tags "$$$ testing" and sorting "undefined"
+1629586163565 | Reading posts sorted by "new" with a length of 10
+1629586168745 | searching stuff by tags "$$$ othertag" and sorting "undefined"
+1629586176587 | searching stuff by tags "$$$ othertag" and sorting "undefined"
+1629587294373 | Reading posts sorted by "new" with a length of 10
+1629587299456 | searching stuff by tags "$$$" and sorting "undefined"
+1629587316925 | Reading posts sorted by "new" with a length of 10
+1629587444038 | Reading post 1
+1629587444689 | Reading comments from post "1", with length: undefined
+1629587446984 | Trying to vote on post: 1; and vote: +; iptkn: 2096300560416030; ip: 82.207.236.116;
+1629587452705 | Reading posts sorted by "new" with a length of 10
+1629587456320 | Reading postindex
+1629587456859 | Reading posts sorted by "hot" with a length of 5
+1629587475660 | Reading post 2
+1629587476646 | Reading comments from post "2", with length: undefined
+1629587478649 | Trying to vote on post: 2; and vote: -; iptkn: 4752029791258578; ip: 82.207.236.116;
diff --git a/node/app.js b/node/app.js
index 9e5667a..b50a3ae 100644
--- a/node/app.js
+++ b/node/app.js
@@ -190,6 +190,7 @@ const postsDB = new JSONdb("storage/posts.json", {
})
posts.init(postsDB)
posts.rank()
+posts.index() // for search
// post auto rank
if ( conf.post_auto_rank > 0)
@@ -318,6 +319,42 @@ app.all("/comments", (req, res) => { // + rating
}
})
+// search stuff:
+con.registercmd("search", (arg) => {
+ if ( !arg[0] || !arg[1] ) return console.log( "No search parameters specified!\nusage: \"search