Commit Graph

37 Commits

Author SHA1 Message Date
Azareal 6870d242e9 Add ClearIPs() to TopicStore.
Add LockMany() to TopicStore.
Add RemoveMany() to TopicCache.
Add ClearIPs() to PollStore.
Add Purge() to RegLogStore.
Add DeleteOlderThanDays() to RegLogStore.
Add Purge() to LoginLogStore.
Add DeleteOlderThanDays() to LoginLogStore.
Add SetInt() to MetaStore.
Add SetInt64() to MetaStore.

Use Createf() in RegLogItem.Create()
Use Count() in SQLRegLogStore.Count()
Use Count() in SQLLoginLogStore.Count()
Use Countf() in SQLLoginLogStore.CountUser()

Add trailing triple dot parser test case.
Removed a block of commented code in gen router.
Reduce boilerplate.
2021-04-27 20:20:26 +10:00
Azareal 7b3cf6877f add basic support for ipns uris 2021-04-05 17:56:38 +10:00
Azareal ba1d68eea7 add basic support for ipfs links
shorten data variable names
add five parser tests
2021-04-05 16:03:53 +10:00
Azareal b66aeac966 fix some parser corner cases
add more parser test cases
2021-02-19 12:51:13 +10:00
Azareal 2176147dec fix parser tests
expand parser tests
2021-02-18 23:02:54 +10:00
Azareal ed64b8f29b eliminate allocs for getting static resources
optimise two char emoticons
add 30 parser tests
2020-07-26 14:36:40 +10:00
Azareal c4f2f0df90 support youtu.be urls
add noscript tags for video embeds
support youtube timestamps
validate youtube video parameters

add more parser tests
2020-06-25 17:46:09 +10:00
Azareal 8be3f79abb improve text file attachment blocks 2020-06-08 21:13:19 +10:00
Azareal 6746c9c91b add audio player
add wav, oga, ogv, ogx file extensions
2020-05-05 18:10:19 +10:00
Azareal c32498d543 use a video player for uploaded videos
optimise the parser
2020-04-30 16:28:01 +10:00
Azareal 48b0b410c9 add a few more parser tests
save bytes in the parser
save allocs in external image embeds in the parser
save alloc bytes in convos
2020-03-28 14:48:42 +10:00
Azareal cd66782129 push content type for opensearch
don't insert a last ip on installation
save bytes and allocs in the parser
add attach parser test cases
more benchmarks
2020-03-28 07:01:44 +10:00
Azareal 42a95d8597 initial Paginate() tests 2020-03-09 11:37:31 +10:00
Azareal 0c1d6f0516 Add CreateProfileReply and AutoEmbed group permissions.
Log profile reply deletions in the moderator log.
Split the global permissions in the UI to make them easier to manage.
Experiment with showing group ID in group edit header.
Avoid loading groups multiple times for the same profile reply.

Initialise disabled IP log points to empty string rather than 0.

Add CreateProfileReply perm phrase.
Add AutoEmbed perm phrase.
Add panel_group_mod_permissions phrase.
Add panel_logs_mod_action_profile_reply_delete phrase.
2020-02-04 21:47:03 +10:00
Azareal 35ddc89009 Optimise the database layer.
Refactor database adapters.
Experimental last ip cutoff.

More parser test cases.
2020-01-01 07:57:54 +10:00
Azareal 0dede6a329 NoEmbeds privacy and config settings.
Phase out url_prefix and url_name.
Eliminate some boilerplate and allocations while we're at it.
Reduce the number of conditional statements in url validator loops.
Better parsing of Site.URL to handle user error better.

You will have to run the patcher / updater for this commit.
2019-12-08 13:40:56 +10:00
Azareal cc76d399e5 Simple spoilers. 2019-11-07 07:15:43 +10:00
Azareal 142359ce11 Add SslSchema config setting.
Reject URL usernames on registration.

Reduce length of char variable name.
2019-11-04 21:55:52 +10:00
Azareal fd1d54c394 Wrestling with tests while pushing random changes. 2019-10-13 20:50:15 +10:00
Azareal f8e0c5635c basic queries for friends and blocks
fix the tests again
2019-10-13 20:36:50 +10:00
Azareal 3cff453494 push a bit of progress while fixing the tests 2019-10-13 19:07:05 +10:00
Azareal 3472dae669 x.x 2019-10-13 18:26:32 +10:00
Azareal 9b5b1ffc95 make this test more reproducible 2019-10-13 18:22:31 +10:00
Azareal 6147db18dd fix the url parser.
improve the url validator.
add a few more url parser test cases.
2019-10-13 17:32:05 +10:00
Azareal 8d40139ae5 Tests are green now.
Recognise localhost equivalents in the parser.
Add rel=ugc to the bbcode parser too.
More shortening and boilerplate eliminating.
Fix a potential lock bug.
2019-10-06 11:49:31 +10:00
Azareal 5705252029 Add UseConvos permission.
Use UseConvos permission instead of ban flags in convo perm checks.
Stop users without the UseConvos permission from editing convo replies, although they can still delete them for privacy reasons.

