Commit Graph

38 Commits

Author SHA1 Message Date
Azareal 3b5f48b5a2 Added support for Websockets.
The Control Panel Dashboard now updates every second.
You can now see how many guests and users are online via the Control Panel Dashboard.
The Control Panel Dashboard is now a little more mobile friendly.
2017-05-11 14:04:43 +01:00
Azareal a906f17470 Added support for modlogs.
Added support for more mod-action posts in topics.

Fixed an easter egg.
Fixed a few redirects.
Fixed an issue with users not being loaded if they weren't already in the cache in the User Editor.
2017-04-06 18:37:32 +01:00
Azareal 6d17e08605 Split mod_routes.go into mod_routes.go and panel_routes.go 2017-04-05 15:15:22 +01:00
Azareal d3d76d407b Modlogs / Adminlogs WIP, not much to see here. I'm just dumping this here, as I'm going to be moving a lot of code into another file, and I didn't want it to mess with the diffs. 2017-04-05 15:05:37 +01:00
Azareal 2dbeef4694 Added the lock and unlock moderation action posts. 2017-04-02 14:00:40 +01:00
Azareal 42eb509448 Added the Group Creator.
Generated files should now be detected by Github. I'll work on making the detection method a little less ugly once Github lets me put that thing on something other than the first line.
Fixed a race condition in the Forum Creator.
Fixed a few forgotten error checks in permmap_to_query.
2017-03-27 08:09:28 +01:00
Azareal bf19b66a94 Added the Group Permissions Editor.
Fixed a permission check.
2017-03-23 12:13:50 +00:00
Azareal c14a1e2100 Added the Group Editor.
Revamped the dual column layout CSS.

Improved the Control Panel Group List.
Fixed the email verification system.
Fixed some visual glitches in the Cosmo Conflux and Cosmo themes.

Added the EditGroup, EditGroupLocalPerms, EditGroupGlobalPerms, EditGroupSuperMod and EditGroup Admin permissions.
Added the group_exists function.
Added the EditGroupPage struct.
Swapped some log.Fatal calls out for InternalError calls to avoid whitescreens.
2017-03-18 07:23:02 +00:00
Azareal ca7c369e9e Added numeric mentions. Username mentions will be automatically pre-parsed into numeric mentions in a future commit.
Added #rid for linking to a specific post.

Added a forum_exists function.
Removed the null bytes from the posts
The report system now uses #rid, #tid and numeric mentions instead of raw HTML.
Improved the custom parser to take control characters into account. It also now parses items at the start of the post.
Fixed the padding on the buttons on the profiles.
#tid now takes into account whether the topic it links to exists.
2017-03-14 10:57:40 +00:00
Azareal ea63768a8e Added a custom auto-link parser rather than using a regex.
Added the Tempra Cursive theme. A fork of Tempra Simple which is less boxy and uses the cursive font.
Improved the theme manager. Primary themes and variant themes (themes based upon another) are now seperate.
plugin_bbcode has been modified to use the URL parsing facilities of the core rather than implementing them itself.
git:// and ftp:// links are now supported by plugin_bbcode.
Added the simple quote BBCode.
Fixed a bug in route_like_topic where the no row error type isn't handled properly.
Moved the rowhead class onto the right element in the topic template.
Removed a couple of linebreaks in the topic template in favour of pure CSS.
Converted some inline CSS in the topic template into new CSS classes.

alerts.png contains some alert types for features which haven't been implemented yet, this is mainly to test if the alert system would work under the presence of those alert types. Think of this as my plans for the future.
2017-03-07 07:22:29 +00:00
Azareal cf480947d3 I'm still working on alerts. I've worked out the client-side UI for Cosmo, the UI will be tweaked for the other themes shortly. The client-side JS also now pulls the alerts from the server.
The errors are now sent properly via JSON.
The success JSON messages are now sent properly.
Optimised the message for guests.
Added the opthead class for adding a nice Cosmo specific enhancement.
2017-03-01 11:36:50 +00:00
Azareal 9fce51a3d7 Added the InternalErrorJS and LocalErrorJS error handler functions.
Hid the themes which aren't under construction yet from the Theme Manager.
Fixed a bug in the BBCode parser where every post had ten spaces appended to them.
Added the get_reply() internal API function for plugins to make use of.
Added the bell to the theme.
Fixed some bits of the Cosmo theme where the rowhead wasn't appearing.
Added a "Don't have an account?" link to the login page.

