Commit Graph

54 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 b20e295375 Changed the defaultest default theme to Cosora... For now.
You need the ViewIPs permission to view IPs on logs now.
Added the leftOfNav and rightOfNav docks, more on this soon.
Added a max length for topic titles.
Added a max length for usernames.
Added none as a possible language for the language view counter.
We began adding the notice phrases.
Fixed a misnamed phrase which was spitting out placeholder text.
Localised unknown for the human language phrases.
Moved routeForums to routes.ForumList.
Moved routeRobotsTxt to routes.RobotsTxt.
Started tracking the views for routes.RobotsTxt.
Moved routeSitemapXml to routes.SitemapXml.
Started tracking the views for routes.SitemapXml.
Changed the fallback theme to Cosora.
Fixed changing the default theme to Cosora or Tempra Conflux.
Removed some redundant type definitions in template init.
Return ErrNoTitle instead of ErrNoBody when trying to create a topic with no title.
Moved some in-progress routes and helper functions for handling search engine crawlers to routes/api.go
2018-03-17 08:16:43 +00:00
Azareal 5a8b994877 Added support for phrases in templates.
The language of the end-user is now tracked and presented in the Analytics Manager.
Profile owners now get alerts when someone posts on their profiles.

The login page is now transpiled, estimated to be sixty times faster.
The registration page is now transpiled, estimated to be sixty times faster.
The IP Search page is now transpiled, estimated to be sixty times faster.
The error pages are now transpiled, estimated to be sixty times faster.
The login page now uses phrases.
The registration page now uses phrases.
IP Search now uses phrases.
Renamed the ip-search template to ip_search.
Alerts are now held in an alertbox container div.
Added ids for the main container divs for the account manager sections.
Added an id to the main container for the topic list template.
Added an id to the main container for the forum list template.
Added an id to the main container for the forum template.
Added an avatar box CSS class for the avatar box in the account manager's avatar page.
Did a bit of renaming for a future refactor in the routes counter.
Did a bit of renaming for a future refactor in the operating system counter.
A notice is shown to the user now when their account is inactive.
The account activation status is now fetched by the user store.
We now track Slackbot.
You can now prepend strings to the start of router.DumpRequest request dumps to avoid tearing these bits of contextual data away from the bodies.
.action file extensions are now seen as suspicious by the router.
Moved routeWebsockets to common.RouteWebsockets for now.
Moved routeCreateReplySubmit to routes.CreateReplySubmit.
Moved alert.go into common.
Moved the WebSockets logic into common.
Escape strings a little earlier in the analytics routes and use integers instead of strings where possible.
We now show a success notification when you update a user via the User Manager.
Split the configuration properties off from CTemplateSet into CTemplateConfig.
Renamed some of the properties of CTemplateSet to make them easier to understand.
Removed some obsolete properties from CTemplateSet.
Did a bit of spring cleaning in the template transpiler to cut down on unneccessary lines and to reduce duplication.
Fixed a double else bug in ranges over maps in the template transpiler.
Split the minifiers off the main template transpilation file into their own file.
Refactored some of the routes which rely on alerts to use shared functions rather than having unique implementations in the routes themselves.

All Themes Except Cosora:
Refactored the opt nodes to make it easier to roll out bulk moderation.

Shadow:
Improved the notice CSS.
Tweaked the sticky border colour.

Cosora:
The theme JS file now uses strict mode.
Notices are shunted under rowhead with JS now, although this change might be reverted soon.
Added CSS for notices.
Fixed the padding under the avatar box in the account manager avatar page.

Schema:
Added the viewchunks_langs table.
2018-03-08 03:59:47 +00:00
Azareal 8ecc637ab9 Moved routeProfile to routes.ViewProfile.
Requests are now logged as one big chunk to help prevent them getting torn apart and improve log throughput.
Newlines are now stripped from dumped requests.
Prepared statement logging now only happens in debug mode for speedier server startups.
More suspicious request tracking is done outside of debug mode now.
Only log the initial message in plugin_markdown in debug mode.
Moved the CreateTopicSubmit attachment logging to super debug mode.
Removed a couple of unneccesary menu items from the Account Manager menu.
Hid the add friend option on the profiles for now.
Moved the remaining analytics results loops into a common function.
Only log the graph for the analytics routes in debug mode.

Every Theme:
Added CSS for the Don't have an Account link on the Login Page.