Shorten some things and reduce the amount of boilerplate.
Add a few misc parser test cases.
Fix footer and tweak indentation.
2019-10-06 10:34:09 +10:00
Azareal 13fa2326bd Avoid a few allocations for mentions.
Add six new parser test cases.
Stop treating lone double forward slashes as URLs.

Fixes #52
2019-07-11 20:44:18 +10:00
Azareal 462464e47e Remember to init the emojis.
Init the parser tests properly.
2019-07-11 17:20:33 +10:00
Azareal bc20c495c3 Support IPv6 hosts in the URL Parser.
Support m and gaming variants of YouTube in the Media Parser.
Reduce repetition in the URL utility functions slightly.

Added 30 new parser test cases.
2019-05-24 09:39:24 +10:00
Azareal 515e607587 Mention, hashlink and URL Parser Rewrite Part 1.
Added 71 new test cases for the parser.
2019-05-22 14:45:07 +10:00
Azareal b9973719a5 Added a small reply cache.
Preloaded a small number of users and topics.
Use cache.Set instead of cache.Add in a few spots for topics to avoid issues with the counter falling out of sync with the cache length.
Embed Reply in ReplyUser instead of duplicating the same fields.
Add the missing AttachCount and ActionType fields to Reply.
Add the missing Poll field to TopicsRow.
Added the TopicUser.Replies method to better abstract the reply list generation logic.
Shortened some common.s to c.s
Moved memStuff out of the analytics memory panes and into analytics.js
Removed the temporary preStats fix for label overflow now that we have a better solution.
Added the panel_analytics_script_memory template to help de-dupe logic in the analytics memory panes.
Added the Topic method to TopicsRow.
Added the GetRidsForTopic method to help cache replies in a small set of scenarios.

Added the ReplyCache config.json setting.
Added the ReplyCacheCapacity config.json setting.

Added a parser test case.
Added more Reply and ReplyStore related test cases.
2019-05-17 18:40:41 +10:00
Azareal b487ad0e5a Last batch for now to be converted from common. to c. 2019-04-19 18:20:10 +10:00
Azareal 5808f1d0ba Improved the poll UIs slightly.
Polls without any votes should look a little nicer now.
.hide_on_edit and other similar classes should now override other classes on Cosora.
Added <red> to avoid having to use inline styles for parser errors.
Reorganised a few elements in topic.html and topic_alt.html
Split topic_poll.html out of topic.html

Fixed a bug where attachments were getting assigned to the wrong reply / topic.

Added the router_after_filters hook.
Added the topic.poll_no_results phrase.

Added two parser tests.
2019-04-10 17:40:47 +10:00
Azareal e9f1a3c677 Added support for <h1>, <h2>, and <h3> to the core post parser.
Changed a span to a div in Tempra Simple and Shadow so that nested divs will work properly.

Added four parser tests.
2019-04-09 15:33:39 +10:00
Azareal 0bb46c9d67 Use #container instead of .container for Cosora.
Added six parser tests.
2019-04-08 17:50:41 +10:00
Azareal 4f7bb5320d You can now escape whitelisted HTML elements with a backslash to make them render as text rather than HTML elements.
Added eight more parser tests.
Replaced an empty slice with nil to make it cleaner.
2019-03-27 16:36:14 +10:00
Azareal 52c8be4173 Variables which are computed multiple times in templates should only be computed once now.
Enabled the Watchdog Goroutine.
Moved a couple of parser tests into their own file.
Eliminated the hard-coded URLs in TestParser()
Refactored the alert system so that a specific actor is only loaded once rather than once for each alert. This isn't a problem in practice due to the user cache, but it might be on high traffic sites.
Don't run HandleServerSync() on single server setups.
Don't load the user in GetTopicUser(), if the topic creator is the current user.
Fixed a bug in the template generator where endloop nodes were being pushed instead of endif ones.
2018-11-22 17:21:43 +10:00