Use arrays for holding fragments rather than using a large number of micro variables.

Fixed a typo in a phrase.
Fixed a typo in a phrase name in Cosora.
Super mods can no longer see the group creation form or click on the groups in the Group Manager (which took them to a no permissions error).
Tweaked some of the uglier generated variables.
This commit is contained in:
Azareal 2018-03-12 04:52:47 +00:00
parent 3821e626ce
commit 84dbe71bfc
17 changed files with 2350 additions and 2314 deletions

View File

@ -4,6 +4,7 @@ import (
"html/template"
"log"
"net/http"
"strconv"
"time"
"./templates"
@ -261,7 +262,12 @@ func compileTemplates() error {
go writeTemplate("ip_search", ipSearchTmpl)
go writeTemplate("error", errorTmpl)
go func() {
err := writeFile("./template_list.go", "package main\n\n// nolint\n"+c.FragOut)
out := "package main\n\n"
for templateName, count := range c.TemplateFragmentCount {
out += "var " + templateName + "_frags = make([][]byte," + strconv.Itoa(count) + ")\n"
}
out += "\n// nolint\nfunc init() {\n" + c.FragOut + "}\n"
err := writeFile("./template_list.go", out)
if err != nil {
log.Fatal(err)
}

View File

@ -36,22 +36,23 @@ type CTemplateConfig struct {
// nolint
type CTemplateSet struct {
templateList map[string]*parse.Tree
fileDir string
funcMap map[string]interface{}
importMap map[string]string
Fragments map[string]int
FragmentCursor map[string]int
FragOut string
varList map[string]VarItem
localVars map[string]map[string]VarItemReflect
hasDispInt bool
localDispStructIndex int
langIndexToName []string
stats map[string]int
previousNode parse.NodeType
currentNode parse.NodeType
nextNode parse.NodeType
templateList map[string]*parse.Tree
fileDir string
funcMap map[string]interface{}
importMap map[string]string
TemplateFragmentCount map[string]int
Fragments map[string]int
fragmentCursor map[string]int
FragOut string
varList map[string]VarItem
localVars map[string]map[string]VarItemReflect
hasDispInt bool
localDispStructIndex int
langIndexToName []string
stats map[string]int
previousNode parse.NodeType
currentNode parse.NodeType
nextNode parse.NodeType
//tempVars map[string]string
config CTemplateConfig
doImports bool
@ -138,10 +139,16 @@ func (c *CTemplateSet) Compile(name string, fileDir string, expects string, expe
if c.Fragments == nil {
c.Fragments = make(map[string]int)
}
c.FragmentCursor = map[string]int{fname: 0}
c.fragmentCursor = map[string]int{fname: 0}
c.langIndexToName = nil
// TODO: Is this the first template loaded in? We really should have some sort of constructor for CTemplateSet
if c.TemplateFragmentCount == nil {
c.TemplateFragmentCount = make(map[string]int)
}
out += c.rootIterate(c.templateList[fname], varholder, holdreflect, fname)
c.TemplateFragmentCount[fname] = c.fragmentCursor[fname] + 1
var importList string
if c.doImports {
@ -158,7 +165,7 @@ func (c *CTemplateSet) Compile(name string, fileDir string, expects string, expe
fout := "// +build !no_templategen\n\n// Code generated by Gosora. More below:\n/* This file was automatically generated by the software. Please don't edit it as your changes may be overwritten at any moment. */\n"
fout += "package main\n" + importList + "\n"
fout += "var " + fname + "_Tmpl_Phrase_ID int\n\n"
fout += "var " + fname + "_tmpl_phrase_id int\n\n"
fout += "// nolint\nfunc init() {\n"
if !c.config.SkipHandles {
@ -169,7 +176,7 @@ func (c *CTemplateSet) Compile(name string, fileDir string, expects string, expe
fout += "\tcommon.TmplPtrMap[\"o_" + fname + "\"] = Template_" + fname + "\n"
if len(c.langIndexToName) > 0 {
fout += "\t" + fname + "_Tmpl_Phrase_ID = common.RegisterTmplPhraseNames([]string{\n"
fout += "\t" + fname + "_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{\n"
for _, name := range c.langIndexToName {
fout += "\t\t" + `"` + name + `"` + ",\n"
}
@ -179,7 +186,7 @@ func (c *CTemplateSet) Compile(name string, fileDir string, expects string, expe
fout += "// nolint\nfunc Template_" + fname + "(tmpl_" + fname + "_vars " + expects + ", w http.ResponseWriter) error {\n"
if len(c.langIndexToName) > 0 {
fout += "\tvar phrases = common.GetTmplPhrasesBytes(" + fname + "_Tmpl_Phrase_ID)\n"
fout += "var phrases = common.GetTmplPhrasesBytes(" + fname + "_tmpl_phrase_id)\n"
}
fout += varString + out + "\treturn nil\n}\n"
@ -268,14 +275,15 @@ func (c *CTemplateSet) compileSwitch(varholder string, holdreflect reflect.Value
return ""
}
fragmentName := templateName + "_" + strconv.Itoa(c.FragmentCursor[templateName])
fragmentName := templateName + "_" + strconv.Itoa(c.fragmentCursor[templateName])
fragmentPrefix := templateName + "_frags[" + strconv.Itoa(c.fragmentCursor[templateName]) + "]"
_, ok := c.Fragments[fragmentName]
if !ok {
c.Fragments[fragmentName] = len(node.Text)
c.FragOut += "var " + fragmentName + " = []byte(`" + string(node.Text) + "`)\n"
c.FragOut += fragmentPrefix + " = []byte(`" + string(node.Text) + "`)\n"
}
c.FragmentCursor[templateName] = c.FragmentCursor[templateName] + 1
return "w.Write(" + fragmentName + ")\n"
c.fragmentCursor[templateName] = c.fragmentCursor[templateName] + 1
return "w.Write(" + fragmentPrefix + ")\n"
default:
return c.unknownNode(node)
}
@ -926,9 +934,10 @@ func (c *CTemplateSet) compileSubtemplate(pvarholder string, pholdreflect reflec
c.localVars[fname] = make(map[string]VarItemReflect)
c.localVars[fname]["."] = VarItemReflect{".", varholder, holdreflect}
c.FragmentCursor[fname] = 0
c.fragmentCursor[fname] = 0
out += c.rootIterate(subtree, varholder, holdreflect, fname)
c.TemplateFragmentCount[fname] = c.fragmentCursor[fname] + 1
return out
}

View File

@ -440,7 +440,7 @@
"ip_search_search_button":"Search",
"ip_search_no_users":"No users found.",
"error_head":"An error has occured",
"error_head":"An error has occurred",
"footer_thingymawhatsit":"Can you please keep the powered by notice? ;)",
"footer_powered_by":"Powered by Gosora",
"footer_made_with_love":"Made with love by Azareal",

View File

@ -3,10 +3,10 @@
// Code generated by Gosora. More below:
/* This file was automatically generated by the software. Please don't edit it as your changes may be overwritten at any moment. */
package main
import "net/http"
import "./common"
import "net/http"
var error_Tmpl_Phrase_ID int
var error_tmpl_phrase_id int
// nolint
func init() {
@ -14,7 +14,7 @@ func init() {
common.Ctemplates = append(common.Ctemplates,"error")
common.TmplPtrMap["error"] = &common.Template_error_handle
common.TmplPtrMap["o_error"] = Template_error
error_Tmpl_Phrase_ID = common.RegisterTmplPhraseNames([]string{
error_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
"menu_forums_aria",
"menu_forums_tooltip",
"menu_topics_aria",
@ -43,140 +43,140 @@ func init() {
// nolint
func Template_error(tmpl_error_vars common.Page, w http.ResponseWriter) error {
var phrases = common.GetTmplPhrasesBytes(error_Tmpl_Phrase_ID)
w.Write(header_0)
var phrases = common.GetTmplPhrasesBytes(error_tmpl_phrase_id)
w.Write(header_frags[0])
w.Write([]byte(tmpl_error_vars.Title))
w.Write(header_1)
w.Write(header_frags[1])
w.Write([]byte(tmpl_error_vars.Header.Site.Name))
w.Write(header_2)
w.Write(header_frags[2])
w.Write([]byte(tmpl_error_vars.Header.Theme.Name))
w.Write(header_3)
w.Write(header_frags[3])
if len(tmpl_error_vars.Header.Stylesheets) != 0 {
for _, item := range tmpl_error_vars.Header.Stylesheets {
w.Write(header_4)
w.Write(header_frags[4])
w.Write([]byte(item))
w.Write(header_5)
w.Write(header_frags[5])
}
}
w.Write(header_6)
w.Write(header_frags[6])
if len(tmpl_error_vars.Header.Scripts) != 0 {
for _, item := range tmpl_error_vars.Header.Scripts {
w.Write(header_7)
w.Write(header_frags[7])
w.Write([]byte(item))
w.Write(header_8)
w.Write(header_frags[8])
}
}
w.Write(header_9)
w.Write(header_frags[9])
w.Write([]byte(tmpl_error_vars.CurrentUser.Session))
w.Write(header_10)
w.Write(header_frags[10])
w.Write([]byte(tmpl_error_vars.Header.Site.URL))
w.Write(header_11)
w.Write(header_frags[11])
if tmpl_error_vars.Header.MetaDesc != "" {
w.Write(header_12)
w.Write(header_frags[12])
w.Write([]byte(tmpl_error_vars.Header.MetaDesc))
w.Write(header_13)
w.Write(header_frags[13])
}
w.Write(header_14)
w.Write(header_frags[14])
if !tmpl_error_vars.CurrentUser.IsSuperMod {
w.Write(header_15)
w.Write(header_frags[15])
}
w.Write(header_16)
w.Write(menu_0)
w.Write(menu_1)
w.Write(header_frags[16])
w.Write(menu_frags[0])
w.Write(menu_frags[1])
w.Write([]byte(tmpl_error_vars.Header.Site.ShortName))
w.Write(menu_2)
w.Write(menu_frags[2])
w.Write(phrases[0])
w.Write(menu_3)
w.Write(menu_frags[3])
w.Write(phrases[1])
w.Write(menu_4)
w.Write(menu_frags[4])
w.Write(phrases[2])
w.Write(menu_5)
w.Write(menu_frags[5])
w.Write(phrases[3])
w.Write(menu_6)
w.Write(menu_frags[6])
w.Write(phrases[4])
w.Write(menu_7)
w.Write(menu_frags[7])
w.Write(phrases[5])
w.Write(menu_8)
w.Write(menu_frags[8])
if tmpl_error_vars.CurrentUser.Loggedin {
w.Write(menu_9)
w.Write(menu_frags[9])
w.Write(phrases[6])
w.Write(menu_10)
w.Write(menu_frags[10])
w.Write(phrases[7])
w.Write(menu_11)
w.Write(menu_frags[11])
w.Write([]byte(tmpl_error_vars.CurrentUser.Link))
w.Write(menu_12)
w.Write(menu_frags[12])
w.Write(phrases[8])
w.Write(menu_13)
w.Write(menu_frags[13])
w.Write(phrases[9])
w.Write(menu_14)
w.Write(menu_frags[14])
w.Write(phrases[10])
w.Write(menu_15)
w.Write(menu_frags[15])
w.Write(phrases[11])
w.Write(menu_16)
w.Write(menu_frags[16])
w.Write([]byte(tmpl_error_vars.CurrentUser.Session))
w.Write(menu_17)
w.Write(menu_frags[17])
w.Write(phrases[12])
w.Write(menu_18)
w.Write(menu_frags[18])
w.Write(phrases[13])
w.Write(menu_19)
w.Write(menu_frags[19])
} else {
w.Write(menu_20)
w.Write(menu_frags[20])
w.Write(phrases[14])
w.Write(menu_21)
w.Write(menu_frags[21])
w.Write(phrases[15])
w.Write(menu_22)
w.Write(menu_frags[22])
w.Write(phrases[16])
w.Write(menu_23)
w.Write(menu_frags[23])
w.Write(phrases[17])
w.Write(menu_24)
w.Write(menu_frags[24])
}
w.Write(menu_25)
w.Write(menu_frags[25])
w.Write(phrases[18])
w.Write(menu_26)
w.Write(header_17)
w.Write(menu_frags[26])
w.Write(header_frags[17])
if tmpl_error_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_18)
w.Write(header_frags[18])
}
w.Write(header_19)
w.Write(header_frags[19])
if len(tmpl_error_vars.Header.NoticeList) != 0 {
for _, item := range tmpl_error_vars.Header.NoticeList {
w.Write(header_20)
w.Write(header_frags[20])
w.Write([]byte(item))
w.Write(header_21)
w.Write(header_frags[21])
}
}
w.Write(header_22)
w.Write(error_0)
w.Write(header_frags[22])
w.Write(error_frags[0])
w.Write(phrases[19])
w.Write(error_1)
w.Write(error_frags[1])
w.Write([]byte(tmpl_error_vars.Something.(string)))
w.Write(error_2)
w.Write(footer_0)
w.Write(error_frags[2])
w.Write(footer_frags[0])
w.Write([]byte(common.BuildWidget("footer",tmpl_error_vars.Header)))
w.Write(footer_1)
w.Write(footer_frags[1])
w.Write(phrases[20])
w.Write(footer_2)
w.Write(footer_frags[2])
w.Write(phrases[21])
w.Write(footer_3)
w.Write(footer_frags[3])
w.Write(phrases[22])
w.Write(footer_4)
w.Write(footer_frags[4])
if len(tmpl_error_vars.Header.Themes) != 0 {
for _, item := range tmpl_error_vars.Header.Themes {
if !item.HideFromThemes {
w.Write(footer_5)
w.Write(footer_frags[5])
w.Write([]byte(item.Name))
w.Write(footer_6)
w.Write(footer_frags[6])
if tmpl_error_vars.Header.Theme.Name == item.Name {
w.Write(footer_7)
w.Write(footer_frags[7])
}
w.Write(footer_8)
w.Write(footer_frags[8])
w.Write([]byte(item.FriendlyName))
w.Write(footer_9)
w.Write(footer_frags[9])
}
}
}
w.Write(footer_10)
w.Write(footer_frags[10])
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_error_vars.Header)))
w.Write(footer_11)
w.Write(footer_frags[11])
return nil
}

View File

@ -7,7 +7,7 @@ import "net/http"
import "./common"
import "strconv"
var forum_Tmpl_Phrase_ID int
var forum_tmpl_phrase_id int
// nolint
func init() {
@ -15,7 +15,7 @@ func init() {
common.Ctemplates = append(common.Ctemplates,"forum")
common.TmplPtrMap["forum"] = &common.Template_forum_handle
common.TmplPtrMap["o_forum"] = Template_forum
forum_Tmpl_Phrase_ID = common.RegisterTmplPhraseNames([]string{
forum_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
"menu_forums_aria",
"menu_forums_tooltip",
"menu_topics_aria",
@ -76,350 +76,350 @@ func init() {
// nolint
func Template_forum(tmpl_forum_vars common.ForumPage, w http.ResponseWriter) error {
var phrases = common.GetTmplPhrasesBytes(forum_Tmpl_Phrase_ID)
w.Write(header_0)
var phrases = common.GetTmplPhrasesBytes(forum_tmpl_phrase_id)
w.Write(header_frags[0])
w.Write([]byte(tmpl_forum_vars.Title))
w.Write(header_1)
w.Write(header_frags[1])
w.Write([]byte(tmpl_forum_vars.Header.Site.Name))
w.Write(header_2)
w.Write(header_frags[2])
w.Write([]byte(tmpl_forum_vars.Header.Theme.Name))
w.Write(header_3)
w.Write(header_frags[3])
if len(tmpl_forum_vars.Header.Stylesheets) != 0 {
for _, item := range tmpl_forum_vars.Header.Stylesheets {
w.Write(header_4)
w.Write(header_frags[4])
w.Write([]byte(item))
w.Write(header_5)
w.Write(header_frags[5])
}
}
w.Write(header_6)
w.Write(header_frags[6])
if len(tmpl_forum_vars.Header.Scripts) != 0 {
for _, item := range tmpl_forum_vars.Header.Scripts {
w.Write(header_7)
w.Write(header_frags[7])
w.Write([]byte(item))
w.Write(header_8)
w.Write(header_frags[8])
}
}
w.Write(header_9)
w.Write(header_frags[9])
w.Write([]byte(tmpl_forum_vars.CurrentUser.Session))
w.Write(header_10)
w.Write(header_frags[10])
w.Write([]byte(tmpl_forum_vars.Header.Site.URL))
w.Write(header_11)
w.Write(header_frags[11])
if tmpl_forum_vars.Header.MetaDesc != "" {
w.Write(header_12)
w.Write(header_frags[12])
w.Write([]byte(tmpl_forum_vars.Header.MetaDesc))
w.Write(header_13)
w.Write(header_frags[13])
}
w.Write(header_14)
w.Write(header_frags[14])
if !tmpl_forum_vars.CurrentUser.IsSuperMod {
w.Write(header_15)
w.Write(header_frags[15])
}
w.Write(header_16)
w.Write(menu_0)
w.Write(menu_1)
w.Write(header_frags[16])
w.Write(menu_frags[0])
w.Write(menu_frags[1])
w.Write([]byte(tmpl_forum_vars.Header.Site.ShortName))
w.Write(menu_2)
w.Write(menu_frags[2])
w.Write(phrases[0])
w.Write(menu_3)
w.Write(menu_frags[3])
w.Write(phrases[1])
w.Write(menu_4)
w.Write(menu_frags[4])
w.Write(phrases[2])
w.Write(menu_5)
w.Write(menu_frags[5])
w.Write(phrases[3])
w.Write(menu_6)
w.Write(menu_frags[6])
w.Write(phrases[4])
w.Write(menu_7)
w.Write(menu_frags[7])
w.Write(phrases[5])
w.Write(menu_8)
w.Write(menu_frags[8])
if tmpl_forum_vars.CurrentUser.Loggedin {
w.Write(menu_9)
w.Write(menu_frags[9])
w.Write(phrases[6])
w.Write(menu_10)
w.Write(menu_frags[10])
w.Write(phrases[7])
w.Write(menu_11)
w.Write(menu_frags[11])
w.Write([]byte(tmpl_forum_vars.CurrentUser.Link))
w.Write(menu_12)
w.Write(menu_frags[12])
w.Write(phrases[8])
w.Write(menu_13)
w.Write(menu_frags[13])
w.Write(phrases[9])
w.Write(menu_14)
w.Write(menu_frags[14])
w.Write(phrases[10])
w.Write(menu_15)
w.Write(menu_frags[15])
w.Write(phrases[11])
w.Write(menu_16)
w.Write(menu_frags[16])
w.Write([]byte(tmpl_forum_vars.CurrentUser.Session))
w.Write(menu_17)
w.Write(menu_frags[17])
w.Write(phrases[12])
w.Write(menu_18)
w.Write(menu_frags[18])
w.Write(phrases[13])
w.Write(menu_19)
w.Write(menu_frags[19])
} else {
w.Write(menu_20)
w.Write(menu_frags[20])
w.Write(phrases[14])
w.Write(menu_21)
w.Write(menu_frags[21])
w.Write(phrases[15])
w.Write(menu_22)
w.Write(menu_frags[22])
w.Write(phrases[16])
w.Write(menu_23)
w.Write(menu_frags[23])
w.Write(phrases[17])
w.Write(menu_24)
w.Write(menu_frags[24])
}
w.Write(menu_25)
w.Write(menu_frags[25])
w.Write(phrases[18])
w.Write(menu_26)
w.Write(header_17)
w.Write(menu_frags[26])
w.Write(header_frags[17])
if tmpl_forum_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_18)
w.Write(header_frags[18])
}
w.Write(header_19)
w.Write(header_frags[19])
if len(tmpl_forum_vars.Header.NoticeList) != 0 {
for _, item := range tmpl_forum_vars.Header.NoticeList {
w.Write(header_20)
w.Write(header_frags[20])
w.Write([]byte(item))
w.Write(header_21)
w.Write(header_frags[21])
}
}
w.Write(header_22)
w.Write(header_frags[22])
if tmpl_forum_vars.Page > 1 {
w.Write(forum_0)
w.Write(forum_frags[0])
w.Write(phrases[19])
w.Write(forum_1)
w.Write(forum_frags[1])
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Forum.ID)))
w.Write(forum_2)
w.Write(forum_frags[2])
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page - 1)))
w.Write(forum_3)
w.Write(forum_frags[3])
w.Write(phrases[20])
w.Write(forum_4)
w.Write(forum_frags[4])
}
if tmpl_forum_vars.LastPage != tmpl_forum_vars.Page {
w.Write(forum_5)
w.Write(forum_frags[5])
w.Write(phrases[21])
w.Write(forum_6)
w.Write(forum_frags[6])
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Forum.ID)))
w.Write(forum_7)
w.Write(forum_frags[7])
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page + 1)))
w.Write(forum_8)
w.Write(forum_frags[8])
w.Write(phrases[22])
w.Write(forum_9)
w.Write(forum_frags[9])
}
w.Write(forum_10)
w.Write(forum_frags[10])
if tmpl_forum_vars.CurrentUser.ID != 0 {
w.Write(forum_11)
w.Write(forum_frags[11])
}
w.Write(forum_12)
w.Write(forum_frags[12])
w.Write([]byte(tmpl_forum_vars.Title))
w.Write(forum_13)
w.Write(forum_frags[13])
if tmpl_forum_vars.CurrentUser.ID != 0 {
w.Write(forum_14)
w.Write(forum_frags[14])
if tmpl_forum_vars.CurrentUser.Perms.CreateTopic {
w.Write(forum_15)
w.Write(forum_frags[15])
w.Write(phrases[23])
w.Write(forum_16)
w.Write(forum_frags[16])
w.Write(phrases[24])
w.Write(forum_17)
w.Write(forum_frags[17])
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Forum.ID)))
w.Write(forum_18)
w.Write(forum_19)
w.Write(forum_frags[18])
w.Write(forum_frags[19])
w.Write(phrases[25])
w.Write(forum_20)
w.Write(forum_frags[20])
w.Write(phrases[26])
w.Write(forum_21)
w.Write(forum_frags[21])
} else {
w.Write(forum_22)
w.Write(forum_frags[22])
w.Write(phrases[27])
w.Write(forum_23)
w.Write(forum_frags[23])
w.Write(phrases[28])
w.Write(forum_24)
w.Write(forum_frags[24])
}
w.Write(forum_25)
w.Write(forum_frags[25])
}
w.Write(forum_26)
w.Write(forum_frags[26])
if tmpl_forum_vars.CurrentUser.ID != 0 {
w.Write(forum_27)
w.Write(forum_frags[27])
w.Write(phrases[29])
w.Write(forum_28)
w.Write(forum_frags[28])
w.Write(phrases[30])
w.Write(forum_29)
w.Write(forum_frags[29])
w.Write(phrases[31])
w.Write(forum_30)
w.Write(forum_frags[30])
w.Write(phrases[32])
w.Write(forum_31)
w.Write(forum_frags[31])
w.Write(phrases[33])
w.Write(forum_32)
w.Write(forum_frags[32])
if tmpl_forum_vars.CurrentUser.Perms.CreateTopic {
w.Write(forum_33)
w.Write(forum_frags[33])
w.Write(phrases[34])
w.Write(forum_34)
w.Write(forum_frags[34])
w.Write([]byte(tmpl_forum_vars.CurrentUser.Avatar))
w.Write(forum_35)
w.Write(forum_frags[35])
w.Write(phrases[35])
w.Write(forum_36)
w.Write(forum_frags[36])
w.Write(phrases[36])
w.Write(forum_37)
w.Write(forum_frags[37])
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Forum.ID)))
w.Write(forum_38)
w.Write(forum_frags[38])
w.Write(phrases[37])
w.Write(forum_39)
w.Write(forum_frags[39])
w.Write(phrases[38])
w.Write(forum_40)
w.Write(forum_frags[40])
w.Write(phrases[39])
w.Write(forum_41)
w.Write(forum_frags[41])
w.Write(phrases[40])
w.Write(forum_42)
w.Write(forum_frags[42])
if tmpl_forum_vars.CurrentUser.Perms.UploadFiles {
w.Write(forum_43)
w.Write(forum_frags[43])
w.Write(phrases[41])
w.Write(forum_44)
w.Write(forum_frags[44])
}
w.Write(forum_45)
w.Write(forum_frags[45])
w.Write(phrases[42])
w.Write(forum_46)
w.Write(forum_frags[46])
}
}
w.Write(forum_47)
w.Write(forum_frags[47])
w.Write(phrases[43])
w.Write(forum_48)
w.Write(forum_frags[48])
if len(tmpl_forum_vars.ItemList) != 0 {
for _, item := range tmpl_forum_vars.ItemList {
w.Write(forum_49)
w.Write(forum_frags[49])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(forum_50)
w.Write(forum_frags[50])
if item.Sticky {
w.Write(forum_51)
w.Write(forum_frags[51])
} else {
if item.IsClosed {
w.Write(forum_52)
w.Write(forum_frags[52])
}
}
w.Write(forum_53)
w.Write(forum_frags[53])
w.Write([]byte(item.Creator.Link))
w.Write(forum_54)
w.Write(forum_frags[54])
w.Write([]byte(item.Creator.Avatar))
w.Write(forum_55)
w.Write(forum_frags[55])
w.Write([]byte(item.Creator.Name))
w.Write(forum_56)
w.Write(forum_frags[56])
w.Write([]byte(item.Creator.Name))
w.Write(forum_57)
w.Write(forum_frags[57])
w.Write([]byte(item.Link))
w.Write(forum_58)
w.Write(forum_frags[58])
w.Write([]byte(item.Title))
w.Write(forum_59)
w.Write(forum_frags[59])
w.Write([]byte(item.Creator.Link))
w.Write(forum_60)
w.Write(forum_frags[60])
w.Write([]byte(item.Creator.Name))
w.Write(forum_61)
w.Write(forum_frags[61])
if item.IsClosed {
w.Write(forum_62)
w.Write(forum_frags[62])
w.Write(phrases[44])
w.Write(forum_63)
w.Write(forum_frags[63])
}
if item.Sticky {
w.Write(forum_64)
w.Write(forum_frags[64])
w.Write(phrases[45])
w.Write(forum_65)
w.Write(forum_frags[65])
}
w.Write(forum_66)
w.Write(forum_frags[66])
w.Write([]byte(strconv.Itoa(item.PostCount)))
w.Write(forum_67)
w.Write(forum_frags[67])
w.Write([]byte(strconv.Itoa(item.LikeCount)))
w.Write(forum_68)
w.Write(forum_frags[68])
if item.Sticky {
w.Write(forum_69)
w.Write(forum_frags[69])
} else {
if item.IsClosed {
w.Write(forum_70)
w.Write(forum_frags[70])
}
}
w.Write(forum_71)
w.Write(forum_frags[71])
w.Write([]byte(item.LastUser.Link))
w.Write(forum_72)
w.Write(forum_frags[72])
w.Write([]byte(item.LastUser.Avatar))
w.Write(forum_73)
w.Write(forum_frags[73])
w.Write([]byte(item.LastUser.Name))
w.Write(forum_74)
w.Write(forum_frags[74])
w.Write([]byte(item.LastUser.Name))
w.Write(forum_75)
w.Write(forum_frags[75])
w.Write([]byte(item.LastUser.Link))
w.Write(forum_76)
w.Write(forum_frags[76])
w.Write([]byte(item.LastUser.Name))
w.Write(forum_77)
w.Write(forum_frags[77])
w.Write([]byte(item.RelativeLastReplyAt))
w.Write(forum_78)
w.Write(forum_frags[78])
}
} else {
w.Write(forum_79)
w.Write(forum_frags[79])
w.Write(phrases[46])
if tmpl_forum_vars.CurrentUser.Perms.CreateTopic {
w.Write(forum_80)
w.Write(forum_frags[80])
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Forum.ID)))
w.Write(forum_81)
w.Write(forum_frags[81])
w.Write(phrases[47])
w.Write(forum_82)
w.Write(forum_frags[82])
}
w.Write(forum_83)
w.Write(forum_frags[83])
}
w.Write(forum_84)
w.Write(forum_frags[84])
if tmpl_forum_vars.LastPage > 1 {
w.Write(paginator_0)
w.Write(paginator_frags[0])
if tmpl_forum_vars.Page > 1 {
w.Write(paginator_1)
w.Write(paginator_frags[1])
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page - 1)))
w.Write(paginator_2)
w.Write(paginator_frags[2])
w.Write(phrases[48])
w.Write(paginator_3)
w.Write(paginator_frags[3])
w.Write(phrases[49])
w.Write(paginator_4)
w.Write(paginator_frags[4])
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page - 1)))
w.Write(paginator_5)
w.Write(paginator_frags[5])
}
if len(tmpl_forum_vars.PageList) != 0 {
for _, item := range tmpl_forum_vars.PageList {
w.Write(paginator_6)
w.Write(paginator_frags[6])
w.Write([]byte(strconv.Itoa(item)))
w.Write(paginator_7)
w.Write(paginator_frags[7])
w.Write([]byte(strconv.Itoa(item)))
w.Write(paginator_8)
w.Write(paginator_frags[8])
}
}
if tmpl_forum_vars.LastPage != tmpl_forum_vars.Page {
w.Write(paginator_9)
w.Write(paginator_frags[9])
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page + 1)))
w.Write(paginator_10)
w.Write(paginator_frags[10])
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page + 1)))
w.Write(paginator_11)
w.Write(paginator_frags[11])
w.Write(phrases[50])
w.Write(paginator_12)
w.Write(paginator_frags[12])
w.Write(phrases[51])
w.Write(paginator_13)
w.Write(paginator_frags[13])
}
w.Write(paginator_14)
w.Write(paginator_frags[14])
}
w.Write(forum_85)
w.Write(footer_0)
w.Write(forum_frags[85])
w.Write(footer_frags[0])
w.Write([]byte(common.BuildWidget("footer",tmpl_forum_vars.Header)))
w.Write(footer_1)
w.Write(footer_frags[1])
w.Write(phrases[52])
w.Write(footer_2)
w.Write(footer_frags[2])
w.Write(phrases[53])
w.Write(footer_3)
w.Write(footer_frags[3])
w.Write(phrases[54])
w.Write(footer_4)
w.Write(footer_frags[4])
if len(tmpl_forum_vars.Header.Themes) != 0 {
for _, item := range tmpl_forum_vars.Header.Themes {
if !item.HideFromThemes {
w.Write(footer_5)
w.Write(footer_frags[5])
w.Write([]byte(item.Name))
w.Write(footer_6)
w.Write(footer_frags[6])
if tmpl_forum_vars.Header.Theme.Name == item.Name {
w.Write(footer_7)
w.Write(footer_frags[7])
}
w.Write(footer_8)
w.Write(footer_frags[8])
w.Write([]byte(item.FriendlyName))
w.Write(footer_9)
w.Write(footer_frags[9])
}
}
}
w.Write(footer_10)
w.Write(footer_frags[10])
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_forum_vars.Header)))
w.Write(footer_11)
w.Write(footer_frags[11])
return nil
}

