New threads get a floating window just like new replies have. This only
pops up on the board detail view.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
Sometimes, it is necessary for an admin or other moderator to reveal
themselves. Capcodes allow them to do so by appending a special colored
portion at the end of their name on a post.
This adds object-level permissions, so if you have a moderator who
shouldn't be able to use the "admin" capcode, you can give them
permission only to the "moderator" capcode.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
WinBox is nice, but it has this annoying bug that I don't feel like
figuring out how to fix. JSFrame seems to work much better, although
centering the window seems to be a chore. I'll figure it out soon
enough.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
If a user had a permaban, there would be a comparison error between the
current time and the expiration time (none).
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
Winbox has this annoying bug where you can't move the window below the
calculated area of the document, so you can't drag it over blank space.
JSFrame fixes this and does basically what we want as well. This has
been implemented for post replies and I am going to implement it for
reports and ban creation too.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
The artist formerly known as CreatePostView is a little more generic now
and outsources its ban check to a new util method, is_banned.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
On the success page for bans and reports, the window can now be
configured to close after N seconds if desired.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
* Board selection is allowed for when you want to make a global ban
* Post ID is added to ban model for referencing later
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This is done in the admin view and opens a new iframed window. The ban
form is pretty barebones and doesn't have full functionality yet, but
that is coming.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
If a user had a ban previously, range-ban or single IP, which has since
expired, they will not be redirected to the "you are banned" page and
the active bans are deleted.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
Users can be banned by IP address now, either by singular IP or in an IP
range. If they are banned and attempt to post, they will be met with a
"you are banned until X date" screen.
There are a few loose threads with this, and IP bans may be obsolete if
I decide to go the accounts-required-for-posting route. But I think this
is a good start for 4chan style posting.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
* There are now Reports and ReportRecords.
* Reports coordinate to what moderators see, and ReportRecords
coordinate with the reports that are created by individual users.
* Reports keep track of the report reason and the creating user.
* ReportRecords keep track of the total weight and whether this report
requires urgent attention or not.
* ReportRecord keeps track of its own weight and urgency because then we
can sort by weight and urgency in the admin view.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
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>
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>
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>
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>
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>
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>
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>
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>