Cosora:
Fixed the header CSS on mobile.
The header CSS now covers optheads on mobile.
Revamped the profile comment UI.

Shadow:
Added CSS for sticky topics.

Tempra Simple:
Button CSS now applies to type=submit inputs.
Fixed the IP Search CSS.

Tempra Conflux:
Button CSS now applies to type=submit inputs.
Fixed the IP Search CSS.

Tempra Cursive (Deprecated):
Button CSS now applies to type=submit inputs.
2018-02-26 09:07:00 +00:00
Azareal 60964868d4 Moved the counters to their own package.
De-duped some of the logging code.
Added per-route state to the not found errors.
Exported debugDetail, debugDetailf, debugLog, and debugLogf.
Tweaked the padding on Tempra Simple.
Added panel submenus to Tempra Conflux.
Added Chart CSS to Tempra Conflux.
Fixed the padding and margins for the Control Panel in Cosora.
Made Cosora's Control Panel a little more tablet friendly.
Added the rowmsg CSS class to better style message rows.
Removed the repetitive guard code for the pre-render hooks.
Removed the repetitive guard code for the string-string hooks.
We now capture views for routes.StaticFile
Added the move action to the moderation logs.

Added the viewchunks_forums table.
Began work on Per-forum Views.
I probably missed a few things in this changelog.
2018-02-19 04:26:01 +00:00
Azareal fa065bc584 /topics/ (the default index) is now over 25 times faster than before.
Change the length of the ticks for referrer tracking.
Fixed a bug in Shadow and Tempra Simple where the polls would appear when they shouldn't.
Added styling to Shadow for Control Panel Sub-menus.
Fixed the ridiculously wide attachment images on Cosora.
The analytics pages should no longer be treated as the dashboard style-wise.
The installer now works again.
Tests now run again, as do the benchmarks.
Refactored the topic list logic, and moved the route portion into the routes package.
Fixed an inverted comparison in the referrer logic.
Added friendly text for Mac operating systems to the english language pack.
Removed two obsolete prepared statements.
Fixed three race conditions in the database adapters.
Potentially sped up the topic page by 20%
Added several new benchmarks and refactored the others.
Removed a redundant prepared statement in user.go

Added reviseID as a primary key to the revisions table.
The user_count column was added to the users_groups table, but it's unknown if it will stay.
2018-02-10 15:07:21 +00:00
Azareal 1ac47bfdfd Added referrer analytics. You can now see what site a visitor has come from.
Added the viewchunks_referrers table.
2018-02-05 10:29:13 +00:00
Azareal e56e7cd467 Fix the false positives with IE11 and Firefox.
Moved some noisy things to SuperDebug.
2018-02-04 09:33:04 +00:00
Azareal 2455e951aa We now have analytics for the operating systems used by users.
Route view bumping logs have been moved from regular debug mode to super debug to reduce the amount of noise.
Added user friendly agent names.
Reduced the amount of logging outside of debug mode.
We now track Mobile Safari and the Samsung Browser.
We now track SeznamBot, TwitterBot, and Discourse's Bot.
We now track Trident.
UAs are now filtered to reduce the amount of bad activity.
Added more bad phrases for bad routes.

Added the viewchunks_systems table.
Began work on referrer tracking.
2018-02-04 08:15:20 +00:00
Azareal 017bce9c09 Replaced the user agent parser with a faster and more flexible one.
More progress on poll posts.

Improved the poll UI on the other themes.
De-duplicated some avatar logic.
Added Exec() to accInsertBuilder.
Moved routeOverview to routes.Overview
Moved routeCustomPage to routes.CustomPage
Moved routeTopicID to routes.ViewTopic
Moved routeLogin to routes.AccountLogin
Moved routeRegister to routes.AccountRegister
Moved routeLoginSubmit to routes.AccountLoginSubmit
Moved routeRegisterSubmit to routes.AccountRegisterSubmit
We now track the Android Chrome user agent.
We now track the UCBrowser user agent.
We now track the zgrab user agent.
Fixed a few cases where Googlebot wasn't tracked properly.
Moved routeStatic to routes.StaticFile
2018-02-03 05:47:14 +00:00
Azareal 0c26b5a8da You can now view the results of polls.
Added the polls_options table.
We now spell suspicious correctly.
www URLs are now redirected to non-www URLs.
2018-01-28 14:30:24 +00:00
Azareal 9efed8c0bc Added support for polls, minus the results UI, we're planning to have a nice little chart for this.
Refactored the request logging logic into it's own function.
2018-01-27 07:30:44 +00:00
Azareal 1bd3d7d104 We now show requests to non-existent routes on the Route Analytics Page.
The filter now catches more odd requests for statistical purposes.