I began work on the alerts system, I took a little break, so it's a little further behind than you might expect, but it shouldn't take too long for me to finish it up.
I haven't finished the back-end portions of it yet, so there's not much to see yet!
2017-02-28 09:27:28 +00:00
Azareal 1d85224dbc Static images now work again after they were accidentally broken when I added Gzip Compression.
Fixed a topic desync and eliminates a number of possible race conditions in the caches.
Optimised global.js by swapping out some of the unnecessary jQuery with native javascript code.
Updated jQuery to version 3.1.11
Fixed the CSS on the areyousure and error templates.
2017-02-16 06:47:55 +00:00
Azareal 6fdf615cf5 Topic and user edits should now update the caches. Ditto for topic deletions.
The tests and benchmarks now run again.
gloinit() is always called prior to the tests and benchmarks now.
The tests and benchmarks no longer use hard-coded session strings for admin route tests.
Added some new route tests.
We now pull the database version into a variable.
Fixed an issue with guest perms not applying properly.
Tweaked the router to make it a little more efficient.
Moved more topic / user parsing logic into CascadeGet
Profiles now use the user cache.
Added the Set method to the caches. Set is used when you don't know if an item exists in a cache or not.
Added the Load method to the caches. Load is used to forcefully reload an item in a cache from the database.
2017-02-15 10:49:30 +00:00
Azareal 534ef10194 You can now upvote topics and replies. The number of upvotes is visible on the posts.
The static resources now support Gzip Compression. Software-wide support is coming with the upcoming router rewrite!
Revamped Tempra Simple's topic view. We now use emojis instead of text for the fields. Experimental.
Simplified the json permissions in the installer.
Fixed some places where the wrong error handler is used.
Fixed a bug in the word counter where it was off by one.
The word count is now tracked by the topics and replies.
2017-02-10 13:39:13 +00:00
Azareal dca8670eed Per-Forum Permissions work everywhere now.
Removed some unnecessary user parameters from the error handlers.
Added a PreError type for when the user data isn't available yet.
2017-02-05 16:36:54 +00:00
Azareal c233f1fbbe You can now change the permission preset of a forum. More granular permission changes coming soon.
The permission presets are now shown on the Forum Manager.
The hidden state of a forum is now represented with a spy emoji on the Forum Manager.
2017-02-04 15:49:24 +00:00
Azareal f8e657ee39 You can now create forums with a specific permission preset. The ability to change the preset of a forum and more granular control over it's permissions is coming soon.
Fixed a bug in the /forums/ route over which forums were visible.
2017-02-04 06:19:55 +00:00
Azareal f5c6f6b552 Added Per-Forum Permissions. The admin side of this is under development.
Added the Not Loggedin group.
The Reports Forum is now only available to staff.
Groups are now stored in a slice instead of a map for extra concurrency and speed.
Testing background SVGs.
You can now toggle a forum's visibility via the Forum Manager.
Added the Inline Form API to global.js
The reports forum can now be edited but not deleted.
Tempra Simple and Tempra Conflux now support backgrounds.
2017-01-31 05:13:38 +00:00
Azareal 5e3b61d910 Added pagination for forums.
You can now use the left and right keyboard keys to go to the next and previous page.
Making the shell files a little friendlier. Needs testing.
The main executable will always be named gosora.exe or the Linux equivalent ./Gosora
Reports is now a physical forum and not a "virtual" one.
Added create_forum() and delete_forum() for creating and deleting forums.
Synced the installer's config.go with the main one.
Forums are now stored in slices rather than maps for improved performance and concurrency.
You can now set a forum as hidden when initially creating it.
BBCode tag names may only be seven characters long now. This is part of a new anti-overflow measure that's much faster and simpler than the previous one.
Updated the last block of code in routes.go which uses the antiquated "success = 0" error detection method.
Fixed a visual bug in the Control Panel CSS.
Seperated the system forums from the normal ones in the Forum Manager.
You can now see if a forum is marked as Hidden in the Forum Manager.
Fixed the position of the lock status indicator.
IP Addresses now have a simple title attribute explaining that this long incomprehensible string is in fact an IP Address.
Textareas look a little better now.
Next / Previous buttons are now visible on mobile.
.bat files always say what they're doing now.
2017-01-26 13:37:50 +00:00
Azareal 16bc3a82e2 Added basic pagination for topics.
Added template functions for arithmetic.
Split the "TO-DO" section of README.md into it's own file.
Themes can now mark themselves as permanently disabled.
Improved the BBCode Bounds Checking.
Fixed a bug with the BBCode parser where part of the content at the end is cut off.
is_super_admin is now a hidden flag and isn't taken into account for Staff CSS.
Themes can now show a custom tag in the Theme Manager.
2017-01-21 18:16:27 +00:00
Azareal d4ad7f1a4c Dramatically improved Gosora's speed by two to four times.
Admins and mods can now see the IP Addresses of users.
The last IP Address of a user is now tracked.
The IP Addresses a user used to create replies and topics are now tracked.
Dramatically improved the speed of templates with the new Fragment System. More optimisations to come!
Decreased the memory usage of compiled templates with the new Fragment System.
build.bat now provides more information on what it's doing.
Added the `go generate` command to the .bat files in preparation for the future.
We're currently in the process of overhauling the benchmark system to run tests in parallel rather than serially. More news on that later.
We're also looking into the best way of integrating pprof with the benchmarks for detailed profiling.
The internal and notfound errors are now static pages.
Internal Error pages are now served properly.
Optimised most of the errors.
Added an internal flag for checking if the plugins have been initialised yet. Mainly for tests.
Decoupled the global initialisation code from the tests.
Removed URL Tags from Tempra Simple. We're pondering over how to re-introduce this in a less intrusive way.
Template file writing is now multi-threaded.
The number of maximum open connections is now explicitly set.
Removed the Name field from the page struct.
Turned some of the most frequently hit queries into prepared statements.
Added the [rand] BBCode.
Converted the NoticeList map into a slice.
Added the missing_tag error type to the [url] tag.
error_notfound is now used for when the router can't find a route.
Fixed a bug in the custom page route where both the page AND the error is served when the page doesn't exist.
Removed some deferrals.
Reduced the number of allocations on the topic page.
run.bat now provides more information on what it's doing.
2017-01-17 07:55:46 +00:00
Azareal b7c89fd020 Added the Level System.
The .bat files now exit upon encountering an error.
Post, bigpost, megapost, and topic stats are now tracked for each user.
Added the bigpost_min_chars and megapost_min_chars settings. Probably needs to be renamed.
Added the Levels test. Run `go test -run "Levels"`
The installer now validates the inputted server port.
Added a word counter utility function.
The template engine now borks less on variable nodes.
Added the lt, gt, ge, eq and ne to the template engine. I'm fairly sure eq was already in there, but things get handled differently depending on what type of node it is.
Eliminated more "success" variables by converting the errors over into InternalError() and LocalErrors()
2017-01-12 02:55:08 +00:00
Azareal bbbd0c381f Added the Cosmo and Cosmo Conflux themes. Freshly ported over from one of my other projects.
The porting is still underway, part of it relies on functionality which hasn't be implemented in Gosora yet like sidebars and alerts.