View File

@ -6,7 +6,7 @@ package main
import "net/http"
import "./common"
var forums_Tmpl_Phrase_ID int
var forums_tmpl_phrase_id int
// nolint
func init() {
@ -14,7 +14,7 @@ func init() {
common.Ctemplates = append(common.Ctemplates,"forums")
common.TmplPtrMap["forums"] = &common.Template_forums_handle
common.TmplPtrMap["o_forums"] = Template_forums
forums_Tmpl_Phrase_ID = common.RegisterTmplPhraseNames([]string{
forums_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
"menu_forums_aria",
"menu_forums_tooltip",
"menu_topics_aria",
@ -46,190 +46,190 @@ func init() {
// nolint
func Template_forums(tmpl_forums_vars common.ForumsPage, w http.ResponseWriter) error {
var phrases = common.GetTmplPhrasesBytes(forums_Tmpl_Phrase_ID)
w.Write(header_0)
var phrases = common.GetTmplPhrasesBytes(forums_tmpl_phrase_id)
w.Write(header_frags[0])
w.Write([]byte(tmpl_forums_vars.Title))
w.Write(header_1)
w.Write(header_frags[1])
w.Write([]byte(tmpl_forums_vars.Header.Site.Name))
w.Write(header_2)
w.Write(header_frags[2])
w.Write([]byte(tmpl_forums_vars.Header.Theme.Name))
w.Write(header_3)
w.Write(header_frags[3])
if len(tmpl_forums_vars.Header.Stylesheets) != 0 {
for _, item := range tmpl_forums_vars.Header.Stylesheets {
w.Write(header_4)
w.Write(header_frags[4])
w.Write([]byte(item))
w.Write(header_5)
w.Write(header_frags[5])
}
}
w.Write(header_6)
w.Write(header_frags[6])
if len(tmpl_forums_vars.Header.Scripts) != 0 {
for _, item := range tmpl_forums_vars.Header.Scripts {
w.Write(header_7)
w.Write(header_frags[7])
w.Write([]byte(item))
w.Write(header_8)
w.Write(header_frags[8])
}
}
w.Write(header_9)
w.Write(header_frags[9])
w.Write([]byte(tmpl_forums_vars.CurrentUser.Session))
w.Write(header_10)
w.Write(header_frags[10])
w.Write([]byte(tmpl_forums_vars.Header.Site.URL))
w.Write(header_11)
w.Write(header_frags[11])
if tmpl_forums_vars.Header.MetaDesc != "" {
w.Write(header_12)
w.Write(header_frags[12])
w.Write([]byte(tmpl_forums_vars.Header.MetaDesc))
w.Write(header_13)
w.Write(header_frags[13])
}
w.Write(header_14)
w.Write(header_frags[14])
if !tmpl_forums_vars.CurrentUser.IsSuperMod {
w.Write(header_15)
w.Write(header_frags[15])
}
w.Write(header_16)
w.Write(menu_0)
w.Write(menu_1)
w.Write(header_frags[16])
w.Write(menu_frags[0])
w.Write(menu_frags[1])
w.Write([]byte(tmpl_forums_vars.Header.Site.ShortName))
w.Write(menu_2)
w.Write(menu_frags[2])
w.Write(phrases[0])
w.Write(menu_3)
w.Write(menu_frags[3])
w.Write(phrases[1])
w.Write(menu_4)
w.Write(menu_frags[4])
w.Write(phrases[2])
w.Write(menu_5)
w.Write(menu_frags[5])
w.Write(phrases[3])
w.Write(menu_6)
w.Write(menu_frags[6])
w.Write(phrases[4])
w.Write(menu_7)
w.Write(menu_frags[7])
w.Write(phrases[5])
w.Write(menu_8)
w.Write(menu_frags[8])
if tmpl_forums_vars.CurrentUser.Loggedin {
w.Write(menu_9)
w.Write(menu_frags[9])
w.Write(phrases[6])
w.Write(menu_10)
w.Write(menu_frags[10])
w.Write(phrases[7])
w.Write(menu_11)
w.Write(menu_frags[11])
w.Write([]byte(tmpl_forums_vars.CurrentUser.Link))
w.Write(menu_12)
w.Write(menu_frags[12])
w.Write(phrases[8])
w.Write(menu_13)
w.Write(menu_frags[13])
w.Write(phrases[9])
w.Write(menu_14)
w.Write(menu_frags[14])
w.Write(phrases[10])
w.Write(menu_15)
w.Write(menu_frags[15])
w.Write(phrases[11])
w.Write(menu_16)
w.Write(menu_frags[16])
w.Write([]byte(tmpl_forums_vars.CurrentUser.Session))
w.Write(menu_17)
w.Write(menu_frags[17])
w.Write(phrases[12])
w.Write(menu_18)
w.Write(menu_frags[18])
w.Write(phrases[13])
w.Write(menu_19)
w.Write(menu_frags[19])
} else {
w.Write(menu_20)
w.Write(menu_frags[20])
w.Write(phrases[14])
w.Write(menu_21)
w.Write(menu_frags[21])
w.Write(phrases[15])
w.Write(menu_22)
w.Write(menu_frags[22])
w.Write(phrases[16])
w.Write(menu_23)
w.Write(menu_frags[23])
w.Write(phrases[17])
w.Write(menu_24)
w.Write(menu_frags[24])
}
w.Write(menu_25)
w.Write(menu_frags[25])
w.Write(phrases[18])
w.Write(menu_26)
w.Write(header_17)
w.Write(menu_frags[26])
w.Write(header_frags[17])
if tmpl_forums_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_18)
w.Write(header_frags[18])
}
w.Write(header_19)
w.Write(header_frags[19])
if len(tmpl_forums_vars.Header.NoticeList) != 0 {
for _, item := range tmpl_forums_vars.Header.NoticeList {
w.Write(header_20)
w.Write(header_frags[20])
w.Write([]byte(item))
w.Write(header_21)
w.Write(header_frags[21])
}
}
w.Write(header_22)
w.Write(forums_0)
w.Write(header_frags[22])
w.Write(forums_frags[0])
w.Write(phrases[19])
w.Write(forums_1)
w.Write(forums_frags[1])
if len(tmpl_forums_vars.ItemList) != 0 {
for _, item := range tmpl_forums_vars.ItemList {
w.Write(forums_2)
w.Write(forums_frags[2])
if item.Desc != "" || item.LastTopic.Title != "" {
w.Write(forums_3)
w.Write(forums_frags[3])
}
w.Write(forums_4)
w.Write(forums_frags[4])
w.Write([]byte(item.Link))
w.Write(forums_5)
w.Write(forums_frags[5])
w.Write([]byte(item.Name))
w.Write(forums_6)
w.Write(forums_frags[6])
if item.Desc != "" {
w.Write(forums_7)
w.Write(forums_frags[7])
w.Write([]byte(item.Desc))
w.Write(forums_8)
w.Write(forums_frags[8])
} else {
w.Write(forums_9)
w.Write(forums_frags[9])
w.Write(phrases[20])
w.Write(forums_10)
w.Write(forums_frags[10])
}
w.Write(forums_11)
w.Write(forums_frags[11])
if item.LastReplyer.Avatar != "" {
w.Write(forums_12)
w.Write(forums_frags[12])
w.Write([]byte(item.LastReplyer.Avatar))
w.Write(forums_13)
w.Write(forums_frags[13])
w.Write([]byte(item.LastReplyer.Name))
w.Write(forums_14)
w.Write(forums_frags[14])
w.Write([]byte(item.LastReplyer.Name))
w.Write(forums_15)
w.Write(forums_frags[15])
}
w.Write(forums_16)
w.Write(forums_frags[16])
w.Write([]byte(item.LastTopic.Link))
w.Write(forums_17)
w.Write(forums_frags[17])
if item.LastTopic.Title != "" {
w.Write([]byte(item.LastTopic.Title))
} else {
w.Write(phrases[21])
}
w.Write(forums_18)
w.Write(forums_frags[18])
if item.LastTopicTime != "" {
w.Write(forums_19)
w.Write(forums_frags[19])
w.Write([]byte(item.LastTopicTime))
w.Write(forums_20)
w.Write(forums_frags[20])
}
w.Write(forums_21)
w.Write(forums_frags[21])
}
} else {
w.Write(forums_22)
w.Write(forums_frags[22])
w.Write(phrases[22])
w.Write(forums_23)
w.Write(forums_frags[23])
}
w.Write(forums_24)
w.Write(footer_0)
w.Write(forums_frags[24])
w.Write(footer_frags[0])
w.Write([]byte(common.BuildWidget("footer",tmpl_forums_vars.Header)))
w.Write(footer_1)
w.Write(footer_frags[1])
w.Write(phrases[23])
w.Write(footer_2)
w.Write(footer_frags[2])
w.Write(phrases[24])
w.Write(footer_3)
w.Write(footer_frags[3])
w.Write(phrases[25])
w.Write(footer_4)
w.Write(footer_frags[4])
if len(tmpl_forums_vars.Header.Themes) != 0 {
for _, item := range tmpl_forums_vars.Header.Themes {
if !item.HideFromThemes {
w.Write(footer_5)
w.Write(footer_frags[5])
w.Write([]byte(item.Name))
w.Write(footer_6)
w.Write(footer_frags[6])
if tmpl_forums_vars.Header.Theme.Name == item.Name {
w.Write(footer_7)
w.Write(footer_frags[7])
}
w.Write(footer_8)
w.Write(footer_frags[8])
w.Write([]byte(item.FriendlyName))
w.Write(footer_9)
w.Write(footer_frags[9])
}
}
}
w.Write(footer_10)
w.Write(footer_frags[10])
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_forums_vars.Header)))
w.Write(footer_11)
w.Write(footer_frags[11])
return nil
}

