2018-05-15 05:59:52 +00:00
package config
2016-12-02 08:07:56 +00:00
2018-05-13 06:56:59 +00:00
import "../common"
2017-11-12 03:29:05 +00:00
2018-05-13 06:56:59 +00:00
func Config() {
2017-09-11 10:24:03 +00:00
// Site Info
2017-11-12 03:29:05 +00:00
common.Site.ShortName = "Ts" // This should be less than three letters to fit in the navbar
common.Site.Name = "Test Site"
common.Site.Email = ""
common.Site.URL = "localhost"
common.Site.Port = "8080" // 8080
common.Site.EnableSsl = false
common.Site.EnableEmails = false
common.Site.HasProxy = false // Cloudflare counts as this, if it's sitting in the middle
common.Config.SslPrivkey = ""
common.Config.SslFullchain = ""
common.Site.Language = "english"
2017-09-11 10:24:03 +00:00
// Database details
2017-11-12 03:29:05 +00:00
common.DbConfig.Host = "localhost"
common.DbConfig.Username = "root"
common.DbConfig.Password = "password"
common.DbConfig.Dbname = "gosora"
common.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
2017-11-12 03:29:05 +00:00
common.DbConfig.TestHost = "localhost"
common.DbConfig.TestUsername = "root"
common.DbConfig.TestPassword = ""
common.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.
common.DbConfig.TestPort = "3306"
2017-10-31 01:22:05 +00:00
2017-09-11 10:24:03 +00:00
// Limiters
2017-11-12 03:29:05 +00:00
common.Config.MaxRequestSize = 5 * common.Megabyte
2017-09-11 10:24:03 +00:00
// Caching
2017-11-12 03:29:05 +00:00
common.Config.CacheTopicUser = common.CACHE_STATIC
common.Config.UserCacheCapacity = 120 // The max number of users held in memory
common.Config.TopicCacheCapacity = 200 // The max number of topics held in memory
2017-09-11 10:24:03 +00:00
// Email
2017-11-12 03:29:05 +00:00
common.Config.SMTPServer = ""
common.Config.SMTPUsername = ""
common.Config.SMTPPassword = ""
common.Config.SMTPPort = "25"
2017-09-11 10:24:03 +00:00
// Misc
2018-02-10 15:07:21 +00:00
common.Config.DefaultRoute = "routes.TopicList"
2017-11-12 03:29:05 +00:00
common.Config.DefaultGroup = 3 // Should be a setting in the database
common.Config.ActivationGroup = 5 // Should be a setting in the database
common.Config.StaffCSS = "staff_post"
common.Config.DefaultForum = 2
common.Config.MinifyTemplates = true
2018-02-15 13:15:27 +00:00
common.Config.ServerCount = 1 // Experimental: Enable Cross-Server Synchronisation and several other features
2017-09-11 10:24:03 +00:00
2017-11-12 03:29:05 +00:00
//common.Config.Noavatar = "https://api.adorable.io/avatars/{width}/{id}@{site_url}.png"
common.Config.Noavatar = "https://api.adorable.io/avatars/285/{id}@{site_url}.png"
common.Config.ItemsPerPage = 25
2017-09-11 10:24:03 +00:00
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-11-12 03:29:05 +00:00
//common.Dev.DebugMode = true
//common.Dev.SuperDebug = true
//common.Dev.TemplateDebug = true
//common.Dev.Profiling = true
//common.Dev.TestDB = true
2017-07-17 10:23:42 +00:00
}