Restructured the BBCode parser plugin.
Added the [code] tag to the BBCode parser. Disabled by default for now.
Added a benchmark for comparing performance between when [code] is enabled and when it isn't.
Tweaked the templates to make them more flexible, thus allowing a wider variety of themes.
Images of the themes can now be found in the Theme Manager.
There's an emoji on each theme row to show which themes are mobile friendly and which aren't.
Fixed editing and deleting posts on Tempra Conflux.
Moved a large portion of the inline CSS in the topic_alt template into the stylesheets.
2017-01-07 06:31:04 +00:00
Azareal 33c2f4ccb0 Added a custom router which is twice as fast as the old one.
Added support for SSL.
Added the email system. Not fully tested.
Added Email Verification.
Added the Emails Page in the Account Manager.
Email Activation is now fully supported.
Fixed CustomErrorJSQ() and added CustomError().
Added commented out tests for Vestigo.
Added tests for the new (possibly temporary) custom router.
Swapped some of the custom error blocks for the Account Manager with LocalError calls.
Moved the account menu into it's own template.
2017-01-03 07:47:31 +00:00
Azareal e47450d372 Added the theme system.
You can now switch between themes in the Control Panel.
The Alternate Post Layout teased in various screenshots and bits of inaccessible code is now the Tempra Conflux theme, while the original post layout is the Tempa Simple theme.
Dramatically increased the speed at which the static files are served.
Added a benchmark for static files.
Eliminated the name parameter in various custom page structs.
Added the TopicsPage struct for the /topics/ route.
Added the ForumPage struct for the /forum/{id} route.
Added the ForumsPage struct for the /forums/ route.
The static file route now serves 404s when a file doesn't exist instead of nearly crashing the server.
Reduced the number of unnecessary allocations on some of the routes.
Added gradients to Tempra Conflux.
Added position: sticky; to the userinfo blocks in Tempra Conflux.
Added a notice on the generated template files.
2017-01-01 15:45:43 +00:00
Azareal bcaa646f68 Added an alternate topic layout. This might serve as the foundation of a second theme. You'll be able to switch between the two with ease once the theme system is in.
The profile route is now compiled again. A custom struct is now used for it instead of the generic Page struct.
Added the group list to the Control Panel.
Tweaked the navbar CSS.
Non-mods can no longer post in locked topics.
Locked topics now have a gray background on the topic view header, the forum view, and the topiclist,
The reply content box no longer shows up on topics which don't have any replies.
2016-12-26 04:44:07 +00:00
Azareal 9f2efce516 The design is now responsive. It looks decent on mobile phones, tablets, laptops and desktop computers.
The router is now benchmarked. The custom router we'll use to replace it will also be benchmarked once it's completed.
Added a placeholder page for the Control Panel Dashboard.
Tightened some of the control panel route permission checks.
Moved the Control Panel menu into it's own template.
Added permission checks to the links on the Control Panel menu.
2016-12-24 13:14:40 +00:00
Azareal 2702b745d5 Added the User Editor.
Added the EditUser, EditUserEmail, EditUserPassword, EditUserGroup, EditUserGroupSuperMod and EditUserGroupAdmin permissions.
Allocations are now tracked in the benchmarks.
The topics template is now tracked in the benchmarks.
The entire topic, topics, forum and forums routes are now benchmarked.
Initial attempts to benchmark the router have begun, I'll probably have a benchmark in a later commit without the fluff so that it's easier to see it's performance impact.
Improved the security on some of the moderation routes.
SettingLabel is now OptionLabel for easier reuse.
Moved one of the inline queries into a prepared statement.
Added the initial draft for the new router.
Fixed a bug where you lose all of your guest permissions when your session is invalidated.
2016-12-23 12:35:22 +00:00
Azareal 78a6eae0e8 Added the Group Permissions system.
Added the account activation system (just manual activations, email ones are coming later o.o).
Changed the benchmark test to an interface{} struct versus a typed one.
Changed the compiled template holders from a map of functions to handle variables.
Added elses for loops in the template compiler.
Added the list setting type.
Added friendlier values to the setting page :)
Added a link to the profile on the User Manager and new mini-tag mark-up to go with it.
2016-12-21 02:30:32 +00:00
Azareal b9885e9d7a Simplified adding variant hooks.
The benchmark now uses ten replies instead of one for a more relevant result.
Slices are now used instead of maps for itemLists.
The compiled template engine now supports slice loops.
More routes are compiled now.
Fixed a bug with the sorting of the itemLists in the templates.
Guests can no longer see the reply creation forms.
Fixed the notice system.
2016-12-18 12:56:06 +00:00
Azareal 7b1f27bf41 Added the ability to compile templates down to Pure Go code.
I'm slowly rolling this feature out to the various routes and doing tests.

