Commit Graph

25 Commits

Author SHA1 Message Date
fb14fbd4fc Update report success close to actually be one second
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-19 19:26:19 -07:00
5a2d6efbe1 Add list_display customization to the reports view
This allows us to access the reported post's body, subject, etc for
in-line display. It ain't perfect, but it definitely is better than
nothing.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-19 18:12:02 -07:00
d148b653cd Update report admin to have post, reason, and IP as readonly
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-15 20:50:21 -07:00
b838663d50 Add preliminary report system
The report system is pretty low-tech. However the scaffolding is there
for a lot of new stuff. What we currently have:

* Users can create reports
* Staff can view reports
* Admins can create report templates

There's a post drop-down menu available on all posts now, too. This is
where "report post" menu item lives and other things like that can be
added too.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-14 14:56:50 -07:00
ec011dc047 Add winbox.js to base.html
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-11 23:59:26 -07:00
0fd40d5d3d Add winbox.bundle.js
I hope this library is sufficient for our needs

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-07 17:47:26 -07:00
2940affae3 Add reports, report reasons, bans, and ban templates
Reports are created by users.

Bans are created by moderators, in response to reports.

Report reasons and ban templates are created by admins, which give a
template for reports sent and bans issued.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-07 17:39:40 -07:00
1aa263fd7d Add board and post view to admin
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-07 17:39:40 -07:00
6d16db0762 Remove unused html file
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-07 17:39:24 -07:00
57b4657353 Remove a couple of unused comments
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-07 16:34:53 -07:00
bd6a86169d Add redirect to page 1 from bare URL
Previously, you could browse /board/ and /board/page/1/ in the browser
and they would be the same thing. Now, /board/ redirects to
/board/page/1/ to keep things unambiguous.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-07 16:31:32 -07:00
439035f1d8 Add return link to thread view
When you're looking at a post, there is now a "return" link that will
take you back to page 1 of the board.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-07 16:30:32 -07:00
994e4904a6 Add page count and links to bottom of board view
Current page shows up on the bottom of every board with next/prev links
where applicable.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-07 15:14:50 -07:00
6e2c29ae29 Add hcaptcha support and .env file
hcaptcha can be turned on in settings.py with parameters in the .env
file

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-07 14:51:26 -07:00
fe8ea04d18 Add support for i18n and l10n
The majority of the words on the site are user-generated, but I've tried
to surround everything else with localization calls. I don't know
another language so this will have to do until someone decides to
translate it lol

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-07 14:19:06 -07:00
bce5e6cdf6 Add sage-like functionality a la 4chan
When reply to a post, you can uncheck "bump" and it will not bump the
thread to the top of the board.

This is useful for the OP, too, because it allows for "permasage"
functionality which is useful for moderators.

Finally, there is also "autosink" functionality. After a per-board
threshhold of posts, a thread will stop bumping.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-07 13:52:56 -07:00
efc1845aa0 Update TODO comment
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-07 13:36:52 -07:00
4e5203c61b Add check to prevent completely blank posts
This isn't perfect, but if a user tries to make a completely blank post,
they will be blocked from doing so

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-07 13:30:12 -07:00
3a35a35caf Add posting cooldown
If a user tries to post more than once in a certain amount of time, they
will be blocked from doing so until their cooldown is over. This
required a little bit of hacking to get the board and IP address set
*before* the validation checks were made, but it all appears to work.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-07 13:24:43 -07:00
771dba1515 Remove todo
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-06 22:03:21 -07:00
27045c11c2 Add thread pruning for threads that pass the maximum page threshhold
Each board is allowed a number of threads per page, and a maximum number
of pages (default 10 for both). If a thread falls off the last page, it
is deleted.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-06 22:00:54 -07:00
e9585544d5 Add underline back to links in the style
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-06 21:59:45 -07:00
6ed47f9957 Add max image upload size limit
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-04 21:14:00 -07:00
e6c60ff93c Add image upload support
Images can be uploaded, thumbnails are created, they're displayed within
the threads themselves. Just like four chans!

There is not an upload size limit set yet. Gotta get on that next.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-04 19:45:36 -07:00
126db039e2 Initial commit
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-03 18:02:04 -07:00