More progress on poll posts.
Dropped the polls_voters table and added the polls_votes one. The two have different definitions.
2018-01-26 05:53:34 +00:00
Azareal 59754b489d Block requests without known hosts for security reasons.
We now track stats for Uptimebot.
We now track stats for malformed requests.
Added json as a valid column type.

Continued work on poll posts.
Added the polls table.
Added the polls_voters table.
Added the poll column to the topics table.
Changed the type of the poll column on the replies table from boolean to int.
2018-01-25 04:57:33 +00:00
Azareal 2997135e80 Added proper pagination to the topic list.
Fixed two existence checks.
Tweaked the profile CSS for Cosora.
Added the TopicByReplyID function.
Split off the profile logic from Reply into ProfileReply.
Moved various hard-coded bits in the profile reply routes into ProfileReply.
Moved four reply routes into /routes/reply.go
Moved six topic routes into /routes/topic.go
We should now capture more suspicious activity.

Changed the definition of the revisions table.
2018-01-20 06:50:29 +00:00
Azareal ef839a601c It would help if this code was in the right place. 2018-01-18 12:51:35 +00:00
Azareal a66bab7c51 Added the global topic counter and associated graphs.
Wildcards should work properly in robots.txt now
Fixed the padding on the registration and login pages for Cosora.
Moved the Websockets route into the new router.
We now log more suspicious requests.

Started moving routes into /routes/
Added the topicchunks table.
2018-01-18 12:31:25 +00:00
Azareal 0416b1ed91 Fixed the Cosora Alerts CSS.
Fixed the topic edit input CSS.
You can now filter the time range of the routes list.
You can now filter the time range of the agents list.
Renamed operations.log to ops.log
Moved the account routes into the new router.
Log suspicious requests.
Removed some duplicated code in the control panel routes.
Fixed a bug in the User Editor where the Administrator group didn't show up.
Users are now force logged out when an admin changes their password.
2018-01-17 11:13:08 +00:00
Azareal 2436d9a6fa You can now bulk move topics from one forum to another.
We now track the User Agent for Cloudflare Always On.
2018-01-15 08:24:18 +00:00
Azareal 9a3d8425e0 Added the post counter and the associated Control Panel graph.
Renamed the pre_render_panel_analytics hook to pre_render_panel_analytics_views.
Added a details table to the route graphs.
Moved the /topic/ and /reply/ routes to the router generator and hardened them.
Made some of the route names more consistent.
We now track IPs in odd situations in debug mode.
Fixed a bug where people could post on non-existent profiles.

Continued work on topic move.
Added the postchunks table.
2018-01-14 12:03:20 +00:00
Azareal 90a20d5b05 You can now filter views by one month.
More debug logging.
More progress with Topic Moving.
2018-01-12 10:22:28 +00:00
Azareal 3fca8114f0 Added a counter tree experiment.
Added more logging for odd user agents.
2018-01-11 09:29:25 +00:00
Azareal 5ba7aa74f7 Renamed the pre_render_panel_mod_log pre-render hook to pre_render_panel_modlogs.
Added the half-second task type, you'll why later ;)
Reduced the amount of code duplication in the panel routes (saved a hundred lines).
Added the two day time range option for graphs.
We now track the discord, lynx and blank user agents.
Renamed some template files for consistency and to help stamp out some duplicate code.