View File

@ -3,17 +3,17 @@
// Code generated by Gosora. More below:
/* This file was automatically generated by the software. Please don't edit it as your changes may be overwritten at any moment. */
package main
import "./extend/guilds/lib"
import "strconv"
import "net/http"
import "./common"
import "./extend/guilds/lib"
import "strconv"
var guilds_guild_list_Tmpl_Phrase_ID int
var guilds_guild_list_tmpl_phrase_id int
// nolint
func init() {
common.TmplPtrMap["o_guilds_guild_list"] = Template_guilds_guild_list
guilds_guild_list_Tmpl_Phrase_ID = common.RegisterTmplPhraseNames([]string{
guilds_guild_list_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
"menu_forums_aria",
"menu_forums_tooltip",
"menu_topics_aria",
@ -41,154 +41,154 @@ func init() {
// nolint
func Template_guilds_guild_list(tmpl_guilds_guild_list_vars guilds.ListPage, w http.ResponseWriter) error {
var phrases = common.GetTmplPhrasesBytes(guilds_guild_list_Tmpl_Phrase_ID)
w.Write(header_0)
var phrases = common.GetTmplPhrasesBytes(guilds_guild_list_tmpl_phrase_id)
w.Write(header_frags[0])
w.Write([]byte(tmpl_guilds_guild_list_vars.Title))
w.Write(header_1)
w.Write(header_frags[1])
w.Write([]byte(tmpl_guilds_guild_list_vars.Header.Site.Name))
w.Write(header_2)
w.Write(header_frags[2])
w.Write([]byte(tmpl_guilds_guild_list_vars.Header.Theme.Name))
w.Write(header_3)
w.Write(header_frags[3])
if len(tmpl_guilds_guild_list_vars.Header.Stylesheets) != 0 {
for _, item := range tmpl_guilds_guild_list_vars.Header.Stylesheets {
w.Write(header_4)
w.Write(header_frags[4])
w.Write([]byte(item))
w.Write(header_5)
w.Write(header_frags[5])
}
}
w.Write(header_6)
w.Write(header_frags[6])
if len(tmpl_guilds_guild_list_vars.Header.Scripts) != 0 {
for _, item := range tmpl_guilds_guild_list_vars.Header.Scripts {
w.Write(header_7)
w.Write(header_frags[7])
w.Write([]byte(item))
w.Write(header_8)
w.Write(header_frags[8])
}
}
w.Write(header_9)
w.Write(header_frags[9])
w.Write([]byte(tmpl_guilds_guild_list_vars.CurrentUser.Session))
w.Write(header_10)
w.Write(header_frags[10])
w.Write([]byte(tmpl_guilds_guild_list_vars.Header.Site.URL))
w.Write(header_11)
w.Write(header_frags[11])
if tmpl_guilds_guild_list_vars.Header.MetaDesc != "" {
w.Write(header_12)
w.Write(header_frags[12])
w.Write([]byte(tmpl_guilds_guild_list_vars.Header.MetaDesc))
w.Write(header_13)
w.Write(header_frags[13])
}
w.Write(header_14)
w.Write(header_frags[14])
if !tmpl_guilds_guild_list_vars.CurrentUser.IsSuperMod {
w.Write(header_15)
w.Write(header_frags[15])
}
w.Write(header_16)
w.Write(menu_0)
w.Write(menu_1)
w.Write(header_frags[16])
w.Write(menu_frags[0])
w.Write(menu_frags[1])
w.Write([]byte(tmpl_guilds_guild_list_vars.Header.Site.ShortName))
w.Write(menu_2)
w.Write(menu_frags[2])
w.Write(phrases[0])
w.Write(menu_3)
w.Write(menu_frags[3])
w.Write(phrases[1])
w.Write(menu_4)
w.Write(menu_frags[4])
w.Write(phrases[2])
w.Write(menu_5)
w.Write(menu_frags[5])
w.Write(phrases[3])
w.Write(menu_6)
w.Write(menu_frags[6])
w.Write(phrases[4])
w.Write(menu_7)
w.Write(menu_frags[7])
w.Write(phrases[5])
w.Write(menu_8)
w.Write(menu_frags[8])
if tmpl_guilds_guild_list_vars.CurrentUser.Loggedin {
w.Write(menu_9)
w.Write(menu_frags[9])
w.Write(phrases[6])
w.Write(menu_10)
w.Write(menu_frags[10])
w.Write(phrases[7])
w.Write(menu_11)
w.Write(menu_frags[11])
w.Write([]byte(tmpl_guilds_guild_list_vars.CurrentUser.Link))
w.Write(menu_12)
w.Write(menu_frags[12])
w.Write(phrases[8])
w.Write(menu_13)
w.Write(menu_frags[13])
w.Write(phrases[9])
w.Write(menu_14)
w.Write(menu_frags[14])
w.Write(phrases[10])
w.Write(menu_15)
w.Write(menu_frags[15])
w.Write(phrases[11])
w.Write(menu_16)
w.Write(menu_frags[16])
w.Write([]byte(tmpl_guilds_guild_list_vars.CurrentUser.Session))
w.Write(menu_17)
w.Write(menu_frags[17])
w.Write(phrases[12])
w.Write(menu_18)
w.Write(menu_frags[18])
w.Write(phrases[13])
w.Write(menu_19)
w.Write(menu_frags[19])
} else {
w.Write(menu_20)
w.Write(menu_frags[20])
w.Write(phrases[14])
w.Write(menu_21)
w.Write(menu_frags[21])
w.Write(phrases[15])
w.Write(menu_22)
w.Write(menu_frags[22])
w.Write(phrases[16])
w.Write(menu_23)
w.Write(menu_frags[23])
w.Write(phrases[17])
w.Write(menu_24)
w.Write(menu_frags[24])
}
w.Write(menu_25)
w.Write(menu_frags[25])
w.Write(phrases[18])
w.Write(menu_26)
w.Write(header_17)
w.Write(menu_frags[26])
w.Write(header_frags[17])
if tmpl_guilds_guild_list_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_18)
w.Write(header_frags[18])
}
w.Write(header_19)
w.Write(header_frags[19])
if len(tmpl_guilds_guild_list_vars.Header.NoticeList) != 0 {
for _, item := range tmpl_guilds_guild_list_vars.Header.NoticeList {
w.Write(header_20)
w.Write(header_frags[20])
w.Write([]byte(item))
w.Write(header_21)
w.Write(header_frags[21])
}
}
w.Write(header_22)
w.Write(guilds_guild_list_0)
w.Write(header_frags[22])
w.Write(guilds_guild_list_frags[0])
if len(tmpl_guilds_guild_list_vars.GuildList) != 0 {
for _, item := range tmpl_guilds_guild_list_vars.GuildList {
w.Write(guilds_guild_list_1)
w.Write(guilds_guild_list_frags[1])
w.Write([]byte(item.Link))
w.Write(guilds_guild_list_2)
w.Write(guilds_guild_list_frags[2])
w.Write([]byte(item.Name))
w.Write(guilds_guild_list_3)
w.Write(guilds_guild_list_frags[3])
w.Write([]byte(item.Desc))
w.Write(guilds_guild_list_4)
w.Write(guilds_guild_list_frags[4])
w.Write([]byte(strconv.Itoa(item.MemberCount)))
w.Write(guilds_guild_list_5)
w.Write(guilds_guild_list_frags[5])
w.Write([]byte(item.LastUpdateTime))
w.Write(guilds_guild_list_6)
w.Write(guilds_guild_list_frags[6])
}
} else {
w.Write(guilds_guild_list_7)
w.Write(guilds_guild_list_frags[7])
}
w.Write(guilds_guild_list_8)
w.Write(footer_0)
w.Write(guilds_guild_list_frags[8])
w.Write(footer_frags[0])
w.Write([]byte(common.BuildWidget("footer",tmpl_guilds_guild_list_vars.Header)))
w.Write(footer_1)
w.Write(footer_frags[1])
w.Write(phrases[19])
w.Write(footer_2)
w.Write(footer_frags[2])
w.Write(phrases[20])
w.Write(footer_3)
w.Write(footer_frags[3])
w.Write(phrases[21])
w.Write(footer_4)
w.Write(footer_frags[4])
if len(tmpl_guilds_guild_list_vars.Header.Themes) != 0 {
for _, item := range tmpl_guilds_guild_list_vars.Header.Themes {
if !item.HideFromThemes {
w.Write(footer_5)
w.Write(footer_frags[5])
w.Write([]byte(item.Name))
w.Write(footer_6)
w.Write(footer_frags[6])
if tmpl_guilds_guild_list_vars.Header.Theme.Name == item.Name {
w.Write(footer_7)
w.Write(footer_frags[7])
}
w.Write(footer_8)
w.Write(footer_frags[8])
w.Write([]byte(item.FriendlyName))
w.Write(footer_9)
w.Write(footer_frags[9])
}
}
}
w.Write(footer_10)
w.Write(footer_frags[10])
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_guilds_guild_list_vars.Header)))
w.Write(footer_11)
w.Write(footer_frags[11])
return nil
}

View File

@ -3,10 +3,10 @@
// Code generated by Gosora. More below:
/* This file was automatically generated by the software. Please don't edit it as your changes may be overwritten at any moment. */
package main
import "./common"
import "net/http"
import "./common"
var ip_search_Tmpl_Phrase_ID int
var ip_search_tmpl_phrase_id int
// nolint
func init() {
@ -14,7 +14,7 @@ func init() {
common.Ctemplates = append(common.Ctemplates,"ip_search")
common.TmplPtrMap["ip_search"] = &common.Template_ip_search_handle
common.TmplPtrMap["o_ip_search"] = Template_ip_search
ip_search_Tmpl_Phrase_ID = common.RegisterTmplPhraseNames([]string{
ip_search_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
"menu_forums_aria",
"menu_forums_tooltip",
"menu_topics_aria",
@ -45,171 +45,171 @@ func init() {
// nolint
func Template_ip_search(tmpl_ip_search_vars common.IPSearchPage, w http.ResponseWriter) error {
var phrases = common.GetTmplPhrasesBytes(ip_search_Tmpl_Phrase_ID)
w.Write(header_0)
var phrases = common.GetTmplPhrasesBytes(ip_search_tmpl_phrase_id)
w.Write(header_frags[0])
w.Write([]byte(tmpl_ip_search_vars.Title))
w.Write(header_1)
w.Write(header_frags[1])
w.Write([]byte(tmpl_ip_search_vars.Header.Site.Name))
w.Write(header_2)
w.Write(header_frags[2])
w.Write([]byte(tmpl_ip_search_vars.Header.Theme.Name))
w.Write(header_3)
w.Write(header_frags[3])
if len(tmpl_ip_search_vars.Header.Stylesheets) != 0 {
for _, item := range tmpl_ip_search_vars.Header.Stylesheets {
w.Write(header_4)
w.Write(header_frags[4])
w.Write([]byte(item))
w.Write(header_5)
w.Write(header_frags[5])
}
}
w.Write(header_6)
w.Write(header_frags[6])
if len(tmpl_ip_search_vars.Header.Scripts) != 0 {
for _, item := range tmpl_ip_search_vars.Header.Scripts {
w.Write(header_7)
w.Write(header_frags[7])
w.Write([]byte(item))
w.Write(header_8)
w.Write(header_frags[8])
}
}
w.Write(header_9)
w.Write(header_frags[9])
w.Write([]byte(tmpl_ip_search_vars.CurrentUser.Session))
w.Write(header_10)
w.Write(header_frags[10])
w.Write([]byte(tmpl_ip_search_vars.Header.Site.URL))
w.Write(header_11)
w.Write(header_frags[11])
if tmpl_ip_search_vars.Header.MetaDesc != "" {
w.Write(header_12)
w.Write(header_frags[12])
w.Write([]byte(tmpl_ip_search_vars.Header.MetaDesc))
w.Write(header_13)
w.Write(header_frags[13])
}
w.Write(header_14)
w.Write(header_frags[14])
if !tmpl_ip_search_vars.CurrentUser.IsSuperMod {
w.Write(header_15)
w.Write(header_frags[15])
}
w.Write(header_16)
w.Write(menu_0)
w.Write(menu_1)
w.Write(header_frags[16])
w.Write(menu_frags[0])
w.Write(menu_frags[1])
w.Write([]byte(tmpl_ip_search_vars.Header.Site.ShortName))
w.Write(menu_2)
w.Write(menu_frags[2])
w.Write(phrases[0])
w.Write(menu_3)
w.Write(menu_frags[3])
w.Write(phrases[1])
w.Write(menu_4)
w.Write(menu_frags[4])
w.Write(phrases[2])
w.Write(menu_5)
w.Write(menu_frags[5])
w.Write(phrases[3])
w.Write(menu_6)
w.Write(menu_frags[6])
w.Write(phrases[4])
w.Write(menu_7)
w.Write(menu_frags[7])
w.Write(phrases[5])
w.Write(menu_8)
w.Write(menu_frags[8])
if tmpl_ip_search_vars.CurrentUser.Loggedin {
w.Write(menu_9)
w.Write(menu_frags[9])
w.Write(phrases[6])
w.Write(menu_10)
w.Write(menu_frags[10])
w.Write(phrases[7])
w.Write(menu_11)
w.Write(menu_frags[11])
w.Write([]byte(tmpl_ip_search_vars.CurrentUser.Link))
w.Write(menu_12)
w.Write(menu_frags[12])
w.Write(phrases[8])
w.Write(menu_13)
w.Write(menu_frags[13])
w.Write(phrases[9])
w.Write(menu_14)
w.Write(menu_frags[14])
w.Write(phrases[10])
w.Write(menu_15)
w.Write(menu_frags[15])
w.Write(phrases[11])
w.Write(menu_16)
w.Write(menu_frags[16])
w.Write([]byte(tmpl_ip_search_vars.CurrentUser.Session))
w.Write(menu_17)
w.Write(menu_frags[17])
w.Write(phrases[12])
w.Write(menu_18)
w.Write(menu_frags[18])
w.Write(phrases[13])
w.Write(menu_19)
w.Write(menu_frags[19])
} else {
w.Write(menu_20)
w.Write(menu_frags[20])
w.Write(phrases[14])
w.Write(menu_21)
w.Write(menu_frags[21])
w.Write(phrases[15])
w.Write(menu_22)
w.Write(menu_frags[22])
w.Write(phrases[16])
w.Write(menu_23)
w.Write(menu_frags[23])
w.Write(phrases[17])
w.Write(menu_24)
w.Write(menu_frags[24])
}
w.Write(menu_25)
w.Write(menu_frags[25])
w.Write(phrases[18])
w.Write(menu_26)
w.Write(header_17)
w.Write(menu_frags[26])
w.Write(header_frags[17])
if tmpl_ip_search_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_18)
w.Write(header_frags[18])
}
w.Write(header_19)
w.Write(header_frags[19])
if len(tmpl_ip_search_vars.Header.NoticeList) != 0 {
for _, item := range tmpl_ip_search_vars.Header.NoticeList {
w.Write(header_20)
w.Write(header_frags[20])
w.Write([]byte(item))
w.Write(header_21)
w.Write(header_frags[21])
}
}
w.Write(header_22)
w.Write(ip_search_0)
w.Write(header_frags[22])
w.Write(ip_search_frags[0])
w.Write(phrases[19])
w.Write(ip_search_1)
w.Write(ip_search_frags[1])
if tmpl_ip_search_vars.IP != "" {
w.Write(ip_search_2)
w.Write(ip_search_frags[2])
w.Write([]byte(tmpl_ip_search_vars.IP))
w.Write(ip_search_3)
w.Write(ip_search_frags[3])
}
w.Write(ip_search_4)
w.Write(ip_search_frags[4])
w.Write(phrases[20])
w.Write(ip_search_5)
w.Write(ip_search_frags[5])
if tmpl_ip_search_vars.IP != "" {
w.Write(ip_search_6)
w.Write(ip_search_frags[6])
if len(tmpl_ip_search_vars.ItemList) != 0 {
for _, item := range tmpl_ip_search_vars.ItemList {
w.Write(ip_search_7)
w.Write(ip_search_frags[7])
w.Write([]byte(item.Avatar))
w.Write(ip_search_8)
w.Write(ip_search_frags[8])
w.Write([]byte(item.Avatar))
w.Write(ip_search_9)
w.Write(ip_search_frags[9])
w.Write([]byte(item.Name))
w.Write(ip_search_10)
w.Write(ip_search_frags[10])
w.Write([]byte(item.Link))
w.Write(ip_search_11)
w.Write(ip_search_frags[11])
w.Write([]byte(item.Name))
w.Write(ip_search_12)
w.Write(ip_search_frags[12])
}
} else {
w.Write(ip_search_13)
w.Write(ip_search_frags[13])
w.Write(phrases[21])
w.Write(ip_search_14)
w.Write(ip_search_frags[14])
}
w.Write(ip_search_15)
w.Write(ip_search_frags[15])
}
w.Write(ip_search_16)
w.Write(footer_0)
w.Write(ip_search_frags[16])
w.Write(footer_frags[0])
w.Write([]byte(common.BuildWidget("footer",tmpl_ip_search_vars.Header)))
w.Write(footer_1)
w.Write(footer_frags[1])
w.Write(phrases[22])
w.Write(footer_2)
w.Write(footer_frags[2])
w.Write(phrases[23])
w.Write(footer_3)
w.Write(footer_frags[3])
w.Write(phrases[24])
w.Write(footer_4)
w.Write(footer_frags[4])
if len(tmpl_ip_search_vars.Header.Themes) != 0 {
for _, item := range tmpl_ip_search_vars.Header.Themes {
if !item.HideFromThemes {
w.Write(footer_5)
w.Write(footer_frags[5])
w.Write([]byte(item.Name))
w.Write(footer_6)
w.Write(footer_frags[6])
if tmpl_ip_search_vars.Header.Theme.Name == item.Name {
w.Write(footer_7)
w.Write(footer_frags[7])
}
w.Write(footer_8)
w.Write(footer_frags[8])
w.Write([]byte(item.FriendlyName))
w.Write(footer_9)
w.Write(footer_frags[9])
}
}
}
w.Write(footer_10)
w.Write(footer_frags[10])
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_ip_search_vars.Header)))
w.Write(footer_11)
w.Write(footer_frags[11])
return nil
}

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,7 @@ package main
import "net/http"
import "./common"
var login_Tmpl_Phrase_ID int
var login_tmpl_phrase_id int
// nolint
func init() {
@ -14,7 +14,7 @@ func init() {
common.Ctemplates = append(common.Ctemplates,"login")
common.TmplPtrMap["login"] = &common.Template_login_handle
common.TmplPtrMap["o_login"] = Template_login
login_Tmpl_Phrase_ID = common.RegisterTmplPhraseNames([]string{
login_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
"menu_forums_aria",
"menu_forums_tooltip",
"menu_topics_aria",
@ -48,148 +48,148 @@ func init() {
// nolint
func Template_login(tmpl_login_vars common.Page, w http.ResponseWriter) error {
var phrases = common.GetTmplPhrasesBytes(login_Tmpl_Phrase_ID)
w.Write(header_0)
var phrases = common.GetTmplPhrasesBytes(login_tmpl_phrase_id)
w.Write(header_frags[0])
w.Write([]byte(tmpl_login_vars.Title))
w.Write(header_1)
w.Write(header_frags[1])
w.Write([]byte(tmpl_login_vars.Header.Site.Name))
w.Write(header_2)
w.Write(header_frags[2])
w.Write([]byte(tmpl_login_vars.Header.Theme.Name))
w.Write(header_3)
w.Write(header_frags[3])
if len(tmpl_login_vars.Header.Stylesheets) != 0 {
for _, item := range tmpl_login_vars.Header.Stylesheets {
w.Write(header_4)
w.Write(header_frags[4])
w.Write([]byte(item))
w.Write(header_5)
w.Write(header_frags[5])
}
}
w.Write(header_6)
w.Write(header_frags[6])
if len(tmpl_login_vars.Header.Scripts) != 0 {
for _, item := range tmpl_login_vars.Header.Scripts {
w.Write(header_7)
w.Write(header_frags[7])
w.Write([]byte(item))
w.Write(header_8)
w.Write(header_frags[8])
}
}
w.Write(header_9)
w.Write(header_frags[9])
w.Write([]byte(tmpl_login_vars.CurrentUser.Session))
w.Write(header_10)
w.Write(header_frags[10])
w.Write([]byte(tmpl_login_vars.Header.Site.URL))
w.Write(header_11)
w.Write(header_frags[11])
if tmpl_login_vars.Header.MetaDesc != "" {
w.Write(header_12)
w.Write(header_frags[12])
w.Write([]byte(tmpl_login_vars.Header.MetaDesc))
w.Write(header_13)
w.Write(header_frags[13])
}
w.Write(header_14)
w.Write(header_frags[14])
if !tmpl_login_vars.CurrentUser.IsSuperMod {
w.Write(header_15)
w.Write(header_frags[15])
}
w.Write(header_16)
w.Write(menu_0)
w.Write(menu_1)
w.Write(header_frags[16])
w.Write(menu_frags[0])
w.Write(menu_frags[1])
w.Write([]byte(tmpl_login_vars.Header.Site.ShortName))
w.Write(menu_2)
w.Write(menu_frags[2])
w.Write(phrases[0])
w.Write(menu_3)
w.Write(menu_frags[3])
w.Write(phrases[1])
w.Write(menu_4)
w.Write(menu_frags[4])
w.Write(phrases[2])
w.Write(menu_5)
w.Write(menu_frags[5])
w.Write(phrases[3])
w.Write(menu_6)
w.Write(menu_frags[6])
w.Write(phrases[4])
w.Write(menu_7)
w.Write(menu_frags[7])
w.Write(phrases[5])
w.Write(menu_8)
w.Write(menu_frags[8])
if tmpl_login_vars.CurrentUser.Loggedin {
w.Write(menu_9)
w.Write(menu_frags[9])
w.Write(phrases[6])
w.Write(menu_10)
w.Write(menu_frags[10])
w.Write(phrases[7])
w.Write(menu_11)
w.Write(menu_frags[11])
w.Write([]byte(tmpl_login_vars.CurrentUser.Link))
w.Write(menu_12)
w.Write(menu_frags[12])
w.Write(phrases[8])
w.Write(menu_13)
w.Write(menu_frags[13])
w.Write(phrases[9])
w.Write(menu_14)
w.Write(menu_frags[14])
w.Write(phrases[10])
w.Write(menu_15)
w.Write(menu_frags[15])
w.Write(phrases[11])
w.Write(menu_16)
w.Write(menu_frags[16])
w.Write([]byte(tmpl_login_vars.CurrentUser.Session))
w.Write(menu_17)
w.Write(menu_frags[17])
w.Write(phrases[12])
w.Write(menu_18)
w.Write(menu_frags[18])
w.Write(phrases[13])
w.Write(menu_19)
w.Write(menu_frags[19])
} else {
w.Write(menu_20)
w.Write(menu_frags[20])
w.Write(phrases[14])
w.Write(menu_21)
w.Write(menu_frags[21])
w.Write(phrases[15])
w.Write(menu_22)
w.Write(menu_frags[22])
w.Write(phrases[16])
w.Write(menu_23)
w.Write(menu_frags[23])
w.Write(phrases[17])
w.Write(menu_24)
w.Write(menu_frags[24])
}
w.Write(menu_25)
w.Write(menu_frags[25])
w.Write(phrases[18])
w.Write(menu_26)
w.Write(header_17)
w.Write(menu_frags[26])
w.Write(header_frags[17])
if tmpl_login_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_18)
w.Write(header_frags[18])
}
w.Write(header_19)
w.Write(header_frags[19])
if len(tmpl_login_vars.Header.NoticeList) != 0 {
for _, item := range tmpl_login_vars.Header.NoticeList {
w.Write(header_20)
w.Write(header_frags[20])
w.Write([]byte(item))
w.Write(header_21)
w.Write(header_frags[21])
}
}
w.Write(header_22)
w.Write(login_0)
w.Write(header_frags[22])
w.Write(login_frags[0])
w.Write(phrases[19])
w.Write(login_1)
w.Write(login_frags[1])
w.Write(phrases[20])
w.Write(login_2)
w.Write(login_frags[2])
w.Write(phrases[21])
w.Write(login_3)
w.Write(login_frags[3])
w.Write(phrases[22])
w.Write(login_4)
w.Write(login_frags[4])
w.Write(phrases[23])
w.Write(login_5)
w.Write(login_frags[5])
w.Write(phrases[24])
w.Write(login_6)
w.Write(footer_0)
w.Write(login_frags[6])
w.Write(footer_frags[0])
w.Write([]byte(common.BuildWidget("footer",tmpl_login_vars.Header)))
w.Write(footer_1)
w.Write(footer_frags[1])
w.Write(phrases[25])
w.Write(footer_2)
w.Write(footer_frags[2])
w.Write(phrases[26])
w.Write(footer_3)
w.Write(footer_frags[3])
w.Write(phrases[27])
w.Write(footer_4)
w.Write(footer_frags[4])
if len(tmpl_login_vars.Header.Themes) != 0 {
for _, item := range tmpl_login_vars.Header.Themes {
if !item.HideFromThemes {
w.Write(footer_5)
w.Write(footer_frags[5])
w.Write([]byte(item.Name))
w.Write(footer_6)
w.Write(footer_frags[6])
if tmpl_login_vars.Header.Theme.Name == item.Name {
w.Write(footer_7)
w.Write(footer_frags[7])
}
w.Write(footer_8)
w.Write(footer_frags[8])
w.Write([]byte(item.FriendlyName))
w.Write(footer_9)
w.Write(footer_frags[9])
}
}
}
w.Write(footer_10)
w.Write(footer_frags[10])
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_login_vars.Header)))
w.Write(footer_11)
w.Write(footer_frags[11])
return nil
}

