From 3e42ce191ed9a72ed8aa69ee7819a20bb4d23048 Mon Sep 17 00:00:00 2001 From: FChannel <=> Date: Tue, 2 Feb 2021 23:28:35 -0800 Subject: added rules.html and faq.html change to fit your own instance specs. --- OutboxPost.go | 2 +- client.go | 2 +- static/faq.html | 35 +++++++++++++++++++++++++++++++++++ static/main.html | 4 ++++ static/npost.html | 8 ++++---- static/posts.html | 4 ++-- static/rules.html | 12 ++++++++++++ 7 files changed, 59 insertions(+), 8 deletions(-) create mode 100644 static/faq.html create mode 100644 static/rules.html diff --git a/OutboxPost.go b/OutboxPost.go index 9d7c004..6483a27 100644 --- a/OutboxPost.go +++ b/OutboxPost.go @@ -510,7 +510,7 @@ func GetActivityFromJson(r *http.Request, db *sql.DB) Activity { func CheckCaptcha(db *sql.DB, captcha string) bool { parts := strings.Split(captcha, ":") - if strings.Trim(parts[0], " ") == "" { + if strings.Trim(parts[0], " ") == "" || strings.Trim(parts[1], " ") == ""{ return false } diff --git a/client.go b/client.go index cede640..56f5812 100644 --- a/client.go +++ b/client.go @@ -202,7 +202,7 @@ func OutboxGet(w http.ResponseWriter, r *http.Request, db *sql.DB, collection Co for i := 0.0; i < pageLimit; i++ { pages = append(pages, int(i)) } - + returnData.Pages = pages returnData.TotalPage = len(returnData.Pages) - 1 diff --git a/static/faq.html b/static/faq.html new file mode 100644 index 0000000..0d929f9 --- /dev/null +++ b/static/faq.html @@ -0,0 +1,35 @@ + + +
+ [Back] +fchan short for fchannel and is a federated image board based on activity pub. it removes the centralization aspect that so many of us have become accustom to. it is not trying to re-invent the wheel and draws likeness from other chans for ease of familiarity. you can get the source code here https://github.com/FChannel0 any help is appreciated.
+ +the options field when posting can be used for special options when posting. type noko in the options field to return to the thread you posting to. use sage to ignore updating the thread bump order. nokosage will do both.
+ +you can identify yourself with a tripcode by adding a hash mark (#) after your name followed by your unique identifying string, example anon#myunique.
+ +use a greater than symbols (>) to quote strings of text. use double (>>) followed by the url id of the post you are referencing (this will be changed later for better use).
+ +click on "No." next to a post to view its thread.
+ +max file size is 7MB. the supported file types are "image/gif","image/jpeg","image/png","image/svg+xml","image/webp","image/avif","image/apng","video/mp4","video/ogg","video/webm","audio/mpeg","audio/ogg","audio/wav", "audio/wave", "audio/x-wav". these were choosen based on browser support for embeding
+ +a version of the client with no javascript will be made eventually. current version requires it, because of basic functionality needed. no libraries or frameworks for javascript is used besides ECMAScript, just basic selection of DOM elements and modifying their styling. maybe someone would be willing to make a client that uses no javascript.
+ +sequential numbers have run their course. random base 16 (now base 36) is better.
+ +coming soon(tm).
+