Began work on topic move.
2018-01-11 08:03:17 +00:00
Azareal 5f5994726e Fixed a text editor bug.
It should log the unknown user agents properly now...
2018-01-10 04:35:34 +00:00
Azareal 25074b58b2 Added a time graph for individual user agents.
We now have an Advanced Forum Permissions Editor providing more granular control over permissions.
Tweaked the button CSS and some other bits and pieces.
Added a details section to the View Count Graph.
Renamed a few template files for the sake of consistency and for an upcoming refactor.
Unknown user agents are now logged in debug mode.
Added GetCopy() to the forum permissions store.
Fixed a crash bug in the forum deletion action.
Refactored the permissions list in the group permissions editor.
2018-01-10 03:32:48 +00:00
Azareal 17b21bb7da Didn't I fix this bug already? Oh well. Fixed.
Added user agent tracking for Edge and DuckDuckGo.
2018-01-09 10:37:14 +00:00
Azareal c2a3e66c6b We now track the IE, Yandex, Bing, and Baidu user agents. 2018-01-09 08:46:16 +00:00
Azareal a25ee29197 We now track global user agent stats and have a currently simple Control Panel interface for that.
Fixed a possible out of bounds panic in DefaultRouteViewCounter.Bump()
2018-01-09 07:39:29 +00:00
Azareal 964d219407 Added support for per-topic view counters.
Added support for shutdown tasks.
View counters are now saved on graceful shutdown.
Dynamic routes are now tracked by the route view counter.
The uploads route should now be tracked by the route view counter.
Added a WYSIWYG Editor to the profiles for Cosora.
2017-12-24 22:08:35 +00:00
Azareal c7df616f5b Profiles are less broken now.
Renamed RouteViewCounterImpl to DefaultRouteViewCounter.
Added the bot_routes.go file and moved routeRobotsTxt into it.
Added /report/ to robots.txt to stop Googlebot going there.

Began work on the sitemaps. I plan to move the routes into their own package, but I don't want to break too many things right now.
2017-12-24 07:38:46 +00:00
Azareal bdbd80319f Made some minor tweaks.
The DefaultRoute parameter in the configuration struct is now a string.
Fixed a few mismatched HTML tags.
Added the profile_comments_row template.
Added more alt attributes for images and associated title=""s in a few places.
Connections should now be closed properly.
Custom Pages no longer have a .html file extension in their URLs.
We now track route views for the default route and the custom page route.

Began work on cleaning up the profiles on Cosora.
2017-12-22 03:32:23 +00:00
Azareal 10a0c62823 The Cosora Theme is almost complete and is being rolled out on the site to demo it.
We now track the views on a per-route basis. We have plans for an admin UI for this, global views, etc. which will come in a future commit.

The local error JSON is now properly formed.
Fixed an outdated line in topic.go which was using the old cache system.
We now use fuzzy dates for relative times between three months ago and a year ago.
Added the super admin middleware and the associated tests.
Added the route column to the viewchunks table.
Added more alt attributes to images.
Added a few missing ARIA attributes.

Began refactoring the route generator to use text/template instead of generating everything procedurally.
Began work on per-topic view counts.
2017-12-19 03:53:13 +00:00
Azareal abfe0a472a Made a huge amount of progress on the Cosora Theme in the Control Panel, it's almost ready for deployment.
Added the view counter, it currently collects data without exposing it to the admin.

Added an API for scheduling tasks which run once every second and once every fifteen minutes.
Added a generated map containing all the routes with the function names as keys.
Added the request counter to the generated router.
Added more ARIA Labels and moved various bits and pieces into the CSS files for flexibility.
Removed a bunch of redundant avatar checks in the templates.
Improved the mobile friendliness of Cosora.
Fixed various issues in the other themes.
Refactored the file listener.
Gosora now resyncs newly created theme files not just modified ones.
Gosora now resyncs renamed theme files not just modified ones.
2017-12-10 03:43:30 +00:00
Azareal f1c418bd13 Refactored the routing logic.
Continued refactoring the prequeries.
Continued work on the profiles.
Moved more logic out of the routes.
2017-11-12 07:18:25 +00:00
Azareal f30ea7a9bb Finished moving the files into the subpackage, this should open more doors to us.
Moved more queries out of the global stmt holder.
Refactored several things.
2017-11-11 04:06:16 +00:00
Azareal 3fa9bf7373 I've revamped the query generator to reduce the number of globals, this'll help us split up the software and plugins in the future.
Refactored the router.
Added the MemberOnly middleware and tests for it.
2017-11-05 09:55:34 +00:00
Azareal 0361310eb2 Moved the forum permission cascade logic into it's own function.
Removed some redundant queries.
Refactored the router generator.
2017-10-31 07:26:44 +00:00
Azareal 14a14b7e80 More work on Cosora, we have a screenshot of it up now, although it's super experimental at the moment.
This commit might be a little broken, another is coming to fix things up!