View File

@ -7,7 +7,7 @@ import "net/http"
import "./common"
import "strconv"
var profile_Tmpl_Phrase_ID int
var profile_tmpl_phrase_id int
// nolint
func init() {
@ -15,7 +15,7 @@ func init() {
common.Ctemplates = append(common.Ctemplates,"profile")
common.TmplPtrMap["profile"] = &common.Template_profile_handle
common.TmplPtrMap["o_profile"] = Template_profile
profile_Tmpl_Phrase_ID = common.RegisterTmplPhraseNames([]string{
profile_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
"menu_forums_aria",
"menu_forums_tooltip",
"menu_topics_aria",
@ -71,334 +71,334 @@ func init() {
// nolint
func Template_profile(tmpl_profile_vars common.ProfilePage, w http.ResponseWriter) error {
var phrases = common.GetTmplPhrasesBytes(profile_Tmpl_Phrase_ID)
w.Write(header_0)
var phrases = common.GetTmplPhrasesBytes(profile_tmpl_phrase_id)
w.Write(header_frags[0])
w.Write([]byte(tmpl_profile_vars.Title))
w.Write(header_1)
w.Write(header_frags[1])
w.Write([]byte(tmpl_profile_vars.Header.Site.Name))
w.Write(header_2)
w.Write(header_frags[2])
w.Write([]byte(tmpl_profile_vars.Header.Theme.Name))
w.Write(header_3)
w.Write(header_frags[3])
if len(tmpl_profile_vars.Header.Stylesheets) != 0 {
for _, item := range tmpl_profile_vars.Header.Stylesheets {
w.Write(header_4)
w.Write(header_frags[4])
w.Write([]byte(item))
w.Write(header_5)
w.Write(header_frags[5])
}
}
w.Write(header_6)
w.Write(header_frags[6])
if len(tmpl_profile_vars.Header.Scripts) != 0 {
for _, item := range tmpl_profile_vars.Header.Scripts {
w.Write(header_7)
w.Write(header_frags[7])
w.Write([]byte(item))
w.Write(header_8)
w.Write(header_frags[8])
}
}
w.Write(header_9)
w.Write(header_frags[9])
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(header_10)
w.Write(header_frags[10])
w.Write([]byte(tmpl_profile_vars.Header.Site.URL))
w.Write(header_11)
w.Write(header_frags[11])
if tmpl_profile_vars.Header.MetaDesc != "" {
w.Write(header_12)
w.Write(header_frags[12])
w.Write([]byte(tmpl_profile_vars.Header.MetaDesc))
w.Write(header_13)
w.Write(header_frags[13])
}
w.Write(header_14)
w.Write(header_frags[14])
if !tmpl_profile_vars.CurrentUser.IsSuperMod {
w.Write(header_15)
w.Write(header_frags[15])
}
w.Write(header_16)
w.Write(menu_0)
w.Write(menu_1)
w.Write(header_frags[16])
w.Write(menu_frags[0])
w.Write(menu_frags[1])
w.Write([]byte(tmpl_profile_vars.Header.Site.ShortName))
w.Write(menu_2)
w.Write(menu_frags[2])
w.Write(phrases[0])
w.Write(menu_3)
w.Write(menu_frags[3])
w.Write(phrases[1])
w.Write(menu_4)
w.Write(menu_frags[4])
w.Write(phrases[2])
w.Write(menu_5)
w.Write(menu_frags[5])
w.Write(phrases[3])
w.Write(menu_6)
w.Write(menu_frags[6])
w.Write(phrases[4])
w.Write(menu_7)
w.Write(menu_frags[7])
w.Write(phrases[5])
w.Write(menu_8)
w.Write(menu_frags[8])
if tmpl_profile_vars.CurrentUser.Loggedin {
w.Write(menu_9)
w.Write(menu_frags[9])
w.Write(phrases[6])
w.Write(menu_10)
w.Write(menu_frags[10])
w.Write(phrases[7])
w.Write(menu_11)
w.Write(menu_frags[11])
w.Write([]byte(tmpl_profile_vars.CurrentUser.Link))
w.Write(menu_12)
w.Write(menu_frags[12])
w.Write(phrases[8])
w.Write(menu_13)
w.Write(menu_frags[13])
w.Write(phrases[9])
w.Write(menu_14)
w.Write(menu_frags[14])
w.Write(phrases[10])
w.Write(menu_15)
w.Write(menu_frags[15])
w.Write(phrases[11])
w.Write(menu_16)
w.Write(menu_frags[16])
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(menu_17)
w.Write(menu_frags[17])
w.Write(phrases[12])
w.Write(menu_18)
w.Write(menu_frags[18])
w.Write(phrases[13])
w.Write(menu_19)
w.Write(menu_frags[19])
} else {
w.Write(menu_20)
w.Write(menu_frags[20])
w.Write(phrases[14])
w.Write(menu_21)
w.Write(menu_frags[21])
w.Write(phrases[15])
w.Write(menu_22)
w.Write(menu_frags[22])
w.Write(phrases[16])
w.Write(menu_23)
w.Write(menu_frags[23])
w.Write(phrases[17])
w.Write(menu_24)
w.Write(menu_frags[24])
}
w.Write(menu_25)
w.Write(menu_frags[25])
w.Write(phrases[18])
w.Write(menu_26)
w.Write(header_17)
w.Write(menu_frags[26])
w.Write(header_frags[17])
if tmpl_profile_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_18)
w.Write(header_frags[18])
}
w.Write(header_19)
w.Write(header_frags[19])
if len(tmpl_profile_vars.Header.NoticeList) != 0 {
for _, item := range tmpl_profile_vars.Header.NoticeList {
w.Write(header_20)
w.Write(header_frags[20])
w.Write([]byte(item))
w.Write(header_21)
w.Write(header_frags[21])
}
}
w.Write(header_22)
w.Write(profile_0)
w.Write(header_frags[22])
w.Write(profile_frags[0])
w.Write([]byte(tmpl_profile_vars.ProfileOwner.Avatar))
w.Write(profile_1)
w.Write(profile_frags[1])
w.Write([]byte(tmpl_profile_vars.ProfileOwner.Name))
w.Write(profile_2)
w.Write(profile_frags[2])
w.Write([]byte(tmpl_profile_vars.ProfileOwner.Name))
w.Write(profile_3)
w.Write(profile_frags[3])
w.Write([]byte(tmpl_profile_vars.ProfileOwner.Name))
w.Write(profile_4)
w.Write(profile_frags[4])
if tmpl_profile_vars.ProfileOwner.Tag != "" {
w.Write(profile_5)
w.Write(profile_frags[5])
w.Write([]byte(tmpl_profile_vars.ProfileOwner.Tag))
w.Write(profile_6)
w.Write(profile_frags[6])
}
w.Write(profile_7)
w.Write(profile_frags[7])
if !tmpl_profile_vars.CurrentUser.Loggedin {
w.Write(profile_8)
w.Write(profile_frags[8])
w.Write(phrases[19])
w.Write(profile_9)
w.Write(profile_frags[9])
} else {
w.Write(profile_10)
w.Write(profile_frags[10])
w.Write(phrases[20])
w.Write(profile_11)
w.Write(profile_frags[11])
if tmpl_profile_vars.CurrentUser.IsSuperMod && !tmpl_profile_vars.ProfileOwner.IsSuperMod {
w.Write(profile_12)
w.Write(profile_frags[12])
if tmpl_profile_vars.ProfileOwner.IsBanned {
w.Write(profile_13)
w.Write(profile_frags[13])
w.Write([]byte(strconv.Itoa(tmpl_profile_vars.ProfileOwner.ID)))
w.Write(profile_14)
w.Write(profile_frags[14])
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_15)
w.Write(profile_frags[15])
w.Write(phrases[21])
w.Write(profile_16)
w.Write(profile_frags[16])
} else {
w.Write(profile_17)
w.Write(profile_frags[17])
w.Write(phrases[22])
w.Write(profile_18)
w.Write(profile_frags[18])
}
w.Write(profile_19)
w.Write(profile_frags[19])
}
w.Write(profile_20)
w.Write(profile_frags[20])
w.Write([]byte(strconv.Itoa(tmpl_profile_vars.ProfileOwner.ID)))
w.Write(profile_21)
w.Write(profile_frags[21])
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_22)
w.Write(profile_frags[22])
w.Write(phrases[23])
w.Write(profile_23)
w.Write(profile_frags[23])
w.Write(phrases[24])
w.Write(profile_24)
w.Write(profile_frags[24])
}
w.Write(profile_25)
w.Write(profile_frags[25])
if tmpl_profile_vars.CurrentUser.Perms.BanUsers {
w.Write(profile_26)
w.Write(profile_frags[26])
w.Write(phrases[25])
w.Write(profile_27)
w.Write(profile_frags[27])
w.Write([]byte(strconv.Itoa(tmpl_profile_vars.ProfileOwner.ID)))
w.Write(profile_28)
w.Write(profile_frags[28])
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_29)
w.Write(profile_30)
w.Write(profile_frags[29])
w.Write(profile_frags[30])
w.Write(phrases[26])
w.Write(profile_31)
w.Write(profile_frags[31])
w.Write(phrases[27])
w.Write(profile_32)
w.Write(profile_frags[32])
w.Write(phrases[28])
w.Write(profile_33)
w.Write(profile_frags[33])
w.Write(phrases[29])
w.Write(profile_34)
w.Write(profile_frags[34])
w.Write(phrases[30])
w.Write(profile_35)
w.Write(profile_frags[35])
w.Write(phrases[31])
w.Write(profile_36)
w.Write(profile_frags[36])
}
w.Write(profile_37)
w.Write(profile_frags[37])
w.Write(phrases[32])
w.Write(profile_38)
w.Write(profile_frags[38])
if tmpl_profile_vars.Header.Theme.BgAvatars {
if len(tmpl_profile_vars.ItemList) != 0 {
for _, item := range tmpl_profile_vars.ItemList {
w.Write(profile_comments_row_0)
w.Write(profile_comments_row_frags[0])
w.Write([]byte(item.ClassName))
w.Write(profile_comments_row_1)
w.Write(profile_comments_row_frags[1])
w.Write([]byte(item.Avatar))
w.Write(profile_comments_row_2)
w.Write(profile_comments_row_frags[2])
if item.ContentLines <= 5 {
w.Write(profile_comments_row_3)
w.Write(profile_comments_row_frags[3])
}
w.Write(profile_comments_row_4)
w.Write(profile_comments_row_frags[4])
w.Write([]byte(item.ContentHtml))
w.Write(profile_comments_row_5)
w.Write(profile_comments_row_frags[5])
w.Write([]byte(item.UserLink))
w.Write(profile_comments_row_6)
w.Write(profile_comments_row_frags[6])
w.Write([]byte(item.CreatedByName))
w.Write(profile_comments_row_7)
w.Write(profile_comments_row_frags[7])
if tmpl_profile_vars.CurrentUser.IsMod {
w.Write(profile_comments_row_8)
w.Write(profile_comments_row_frags[8])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(profile_comments_row_9)
w.Write(profile_comments_row_frags[9])
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_comments_row_10)
w.Write(profile_comments_row_frags[10])
w.Write(phrases[33])
w.Write(profile_comments_row_11)
w.Write(profile_comments_row_frags[11])
w.Write(phrases[34])
w.Write(profile_comments_row_12)
w.Write(profile_comments_row_frags[12])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(profile_comments_row_13)
w.Write(profile_comments_row_frags[13])
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_comments_row_14)
w.Write(profile_comments_row_frags[14])
w.Write(phrases[35])
w.Write(profile_comments_row_15)
w.Write(profile_comments_row_frags[15])
w.Write(phrases[36])
w.Write(profile_comments_row_16)
w.Write(profile_comments_row_frags[16])
}
w.Write(profile_comments_row_17)
w.Write(profile_comments_row_frags[17])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(profile_comments_row_18)
w.Write(profile_comments_row_frags[18])
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_comments_row_19)
w.Write(profile_comments_row_frags[19])
w.Write(phrases[37])
w.Write(profile_comments_row_20)
w.Write(profile_comments_row_frags[20])
w.Write(phrases[38])
w.Write(profile_comments_row_21)
w.Write(profile_comments_row_frags[21])
if item.Tag != "" {
w.Write(profile_comments_row_22)
w.Write(profile_comments_row_frags[22])
w.Write([]byte(item.Tag))
w.Write(profile_comments_row_23)
w.Write(profile_comments_row_frags[23])
}
w.Write(profile_comments_row_24)
w.Write(profile_comments_row_frags[24])
}
}
} else {
if len(tmpl_profile_vars.ItemList) != 0 {
for _, item := range tmpl_profile_vars.ItemList {
w.Write(profile_comments_row_25)
w.Write(profile_comments_row_frags[25])
w.Write([]byte(item.ClassName))
w.Write(profile_comments_row_26)
w.Write(profile_comments_row_frags[26])
w.Write([]byte(item.Avatar))
w.Write(profile_comments_row_27)
w.Write(profile_comments_row_frags[27])
w.Write([]byte(item.CreatedByName))
w.Write(profile_comments_row_28)
w.Write(profile_comments_row_frags[28])
w.Write([]byte(item.CreatedByName))
w.Write(profile_comments_row_29)
w.Write(profile_comments_row_frags[29])
w.Write([]byte(item.UserLink))
w.Write(profile_comments_row_30)
w.Write(profile_comments_row_frags[30])
w.Write([]byte(item.CreatedByName))
w.Write(profile_comments_row_31)
w.Write(profile_comments_row_frags[31])
if item.Tag != "" {
w.Write(profile_comments_row_32)
w.Write(profile_comments_row_frags[32])
w.Write([]byte(item.Tag))
w.Write(profile_comments_row_33)
w.Write(profile_comments_row_frags[33])
}
w.Write(profile_comments_row_34)
w.Write(profile_comments_row_frags[34])
if tmpl_profile_vars.CurrentUser.IsMod {
w.Write(profile_comments_row_35)
w.Write(profile_comments_row_frags[35])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(profile_comments_row_36)
w.Write(profile_comments_row_frags[36])
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_comments_row_37)
w.Write(profile_comments_row_frags[37])
w.Write(phrases[39])
w.Write(profile_comments_row_38)
w.Write(profile_comments_row_frags[38])
w.Write(phrases[40])
w.Write(profile_comments_row_39)
w.Write(profile_comments_row_frags[39])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(profile_comments_row_40)
w.Write(profile_comments_row_frags[40])
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_comments_row_41)
w.Write(profile_comments_row_frags[41])
w.Write(phrases[41])
w.Write(profile_comments_row_42)
w.Write(profile_comments_row_frags[42])
w.Write(phrases[42])
w.Write(profile_comments_row_43)
w.Write(profile_comments_row_frags[43])
}
w.Write(profile_comments_row_44)
w.Write(profile_comments_row_frags[44])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(profile_comments_row_45)
w.Write(profile_comments_row_frags[45])
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_comments_row_46)
w.Write(profile_comments_row_frags[46])
w.Write(phrases[43])
w.Write(profile_comments_row_47)
w.Write(profile_comments_row_frags[47])
w.Write(phrases[44])
w.Write(profile_comments_row_48)
w.Write(profile_comments_row_frags[48])
w.Write([]byte(item.ContentHtml))
w.Write(profile_comments_row_49)
w.Write(profile_comments_row_frags[49])
}
}
}
w.Write(profile_39)
w.Write(profile_frags[39])
if !tmpl_profile_vars.CurrentUser.IsBanned {
w.Write(profile_40)
w.Write(profile_frags[40])
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_41)
w.Write(profile_frags[41])
w.Write([]byte(strconv.Itoa(tmpl_profile_vars.ProfileOwner.ID)))
w.Write(profile_42)
w.Write(profile_frags[42])
w.Write(phrases[45])
w.Write(profile_43)
w.Write(profile_frags[43])
w.Write(phrases[46])
w.Write(profile_44)
w.Write(profile_frags[44])
}
w.Write(profile_45)
w.Write(profile_46)
w.Write(footer_0)
w.Write(profile_frags[45])
w.Write(profile_frags[46])
w.Write(footer_frags[0])
w.Write([]byte(common.BuildWidget("footer",tmpl_profile_vars.Header)))
w.Write(footer_1)
w.Write(footer_frags[1])
w.Write(phrases[47])
w.Write(footer_2)
w.Write(footer_frags[2])
w.Write(phrases[48])
w.Write(footer_3)
w.Write(footer_frags[3])
w.Write(phrases[49])
w.Write(footer_4)
w.Write(footer_frags[4])
if len(tmpl_profile_vars.Header.Themes) != 0 {
for _, item := range tmpl_profile_vars.Header.Themes {
if !item.HideFromThemes {
w.Write(footer_5)
w.Write(footer_frags[5])
w.Write([]byte(item.Name))
w.Write(footer_6)
w.Write(footer_frags[6])
if tmpl_profile_vars.Header.Theme.Name == item.Name {
w.Write(footer_7)
w.Write(footer_frags[7])
}
w.Write(footer_8)
w.Write(footer_frags[8])
w.Write([]byte(item.FriendlyName))
w.Write(footer_9)
w.Write(footer_frags[9])
}
}
}
w.Write(footer_10)
w.Write(footer_frags[10])
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_profile_vars.Header)))
w.Write(footer_11)
w.Write(footer_frags[11])
return nil
}