Added the notice system.
Added the "You are banned" notice.
Added the Sendmail experimental plugin for sending emails without needing a SMTP server.
Added the debug flag for tuning down the amount of noise in the console.
Converted a system notice over to the notice system.
Changed the Activation Function signature to allow it to return errors which abort the process of plugin activation.
Plugins can now set tags. These will be visible in the Plugin Manager at a later date to specify a small snippet of additional information.
Variadic hooks are now first class citizens of the Plugin API rather than just an experiment.
SessionCheck() and the new SimpleSessionCheck() can now halt further processing of a route.
Deleted plugins are no longer shown on the Plugin Manager.
The registration form no longer allows users with blank names, emails or passwords to register.
The registration form now blocks some extremely common passwords.
Added the new status CSS to the /forum/ route.
Simplified some of the range loops in the templates.
2016-12-16 10:37:42 +00:00
Azareal 086239f88c Added the User Manager.
Added the activation and deactivation handlers to plugins.
Experimenting to see the best way of implementing variadic hooks.
Added the ability to deactivate plugins.
Added the preparse_preassign and parse_assign parser hooks.
Added a simple Markdown plugin.
Added the group tag to the profiles.
Improved the open / close status on /topics/
Added the ability to report profile comments.
Added the report_preassign vhook. This is probably going to be changed.
2016-12-13 02:14:14 +00:00
Azareal ec2c02d7c9 Added the plugin system.
Added the report system.
Rebranded the project.
Improved the installation instructions.
Changed the open / close status CSS.