The topics list is now paginated.
Refactored the error handling system.
Added the Trumboyg WYSIWYG editor for Cosora.
Moved Delete() out of the TopicStore and into *Topic
You can now bulk delete and bulk lock topics on Cosora.
h1s are now formatted properly on Firefox.
Added more ARIA Labels.
SuperModOnly is now a piece of middleware for the Control Panel routes.
Refactored and extended the router generator.
Improved the SEO for the paginators.
Added bits of Microdata to improve SEO further.
Wrote benchmarks for users.Get() and users.BypassGet()
More errors are caught now.
You can now attach pcss files to posts.
Improved the error logging for JavaScript.
Topic list avatars now link to the associated profiles.
Added last poster avatars to the forum list.
2017-10-30 09:57:08 +00: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 01bef7a320 The route handlers now use camelCase.
Updated the default config.go
2017-09-11 11:24:03 +01:00
Azareal 91f70d2a4a Add a per-user theme switcher. The CSS might be slightly broken in the themes, that'll be fixed in a follow-up commit.
Added basic support for server sync.

Re-added a few missing defers.
Renamed TO-DO to TODO across the entire codebase.
Renamed StaticForumStore to MemoryForumStore.
The ForumStore is now built on a sync.Map with a view slice for generating /forums rather than a slice.
Renamed many more functions and variables to satisfy the linter.
increase_post_user_stats() and decrease_post_user_stats() are now methods on the User struct. We also fix a bug where they take the moderator's score rather than the target user's into account when recalculating their level after a post / topic is deleted.
Transitioned the topic list to CSS Grid for Tempra Simple, with a float fallback.
Cosmo and Cosmo Conflux are now hidden from the theme list.
Fixed more data races.
Added more debug data to the template compiler logs.
2017-09-10 17:57:22 +01:00
Azareal 3e4cfa8888 Added the Panel Debug page.
Added the mini stats for the various parts of the Control Panel in the Control Panel Menu.
Fixed a crash bug in the router.
The basic arithmetic template functions now work for the interpreted templates.
Tweaked the connection pool to hopefully ease the number of goroutines fighting over a database connection.
The Group Manager is now paginated.
panel.css is now pushed by HTTP/2 Push.
Fixed an issue with the padding on /forum/ and /topics/ for Shadow.
Fixed a bug in the login system forcefully overriding sessions on login.
All admin logins are now logged.
Refactored the client-side alert loading logic.
Added SimpleCount to the Query Builder.
2017-08-15 14:47:56 +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 dd8f68b6d2 Added the Social Groups plugin. This is still under construction.
Made a few improvements to the ForumStore, including bringing it's API closer in line with the other datastores, adding stubs for future subforum functionality, and improving efficiency in a few places.
The auth interface now handles all the authentication stuff.
Renamed the debug config variable to debug_mode.
Added the PluginPerms API.
Internal Errors will now dump the stack trace in the console.
Added support for installable plugins.
Refactored the routing logic so that the router now handles the common PreRoute logic(exc. /static/)
Added the CreateTable method to the query generator. It might need some tweaking to better support other database systems.
Added the same CreateTable method to the query builder.
Began work on PostgreSQL support.

Added the string-string hook type
Added the pre_render hook type.
Added the ParentID and ParentType fields to forums.
Added the get_forum_url_prefix function.
Added a more generic build_slug function.
Added the get_topic_url_prefix function.
Added the override_perms and override_forum_perms functions for bulk setting and unsetting permissions.
Added more ExtData fields in a few structs and removed them on the Perms struct as the PluginPerms API supersedes them there.
Plugins can now see the router instance.
The plugin initialisation handlers can now throw errors.
Plugins are now initialised after all the forum's subsystems are.
Refactored the unit test logic. For instance, we now use the proper .Log method rather than fmt.Println in many cases.
Sorry, we'll have to break Github's generated file detection, as the build instructions aren't working, unless I put them at the top, and they're far, far more important than getting Github to recognise the generated code as generated code.
Fixed an issue with mysql.go's _init_database() overwriting the dbpassword variable. Not a huge issue, but it is a "gotcha" for those not expecting a ':' at the start.
Fixed an issue with forum creation where the forum permissions didn't get cached.
Fixed a bug in plugin_bbcode where negative numbers in rand would crash Gosora.
Made the outputs of plugin_markdown and plugin_bbcode more compliant with the tests.
Revamped the phrase system to make it easier for us to add language pack related features in the future.
Added the WidgetMenu widget type.
Revamped the theme again. I'm experimenting to see which approach I like most.
- Excuse the little W3C rage. Some things about CSS drive me crazy :p

Tests:
Added 22 bbcode_full_parse tests.
Added 19 bbcode_regex_parse tests.
Added 27 markdown_parse tests.
Added four UserStore tests. More to come when the test database functionality is added.
Added 18 name_to_slug tests.