View File

@ -3,10 +3,10 @@
// Code generated by Gosora. More below:
/* This file was automatically generated by the software. Please don't edit it as your changes may be overwritten at any moment. */
package main
import "./common"
import "net/http"
import "./common"
var register_Tmpl_Phrase_ID int
var register_tmpl_phrase_id int
// nolint
func init() {
@ -14,7 +14,7 @@ func init() {
common.Ctemplates = append(common.Ctemplates,"register")
common.TmplPtrMap["register"] = &common.Template_register_handle
common.TmplPtrMap["o_register"] = Template_register
register_Tmpl_Phrase_ID = common.RegisterTmplPhraseNames([]string{
register_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
"menu_forums_aria",
"menu_forums_tooltip",
"menu_topics_aria",
@ -49,150 +49,150 @@ func init() {
// nolint
func Template_register(tmpl_register_vars common.Page, w http.ResponseWriter) error {
var phrases = common.GetTmplPhrasesBytes(register_Tmpl_Phrase_ID)
w.Write(header_0)
var phrases = common.GetTmplPhrasesBytes(register_tmpl_phrase_id)
w.Write(header_frags[0])
w.Write([]byte(tmpl_register_vars.Title))
w.Write(header_1)
w.Write(header_frags[1])
w.Write([]byte(tmpl_register_vars.Header.Site.Name))
w.Write(header_2)
w.Write(header_frags[2])
w.Write([]byte(tmpl_register_vars.Header.Theme.Name))
w.Write(header_3)
w.Write(header_frags[3])
if len(tmpl_register_vars.Header.Stylesheets) != 0 {
for _, item := range tmpl_register_vars.Header.Stylesheets {
w.Write(header_4)
w.Write(header_frags[4])
w.Write([]byte(item))
w.Write(header_5)
w.Write(header_frags[5])
}
}
w.Write(header_6)
w.Write(header_frags[6])
if len(tmpl_register_vars.Header.Scripts) != 0 {
for _, item := range tmpl_register_vars.Header.Scripts {
w.Write(header_7)
w.Write(header_frags[7])
w.Write([]byte(item))
w.Write(header_8)
w.Write(header_frags[8])
}
}
w.Write(header_9)
w.Write(header_frags[9])
w.Write([]byte(tmpl_register_vars.CurrentUser.Session))
w.Write(header_10)
w.Write(header_frags[10])
w.Write([]byte(tmpl_register_vars.Header.Site.URL))
w.Write(header_11)
w.Write(header_frags[11])
if tmpl_register_vars.Header.MetaDesc != "" {
w.Write(header_12)
w.Write(header_frags[12])
w.Write([]byte(tmpl_register_vars.Header.MetaDesc))
w.Write(header_13)
w.Write(header_frags[13])
}
w.Write(header_14)
w.Write(header_frags[14])
if !tmpl_register_vars.CurrentUser.IsSuperMod {
w.Write(header_15)
w.Write(header_frags[15])
}
w.Write(header_16)
w.Write(menu_0)
w.Write(menu_1)
w.Write(header_frags[16])
w.Write(menu_frags[0])
w.Write(menu_frags[1])
w.Write([]byte(tmpl_register_vars.Header.Site.ShortName))
w.Write(menu_2)
w.Write(menu_frags[2])
w.Write(phrases[0])
w.Write(menu_3)
w.Write(menu_frags[3])
w.Write(phrases[1])
w.Write(menu_4)
w.Write(menu_frags[4])
w.Write(phrases[2])
w.Write(menu_5)
w.Write(menu_frags[5])
w.Write(phrases[3])
w.Write(menu_6)
w.Write(menu_frags[6])
w.Write(phrases[4])
w.Write(menu_7)
w.Write(menu_frags[7])
w.Write(phrases[5])
w.Write(menu_8)
w.Write(menu_frags[8])
if tmpl_register_vars.CurrentUser.Loggedin {
w.Write(menu_9)
w.Write(menu_frags[9])
w.Write(phrases[6])
w.Write(menu_10)
w.Write(menu_frags[10])
w.Write(phrases[7])
w.Write(menu_11)
w.Write(menu_frags[11])
w.Write([]byte(tmpl_register_vars.CurrentUser.Link))
w.Write(menu_12)
w.Write(menu_frags[12])
w.Write(phrases[8])
w.Write(menu_13)
w.Write(menu_frags[13])
w.Write(phrases[9])
w.Write(menu_14)
w.Write(menu_frags[14])
w.Write(phrases[10])
w.Write(menu_15)
w.Write(menu_frags[15])
w.Write(phrases[11])
w.Write(menu_16)
w.Write(menu_frags[16])
w.Write([]byte(tmpl_register_vars.CurrentUser.Session))
w.Write(menu_17)
w.Write(menu_frags[17])
w.Write(phrases[12])
w.Write(menu_18)
w.Write(menu_frags[18])
w.Write(phrases[13])
w.Write(menu_19)
w.Write(menu_frags[19])
} else {
w.Write(menu_20)
w.Write(menu_frags[20])
w.Write(phrases[14])
w.Write(menu_21)
w.Write(menu_frags[21])
w.Write(phrases[15])
w.Write(menu_22)
w.Write(menu_frags[22])
w.Write(phrases[16])
w.Write(menu_23)
w.Write(menu_frags[23])
w.Write(phrases[17])
w.Write(menu_24)
w.Write(menu_frags[24])
}
w.Write(menu_25)
w.Write(menu_frags[25])
w.Write(phrases[18])
w.Write(menu_26)
w.Write(header_17)
w.Write(menu_frags[26])
w.Write(header_frags[17])
if tmpl_register_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_18)
w.Write(header_frags[18])
}
w.Write(header_19)
w.Write(header_frags[19])
if len(tmpl_register_vars.Header.NoticeList) != 0 {
for _, item := range tmpl_register_vars.Header.NoticeList {
w.Write(header_20)
w.Write(header_frags[20])
w.Write([]byte(item))
w.Write(header_21)
w.Write(header_frags[21])
}
}
w.Write(header_22)
w.Write(register_0)
w.Write(header_frags[22])
w.Write(register_frags[0])
w.Write(phrases[19])
w.Write(register_1)
w.Write(register_frags[1])
w.Write(phrases[20])
w.Write(register_2)
w.Write(register_frags[2])
w.Write(phrases[21])
w.Write(register_3)
w.Write(register_frags[3])
w.Write(phrases[22])
w.Write(register_4)
w.Write(register_frags[4])
w.Write(phrases[23])
w.Write(register_5)
w.Write(register_frags[5])
w.Write(phrases[24])
w.Write(register_6)
w.Write(register_frags[6])
w.Write(phrases[25])
w.Write(register_7)
w.Write(footer_0)
w.Write(register_frags[7])
w.Write(footer_frags[0])
w.Write([]byte(common.BuildWidget("footer",tmpl_register_vars.Header)))
w.Write(footer_1)
w.Write(footer_frags[1])
w.Write(phrases[26])
w.Write(footer_2)
w.Write(footer_frags[2])
w.Write(phrases[27])
w.Write(footer_3)
w.Write(footer_frags[3])
w.Write(phrases[28])
w.Write(footer_4)
w.Write(footer_frags[4])
if len(tmpl_register_vars.Header.Themes) != 0 {
for _, item := range tmpl_register_vars.Header.Themes {
if !item.HideFromThemes {
w.Write(footer_5)
w.Write(footer_frags[5])
w.Write([]byte(item.Name))
w.Write(footer_6)
w.Write(footer_frags[6])
if tmpl_register_vars.Header.Theme.Name == item.Name {
w.Write(footer_7)
w.Write(footer_frags[7])
}
w.Write(footer_8)
w.Write(footer_frags[8])
w.Write([]byte(item.FriendlyName))
w.Write(footer_9)
w.Write(footer_frags[9])
}
}
}
w.Write(footer_10)
w.Write(footer_frags[10])
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_register_vars.Header)))
w.Write(footer_11)
w.Write(footer_frags[11])
return nil
}

View File

