Commit Graph

18 Commits

Author SHA1 Message Date
Azareal b32e8d6c21 You can now disable slugs.
Split ops.log into ops.log and requests.log
Moved the logs into the logs directory.
Moved more password validation logic in the registration route into WeakPassword().
Tweaked the WeakPassword algorithm to cover more cases and to reduce the number of false positives.
Fixed the error grammer in WeakPassword now that the linter isn't bothering me about that anymore.
Fixed BuildGuildURL().
Removed some commented logging logic.
Bad requests are no longer logged to the console.
All bad routes are logged now.
We now track the instance uptime on the Control Panel Debug Page.
Added the executables for Linux to the .gitignore file.
Added GopherJS as a dependency.

Began work on transpiling WeakPassword to JavaScript in use in the client-side logic.
2018-04-03 05:34:07 +01:00
Azareal 74e09efb63 Fixed a bug where it would use the wrong templates for Tempra Simple, Tempra Cursive, and Shadow
Likes are now done over AJAX.
Posts you have liked are now visually differentiated from those which you have not.
Added support for OR to the where parser.
|| and && now get translated to OR and AND in the where parser.
Added support for ( and ) in the where parser.
Added an adapter and builder method for getting the database version.
Multiple wheres can now be chained with the micro and accumulator builders.
Added the In method to the accumulator select builder.
Added the GetConn method to the builder.
/uploads/ files should now get cached properly.
Added more tooltips for topic titles and usernames.

Fixed a bug in the runners where old stale templates would be served.
Fixed a bug where liking topics didn't work.
Began moving the database initialisation logic out of {adapter}.go and into querygen.
Tweaked the alert direction to show the newest alerts rather than the oldest.
Tweaked the WS JS to have it handle messages more efficiently.
Partially fixed an issue where inline edited posts would lack newlines until the page is refreshed.
Used arrow functions in a few places in global.js to save a few characters.

Schema:
Added the liked, oldestItemLikedCreatedAt and lastLiked columns to the users table.
Added the createdAt column to the likes table.

MySQL Update Queries:
ALTER TABLE `users` ADD COLUMN `liked` INT NOT NULL DEFAULT '0' AFTER `topics`;
ALTER TABLE `users` ADD COLUMN `oldestItemLikedCreatedAt` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `liked`;
ALTER TABLE `users` ADD COLUMN `lastLiked` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `oldestItemLikedCreatedAt`;
ALTER TABLE `likes` ADD COLUMN `createdAt` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `sentBy`;
delete from `likes`;
delete from `activity_stream` where `event` = 'like';
delete from `activity_stream_matches` where `asid` not in(select `asid` from `activity_stream`);
update `topics` set `likeCount` = 0;
update `replies` set `likeCount` = 0;
2018-03-31 06:25:27 +01:00
Azareal 22650aad27 Added Quick Topic.
Added Attachments.
Added Attachment Media Embeds.

Renamed a load of *Store and *Cache methods to reduce the amount of unneccesary typing.
Added petabytes as a unit and cleaned up a few of the friendly units.
Refactored the username change logic to make it easier to maintain.
Refactored the avatar change logic to make it easier to maintain.
Shadow now uses CSS Variables for most of it's colours. We have plans to transpile this to support older browsers later on!
Snuck some CSS Variables into Tempra Conflux.
Added the GroupCache interface to MemoryGroupStore.
Added the Length method to MemoryGroupStore.
Added support for a site short name.
Added the UploadFiles permission.
Renamed more functions.
Fixed the background for the left gutter on the postbit for Tempra Simple and Shadow.
Added support for if statements operating on int8, int16, int32, int32, int64, uint, uint8, uint16, uint32, uint64, float32, and float64 for the template compiler.
Added support for if statements operating on slices and maps for the template compiler.
Fixed a security exploit in reply editing.
Fixed a bug in the URL detector in the parser where it couldn't find URLs with non-standard ports.
Fixed buttons having blue outlines on focus on Shadow.
Refactored the topic creation logic to make it easier to maintain.

Made a few responsive fixes, but there's still more to do in the following commits!
2017-10-05 11:20:28 +01:00
Azareal 11c60b3cbe You can now search for whatever IP you want in the IP Searcher.
Removed the Uncategorised Forum.
Added the Backup Page for super admins. Not quite functional yet.
Forums are now sorted properly again.
Fixed a bug in DirtyGet() where invalid IDs would trigger a panic.
Fixed a bug where alternate themes wouldn't work without setting them as default first and restarting Gosora.
2017-09-23 20:57:13 +01:00
Azareal 31f506c50c Removed the images for Cosmo from /images/, it's very saddening to see it go :(
Moved Reload from the UserStore into the UserCache.
Replaced many of the calls to Reload with CacheRemove.
Simplified the error functions.
Fixed a bug in the errors where they didn't have any CSS. Oops.
Added CustomErrorJS(), unused for now, but it may be useful in the future, especially for plugins.
Fixed many problems in the themes.
Added the Stick(), Unstick(), CreateActionReply(), Lock() and Unlock() methods to *Topic.
Renamed ip-search.html to ip-search-results.html
Added the Activate() and initPerms methods to *User.

