gosora/forum.go
Azareal 41c620b988 Shadow is now fully responsive and almost done! Just a few places like the dashboard and a few glitches to patch up!
Fixed the indentation in alerts.go, Atom replaced the tabs with spaces for some reason x.x
Made the friendly URL logic more flexible.
Made the supermod menu item hiding more JS friendly.
strconv is now an optional dependency for compiled template files.
Revamped the profile template.
2017-07-29 15:04:20 +01:00

55 lines
779 B
Go

package main
//import "fmt"
import "strconv"
import _ "github.com/go-sql-driver/mysql"
type ForumAdmin struct
{
ID int
Name string
Desc string
Active bool
Preset string
TopicCount int
PresetLang string
}
type Forum struct
{
ID int
Link string
Name string
Desc string
Active bool
Preset string
ParentID int
ParentType string
TopicCount int
LastTopicLink string
LastTopic string
LastTopicID int
LastReplyer string
LastReplyerID int
LastTopicTime string
}
type ForumSimple struct
{
ID int
Name string
Active bool
Preset string
}
func build_forum_url(slug string, fid int) string {
if slug == "" {
return "/forum/" + strconv.Itoa(fid)
}
return "/forum/" + slug + "." + strconv.Itoa(fid)
}
func get_forum_url_prefix() string {
return "/forum/"
}