Added the Hello World plugin.
Added the Skeleton plugin.
2016-12-11 16:06:17 +00:00
Azareal b2e3591997 Added URL tags & the settings system.
Moved the database logic out of main.go and into mysql.go
Tweaked the CSS.
Banned users can no longer log out.
2016-12-09 13:46:29 +00:00
Azareal 12abd657e1 Added emojis. The emoji picker is coming soon, as is the font file. More emojis coming soon ^_^
Added the ability to ban and unban users.

Improved the installation instructions.
Changed the collation of the tables from utf8_general_ci to utf8mb4_general_ci.
Changed the group ID order.
Custom pages are now templates rather than little snippets being inserted into a template.
Changed the collation of the driver to utf8mb4_general_ci.
Added a default_group config setting.
Ban flag is overwritten for admins and super mods.
2016-12-08 14:11:18 +00:00
Azareal 6a320edbb4 Added the ability to assign users as moderators without also giving them the administrative tools.
Profile owners can now moderate their own profiles.
Fixed an issue with database entries being set as null.
A message now appears when there aren't any topics in a forum or in the global topics list.
Added the link to the current user's profile to the main menu.

Database Changes.
not nulled some columns.
Added is_mod column to users_groups.
Added the Moderator usergroup.
2016-12-07 13:46:14 +00:00
Azareal 72d7beefe9 Added the profile system.
Added the profile comment system.
Added group tags.
Improved the avatar placement logic.
Users without avatars will now get noavatars. Customisable in config.go
Only admins can see the Control Panel link now.
Fixed a problem with Git not including /uploads/ which can crash the program.

Database changes:
Added active column to forums.
Added tag column to users_groups.
Added the users_replies table.
Commented out the replies_reports table.
2016-12-07 09:34:09 +00:00