Tempra Cursive is hiding from sight for this one commit.
Added Font Awesome to /public/, it isn't used yet.
2017-09-22 03:21:17 +01:00
Azareal ba36814d8d Refactored the code to follow best standards better.
Added Basic IP Search.
Added more items to .gitignore
Add a VSCode settings file.
Refactored the theme system to allow me to add a per-user theme switcher in the following commit.
Fixed h1s, rowmenus, profiles and the Control Panel Dashboard on Tempra Simple.
We now catch more extreme edge case errors.
Renamed route_panel_themes_default to route_panel_themes_set_default.
Centralised some of the per-route ExtData fields.
Added an ExtData field to headerLite.
Moved SettingLabels into the Phrase System.
2017-09-03 05:50:31 +01:00
Azareal 5a43432b80 Replaced most of the uses of fmt with log.
Replaced the io.Writers with http.ResponseWriters.
Refactored the compiled template calls.
Redirect port 443 to port 80.
Catch more errors from templates.
Fixed a few mutexes which are never unlocked.
Eliminated an unnecessary parameter in InternalError()
Temporarily commented out users_penalties so that the installer will succeed.
A couple more template types can be remapped now.
Tweaked the theme.
2017-08-13 12:22:34 +01:00
Azareal f41c281e43 Added support for HTTP/2 Push.
The themes are still going to be a little broken for a while, but here's the progress I've made.

Renamed the topics_trow_assign hook to topics_topic_row_assign.
Added more debug code to the generated router.
Added a robots.txt file.
Gosora now responds to favicon.ico requests with a 404 rather than the topic list.
Fixed the tests and some of the benchmarks.
Changed the default UserCacheCapacity from 100 to 120.
Changed the default TopicCacheCapacity from 100 to 200.
Added the last replyer to the topics list and the forum pages.
Added the BulkCascadeGetMap method to the UserStore.
Refactored the topics list and forum page to load the users with a call to the UserStore rather than via a join.
WebSockets now work on SSL.
Fixed a race condition when the user permissions are initialised at the start of a request.
Fixed a race condition when the user permissions for the OP of a topic are initialised.
The rows.Close() calls are deferred once more, so that we can catch problems with recover()
Improved support for struct pointers in the template compiler.
Added a pin emoji to pinned topics to make them stand-out on the Shadow theme, we have some other ideas in mind for this, but I'd like to get Shadow fully functional for this commit.
Fixed a bug an issue with Chrome not detecting XHTML style closes on <form>s.
Fixed a visual issue with `color` not being set for textarea elements for the Shadow theme.
Fixed a function which wasn't getting renamed for PGSQL.

Added seven new UserStore tests.
2017-08-06 16:22:18 +01:00
Azareal d976a192fb Added the new theme, Shadow. It still isn't complete yet.
Revamped the configuration system.
If you have trouble installing this, try installing my fork of gopsutil with `go get` and delete the users_penalties table from the schema folder. That stuff will be cleaned up in the next commit.

Fixed an issue with the links for the Uncategorised forum being broken.
Swapped out NOW() for UTC_TIMESTAMP() in MySQL queries.
We now get an error message when the server goes down for whatever reason.
The template compiler now supports pointers.
Swapped out shirou/gopsutil for a fork locked on an older and more stable commit of the same library.
Fixed a bug where the preprocessor didn't play nice with empty CSS files.

Added the site name to the navbar.
Added more things to .gitignore
Laid the foundations for the next commit.
2017-07-17 11:23:42 +01:00
Azareal d7cf48e43d Router Generator WIP
Added a test for one of the router algorithms.
Added the ViewAdminLogs permission. Adminlogs are coming soon!
The empty comments next to HandleFuncs on main.go are there to remind me about which routes I've added to the router generator route list.
Fixed the Modlogs Page so that you can view it without the ManageThemes permissions. I accidentally used the wrong permission there before.
Changed the router algorithm to align better with the upcoming generated router. It's faster too.
2017-04-12 11:10:36 +01: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 2f50da8cd8 Dramatically improved mobile friendliness on Tempra Conflux, Cosmo Conflux and Cosmo themes.
Made minor improvements to the mobile friendliness on the Tempra Simple theme.
Added levels to the other three themes.
Added the group tags to the Tempra Conflux and Cosmo Conflux themes.
Added more screenshots and updated some of the existing ones.
Made a small cosmetic improvement to the theme list.
2017-01-12 14:01:35 +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
Azareal 84cbb3a5d5 Added grosolo.exe 2016-12-05 10:51:27 +00:00
Azareal 86817ae966 grosolo.exe doesn't work on computers other than the one which built it.
You will have to build your own with build.bat or the go build command
2016-12-05 07:40:13 +00:00
Azareal 689b1a804b Static files are now served from memory. This feature's a little experimental, so it will need a lot of testing i.i
Added an executable file. Only works on Windows, if it doesn't work, then try building it for yourself with build.bat or go build
Tweaked run.bat to make it more firewall friendly. It now generates an executable.
Moved the files around to make it more organised.
Added build.bat which you can use to build the program for you and install the libraries the software depends on.
2016-12-05 07:21:17 +00:00
Azareal 1f6e585296 Admins now show up in purple on posts.
Added a .gitignore file.
Added group caching.
Improved the forum list.
Added the Member group.
Opening posts are now parsed properly.
Fixed a bug where the avatar of the opening poster was applied to everyone.
Only admins can see moderation options now.
2016-12-04 06:16:59 +00:00