Hooks:
Added the pre_render hook.
Added the pre_render_forum_list hook.
Added the pre_render_view_forum hook.
Added the pre_render_topic_list hook.
Added the pre_render_view_topic hook.
Added the pre_render_profile hook.
Added the pre_render_custom_page hook.
Added the pre_render_overview hook.
Added the pre_render_create_topic hook.

Added the pre_render_account_own_edit_critical hook.
Added the pre_render_account_own_edit_avatar hook.
Added the pre_render_account_own_edit_username hook.
Added the pre_render_account_own_edit_email hook.
Added the pre_render_login hook.
Added the pre_render_register hook.
Added the pre_render_ban hook.

Added the pre_render_panel_dashboard hook.
Added the pre_render_panel_forums hook.
Added the pre_render_panel_delete_forum hook.
Added the pre_render_panel_edit_forum hook.
Added the pre_render_panel_settings hook.
Added the pre_render_panel_setting hook.
Added the pre_render_panel_plugins hook.
Added the pre_render_panel_users hook.
Added the pre_render_panel_edit_user hook.
Added the pre_render_panel_groups hook.
Added the pre_render_panel_edit_group hook.
Added the pre_render_panel_edit_group_perms hook.
Added the pre_render_panel_themes hook.
Added the pre_render_panel_mod_log hook.
Added the pre_render_error hook.
Added the pre_render_security_error hook.

Added the create_group_preappend hook.
Added the intercept_build_widgets hook.
Added the simple_forum_check_pre_perms hook.
Added the forum_check_pre_perms hook.
2017-07-09 13:06:04 +01:00
Azareal e099dfd40e Added the query generator. It's a work in progress and in constant flux.
Added forum descriptions.
Began work on the Advanced Forum Editor. Not to be confused with the Quick Forum Editor. You can access it by going to /panel/forums/edit/{forumid} We'll fix it so the Forum Manager links to it in the next commit.
Fixed the Linux shell scripts.
Fixed an issue with relative timess being off by an hour due to timezones.
Added reply count and author names to the topic list and forum pages.
Improved the look of the forum list, forum page, and topic list.
Added an overlay effect for when the alert list is open on mobile.
You can now close the alert list by clicking on the bell.
Removed the "Report:" prefix from report posts.
Fixed a bug in the template system where "and" and "or" wouldn't work on non-boolean values.
Improved the debug logging in the template system.
Fixed a bug in the forum creator where the "Hidden?" value was inverted.
Fixed a visual bug in the profile where the Ban button rendered in a glitchy way.
Added support for hidden fields to the JS Framework for inline editing rows.
Fixed a bug with the like counter rendering on-top of the alert list.
Atom's stripping trailing tabs for some reason, so don't be confused if there are a bunch of weird changes.
2017-06-05 12:57:27 +01:00
Azareal 9b1489b90f Happy 100th commit! For the 100th commit, I've revamped a good portion of the user interface, and we don't plan on stopping! There's more to come!
Each theme has more of a distinct feel in the control panel now. I moved a large portion of the inline CSS into global.css, tweaked some core code which didn't line up, and added CSS text insertions to make things more flexible.

Revamped the alerts interface. We have more changes coming up!
Added screenshots for Tempra Cursive and Tempra Conflux Mobile to the README.
Added a .htaccess file, just in case someone plops Gosora in Apache's /www/ folder to stop the contents of config.go from becoming publically visible. Never put Gosora in your /www/ folder, Gosora is a standalone program which does NOT use Apache or any other webserver.
Fixed a bug in the inline forum editor.
Added a hand-written Markdown parser which is much faster than the previous Regex based one. This is still a work in progress.
Added support for strikethrough and underline elements to the Markdown parser.
Fixed the missing semicolons in global.js
Revamped the form CSS.
Author bits on the theme manager now link to the author's website.
Improved the profiles a little.
The code in the stylesheets now have a more consistent style.
Fixed a bug in the Cosmo theme relating to the fact that Gosora doesn't have sidebars yet.

There are many more changes which aren't listed here.
If weirdness regarding lines or spacing occurs, I'm experimenting with a new text editor. I hope to have this fixed by the next commit.
2017-05-29 15:52:37 +01:00
Azareal 001b51624b The Control Panel is now in the generated routes list.
Fixed a bug in the hook remover.

I need to improve the search and destroy algorithms.
2017-04-13 16:01:30 +01:00