2016-12-02 08:07:56 +00:00
package main
2017-07-17 10:23:42 +00:00
func init ( ) {
2017-09-11 10:24:03 +00:00
// Site Info
2017-10-31 01:22:05 +00:00
site . ShortName = "Ts" // This should be less than three letters to fit in the navbar
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 10:20:28 +00:00
site . Name = "Test Site"
2017-09-13 15:11:17 +00:00
site . Email = ""
site . URL = "localhost"
2017-09-11 10:24:03 +00:00
site . Port = "8080" // 8080
site . EnableSsl = false
site . EnableEmails = false
site . HasProxy = false // Cloudflare counts as this, if it's sitting in the middle
config . SslPrivkey = ""
config . SslFullchain = ""
2017-09-13 15:11:17 +00:00
site . Language = "english"
2017-09-11 10:24:03 +00:00
// Database details
2017-09-13 15:11:17 +00:00
dbConfig . Host = "localhost"
dbConfig . Username = "root"
dbConfig . Password = "password"
dbConfig . Dbname = "gosora"
dbConfig . Port = "3306" // You probably won't need to change this
2017-09-11 10:24:03 +00:00
2017-10-31 01:22:05 +00:00
// MySQL Test Database details
dbConfig . TestHost = "localhost"
dbConfig . TestUsername = "root"
2017-10-31 01:27:38 +00:00
dbConfig . TestPassword = ""
2017-10-31 01:22:05 +00:00
dbConfig . TestDbname = "gosora_test" // The name of the test database, leave blank to disable. DON'T USE YOUR PRODUCTION DATABASE FOR THIS. LEAVE BLANK IF YOU DON'T KNOW WHAT THIS MEANS.
dbConfig . TestPort = "3306"
2017-09-11 10:24:03 +00:00
// Limiters
config . MaxRequestSize = 5 * megabyte
// Caching
config . CacheTopicUser = CACHE_STATIC
config . UserCacheCapacity = 120 // The max number of users held in memory
config . TopicCacheCapacity = 200 // The max number of topics held in memory
// Email
2017-09-18 17:03:52 +00:00
config . SMTPServer = ""
config . SMTPUsername = ""
config . SMTPPassword = ""
config . SMTPPort = "25"
2017-09-11 10:24:03 +00:00
// Misc
config . DefaultRoute = routeTopics
config . DefaultGroup = 3 // Should be a setting in the database
config . ActivationGroup = 5 // Should be a setting in the database
2017-09-18 17:03:52 +00:00
config . StaffCSS = "staff_post"
2017-09-23 19:57:13 +00:00
config . DefaultForum = 2
2017-10-31 01:22:05 +00:00
config . MinifyTemplates = true
2017-09-11 10:24:03 +00:00
config . MultiServer = false // Experimental: Enable Cross-Server Synchronisation and several other features
//config.Noavatar = "https://api.adorable.io/avatars/{width}/{id}@{site_url}.png"
config . Noavatar = "https://api.adorable.io/avatars/285/{id}@{site_url}.png"
config . ItemsPerPage = 25
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 10:20:28 +00:00
// Developer flags
2017-09-11 10:24:03 +00:00
dev . DebugMode = true
//dev.SuperDebug = true
2017-09-23 21:28:50 +00:00
//dev.TemplateDebug = true
2017-09-11 10:24:03 +00:00
//dev.Profiling = true
2017-10-31 01:22:05 +00:00
//dev.TestDB = true
2017-07-17 10:23:42 +00:00
}