@ -7,7 +7,7 @@ import "net/http"
import "./common"
import "strconv"
var topic_Tmpl_Phrase_ID int
var topic_tmpl_phrase_id int
// nolint
func init() {
@ -15,7 +15,7 @@ func init() {
common.Ctemplates = append(common.Ctemplates,"topic")
common.TmplPtrMap["topic"] = &common.Template_topic_handle
common.TmplPtrMap["o_topic"] = Template_topic
topic_Tmpl_Phrase_ID = common.RegisterTmplPhraseNames([]string{
topic_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
"menu_forums_aria",
"menu_forums_tooltip",
"menu_topics_aria",
@ -102,541 +102,541 @@ func init() {
// nolint
func Template_topic(tmpl_topic_vars common.TopicPage, w http.ResponseWriter) error {
var phrases = common.GetTmplPhrasesBytes(topic_Tmpl_Phrase_ID)
w.Write(header_0)
var phrases = common.GetTmplPhrasesBytes(topic_tmpl_phrase_id)
w.Write(header_frags[0])
w.Write([]byte(tmpl_topic_vars.Title))
w.Write(header_1)
w.Write(header_frags[1])
w.Write([]byte(tmpl_topic_vars.Header.Site.Name))
w.Write(header_2)
w.Write(header_frags[2])
w.Write([]byte(tmpl_topic_vars.Header.Theme.Name))
w.Write(header_3)
w.Write(header_frags[3])
if len(tmpl_topic_vars.Header.Stylesheets) != 0 {
for _, item := range tmpl_topic_vars.Header.Stylesheets {
w.Write(header_4)
w.Write(header_frags[4])
w.Write([]byte(item))
w.Write(header_5)
w.Write(header_frags[5])
}
}
w.Write(header_6)
w.Write(header_frags[6])
if len(tmpl_topic_vars.Header.Scripts) != 0 {
for _, item := range tmpl_topic_vars.Header.Scripts {
w.Write(header_7)
w.Write(header_frags[7])
w.Write([]byte(item))
w.Write(header_8)
w.Write(header_frags[8])
}
}
w.Write(header_9)
w.Write(header_frags[9])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(header_10)
w.Write(header_frags[10])
w.Write([]byte(tmpl_topic_vars.Header.Site.URL))
w.Write(header_11)
w.Write(header_frags[11])
if tmpl_topic_vars.Header.MetaDesc != "" {
w.Write(header_12)
w.Write(header_frags[12])
w.Write([]byte(tmpl_topic_vars.Header.MetaDesc))
w.Write(header_13)
w.Write(header_frags[13])
}
w.Write(header_14)
w.Write(header_frags[14])
if !tmpl_topic_vars.CurrentUser.IsSuperMod {
w.Write(header_15)
w.Write(header_frags[15])
}
w.Write(header_16)
w.Write(menu_0)
w.Write(menu_1)
w.Write(header_frags[16])
w.Write(menu_frags[0])
w.Write(menu_frags[1])
w.Write([]byte(tmpl_topic_vars.Header.Site.ShortName))
w.Write(menu_2)
w.Write(menu_frags[2])
w.Write(phrases[0])
w.Write(menu_3)
w.Write(menu_frags[3])
w.Write(phrases[1])
w.Write(menu_4)
w.Write(menu_frags[4])
w.Write(phrases[2])
w.Write(menu_5)
w.Write(menu_frags[5])
w.Write(phrases[3])
w.Write(menu_6)
w.Write(menu_frags[6])
w.Write(phrases[4])
w.Write(menu_7)
w.Write(menu_frags[7])
w.Write(phrases[5])
w.Write(menu_8)
w.Write(menu_frags[8])
if tmpl_topic_vars.CurrentUser.Loggedin {
w.Write(menu_9)
w.Write(menu_frags[9])
w.Write(phrases[6])
w.Write(menu_10)
w.Write(menu_frags[10])
w.Write(phrases[7])
w.Write(menu_11)
w.Write(menu_frags[11])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Link))
w.Write(menu_12)
w.Write(menu_frags[12])
w.Write(phrases[8])
w.Write(menu_13)
w.Write(menu_frags[13])
w.Write(phrases[9])
w.Write(menu_14)
w.Write(menu_frags[14])
w.Write(phrases[10])
w.Write(menu_15)
w.Write(menu_frags[15])
w.Write(phrases[11])
w.Write(menu_16)
w.Write(menu_frags[16])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(menu_17)
w.Write(menu_frags[17])
w.Write(phrases[12])
w.Write(menu_18)
w.Write(menu_frags[18])
w.Write(phrases[13])
w.Write(menu_19)
w.Write(menu_frags[19])
} else {
w.Write(menu_20)
w.Write(menu_frags[20])
w.Write(phrases[14])
w.Write(menu_21)
w.Write(menu_frags[21])
w.Write(phrases[15])
w.Write(menu_22)
w.Write(menu_frags[22])
w.Write(phrases[16])
w.Write(menu_23)
w.Write(menu_frags[23])
w.Write(phrases[17])
w.Write(menu_24)
w.Write(menu_frags[24])
}
w.Write(menu_25)
w.Write(menu_frags[25])
w.Write(phrases[18])
w.Write(menu_26)
w.Write(header_17)
w.Write(menu_frags[26])
w.Write(header_frags[17])
if tmpl_topic_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_18)
w.Write(header_frags[18])
}
w.Write(header_19)
w.Write(header_frags[19])
if len(tmpl_topic_vars.Header.NoticeList) != 0 {
for _, item := range tmpl_topic_vars.Header.NoticeList {
w.Write(header_20)
w.Write(header_frags[20])
w.Write([]byte(item))
w.Write(header_21)
w.Write(header_frags[21])
}
}
w.Write(header_22)
w.Write(topic_0)
w.Write(header_frags[22])
w.Write(topic_frags[0])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_1)
w.Write(topic_frags[1])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_2)
w.Write(topic_frags[2])
if tmpl_topic_vars.Page > 1 {
w.Write(topic_3)
w.Write(topic_frags[3])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_4)
w.Write(topic_frags[4])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Page - 1)))
w.Write(topic_5)
w.Write(topic_frags[5])
w.Write(phrases[19])
w.Write(topic_6)
w.Write(topic_frags[6])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_7)
w.Write(topic_frags[7])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Page - 1)))
w.Write(topic_8)
w.Write(topic_frags[8])
w.Write(phrases[20])
w.Write(topic_9)
w.Write(topic_frags[9])
}
if tmpl_topic_vars.LastPage != tmpl_topic_vars.Page {
w.Write(topic_10)
w.Write(topic_frags[10])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_11)
w.Write(topic_frags[11])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Page + 1)))
w.Write(topic_12)
w.Write(topic_frags[12])
w.Write(phrases[21])
w.Write(topic_13)
w.Write(topic_frags[13])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_14)
w.Write(topic_frags[14])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Page + 1)))
w.Write(topic_15)
w.Write(topic_frags[15])
w.Write(phrases[22])
w.Write(topic_16)
w.Write(topic_frags[16])
}
w.Write(topic_17)
w.Write(topic_frags[17])
w.Write(phrases[23])
w.Write(topic_18)
w.Write(topic_frags[18])
if tmpl_topic_vars.Topic.Sticky {
w.Write(topic_19)
w.Write(topic_frags[19])
} else {
if tmpl_topic_vars.Topic.IsClosed {
w.Write(topic_20)
w.Write(topic_frags[20])
}
}
w.Write(topic_21)
w.Write(topic_frags[21])
w.Write([]byte(tmpl_topic_vars.Topic.Title))
w.Write(topic_22)
w.Write(topic_frags[22])
if tmpl_topic_vars.Topic.IsClosed {
w.Write(topic_23)
w.Write(topic_frags[23])
w.Write(phrases[24])
w.Write(topic_24)
w.Write(topic_frags[24])
w.Write(phrases[25])
w.Write(topic_25)
w.Write(topic_frags[25])
}
if tmpl_topic_vars.CurrentUser.Perms.EditTopic {
w.Write(topic_26)
w.Write(topic_frags[26])
w.Write([]byte(tmpl_topic_vars.Topic.Title))
w.Write(topic_27)
w.Write(topic_frags[27])
w.Write(phrases[26])
w.Write(topic_28)
w.Write(topic_frags[28])
w.Write(phrases[27])
w.Write(topic_29)
w.Write(topic_frags[29])
}
w.Write(topic_30)
w.Write(topic_frags[30])
if tmpl_topic_vars.Poll.ID > 0 {
w.Write(topic_31)
w.Write(topic_frags[31])
w.Write(phrases[28])
w.Write(topic_32)
w.Write(topic_frags[32])
w.Write([]byte(tmpl_topic_vars.Topic.ClassName))
w.Write(topic_33)
w.Write(topic_frags[33])
w.Write([]byte(tmpl_topic_vars.Topic.Avatar))
w.Write(topic_34)
w.Write(topic_frags[34])
w.Write([]byte(tmpl_topic_vars.Header.Theme.Name))
w.Write(topic_35)
w.Write(topic_frags[35])
if tmpl_topic_vars.Topic.ContentLines <= 5 {
w.Write(topic_36)
w.Write(topic_frags[36])
}
w.Write(topic_37)
w.Write(topic_frags[37])
if len(tmpl_topic_vars.Poll.QuickOptions) != 0 {
for _, item := range tmpl_topic_vars.Poll.QuickOptions {
w.Write(topic_38)
w.Write(topic_frags[38])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Poll.ID)))
w.Write(topic_39)
w.Write(topic_frags[39])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_40)
w.Write(topic_frags[40])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_41)
w.Write(topic_frags[41])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_42)
w.Write(topic_frags[42])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_43)
w.Write(topic_frags[43])
w.Write([]byte(item.Value))
w.Write(topic_44)
w.Write(topic_frags[44])
}
}
w.Write(topic_45)
w.Write(topic_frags[45])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Poll.ID)))
w.Write(topic_46)
w.Write(topic_frags[46])
w.Write(phrases[29])
w.Write(topic_47)
w.Write(topic_frags[47])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Poll.ID)))
w.Write(topic_48)
w.Write(topic_frags[48])
w.Write(phrases[30])
w.Write(topic_49)
w.Write(topic_frags[49])
w.Write(phrases[31])
w.Write(topic_50)
w.Write(topic_frags[50])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Poll.ID)))
w.Write(topic_51)
w.Write(topic_frags[51])
}
w.Write(topic_52)
w.Write(topic_frags[52])
w.Write(phrases[32])
w.Write(topic_53)
w.Write(topic_frags[53])
w.Write([]byte(tmpl_topic_vars.Topic.ClassName))
w.Write(topic_54)
w.Write(topic_frags[54])
w.Write([]byte(tmpl_topic_vars.Topic.Avatar))
w.Write(topic_55)
w.Write(topic_frags[55])
w.Write([]byte(tmpl_topic_vars.Header.Theme.Name))
w.Write(topic_56)
w.Write(topic_frags[56])
if tmpl_topic_vars.Topic.ContentLines <= 5 {
w.Write(topic_57)
w.Write(topic_frags[57])
}
w.Write(topic_58)
w.Write(topic_frags[58])
w.Write([]byte(tmpl_topic_vars.Topic.ContentHTML))
w.Write(topic_59)
w.Write(topic_frags[59])
w.Write([]byte(tmpl_topic_vars.Topic.Content))
w.Write(topic_60)
w.Write(topic_frags[60])
w.Write(phrases[33])
w.Write(topic_61)
w.Write(topic_frags[61])
w.Write([]byte(tmpl_topic_vars.Topic.UserLink))
w.Write(topic_62)
w.Write(topic_frags[62])
w.Write([]byte(tmpl_topic_vars.Topic.CreatedByName))
w.Write(topic_63)
w.Write(topic_frags[63])
if tmpl_topic_vars.CurrentUser.Perms.LikeItem {
w.Write(topic_64)
w.Write(topic_frags[64])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_65)
w.Write(topic_frags[65])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_66)
w.Write(topic_frags[66])
if tmpl_topic_vars.Topic.Liked {
w.Write(topic_67)
w.Write(topic_frags[67])
w.Write(phrases[34])
w.Write(topic_68)
w.Write(topic_frags[68])
w.Write(phrases[35])
w.Write(topic_69)
w.Write(topic_frags[69])
} else {
w.Write(topic_70)
w.Write(topic_frags[70])
w.Write(phrases[36])
w.Write(topic_71)
w.Write(topic_frags[71])
w.Write(phrases[37])
w.Write(topic_72)
w.Write(topic_frags[72])
}
w.Write(topic_73)
w.Write(topic_frags[73])
if tmpl_topic_vars.Topic.Liked {
w.Write(topic_74)
w.Write(topic_frags[74])
}
w.Write(topic_75)
w.Write(topic_frags[75])
}
if tmpl_topic_vars.CurrentUser.Perms.EditTopic {
w.Write(topic_76)
w.Write(topic_frags[76])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_77)
w.Write(topic_frags[77])
w.Write(phrases[38])
w.Write(topic_78)
w.Write(topic_frags[78])
w.Write(phrases[39])
w.Write(topic_79)
w.Write(topic_frags[79])
}
if tmpl_topic_vars.CurrentUser.Perms.DeleteTopic {
w.Write(topic_80)
w.Write(topic_frags[80])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_81)
w.Write(topic_frags[81])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_82)
w.Write(topic_frags[82])
w.Write(phrases[40])
w.Write(topic_83)
w.Write(topic_frags[83])
w.Write(phrases[41])
w.Write(topic_84)
w.Write(topic_frags[84])
}
if tmpl_topic_vars.CurrentUser.Perms.CloseTopic {
if tmpl_topic_vars.Topic.IsClosed {
w.Write(topic_85)
w.Write(topic_frags[85])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_86)
w.Write(topic_frags[86])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_87)
w.Write(topic_frags[87])
w.Write(phrases[42])
w.Write(topic_88)
w.Write(topic_frags[88])
w.Write(phrases[43])
w.Write(topic_89)
w.Write(topic_frags[89])
} else {
w.Write(topic_90)
w.Write(topic_frags[90])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_91)
w.Write(topic_frags[91])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_92)
w.Write(topic_frags[92])
w.Write(phrases[44])
w.Write(topic_93)
w.Write(topic_frags[93])
w.Write(phrases[45])
w.Write(topic_94)
w.Write(topic_frags[94])
}
}
if tmpl_topic_vars.CurrentUser.Perms.PinTopic {
if tmpl_topic_vars.Topic.Sticky {
w.Write(topic_95)
w.Write(topic_frags[95])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_96)
w.Write(topic_frags[96])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_97)
w.Write(topic_frags[97])
w.Write(phrases[46])
w.Write(topic_98)
w.Write(topic_frags[98])
w.Write(phrases[47])
w.Write(topic_99)
w.Write(topic_frags[99])
} else {
w.Write(topic_100)
w.Write(topic_frags[100])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_101)
w.Write(topic_frags[101])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_102)
w.Write(topic_frags[102])
w.Write(phrases[48])
w.Write(topic_103)
w.Write(topic_frags[103])
w.Write(phrases[49])
w.Write(topic_104)
w.Write(topic_frags[104])
}
}
if tmpl_topic_vars.CurrentUser.Perms.ViewIPs {
w.Write(topic_105)
w.Write(topic_frags[105])
w.Write([]byte(tmpl_topic_vars.Topic.IPAddress))
w.Write(topic_106)
w.Write(topic_frags[106])
w.Write(phrases[50])
w.Write(topic_107)
w.Write(topic_frags[107])
w.Write([]byte(tmpl_topic_vars.Topic.IPAddress))
w.Write(topic_108)
w.Write(topic_frags[108])
}
w.Write(topic_109)
w.Write(topic_frags[109])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_110)
w.Write(topic_frags[110])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_111)
w.Write(topic_frags[111])
w.Write(phrases[51])
w.Write(topic_112)
w.Write(topic_frags[112])
w.Write(phrases[52])
w.Write(topic_113)
w.Write(topic_frags[113])
if tmpl_topic_vars.Topic.LikeCount > 0 {
w.Write(topic_114)
w.Write(topic_frags[114])
w.Write(phrases[53])
w.Write(topic_115)
w.Write(topic_frags[115])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.LikeCount)))
w.Write(topic_116)
w.Write(topic_frags[116])
w.Write(phrases[54])
w.Write(topic_117)
w.Write(topic_frags[117])
}
if tmpl_topic_vars.Topic.Tag != "" {
w.Write(topic_118)
w.Write(topic_frags[118])
w.Write([]byte(tmpl_topic_vars.Topic.Tag))
w.Write(topic_119)
w.Write(topic_frags[119])
} else {
w.Write(topic_120)
w.Write(topic_frags[120])
w.Write(phrases[55])
w.Write(topic_121)
w.Write(topic_frags[121])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.Level)))
w.Write(topic_122)
w.Write(topic_frags[122])
w.Write(phrases[56])
w.Write(topic_123)
w.Write(topic_frags[123])
}
w.Write(topic_124)
w.Write(topic_frags[124])
w.Write(phrases[57])
w.Write(topic_125)
w.Write(topic_frags[125])
if len(tmpl_topic_vars.ItemList) != 0 {
for _, item := range tmpl_topic_vars.ItemList {
if item.ActionType != "" {
w.Write(topic_126)
w.Write(topic_frags[126])
w.Write([]byte(item.ActionIcon))
w.Write(topic_127)
w.Write(topic_frags[127])
w.Write([]byte(item.ActionType))
w.Write(topic_128)
w.Write(topic_frags[128])
} else {
w.Write(topic_129)
w.Write(topic_frags[129])
w.Write([]byte(item.ClassName))
w.Write(topic_130)
w.Write(topic_frags[130])
w.Write([]byte(item.Avatar))
w.Write(topic_131)
w.Write(topic_frags[131])
w.Write([]byte(tmpl_topic_vars.Header.Theme.Name))
w.Write(topic_132)
w.Write(topic_frags[132])
if item.ContentLines <= 5 {
w.Write(topic_133)
w.Write(topic_frags[133])
}
w.Write(topic_134)
w.Write(topic_135)
w.Write(topic_frags[134])
w.Write(topic_frags[135])
w.Write([]byte(item.ContentHtml))
w.Write(topic_136)
w.Write(topic_frags[136])
w.Write([]byte(item.UserLink))
w.Write(topic_137)
w.Write(topic_frags[137])
w.Write([]byte(item.CreatedByName))
w.Write(topic_138)
w.Write(topic_frags[138])
if tmpl_topic_vars.CurrentUser.Perms.LikeItem {
if item.Liked {
w.Write(topic_139)
w.Write(topic_frags[139])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_140)
w.Write(topic_frags[140])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_141)
w.Write(topic_frags[141])
w.Write(phrases[58])
w.Write(topic_142)
w.Write(topic_frags[142])
w.Write(phrases[59])
w.Write(topic_143)
w.Write(topic_frags[143])
} else {
w.Write(topic_144)
w.Write(topic_frags[144])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_145)
w.Write(topic_frags[145])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_146)
w.Write(topic_frags[146])
w.Write(phrases[60])
w.Write(topic_147)
w.Write(topic_frags[147])
w.Write(phrases[61])
w.Write(topic_148)
w.Write(topic_frags[148])
}
}
if tmpl_topic_vars.CurrentUser.Perms.EditReply {
w.Write(topic_149)
w.Write(topic_frags[149])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_150)
w.Write(topic_frags[150])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_151)
w.Write(topic_frags[151])
w.Write(phrases[62])
w.Write(topic_152)
w.Write(topic_frags[152])
w.Write(phrases[63])
w.Write(topic_153)
w.Write(topic_frags[153])
}
if tmpl_topic_vars.CurrentUser.Perms.DeleteReply {
w.Write(topic_154)
w.Write(topic_frags[154])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_155)
w.Write(topic_frags[155])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_156)
w.Write(topic_frags[156])
w.Write(phrases[64])
w.Write(topic_157)
w.Write(topic_frags[157])
w.Write(phrases[65])
w.Write(topic_158)
w.Write(topic_frags[158])
}
if tmpl_topic_vars.CurrentUser.Perms.ViewIPs {
w.Write(topic_159)
w.Write(topic_frags[159])
w.Write([]byte(item.IPAddress))
w.Write(topic_160)
w.Write(topic_frags[160])
w.Write(phrases[66])
w.Write(topic_161)
w.Write(topic_frags[161])
w.Write([]byte(item.IPAddress))
w.Write(topic_162)
w.Write(topic_frags[162])
}
w.Write(topic_163)
w.Write(topic_frags[163])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_164)
w.Write(topic_frags[164])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_165)
w.Write(topic_frags[165])
w.Write(phrases[67])
w.Write(topic_166)
w.Write(topic_frags[166])
w.Write(phrases[68])
w.Write(topic_167)
w.Write(topic_frags[167])
if item.LikeCount > 0 {
w.Write(topic_168)
w.Write(topic_frags[168])
w.Write([]byte(strconv.Itoa(item.LikeCount)))
w.Write(topic_169)
w.Write(topic_frags[169])
w.Write(phrases[69])
w.Write(topic_170)
w.Write(topic_frags[170])
}
if item.Tag != "" {
w.Write(topic_171)
w.Write(topic_frags[171])
w.Write([]byte(item.Tag))
w.Write(topic_172)
w.Write(topic_frags[172])
} else {
w.Write(topic_173)
w.Write(topic_frags[173])
w.Write(phrases[70])
w.Write(topic_174)
w.Write(topic_frags[174])
w.Write([]byte(strconv.Itoa(item.Level)))
w.Write(topic_175)
w.Write(topic_frags[175])
w.Write(phrases[71])
w.Write(topic_176)
w.Write(topic_frags[176])
}
w.Write(topic_177)
w.Write(topic_frags[177])
}
}
}
w.Write(topic_178)
w.Write(topic_frags[178])
if tmpl_topic_vars.CurrentUser.Perms.CreateReply {
w.Write(topic_179)
w.Write(topic_frags[179])
w.Write(phrases[72])
w.Write(topic_180)
w.Write(topic_frags[180])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_181)
w.Write(topic_frags[181])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_182)
w.Write(topic_frags[182])
w.Write(phrases[73])
w.Write(topic_183)
w.Write(topic_frags[183])
w.Write(phrases[74])
w.Write(topic_184)
w.Write(topic_frags[184])
w.Write(phrases[75])
w.Write(topic_185)
w.Write(topic_frags[185])
w.Write(phrases[76])
w.Write(topic_186)
w.Write(topic_frags[186])
if tmpl_topic_vars.CurrentUser.Perms.UploadFiles {
w.Write(topic_187)
w.Write(topic_frags[187])
w.Write(phrases[77])
w.Write(topic_188)
w.Write(topic_frags[188])
}
w.Write(topic_189)
w.Write(topic_frags[189])
}
w.Write(topic_190)
w.Write(footer_0)
w.Write(topic_frags[190])
w.Write(footer_frags[0])
w.Write([]byte(common.BuildWidget("footer",tmpl_topic_vars.Header)))
w.Write(footer_1)
w.Write(footer_frags[1])
w.Write(phrases[78])
w.Write(footer_2)
w.Write(footer_frags[2])
w.Write(phrases[79])
w.Write(footer_3)
w.Write(footer_frags[3])
w.Write(phrases[80])
w.Write(footer_4)
w.Write(footer_frags[4])
if len(tmpl_topic_vars.Header.Themes) != 0 {
for _, item := range tmpl_topic_vars.Header.Themes {
if !item.HideFromThemes {
w.Write(footer_5)
w.Write(footer_frags[5])
w.Write([]byte(item.Name))
w.Write(footer_6)
w.Write(footer_frags[6])
if tmpl_topic_vars.Header.Theme.Name == item.Name {
w.Write(footer_7)
w.Write(footer_frags[7])
}
w.Write(footer_8)
w.Write(footer_frags[8])
w.Write([]byte(item.FriendlyName))
w.Write(footer_9)
w.Write(footer_frags[9])
}
}
}
w.Write(footer_10)
w.Write(footer_frags[10])
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_topic_vars.Header)))
w.Write(footer_11)
w.Write(footer_frags[11])
return nil
}

View File

