diff options
-rw-r--r-- | activitypub/object.go | 6 | ||||
-rw-r--r-- | config-init | 3 | ||||
-rw-r--r-- | config/config.go | 3 | ||||
-rw-r--r-- | main.go | 1 | ||||
-rw-r--r-- | util/util.go | 2 | ||||
-rw-r--r-- | views/clover.png | bin | 0 -> 92559 bytes | |||
-rw-r--r-- | views/faq.html | 66 | ||||
-rw-r--r-- | views/favicon.png | bin | 0 -> 12901 bytes | |||
-rw-r--r-- | views/locked.png | bin | 0 -> 717 bytes | |||
-rw-r--r-- | views/notfound.png | bin | 0 -> 96599 bytes | |||
-rw-r--r-- | views/onion.png | bin | 0 -> 107039 bytes | |||
-rw-r--r-- | views/pin.png | bin | 0 -> 6118 bytes | |||
-rw-r--r-- | views/rules.html | 12 | ||||
-rw-r--r-- | views/sensitive.png | bin | 0 -> 3737 bytes |
14 files changed, 89 insertions, 4 deletions
diff --git a/activitypub/object.go b/activitypub/object.go index 9e6a97b..f01d97d 100644 --- a/activitypub/object.go +++ b/activitypub/object.go @@ -1463,11 +1463,15 @@ func (obj ObjectBase) IsLocked() (bool, error) { } func (obj ObjectBase) SendEmailNotify() error { + if setup := util.IsEmailSetup(); !setup { + return nil + } + actor, _ := GetActorFromDB(obj.Actor) from := config.SiteEmail pass := config.SiteEmailPassword - to := "" + to := config.SiteEmailNotifyTo body := fmt.Sprintf("New post: %s", config.Domain+"/"+actor.Name+"/"+util.ShortURL(actor.Outbox, obj.Id)) msg := "From: " + from + "\n" + diff --git a/config-init b/config-init index ae950b8..feaaf5e 100644 --- a/config-init +++ b/config-init @@ -24,6 +24,9 @@ emailport: emailaddress: emailpass: +## comma seperated emails To +emailnotify: + ## enter proxy ip and port if you want to have tor connections supported ## 127.0.0.1:9050 default torproxy: diff --git a/config/config.go b/config/config.go index 02d43eb..3a2e2f3 100644 --- a/config/config.go +++ b/config/config.go @@ -18,7 +18,8 @@ var SiteEmail = GetConfigValue("emailaddress", "") //contact@fchan.xyz var SiteEmailPassword = GetConfigValue("emailpass", "") var SiteEmailServer = GetConfigValue("emailserver", "") //mail.fchan.xyz var SiteEmailPort = GetConfigValue("emailport", "") //587 -var TorProxy = GetConfigValue("torproxy", "") //127.0.0.1:9050 +var SiteEmailNotifyTo = GetConfigValue("emailnotify", "") +var TorProxy = GetConfigValue("torproxy", "") //127.0.0.1:9050 var PublicIndexing = strings.ToLower(GetConfigValue("publicindex", "false")) var Salt = GetConfigValue("instancesalt", "") var DBHost = GetConfigValue("dbhost", "localhost") @@ -50,7 +50,6 @@ func main() { })) app.Static("/static", "./views") - app.Static("/static", "./static") app.Static("/public", "./public") // Main actor diff --git a/util/util.go b/util/util.go index 6d45442..bc08140 100644 --- a/util/util.go +++ b/util/util.go @@ -238,7 +238,7 @@ func CreatedNeededDirectories() error { } func LoadThemes() error { - themes, err := ioutil.ReadDir("./static/css/themes") + themes, err := ioutil.ReadDir("./views/css/themes") if err != nil { MakeError(err, "LoadThemes") diff --git a/views/clover.png b/views/clover.png Binary files differnew file mode 100644 index 0000000..305748e --- /dev/null +++ b/views/clover.png diff --git a/views/faq.html b/views/faq.html new file mode 100644 index 0000000..0305b7e --- /dev/null +++ b/views/faq.html @@ -0,0 +1,66 @@ +<!DOCTYPE html> +<html> + <head> + <style> + a { color: black; } + </style> + </head> + <body style="background-color:#ffffee; max-width: 800px; margin: 0 auto;"> + <a href="javascript:history.back()">[Back]</a> + <h1 style="text-align: center;">FAQ</h1> + <div> + <h4>What is fchan?</h4> + <p>fchan, short for FChannel, is a federated image board based on <a href="https://activitypub.rocks/">ActivityPub</a>, a protocol which allows social sites like social media and image boards to be decentralized. Boards across sites which are on the opposite sides of the Globe can be connected and feeds can be shared or followed. It pulls likeness from other chans for ease of familiarity and use.</p><p> You can get the source code on <a href="https://github.com/FChannel0">https://github.com/FChannel0</a> which is available under <a href="https://en.wikipedia.org/wiki/Affero_General_Public_License">AGPLv3</a>, which means that you can modify the source code of fchan however you like as long as you share your source code with everyone else. We appreciate and encourage any positive contributions to the source code!</p> + + <h4 id="options">What are the "Options" used for when posting?</h4> + <p>The "Options" field can be used for special options when posting.</p> + <ul> + <li>Type <span style="font-weight: bold;">"noko"</span> in the options field if you want to stay on the thread you are about to post on.</li> + <li>Type <span style="font-weight: bold;">"sage"</span> to not bump the thread, meaning that if will not show up on the front page of the board, that you are replying to.</li> + <li>Typing in <span style="font-weight: bold;">"nokosage"</span> will do both actions as described above.</li> + </ul> + <h4 id="tripcode">What is a "tripcode"?</h4> + <p>A tripcode is a way to uniquely identify yourself on an imageboard. This is the closest you will get to registering. There are two kinds of tripcodes that can identify yourself with, however, it's recommended that you use secure tripcodes only if you take your identification number seriously.</p> + <ul> + <li><span style="font-weight: bold;">Secure tripcode:</span> Type in your name in the "Name" field, and then a double hash mark (##) which is followed by a password. So for example, typing in <span style="font-weight: bold;">moot##faggot</span> in the "Name" field will result in <span style="color:#117743"><span style="font-weight: bold;">moot</span> !!IefQUZVu/1</span></li> + <li><span style="font-weight: bold;">Regular tripcode:</span> Type in your name in the "Name" field, and then a hash mark (#) which is followed by a password. So for example, typing in <span style="font-weight: bold;">moot#faggot</span> in the "Name" field will result in <span style="color:#117743"><span style="font-weight: bold;">moot</span> !UcVghOVf01</span></li> + </ul></p> + + <h4 id="quote">How do I quote?</h4> + <p>Use the greater-than symbol (>) to quote strings of text. Use double (>>) followed by the URL id of the post you are referencing or click on the unique ID of the post (for example, FIDV40Q2) if you want to reference a post (keep in mind that this will be changed later for better use).</p> + + <h4 id="link">How do I view an entire thread?</h4> + <p>Click the "No." next to the post to view its thread.</p> + + <h4 id="upload">What kind of files can I upload?</h4> + <p>The maximum file size is 7 MiB (mebibyte). The supported file types are:</p> + <ul> + <li>.GIF: "image/gif"</li> + <li>.PNG, (animated) .PNG: "image/png", "image/apng"</li> + <li>.JPG: "image/jpeg"</li> + <li>.WEBP: "image/webp"</li> + <li>.MP4: "image/mp4"</li> + <li>.WEBM: "image/webm"</li> + <li>.OGG: "image/ogg"</li> + <li>.MP2, .MP3: "audio/mpeg"</li> + <li>.WAV: "audio/wav", "audio/wave", "audio/x-wav"</li> + </ul> + + <h4 id="javascript">Why use JavaScript?</h4> + <p>A version of the frontend with no JavaScript will be made eventually. Current version requires it as it is needed for some basic functionality. There are no external libraries used by the frontend, just basic selection of DOM elements and modifying their styling. <a href="https://github.com/FChannel0/FChannel-Server/pulls">Perhaps (You) could contribute a frontend that uses no JavaScript?</a></p> + + <h4 id="seqnum">Why do the posts not have sequential ID numbers?</h4> + <p>Sequential ID numbers have run their course, random base36 is better.</p> + + <h4 id="pubexamp">ActivityPub specific examples</h4> + <p>Soon™.</p> + + <h4 id="version">What version is this FChannel instance?</h4> + <p>v0.0.15-release</p> + </div> + <div style="width: 500px; margin:0 auto; margin-top: 50px; text-align: center;"> + <a href="/">[Home]</a><a href="/static/rules.html">[Rules]</a><a href="/static/faq.html">[FAQ]</a> + <p>All trademarks and copyrights on this page are owned by their respective parties.</p> + </div> + </body> +</html> diff --git a/views/favicon.png b/views/favicon.png Binary files differnew file mode 100644 index 0000000..b90281e --- /dev/null +++ b/views/favicon.png diff --git a/views/locked.png b/views/locked.png Binary files differnew file mode 100644 index 0000000..7792d16 --- /dev/null +++ b/views/locked.png diff --git a/views/notfound.png b/views/notfound.png Binary files differnew file mode 100644 index 0000000..1253e47 --- /dev/null +++ b/views/notfound.png diff --git a/views/onion.png b/views/onion.png Binary files differnew file mode 100644 index 0000000..0cb9527 --- /dev/null +++ b/views/onion.png diff --git a/views/pin.png b/views/pin.png Binary files differnew file mode 100644 index 0000000..6952601 --- /dev/null +++ b/views/pin.png diff --git a/views/rules.html b/views/rules.html new file mode 100644 index 0000000..afb0319 --- /dev/null +++ b/views/rules.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<html> + <body style="background-color:#ffffee; max-width: 800px; margin: 0 auto;"> + <a style="color: black;" href="javascript:history.back()">[Back]</a> + <h1 style="text-align: center;">Rules and Agreements:</h1> + <ol> + <li>Do not break any laws of the U.S.A.</li> + <li>You must be 18 to post or access this website.</li> + <li>Blue boards are restricted to work-safe (SFW) posts only.</li> + </ol> + </body> +</html> diff --git a/views/sensitive.png b/views/sensitive.png Binary files differnew file mode 100644 index 0000000..ea706c8 --- /dev/null +++ b/views/sensitive.png |