@ -7,7 +7,7 @@ import "net/http"
import "./common"
import "strconv"
var topic_alt_Tmpl_Phrase_ID int
var topic_alt_tmpl_phrase_id int
// nolint
func init() {
@ -15,7 +15,7 @@ func init() {
common.Ctemplates = append(common.Ctemplates,"topic_alt")
common.TmplPtrMap["topic_alt"] = &common.Template_topic_alt_handle
common.TmplPtrMap["o_topic_alt"] = Template_topic_alt
topic_alt_Tmpl_Phrase_ID = common.RegisterTmplPhraseNames([]string{
topic_alt_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
"menu_forums_aria",
"menu_forums_tooltip",
"menu_topics_aria",
@ -89,547 +89,547 @@ func init() {
// nolint
func Template_topic_alt(tmpl_topic_alt_vars common.TopicPage, w http.ResponseWriter) error {
var phrases = common.GetTmplPhrasesBytes(topic_alt_Tmpl_Phrase_ID)
w.Write(header_0)
var phrases = common.GetTmplPhrasesBytes(topic_alt_tmpl_phrase_id)
w.Write(header_frags[0])
w.Write([]byte(tmpl_topic_alt_vars.Title))
w.Write(header_1)
w.Write(header_frags[1])
w.Write([]byte(tmpl_topic_alt_vars.Header.Site.Name))
w.Write(header_2)
w.Write(header_frags[2])
w.Write([]byte(tmpl_topic_alt_vars.Header.Theme.Name))
w.Write(header_3)
w.Write(header_frags[3])
if len(tmpl_topic_alt_vars.Header.Stylesheets) != 0 {
for _, item := range tmpl_topic_alt_vars.Header.Stylesheets {
w.Write(header_4)
w.Write(header_frags[4])
w.Write([]byte(item))
w.Write(header_5)
w.Write(header_frags[5])
}
}
w.Write(header_6)
w.Write(header_frags[6])
if len(tmpl_topic_alt_vars.Header.Scripts) != 0 {
for _, item := range tmpl_topic_alt_vars.Header.Scripts {
w.Write(header_7)
w.Write(header_frags[7])
w.Write([]byte(item))
w.Write(header_8)
w.Write(header_frags[8])
}
}
w.Write(header_9)
w.Write(header_frags[9])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(header_10)
w.Write(header_frags[10])
w.Write([]byte(tmpl_topic_alt_vars.Header.Site.URL))
w.Write(header_11)
w.Write(header_frags[11])
if tmpl_topic_alt_vars.Header.MetaDesc != "" {
w.Write(header_12)
w.Write(header_frags[12])
w.Write([]byte(tmpl_topic_alt_vars.Header.MetaDesc))
w.Write(header_13)
w.Write(header_frags[13])
}
w.Write(header_14)
w.Write(header_frags[14])
if !tmpl_topic_alt_vars.CurrentUser.IsSuperMod {
w.Write(header_15)
w.Write(header_frags[15])
}
w.Write(header_16)
w.Write(menu_0)
w.Write(menu_1)
w.Write(header_frags[16])
w.Write(menu_frags[0])
w.Write(menu_frags[1])
w.Write([]byte(tmpl_topic_alt_vars.Header.Site.ShortName))
w.Write(menu_2)
w.Write(menu_frags[2])
w.Write(phrases[0])
w.Write(menu_3)
w.Write(menu_frags[3])
w.Write(phrases[1])
w.Write(menu_4)
w.Write(menu_frags[4])
w.Write(phrases[2])
w.Write(menu_5)
w.Write(menu_frags[5])
w.Write(phrases[3])
w.Write(menu_6)
w.Write(menu_frags[6])
w.Write(phrases[4])
w.Write(menu_7)
w.Write(menu_frags[7])
w.Write(phrases[5])
w.Write(menu_8)
w.Write(menu_frags[8])
if tmpl_topic_alt_vars.CurrentUser.Loggedin {
w.Write(menu_9)
w.Write(menu_frags[9])
w.Write(phrases[6])
w.Write(menu_10)
w.Write(menu_frags[10])
w.Write(phrases[7])
w.Write(menu_11)
w.Write(menu_frags[11])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Link))
w.Write(menu_12)
w.Write(menu_frags[12])
w.Write(phrases[8])
w.Write(menu_13)
w.Write(menu_frags[13])
w.Write(phrases[9])
w.Write(menu_14)
w.Write(menu_frags[14])
w.Write(phrases[10])
w.Write(menu_15)
w.Write(menu_frags[15])
w.Write(phrases[11])
w.Write(menu_16)
w.Write(menu_frags[16])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(menu_17)
w.Write(menu_frags[17])
w.Write(phrases[12])
w.Write(menu_18)
w.Write(menu_frags[18])
w.Write(phrases[13])
w.Write(menu_19)
w.Write(menu_frags[19])
} else {
w.Write(menu_20)
w.Write(menu_frags[20])
w.Write(phrases[14])
w.Write(menu_21)
w.Write(menu_frags[21])
w.Write(phrases[15])
w.Write(menu_22)
w.Write(menu_frags[22])
w.Write(phrases[16])
w.Write(menu_23)
w.Write(menu_frags[23])
w.Write(phrases[17])
w.Write(menu_24)
w.Write(menu_frags[24])
}
w.Write(menu_25)
w.Write(menu_frags[25])
w.Write(phrases[18])
w.Write(menu_26)
w.Write(header_17)
w.Write(menu_frags[26])
w.Write(header_frags[17])
if tmpl_topic_alt_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_18)
w.Write(header_frags[18])
}
w.Write(header_19)
w.Write(header_frags[19])
if len(tmpl_topic_alt_vars.Header.NoticeList) != 0 {
for _, item := range tmpl_topic_alt_vars.Header.NoticeList {
w.Write(header_20)
w.Write(header_frags[20])
w.Write([]byte(item))
w.Write(header_21)
w.Write(header_frags[21])
}
}
w.Write(header_22)
w.Write(header_frags[22])
if tmpl_topic_alt_vars.Page > 1 {
w.Write(topic_alt_0)
w.Write(topic_alt_frags[0])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_1)
w.Write(topic_alt_frags[1])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Page - 1)))
w.Write(topic_alt_2)
w.Write(topic_alt_frags[2])
w.Write(phrases[19])
w.Write(topic_alt_3)
w.Write(topic_alt_frags[3])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_4)
w.Write(topic_alt_frags[4])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Page - 1)))
w.Write(topic_alt_5)
w.Write(topic_alt_frags[5])
w.Write(phrases[20])
w.Write(topic_alt_6)
w.Write(topic_alt_frags[6])
}
if tmpl_topic_alt_vars.LastPage != tmpl_topic_alt_vars.Page {
w.Write(topic_alt_7)
w.Write(topic_alt_frags[7])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_8)
w.Write(topic_alt_frags[8])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Page + 1)))
w.Write(topic_alt_9)
w.Write(topic_alt_frags[9])
w.Write(phrases[21])
w.Write(topic_alt_10)
w.Write(topic_alt_frags[10])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_11)
w.Write(topic_alt_frags[11])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Page + 1)))
w.Write(topic_alt_12)
w.Write(topic_alt_frags[12])
w.Write(phrases[22])
w.Write(topic_alt_13)
w.Write(topic_alt_frags[13])
}
w.Write(topic_alt_14)
w.Write(topic_alt_frags[14])
w.Write(phrases[23])
w.Write(topic_alt_15)
w.Write(topic_alt_frags[15])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_16)
w.Write(topic_alt_frags[16])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_17)
w.Write(topic_alt_frags[17])
if tmpl_topic_alt_vars.Topic.Sticky {
w.Write(topic_alt_18)
w.Write(topic_alt_frags[18])
} else {
if tmpl_topic_alt_vars.Topic.IsClosed {
w.Write(topic_alt_19)
w.Write(topic_alt_frags[19])
}
}
w.Write(topic_alt_20)
w.Write(topic_alt_frags[20])
w.Write([]byte(tmpl_topic_alt_vars.Topic.Title))
w.Write(topic_alt_21)
w.Write(topic_alt_frags[21])
if tmpl_topic_alt_vars.Topic.IsClosed {
w.Write(topic_alt_22)
w.Write(topic_alt_frags[22])
w.Write(phrases[24])
w.Write(topic_alt_23)
w.Write(topic_alt_frags[23])
w.Write(phrases[25])
w.Write(topic_alt_24)
w.Write(topic_alt_frags[24])
}
if tmpl_topic_alt_vars.CurrentUser.Perms.EditTopic {
w.Write(topic_alt_25)
w.Write(topic_alt_frags[25])
w.Write([]byte(tmpl_topic_alt_vars.Topic.Title))
w.Write(topic_alt_26)
w.Write(topic_alt_frags[26])
w.Write(phrases[26])
w.Write(topic_alt_27)
w.Write(topic_alt_frags[27])
w.Write(phrases[27])
w.Write(topic_alt_28)
w.Write(topic_alt_frags[28])
}
w.Write(topic_alt_29)
w.Write(topic_alt_frags[29])
if tmpl_topic_alt_vars.Poll.ID > 0 {
w.Write(topic_alt_30)
w.Write(topic_alt_frags[30])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID)))
w.Write(topic_alt_31)
w.Write(topic_alt_frags[31])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID)))
w.Write(topic_alt_32)
w.Write(topic_alt_frags[32])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_33)
w.Write(topic_alt_frags[33])
w.Write(phrases[28])
w.Write(topic_alt_34)
w.Write(topic_alt_frags[34])
w.Write([]byte(tmpl_topic_alt_vars.Topic.Avatar))
w.Write(topic_alt_35)
w.Write(topic_alt_frags[35])
w.Write([]byte(tmpl_topic_alt_vars.Topic.UserLink))
w.Write(topic_alt_36)
w.Write(topic_alt_frags[36])
w.Write([]byte(tmpl_topic_alt_vars.Topic.CreatedByName))
w.Write(topic_alt_37)
w.Write(topic_alt_frags[37])
if tmpl_topic_alt_vars.Topic.Tag != "" {
w.Write(topic_alt_38)
w.Write(topic_alt_frags[38])
w.Write([]byte(tmpl_topic_alt_vars.Topic.Tag))
w.Write(topic_alt_39)
w.Write(topic_alt_frags[39])
} else {
w.Write(topic_alt_40)
w.Write(topic_alt_frags[40])
w.Write(phrases[29])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.Level)))
w.Write(topic_alt_41)
w.Write(topic_alt_frags[41])
}
w.Write(topic_alt_42)
w.Write(topic_alt_frags[42])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID)))
w.Write(topic_alt_43)
w.Write(topic_alt_frags[43])
if len(tmpl_topic_alt_vars.Poll.QuickOptions) != 0 {
for _, item := range tmpl_topic_alt_vars.Poll.QuickOptions {
w.Write(topic_alt_44)
w.Write(topic_alt_frags[44])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID)))
w.Write(topic_alt_45)
w.Write(topic_alt_frags[45])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_alt_46)
w.Write(topic_alt_frags[46])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_alt_47)
w.Write(topic_alt_frags[47])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_alt_48)
w.Write(topic_alt_frags[48])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_alt_49)
w.Write(topic_alt_frags[49])
w.Write([]byte(item.Value))
w.Write(topic_alt_50)
w.Write(topic_alt_frags[50])
}
}
w.Write(topic_alt_51)
w.Write(topic_alt_frags[51])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID)))
w.Write(topic_alt_52)
w.Write(topic_alt_frags[52])
w.Write(phrases[30])
w.Write(topic_alt_53)
w.Write(topic_alt_frags[53])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID)))
w.Write(topic_alt_54)
w.Write(topic_alt_frags[54])
w.Write(phrases[31])
w.Write(topic_alt_55)
w.Write(topic_alt_frags[55])
w.Write(phrases[32])
w.Write(topic_alt_56)
w.Write(topic_alt_frags[56])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID)))
w.Write(topic_alt_57)
w.Write(topic_alt_frags[57])
}
w.Write(topic_alt_58)
w.Write(topic_alt_frags[58])
w.Write(phrases[33])
w.Write(topic_alt_59)
w.Write(topic_alt_frags[59])
w.Write(phrases[34])
w.Write(topic_alt_60)
w.Write(topic_alt_frags[60])
w.Write([]byte(tmpl_topic_alt_vars.Topic.Avatar))
w.Write(topic_alt_61)
w.Write(topic_alt_frags[61])
w.Write([]byte(tmpl_topic_alt_vars.Topic.UserLink))
w.Write(topic_alt_62)
w.Write(topic_alt_frags[62])
w.Write([]byte(tmpl_topic_alt_vars.Topic.CreatedByName))
w.Write(topic_alt_63)
w.Write(topic_alt_frags[63])
if tmpl_topic_alt_vars.Topic.Tag != "" {
w.Write(topic_alt_64)
w.Write(topic_alt_frags[64])
w.Write([]byte(tmpl_topic_alt_vars.Topic.Tag))
w.Write(topic_alt_65)
w.Write(topic_alt_frags[65])
} else {
w.Write(topic_alt_66)
w.Write(topic_alt_frags[66])
w.Write(phrases[35])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.Level)))
w.Write(topic_alt_67)
w.Write(topic_alt_frags[67])
}
w.Write(topic_alt_68)
w.Write(topic_alt_frags[68])
w.Write([]byte(tmpl_topic_alt_vars.Topic.ContentHTML))
w.Write(topic_alt_69)
w.Write(topic_alt_frags[69])
w.Write([]byte(tmpl_topic_alt_vars.Topic.Content))
w.Write(topic_alt_70)
w.Write(topic_alt_frags[70])
if tmpl_topic_alt_vars.CurrentUser.Loggedin {
if tmpl_topic_alt_vars.CurrentUser.Perms.LikeItem {
w.Write(topic_alt_71)
w.Write(topic_alt_frags[71])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_72)
w.Write(topic_alt_frags[72])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_73)
w.Write(topic_alt_frags[73])
w.Write(phrases[36])
w.Write(topic_alt_74)
w.Write(topic_alt_frags[74])
}
if tmpl_topic_alt_vars.CurrentUser.Perms.EditTopic {
w.Write(topic_alt_75)
w.Write(topic_alt_frags[75])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_76)
w.Write(topic_alt_frags[76])
w.Write(phrases[37])
w.Write(topic_alt_77)
w.Write(topic_alt_frags[77])
}
if tmpl_topic_alt_vars.CurrentUser.Perms.DeleteTopic {
w.Write(topic_alt_78)
w.Write(topic_alt_frags[78])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_79)
w.Write(topic_alt_frags[79])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_80)
w.Write(topic_alt_frags[80])
w.Write(phrases[38])
w.Write(topic_alt_81)
w.Write(topic_alt_frags[81])
}
if tmpl_topic_alt_vars.CurrentUser.Perms.CloseTopic {
if tmpl_topic_alt_vars.Topic.IsClosed {
w.Write(topic_alt_82)
w.Write(topic_alt_frags[82])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_83)
w.Write(topic_alt_frags[83])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_84)
w.Write(topic_alt_frags[84])
w.Write(phrases[39])
w.Write(topic_alt_85)
w.Write(topic_alt_frags[85])
} else {
w.Write(topic_alt_86)
w.Write(topic_alt_frags[86])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_87)
w.Write(topic_alt_frags[87])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_88)
w.Write(topic_alt_frags[88])
w.Write(phrases[40])
w.Write(topic_alt_89)
w.Write(topic_alt_frags[89])
}
}
if tmpl_topic_alt_vars.CurrentUser.Perms.PinTopic {
if tmpl_topic_alt_vars.Topic.Sticky {
w.Write(topic_alt_90)
w.Write(topic_alt_frags[90])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_91)
w.Write(topic_alt_frags[91])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_92)
w.Write(topic_alt_frags[92])
w.Write(phrases[41])
w.Write(topic_alt_93)
w.Write(topic_alt_frags[93])
} else {
w.Write(topic_alt_94)
w.Write(topic_alt_frags[94])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_95)
w.Write(topic_alt_frags[95])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_96)
w.Write(topic_alt_frags[96])
w.Write(phrases[42])
w.Write(topic_alt_97)
w.Write(topic_alt_frags[97])
}
}
if tmpl_topic_alt_vars.CurrentUser.Perms.ViewIPs {
w.Write(topic_alt_98)
w.Write(topic_alt_frags[98])
w.Write([]byte(tmpl_topic_alt_vars.Topic.IPAddress))
w.Write(topic_alt_99)
w.Write(topic_alt_frags[99])
w.Write(phrases[43])
w.Write(topic_alt_100)
w.Write(topic_alt_frags[100])
w.Write(phrases[44])
w.Write(topic_alt_101)
w.Write(topic_alt_frags[101])
}
w.Write(topic_alt_102)
w.Write(topic_alt_frags[102])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_103)
w.Write(topic_alt_frags[103])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_104)
w.Write(topic_alt_frags[104])
w.Write(phrases[45])
w.Write(topic_alt_105)
w.Write(topic_alt_frags[105])
}
w.Write(topic_alt_106)
w.Write(topic_alt_frags[106])
if tmpl_topic_alt_vars.Topic.LikeCount > 0 {
w.Write(topic_alt_107)
w.Write(topic_alt_frags[107])
}
w.Write(topic_alt_108)
w.Write(topic_alt_frags[108])
if tmpl_topic_alt_vars.Topic.LikeCount > 0 {
w.Write(topic_alt_109)
w.Write(topic_alt_frags[109])
w.Write(phrases[46])
w.Write(topic_alt_110)
w.Write(topic_alt_frags[110])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.LikeCount)))
w.Write(topic_alt_111)
w.Write(topic_alt_frags[111])
}
w.Write(topic_alt_112)
w.Write(topic_alt_frags[112])
w.Write([]byte(tmpl_topic_alt_vars.Topic.RelativeCreatedAt))
w.Write(topic_alt_113)
w.Write(topic_alt_frags[113])
if tmpl_topic_alt_vars.CurrentUser.Perms.ViewIPs {
w.Write(topic_alt_114)
w.Write(topic_alt_frags[114])
w.Write([]byte(tmpl_topic_alt_vars.Topic.IPAddress))
w.Write(topic_alt_115)
w.Write(topic_alt_frags[115])
w.Write(phrases[47])
w.Write(topic_alt_116)
w.Write(topic_alt_frags[116])
w.Write([]byte(tmpl_topic_alt_vars.Topic.IPAddress))
w.Write(topic_alt_117)
w.Write(topic_alt_frags[117])
}
w.Write(topic_alt_118)
w.Write(topic_alt_frags[118])
if len(tmpl_topic_alt_vars.ItemList) != 0 {
for _, item := range tmpl_topic_alt_vars.ItemList {
w.Write(topic_alt_119)
w.Write(topic_alt_frags[119])
if item.ActionType != "" {
w.Write(topic_alt_120)
w.Write(topic_alt_frags[120])
}
w.Write(topic_alt_121)
w.Write(topic_alt_frags[121])
w.Write(phrases[48])
w.Write(topic_alt_122)
w.Write(topic_alt_frags[122])
w.Write([]byte(item.Avatar))
w.Write(topic_alt_123)
w.Write(topic_alt_frags[123])
w.Write([]byte(item.UserLink))
w.Write(topic_alt_124)
w.Write(topic_alt_frags[124])
w.Write([]byte(item.CreatedByName))
w.Write(topic_alt_125)
w.Write(topic_alt_frags[125])
if item.Tag != "" {
w.Write(topic_alt_126)
w.Write(topic_alt_frags[126])
w.Write([]byte(item.Tag))
w.Write(topic_alt_127)
w.Write(topic_alt_frags[127])
} else {
w.Write(topic_alt_128)
w.Write(topic_alt_frags[128])
w.Write(phrases[49])
w.Write([]byte(strconv.Itoa(item.Level)))
w.Write(topic_alt_129)
w.Write(topic_alt_frags[129])
}
w.Write(topic_alt_130)
w.Write(topic_alt_frags[130])
if item.ActionType != "" {
w.Write(topic_alt_131)
w.Write(topic_alt_frags[131])
}
w.Write(topic_alt_132)
w.Write(topic_alt_frags[132])
if item.ActionType != "" {
w.Write(topic_alt_133)
w.Write(topic_alt_frags[133])
w.Write([]byte(item.ActionIcon))
w.Write(topic_alt_134)
w.Write(topic_alt_frags[134])
w.Write([]byte(item.ActionType))
w.Write(topic_alt_135)
w.Write(topic_alt_frags[135])
} else {
w.Write(topic_alt_136)
w.Write(topic_alt_frags[136])
w.Write([]byte(item.ContentHtml))
w.Write(topic_alt_137)
w.Write(topic_alt_frags[137])
if tmpl_topic_alt_vars.CurrentUser.Loggedin {
if tmpl_topic_alt_vars.CurrentUser.Perms.LikeItem {
w.Write(topic_alt_138)
w.Write(topic_alt_frags[138])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_alt_139)
w.Write(topic_alt_frags[139])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_140)
w.Write(topic_alt_frags[140])
w.Write(phrases[50])
w.Write(topic_alt_141)
w.Write(topic_alt_frags[141])
}
if tmpl_topic_alt_vars.CurrentUser.Perms.EditReply {
w.Write(topic_alt_142)
w.Write(topic_alt_frags[142])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_alt_143)
w.Write(topic_alt_frags[143])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_144)
w.Write(topic_alt_frags[144])
w.Write(phrases[51])
w.Write(topic_alt_145)
w.Write(topic_alt_frags[145])
}
if tmpl_topic_alt_vars.CurrentUser.Perms.DeleteReply {
w.Write(topic_alt_146)
w.Write(topic_alt_frags[146])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_alt_147)
w.Write(topic_alt_frags[147])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_148)
w.Write(topic_alt_frags[148])
w.Write(phrases[52])
w.Write(topic_alt_149)
w.Write(topic_alt_frags[149])
}
if tmpl_topic_alt_vars.CurrentUser.Perms.ViewIPs {
w.Write(topic_alt_150)
w.Write(topic_alt_frags[150])
w.Write([]byte(item.IPAddress))
w.Write(topic_alt_151)
w.Write(topic_alt_frags[151])
w.Write(phrases[53])
w.Write(topic_alt_152)
w.Write(topic_alt_frags[152])
w.Write(phrases[54])
w.Write(topic_alt_153)
w.Write(topic_alt_frags[153])
}
w.Write(topic_alt_154)
w.Write(topic_alt_frags[154])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_alt_155)
w.Write(topic_alt_frags[155])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_156)
w.Write(topic_alt_frags[156])
w.Write(phrases[55])
w.Write(topic_alt_157)
w.Write(topic_alt_frags[157])
}
w.Write(topic_alt_158)
w.Write(topic_alt_frags[158])
if item.LikeCount > 0 {
w.Write(topic_alt_159)
w.Write(topic_alt_frags[159])
}
w.Write(topic_alt_160)
w.Write(topic_alt_frags[160])
if item.LikeCount > 0 {
w.Write(topic_alt_161)
w.Write(topic_alt_frags[161])
w.Write(phrases[56])
w.Write(topic_alt_162)
w.Write(topic_alt_frags[162])
w.Write([]byte(strconv.Itoa(item.LikeCount)))
w.Write(topic_alt_163)
w.Write(topic_alt_frags[163])
}
w.Write(topic_alt_164)
w.Write(topic_alt_frags[164])
w.Write([]byte(item.RelativeCreatedAt))
w.Write(topic_alt_165)
w.Write(topic_alt_frags[165])
if tmpl_topic_alt_vars.CurrentUser.Perms.ViewIPs {
w.Write(topic_alt_166)
w.Write(topic_alt_frags[166])
w.Write([]byte(item.IPAddress))
w.Write(topic_alt_167)
w.Write(topic_alt_frags[167])
w.Write([]byte(item.IPAddress))
w.Write(topic_alt_168)
w.Write(topic_alt_frags[168])
}
w.Write(topic_alt_169)
w.Write(topic_alt_frags[169])
}
w.Write(topic_alt_170)
w.Write(topic_alt_frags[170])
}
}
w.Write(topic_alt_171)
w.Write(topic_alt_frags[171])
if tmpl_topic_alt_vars.CurrentUser.Perms.CreateReply {
w.Write(topic_alt_172)
w.Write(topic_alt_frags[172])
w.Write(phrases[57])
w.Write(topic_alt_173)
w.Write(topic_alt_frags[173])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Avatar))
w.Write(topic_alt_174)
w.Write(topic_alt_frags[174])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Link))
w.Write(topic_alt_175)
w.Write(topic_alt_frags[175])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Name))
w.Write(topic_alt_176)
w.Write(topic_alt_frags[176])
if tmpl_topic_alt_vars.CurrentUser.Tag != "" {
w.Write(topic_alt_177)
w.Write(topic_alt_frags[177])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Tag))
w.Write(topic_alt_178)
w.Write(topic_alt_frags[178])
} else {
w.Write(topic_alt_179)
w.Write(topic_alt_frags[179])
w.Write(phrases[58])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.CurrentUser.Level)))
w.Write(topic_alt_180)
w.Write(topic_alt_frags[180])
}
w.Write(topic_alt_181)
w.Write(topic_alt_frags[181])
w.Write(phrases[59])
w.Write(topic_alt_182)
w.Write(topic_alt_frags[182])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_183)
w.Write(topic_alt_frags[183])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_184)
w.Write(topic_alt_frags[184])
w.Write(phrases[60])
w.Write(topic_alt_185)
w.Write(topic_alt_frags[185])
w.Write(phrases[61])
w.Write(topic_alt_186)
w.Write(topic_alt_frags[186])
w.Write(phrases[62])
w.Write(topic_alt_187)
w.Write(topic_alt_frags[187])
w.Write(phrases[63])
w.Write(topic_alt_188)
w.Write(topic_alt_frags[188])
if tmpl_topic_alt_vars.CurrentUser.Perms.UploadFiles {
w.Write(topic_alt_189)
w.Write(topic_alt_frags[189])
w.Write(phrases[64])
w.Write(topic_alt_190)
w.Write(topic_alt_frags[190])
}
w.Write(topic_alt_191)
w.Write(topic_alt_frags[191])
}
w.Write(topic_alt_192)
w.Write(footer_0)
w.Write(topic_alt_frags[192])
w.Write(footer_frags[0])
w.Write([]byte(common.BuildWidget("footer",tmpl_topic_alt_vars.Header)))
w.Write(footer_1)
w.Write(footer_frags[1])
w.Write(phrases[65])
w.Write(footer_2)
w.Write(footer_frags[2])
w.Write(phrases[66])
w.Write(footer_3)
w.Write(footer_frags[3])
w.Write(phrases[67])
w.Write(footer_4)
w.Write(footer_frags[4])
if len(tmpl_topic_alt_vars.Header.Themes) != 0 {
for _, item := range tmpl_topic_alt_vars.Header.Themes {
if !item.HideFromThemes {
w.Write(footer_5)
w.Write(footer_frags[5])
w.Write([]byte(item.Name))
w.Write(footer_6)
w.Write(footer_frags[6])
if tmpl_topic_alt_vars.Header.Theme.Name == item.Name {
w.Write(footer_7)
w.Write(footer_frags[7])
}
w.Write(footer_8)
w.Write(footer_frags[8])
w.Write([]byte(item.FriendlyName))
w.Write(footer_9)
w.Write(footer_frags[9])
}
}
}
w.Write(footer_10)
w.Write(footer_frags[10])
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_topic_alt_vars.Header)))
w.Write(footer_11)
w.Write(footer_frags[11])
return nil
}

View File

@ -7,7 +7,7 @@ import "net/http"
import "./common"
import "strconv"
var topics_Tmpl_Phrase_ID int
var topics_tmpl_phrase_id int
// nolint
func init() {
@ -15,7 +15,7 @@ func init() {
common.Ctemplates = append(common.Ctemplates,"topics")
common.TmplPtrMap["topics"] = &common.Template_topics_handle
common.TmplPtrMap["o_topics"] = Template_topics
topics_Tmpl_Phrase_ID = common.RegisterTmplPhraseNames([]string{
topics_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
"menu_forums_aria",
"menu_forums_tooltip",
"menu_topics_aria",
@ -76,366 +76,366 @@ func init() {
// nolint
func Template_topics(tmpl_topics_vars common.TopicsPage, w http.ResponseWriter) error {
var phrases = common.GetTmplPhrasesBytes(topics_Tmpl_Phrase_ID)
w.Write(header_0)
var phrases = common.GetTmplPhrasesBytes(topics_tmpl_phrase_id)
w.Write(header_frags[0])
w.Write([]byte(tmpl_topics_vars.Title))
w.Write(header_1)
w.Write(header_frags[1])
w.Write([]byte(tmpl_topics_vars.Header.Site.Name))
w.Write(header_2)
w.Write(header_frags[2])
w.Write([]byte(tmpl_topics_vars.Header.Theme.Name))
w.Write(header_3)
w.Write(header_frags[3])
if len(tmpl_topics_vars.Header.Stylesheets) != 0 {
for _, item := range tmpl_topics_vars.Header.Stylesheets {
w.Write(header_4)
w.Write(header_frags[4])
w.Write([]byte(item))
w.Write(header_5)
w.Write(header_frags[5])
}
}
w.Write(header_6)
w.Write(header_frags[6])
if len(tmpl_topics_vars.Header.Scripts) != 0 {
for _, item := range tmpl_topics_vars.Header.Scripts {
w.Write(header_7)
w.Write(header_frags[7])
w.Write([]byte(item))
w.Write(header_8)
w.Write(header_frags[8])
}
}
w.Write(header_9)
w.Write(header_frags[9])
w.Write([]byte(tmpl_topics_vars.CurrentUser.Session))
w.Write(header_10)
w.Write(header_frags[10])
w.Write([]byte(tmpl_topics_vars.Header.Site.URL))
w.Write(header_11)
w.Write(header_frags[11])
if tmpl_topics_vars.Header.MetaDesc != "" {
w.Write(header_12)
w.Write(header_frags[12])
w.Write([]byte(tmpl_topics_vars.Header.MetaDesc))
w.Write(header_13)
w.Write(header_frags[13])
}
w.Write(header_14)
w.Write(header_frags[14])
if !tmpl_topics_vars.CurrentUser.IsSuperMod {
w.Write(header_15)
w.Write(header_frags[15])
}
w.Write(header_16)
w.Write(menu_0)
w.Write(menu_1)
w.Write(header_frags[16])
w.Write(menu_frags[0])
w.Write(menu_frags[1])
w.Write([]byte(tmpl_topics_vars.Header.Site.ShortName))
w.Write(menu_2)
w.Write(menu_frags[2])
w.Write(phrases[0])
w.Write(menu_3)
w.Write(menu_frags[3])
w.Write(phrases[1])
w.Write(menu_4)
w.Write(menu_frags[4])
w.Write(phrases[2])
w.Write(menu_5)
w.Write(menu_frags[5])
w.Write(phrases[3])
w.Write(menu_6)
w.Write(menu_frags[6])
w.Write(phrases[4])
w.Write(menu_7)
w.Write(menu_frags[7])
w.Write(phrases[5])
w.Write(menu_8)
w.Write(menu_frags[8])
if tmpl_topics_vars.CurrentUser.Loggedin {
w.Write(menu_9)
w.Write(menu_frags[9])
w.Write(phrases[6])
w.Write(menu_10)
w.Write(menu_frags[10])
w.Write(phrases[7])
w.Write(menu_11)
w.Write(menu_frags[11])
w.Write([]byte(tmpl_topics_vars.CurrentUser.Link))
w.Write(menu_12)
w.Write(menu_frags[12])
w.Write(phrases[8])
w.Write(menu_13)
w.Write(menu_frags[13])
w.Write(phrases[9])
w.Write(menu_14)
w.Write(menu_frags[14])
w.Write(phrases[10])
w.Write(menu_15)
w.Write(menu_frags[15])
w.Write(phrases[11])
w.Write(menu_16)
w.Write(menu_frags[16])
w.Write([]byte(tmpl_topics_vars.CurrentUser.Session))
w.Write(menu_17)
w.Write(menu_frags[17])
w.Write(phrases[12])
w.Write(menu_18)
w.Write(menu_frags[18])
w.Write(phrases[13])
w.Write(menu_19)
w.Write(menu_frags[19])
} else {
w.Write(menu_20)
w.Write(menu_frags[20])
w.Write(phrases[14])
w.Write(menu_21)
w.Write(menu_frags[21])
w.Write(phrases[15])
w.Write(menu_22)
w.Write(menu_frags[22])
w.Write(phrases[16])
w.Write(menu_23)
w.Write(menu_frags[23])
w.Write(phrases[17])
w.Write(menu_24)
w.Write(menu_frags[24])
}
w.Write(menu_25)
w.Write(menu_frags[25])
w.Write(phrases[18])
w.Write(menu_26)
w.Write(header_17)
w.Write(menu_frags[26])
w.Write(header_frags[17])
if tmpl_topics_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_18)
w.Write(header_frags[18])
}
w.Write(header_19)
w.Write(header_frags[19])
if len(tmpl_topics_vars.Header.NoticeList) != 0 {
for _, item := range tmpl_topics_vars.Header.NoticeList {
w.Write(header_20)
w.Write(header_frags[20])
w.Write([]byte(item))
w.Write(header_21)
w.Write(header_frags[21])
}
}
w.Write(header_22)
w.Write(topics_0)
w.Write(header_frags[22])
w.Write(topics_frags[0])
if tmpl_topics_vars.CurrentUser.ID != 0 {
w.Write(topics_1)
w.Write(topics_frags[1])
}
w.Write(topics_2)
w.Write(topics_frags[2])
w.Write(phrases[19])
w.Write(topics_3)
w.Write(topics_frags[3])
if tmpl_topics_vars.CurrentUser.ID != 0 {
w.Write(topics_4)
w.Write(topics_frags[4])
if len(tmpl_topics_vars.ForumList) != 0 {
w.Write(topics_5)
w.Write(topics_frags[5])
w.Write(phrases[20])
w.Write(topics_6)
w.Write(topics_frags[6])
w.Write(phrases[21])
w.Write(topics_7)
w.Write(topics_8)
w.Write(topics_frags[7])
w.Write(topics_frags[8])
w.Write(phrases[22])
w.Write(topics_9)
w.Write(topics_frags[9])
w.Write(phrases[23])
w.Write(topics_10)
w.Write(topics_frags[10])
} else {
w.Write(topics_11)
w.Write(topics_frags[11])
w.Write(phrases[24])
w.Write(topics_12)
w.Write(topics_frags[12])
w.Write(phrases[25])
w.Write(topics_13)
w.Write(topics_frags[13])
}
w.Write(topics_14)
w.Write(topics_frags[14])
}
w.Write(topics_15)
w.Write(topics_frags[15])
if tmpl_topics_vars.CurrentUser.ID != 0 {
w.Write(topics_16)
w.Write(topics_frags[16])
w.Write(phrases[26])
w.Write(topics_17)
w.Write(topics_frags[17])
w.Write(phrases[27])
w.Write(topics_18)
w.Write(topics_frags[18])
w.Write(phrases[28])
w.Write(topics_19)
w.Write(topics_frags[19])
w.Write(phrases[29])
w.Write(topics_20)
w.Write(topics_frags[20])
w.Write(phrases[30])
w.Write(topics_21)
w.Write(topics_frags[21])
if len(tmpl_topics_vars.ForumList) != 0 {
w.Write(topics_22)
w.Write(topics_frags[22])
w.Write([]byte(tmpl_topics_vars.CurrentUser.Session))
w.Write(topics_23)
w.Write(topics_frags[23])
w.Write(phrases[31])
w.Write(topics_24)
w.Write(topics_frags[24])
if len(tmpl_topics_vars.ForumList) != 0 {
for _, item := range tmpl_topics_vars.ForumList {
w.Write(topics_25)
w.Write(topics_frags[25])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topics_26)
w.Write(topics_frags[26])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topics_27)
w.Write(topics_frags[27])
w.Write([]byte(item.Name))
w.Write(topics_28)
w.Write(topics_frags[28])
}
}
w.Write(topics_29)
w.Write(topics_frags[29])
w.Write(phrases[32])
w.Write(topics_30)
w.Write(topics_frags[30])
w.Write(phrases[33])
w.Write(topics_31)
w.Write(topics_frags[31])
w.Write([]byte(tmpl_topics_vars.CurrentUser.Session))
w.Write(topics_32)
w.Write(topics_frags[32])
w.Write([]byte(tmpl_topics_vars.CurrentUser.Avatar))
w.Write(topics_33)
w.Write(topics_frags[33])
w.Write(phrases[34])
w.Write(topics_34)
w.Write(topics_frags[34])
w.Write(phrases[35])
w.Write(topics_35)
w.Write(topics_frags[35])
if len(tmpl_topics_vars.ForumList) != 0 {
for _, item := range tmpl_topics_vars.ForumList {
w.Write(topics_36)
w.Write(topics_frags[36])
if item.ID == tmpl_topics_vars.DefaultForum {
w.Write(topics_37)
w.Write(topics_frags[37])
}
w.Write(topics_38)
w.Write(topics_frags[38])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topics_39)
w.Write(topics_frags[39])
w.Write([]byte(item.Name))
w.Write(topics_40)
w.Write(topics_frags[40])
}
}
w.Write(topics_41)
w.Write(topics_frags[41])
w.Write(phrases[36])
w.Write(topics_42)
w.Write(topics_frags[42])
w.Write(phrases[37])
w.Write(topics_43)
w.Write(topics_frags[43])
w.Write(phrases[38])
w.Write(topics_44)
w.Write(topics_frags[44])
w.Write(phrases[39])
w.Write(topics_45)
w.Write(topics_frags[45])
w.Write(phrases[40])
w.Write(topics_46)
w.Write(topics_frags[46])
if tmpl_topics_vars.CurrentUser.Perms.UploadFiles {
w.Write(topics_47)
w.Write(topics_frags[47])
w.Write(phrases[41])
w.Write(topics_48)
w.Write(topics_frags[48])
}
w.Write(topics_49)
w.Write(topics_frags[49])
w.Write(phrases[42])
w.Write(topics_50)
w.Write(topics_frags[50])
}
}
w.Write(topics_51)
w.Write(topics_frags[51])
w.Write(phrases[43])
w.Write(topics_52)
w.Write(topics_frags[52])
if len(tmpl_topics_vars.TopicList) != 0 {
for _, item := range tmpl_topics_vars.TopicList {
w.Write(topics_53)
w.Write(topics_frags[53])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topics_54)
w.Write(topics_frags[54])
if item.Sticky {
w.Write(topics_55)
w.Write(topics_frags[55])
} else {
if item.IsClosed {
w.Write(topics_56)
w.Write(topics_frags[56])
}
}
w.Write(topics_57)
w.Write(topics_frags[57])
w.Write([]byte(item.Creator.Link))
w.Write(topics_58)
w.Write(topics_frags[58])
w.Write([]byte(item.Creator.Avatar))
w.Write(topics_59)
w.Write(topics_frags[59])
w.Write([]byte(item.Creator.Name))
w.Write(topics_60)
w.Write(topics_frags[60])
w.Write([]byte(item.Creator.Name))
w.Write(topics_61)
w.Write(topics_frags[61])
w.Write([]byte(item.Link))
w.Write(topics_62)
w.Write(topics_frags[62])
w.Write([]byte(item.Title))
w.Write(topics_63)
w.Write(topics_frags[63])
if item.ForumName != "" {
w.Write(topics_64)
w.Write(topics_frags[64])
w.Write([]byte(item.ForumLink))
w.Write(topics_65)
w.Write(topics_frags[65])
w.Write([]byte(item.ForumName))
w.Write(topics_66)
w.Write(topics_frags[66])
}
w.Write(topics_67)
w.Write(topics_frags[67])
w.Write([]byte(item.Creator.Link))
w.Write(topics_68)
w.Write(topics_frags[68])
w.Write([]byte(item.Creator.Name))
w.Write(topics_69)
w.Write(topics_frags[69])
if item.IsClosed {
w.Write(topics_70)
w.Write(topics_frags[70])
w.Write(phrases[44])
w.Write(topics_71)
w.Write(topics_frags[71])
}
if item.Sticky {
w.Write(topics_72)
w.Write(topics_frags[72])
w.Write(phrases[45])
w.Write(topics_73)
w.Write(topics_frags[73])
}
w.Write(topics_74)
w.Write(topics_frags[74])
w.Write([]byte(strconv.Itoa(item.PostCount)))
w.Write(topics_75)
w.Write(topics_frags[75])
w.Write([]byte(strconv.Itoa(item.LikeCount)))
w.Write(topics_76)
w.Write(topics_frags[76])
if item.Sticky {
w.Write(topics_77)
w.Write(topics_frags[77])
} else {
if item.IsClosed {
w.Write(topics_78)
w.Write(topics_frags[78])
}
}
w.Write(topics_79)
w.Write(topics_frags[79])
w.Write([]byte(item.LastUser.Link))
w.Write(topics_80)
w.Write(topics_frags[80])
w.Write([]byte(item.LastUser.Avatar))
w.Write(topics_81)
w.Write(topics_frags[81])
w.Write([]byte(item.LastUser.Name))
w.Write(topics_82)
w.Write(topics_frags[82])
w.Write([]byte(item.LastUser.Name))
w.Write(topics_83)
w.Write(topics_frags[83])
w.Write([]byte(item.LastUser.Link))
w.Write(topics_84)
w.Write(topics_frags[84])
w.Write([]byte(item.LastUser.Name))
w.Write(topics_85)
w.Write(topics_frags[85])
w.Write([]byte(item.RelativeLastReplyAt))
w.Write(topics_86)
w.Write(topics_frags[86])
}
} else {
w.Write(topics_87)
w.Write(topics_frags[87])
w.Write(phrases[46])
if tmpl_topics_vars.CurrentUser.Perms.CreateTopic {
w.Write(topics_88)
w.Write(topics_frags[88])
w.Write(phrases[47])
w.Write(topics_89)
w.Write(topics_frags[89])
}
w.Write(topics_90)
w.Write(topics_frags[90])
}
w.Write(topics_91)
w.Write(topics_frags[91])
if tmpl_topics_vars.LastPage > 1 {
w.Write(paginator_0)
w.Write(paginator_frags[0])
if tmpl_topics_vars.Page > 1 {
w.Write(paginator_1)
w.Write(paginator_frags[1])
w.Write([]byte(strconv.Itoa(tmpl_topics_vars.Page - 1)))
w.Write(paginator_2)
w.Write(paginator_frags[2])
w.Write(phrases[48])
w.Write(paginator_3)
w.Write(paginator_frags[3])
w.Write(phrases[49])
w.Write(paginator_4)
w.Write(paginator_frags[4])
w.Write([]byte(strconv.Itoa(tmpl_topics_vars.Page - 1)))
w.Write(paginator_5)
w.Write(paginator_frags[5])
}
if len(tmpl_topics_vars.PageList) != 0 {
for _, item := range tmpl_topics_vars.PageList {
w.Write(paginator_6)
w.Write(paginator_frags[6])
w.Write([]byte(strconv.Itoa(item)))
w.Write(paginator_7)
w.Write(paginator_frags[7])
w.Write([]byte(strconv.Itoa(item)))
w.Write(paginator_8)
w.Write(paginator_frags[8])
}
}
if tmpl_topics_vars.LastPage != tmpl_topics_vars.Page {
w.Write(paginator_9)
w.Write(paginator_frags[9])
w.Write([]byte(strconv.Itoa(tmpl_topics_vars.Page + 1)))
w.Write(paginator_10)
w.Write(paginator_frags[10])
w.Write([]byte(strconv.Itoa(tmpl_topics_vars.Page + 1)))
w.Write(paginator_11)
w.Write(paginator_frags[11])
w.Write(phrases[50])
w.Write(paginator_12)
w.Write(paginator_frags[12])
w.Write(phrases[51])
w.Write(paginator_13)
w.Write(paginator_frags[13])
}
w.Write(paginator_14)
w.Write(paginator_frags[14])
}
w.Write(topics_92)
w.Write(footer_0)
w.Write(topics_frags[92])
w.Write(footer_frags[0])
w.Write([]byte(common.BuildWidget("footer",tmpl_topics_vars.Header)))
w.Write(footer_1)
w.Write(footer_frags[1])
w.Write(phrases[52])
w.Write(footer_2)
w.Write(footer_frags[2])
w.Write(phrases[53])
w.Write(footer_3)
w.Write(footer_frags[3])
w.Write(phrases[54])
w.Write(footer_4)
w.Write(footer_frags[4])
if len(tmpl_topics_vars.Header.Themes) != 0 {
for _, item := range tmpl_topics_vars.Header.Themes {
if !item.HideFromThemes {
w.Write(footer_5)
w.Write(footer_frags[5])
w.Write([]byte(item.Name))
w.Write(footer_6)
w.Write(footer_frags[6])
if tmpl_topics_vars.Header.Theme.Name == item.Name {
w.Write(footer_7)
w.Write(footer_frags[7])
}
w.Write(footer_8)
w.Write(footer_frags[8])
w.Write([]byte(item.FriendlyName))
w.Write(footer_9)
w.Write(footer_frags[9])
}
}
}
w.Write(footer_10)
w.Write(footer_frags[10])
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_topics_vars.Header)))
w.Write(footer_11)
w.Write(footer_frags[11])
return nil
}

View File

@ -9,7 +9,7 @@
<div id="panel_groups" class="colstack_item rowlist">
{{range .ItemList}}
<div class="rowitem panel_compactrow editable_parent">
<a href="/panel/groups/edit/{{.ID}}" class="panel_upshift">{{.Name}}</a>
<a{{if .CanEdit}} href="/panel/groups/edit/{{.ID}}"{{end}} class="panel_upshift">{{.Name}}</a>
<span class="panel_floater">
{{if .RankClass}}<a class="panel_tag panel_rank_tag panel_rank_tag_{{.RankClass}}" title="{{.Rank}}" aria-label="{{lang "panel_groups_rank_prefix"}}{{.Rank}}"></a>
{{else}}<span class="panel_tag">{{.Rank}}</span>{{end}}
@ -22,6 +22,7 @@
{{if gt .LastPage 1}}
{{template "paginator.html" . }}
{{end}}
{{if .CurrentUser.Perms.EditGroup}}
<div class="colstack_item colstack_head">
<div class="rowitem"><h1>{{lang "panel_groups_create_head"}}</h1></div>
</div>
@ -51,6 +52,7 @@
</div>
</form>
</div>
{{end}}
</main>
</div>

View File

@ -1003,7 +1003,7 @@ textarea {
margin-left: auto;
}
.like_count:after {
content: "{{index .Phrases "topic_like_count"}}";
content: "{{index .Phrases "topic_like_count_suffix"}}";
margin-right: 6px;
}