All the menu items are dynamic now, all that needs to be done now is the Control Panel part of the Menu Manager.

Travis should now build the patcher to see if that works.
Merged menu.html into header.html
Removed a redundant SetAdapter call in mysql.go.
Fixed a bug where inserting will sometimes strip the spaces in strings.
Bumped the minimum Go Version in schema.json to 1.10
Bumped the DBVersion to 1, so that we don't install these patches twice.

The patcher was botched in the previous commit, drop menus and menu_items and run it again
This commit is contained in:
Azareal 2018-04-23 09:38:25 +01:00
parent f102c97606
commit dbf2b8606e
28 changed files with 762 additions and 1119 deletions

View File

@ -8,8 +8,10 @@ before_install:
- cd Gosora
- mv config_default.noparse config.go
- chmod 755 ./update-deps-linux
- chmod 755 ./dev-update-travis
- chmod 755 ./run-linux-tests
- ./update-deps-linux
- ./dev-update-travis
install: true
script: ./run-linux-tests
addons:

View File

@ -385,10 +385,11 @@ func (hold *MenuListHolder) Build(w io.Writer, user *User) error {
if !hasDot {
continue
}
if bytes.Equal(variable[fenceStart:dotAt], []byte("me")) {
//fmt.Println("checking me: ", string(variable[fenceStart+1:dotAt]))
if bytes.Equal(variable[fenceStart+1:dotAt], []byte("me")) {
//fmt.Println("maybe me variable")
w.Write(variable[prevIndex:fenceStart])
switch string(variable[dotAt:fenceEnd]) {
switch string(variable[dotAt+1 : fenceEnd]) {
case "Link":
w.Write([]byte(user.Link))
case "Session":

11
dev-update-travis Normal file
View File

@ -0,0 +1,11 @@
echo "Building the patcher"
cp ./schema/schema.json ./schema/lastSchema.json
rm ./patcher/config.go
cp ./config.go ./patcher/config.go
rm ./patcher/common/site.go
cp ./common/site.go ./patcher/common/site.go
cd ./patcher
go generate
go build -o Patcher
mv ./Patcher ..
cd ..

View File

@ -2,16 +2,17 @@
package main
var dbTablePrimaryKeys = map[string]string{
"replies":"rid",
"users":"uid",
"topics":"tid",
"revisions":"reviseID",
"polls":"pollID",
"users_replies":"rid",
"activity_stream":"asid",
"word_filters":"wfid",
"users_groups":"gid",
"topics":"tid",
"forums":"fid",
"attachments":"attachID",
"polls":"pollID",
"users":"uid",
"users_groups_scheduler":"uid",
"forums":"fid",
"replies":"rid",
"attachments":"attachID",
"menus":"mid",
}

View File

@ -50,12 +50,6 @@ func initMySQL() (err error) {
return err
}
// Ready the query builder
err = qgen.Builder.SetAdapter("mysql")
if err != nil {
return err
}
// TODO: Is there a less noisy way of doing this for tests?
log.Print("Preparing getActivityFeedByWatcher statement.")
stmts.getActivityFeedByWatcher, err = db.Prepare("SELECT activity_stream_matches.asid, activity_stream.actor, activity_stream.targetUser, activity_stream.event, activity_stream.elementType, activity_stream.elementID FROM `activity_stream_matches` INNER JOIN `activity_stream` ON activity_stream_matches.asid = activity_stream.asid AND activity_stream_matches.watcher != activity_stream.actor WHERE `watcher` = ? ORDER BY activity_stream.asid DESC LIMIT 8")

View File

@ -3,7 +3,9 @@ package main
import (
"bufio"
"database/sql"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"os"
"runtime/debug"
@ -13,8 +15,6 @@ import (
_ "github.com/go-sql-driver/mysql"
)
var db *sql.DB
func main() {
scanner := bufio.NewScanner(os.Stdin)
@ -62,7 +62,7 @@ func pressAnyKey(scanner *bufio.Scanner) {
}
func prepMySQL() error {
err := qgen.Builder.Init("mysql", map[string]string{
return qgen.Builder.Init("mysql", map[string]string{
"host": common.DbConfig.Host,
"port": common.DbConfig.Port,
"name": common.DbConfig.Dbname,
@ -70,13 +70,28 @@ func prepMySQL() error {
"password": common.DbConfig.Password,
"collation": "utf8mb4_general_ci",
})
}
type SchemaFile struct {
DBVersion int // Current version of the database schema
DynamicFileVersion int
MinGoVersion string // TODO: Minimum version of Go needed to install this version
MinVersion string // TODO: Minimum version of Gosora to jump to this version, might be tricky as we don't store this in the schema file, maybe store it in the database
}
func patcher(scanner *bufio.Scanner) error {
data, err := ioutil.ReadFile("./schema/lastSchema.json")
if err != nil {
return err
}
// Ready the query builder
db = qgen.Builder.GetConn()
return qgen.Builder.SetAdapter("mysql")
var schemaFile LanguagePack
err = json.Unmarshal(data, &schemaFile)
if err != nil {
return err
}
_ = schemaFile
return patch0(scanner)
}
func execStmt(stmt *sql.Stmt, err error) error {
@ -87,65 +102,6 @@ func execStmt(stmt *sql.Stmt, err error) error {
return err
}
func patcher(scanner *bufio.Scanner) error {
err := execStmt(qgen.Builder.CreateTable("menus", "", "",
[]qgen.DBTableColumn{
qgen.DBTableColumn{"mid", "int", 0, false, true, ""},
},
[]qgen.DBTableKey{
qgen.DBTableKey{"mid", "primary"},
},
))
if err != nil {
return err
}
err = execStmt(qgen.Builder.CreateTable("menu_items", "", "",
[]qgen.DBTableColumn{
qgen.DBTableColumn{"mid", "int", 0, false, false, ""},
qgen.DBTableColumn{"htmlID", "varchar", 200, false, false, "''"},
qgen.DBTableColumn{"cssClass", "varchar", 200, false, false, "''"},
qgen.DBTableColumn{"position", "varchar", 100, false, false, ""},
qgen.DBTableColumn{"path", "varchar", 200, false, false, "''"},
qgen.DBTableColumn{"aria", "varchar", 200, false, false, "''"},
qgen.DBTableColumn{"tooltip", "varchar", 200, false, false, "''"},
qgen.DBTableColumn{"tmplName", "varchar", 200, false, false, "''"},
qgen.DBTableColumn{"order", "int", 0, false, false, "0"},
qgen.DBTableColumn{"guestOnly", "boolean", 0, false, false, "0"},
qgen.DBTableColumn{"memberOnly", "boolean", 0, false, false, "0"},
qgen.DBTableColumn{"staffOnly", "boolean", 0, false, false, "0"},
qgen.DBTableColumn{"adminOnly", "boolean", 0, false, false, "0"},
},
[]qgen.DBTableKey{},
))
if err != nil {
return err
}
err = execStmt(qgen.Builder.SimpleInsert("menus", "", ""))
if err != nil {
return err
}
err = execStmt(qgen.Builder.SimpleInsert("menu_items", "mid, htmlID, position, path, aria, tooltip, order", "1,'menu_forums','left','/forums/','{lang.menu_forums_aria}','{lang.menu_forums_tooltip}',0"))
if err != nil {
return err
}
err = execStmt(qgen.Builder.SimpleInsert("menu_items", "mid, htmlID, cssClass, position, path, aria, tooltip, order", "1,'menu_topics','menu_topics','left','/topics/','{lang.menu_topics_aria}','{lang.menu_topics_tooltip}',1"))
if err != nil {
return err
}
stmt, err = execStmt(qgen.Builder.SimpleInsert("menu_items", "mid, htmlID, cssClass, position, tmplName, order", "1,'general_alerts','menu_alerts','right','menu_alerts',2"))
if err != nil {
return err
}
return nil
}
/*func eachUserQuick(handle func(int)) error {
stmt, err := qgen.Builder.Select("users").Orderby("uid desc").Limit(1).Prepare()
if err != nil {

106
patcher/patches.go Normal file
View File

@ -0,0 +1,106 @@
package main
import (
"bufio"
"strconv"
"../query_gen/lib"
)
func patch0(scanner *bufio.Scanner) error {
err := execStmt(qgen.Builder.CreateTable("menus", "", "",
[]qgen.DBTableColumn{
qgen.DBTableColumn{"mid", "int", 0, false, true, ""},
},
[]qgen.DBTableKey{
qgen.DBTableKey{"mid", "primary"},
},
))
if err != nil {
return err
}
err = execStmt(qgen.Builder.CreateTable("menu_items", "", "",
[]qgen.DBTableColumn{
qgen.DBTableColumn{"mid", "int", 0, false, false, ""},
qgen.DBTableColumn{"htmlID", "varchar", 200, false, false, "''"},
qgen.DBTableColumn{"cssClass", "varchar", 200, false, false, "''"},
qgen.DBTableColumn{"position", "varchar", 100, false, false, ""},
qgen.DBTableColumn{"path", "varchar", 200, false, false, "''"},
qgen.DBTableColumn{"aria", "varchar", 200, false, false, "''"},
qgen.DBTableColumn{"tooltip", "varchar", 200, false, false, "''"},
qgen.DBTableColumn{"tmplName", "varchar", 200, false, false, "''"},
qgen.DBTableColumn{"order", "int", 0, false, false, "0"},
qgen.DBTableColumn{"guestOnly", "boolean", 0, false, false, "0"},
qgen.DBTableColumn{"memberOnly", "boolean", 0, false, false, "0"},
qgen.DBTableColumn{"staffOnly", "boolean", 0, false, false, "0"},
qgen.DBTableColumn{"adminOnly", "boolean", 0, false, false, "0"},
},
[]qgen.DBTableKey{},
))
if err != nil {
return err
}
err = execStmt(qgen.Builder.SimpleInsert("menus", "", ""))
if err != nil {
return err
}
var mOrder int
var mOrder = "mid, htmlID, cssClass, position, path, aria, tooltip, guestOnly, memberOnly, staffOnly, adminOnly"
var addMenuItem = func(data map[string]interface{}) error {
cols, values := qgen.InterfaceMapToInsertStrings(data, mOrder)
err := execStmt(qgen.Builder.SimpleInsert("menu_items", cols+", order", values+","+strconv.Itoa(mOrder)))
mOrder++
return err
}
err = addMenuItem(map[string]interface{}{"mid": 1, "htmlID": "menu_forums", "position": "left", "path": "/forums/", "aria": "{lang.menu_forums_aria}", "tooltip": "{lang.menu_forums_tooltip}"})
if err != nil {
return err
}
err = addMenuItem(map[string]interface{}{"mid": 1, "htmlID": "menu_topics", "cssClass": "menu_topics", "position": "left", "path": "/topics/", "aria": "{lang.menu_topics_aria}", "tooltip": "{lang.menu_topics_tooltip}"})
if err != nil {
return err
}
err = addMenuItem(map[string]interface{}{"mid": 1, "htmlID": "general_alerts", "cssClass": "menu_alerts", "position": "right", "tmplName": "menu_alerts"})
if err != nil {
return err
}
err = addMenuItem(map[string]interface{}{"mid": 1, "cssClass": "menu_account", "position": "left", "path": "/user/edit/critical/", "aria": "{lang.menu_account_aria}", "tooltip": "{lang.menu_account_tooltip}", "memberOnly": true})
if err != nil {
return err
}
err = addMenuItem(map[string]interface{}{"mid": 1, "cssClass": "menu_profile", "position": "left", "path": "{me.Link}", "aria": "{lang.menu_profile_aria}", "tooltip": "{lang.menu_profile_tooltip}", "memberOnly": true})
if err != nil {
return err
}
err = addMenuItem(map[string]interface{}{"mid": 1, "cssClass": "menu_panel menu_account", "position": "left", "path": "/panel/", "aria": "{lang.menu_panel_aria}", "tooltip": "{lang.menu_panel_tooltip}", "memberOnly": true, "staffOnly": true})
if err != nil {
return err
}
err = addMenuItem(map[string]interface{}{"mid": 1, "cssClass": "menu_logout", "position": "left", "path": "/accounts/logout/?session={me.Session}", "aria": "{lang.menu_logout_aria}", "tooltip": "{lang.menu_logout_tooltip}", "memberOnly": true})
if err != nil {
return err
}
err = addMenuItem(map[string]interface{}{"mid": 1, "cssClass": "menu_register", "position": "left", "path": "/accounts/create/", "aria": "{lang.menu_register_aria}", "tooltip": "{lang.menu_register_tooltip}", "guestOnly": true})
if err != nil {
return err
}
err = addMenuItem(map[string]interface{}{"mid": 1, "cssClass": "menu_login", "position": "left", "path": "/accounts/login/", "aria": "{lang.menu_login_aria}", "tooltip": "{lang.menu_login_tooltip}", "guestOnly": true})
if err != nil {
return err
}
return nil
}

View File

@ -4,6 +4,8 @@ package qgen
import (
"database/sql"
"errors"
"strconv"
"strings"
)
var Registry []Adapter
@ -150,3 +152,55 @@ func PrepareMySQLUpsertCallback(db *sql.DB, query string) (*MySQLUpsertCallback,
stmt, err := db.Prepare(query)
return &MySQLUpsertCallback{stmt}, err
}
type LitStr string
// TODO: Test this
func InterfaceMapToInsertStrings(data map[string]interface{}, order string) (cols string, values string) {
var done = make(map[string]bool)
var addValue = func(value interface{}) {
switch value := value.(type) {
case string:
values += "'" + strings.Replace(value, "'", "\\'", -1) + "',"
case int:
values += strconv.Itoa(value) + ","
case LitStr:
values += string(value) + ","
case bool:
if value {
values += "1,"
} else {
values += "0,"
}
}
}
// Add the ordered items
for _, col := range strings.Split(order, ",") {
col = strings.TrimSpace(col)
value, ok := data[col]
if ok {
cols += col + ","
addValue(value)
done[col] = true
}
}
// Go over any unordered items and add them at the end
if len(data) > len(done) {
for col, value := range data {
_, ok := done[col]
if ok {
continue
}
cols += col + ","
addValue(value)
}
}
if cols != "" {
cols = cols[:len(cols)-1]
values = values[:len(values)-1]
}
return cols, values
}

View File

@ -371,7 +371,7 @@ func processFields(fieldstr string) (fields []DBField) {
fields = append(fields, DBField{Name: buffer, Type: getIdentifierType(buffer)})
buffer = ""
lastItem = i + 1
} else if (fieldstr[i] > 32) && fieldstr[i] != ',' && fieldstr[i] != ')' {
} else if (fieldstr[i] >= 32) && fieldstr[i] != ',' && fieldstr[i] != ')' {
buffer += string(fieldstr[i])
}
}

View File

@ -6,6 +6,7 @@ import (
"log"
"os"
"runtime/debug"
"strconv"
"./lib"
)
@ -210,16 +211,11 @@ func seedTables(adapter qgen.Adapter) error {
qgen.Install.SimpleInsert("replies", "tid, content, parsed_content, createdAt, createdBy, lastUpdated, lastEdit, lastEditBy, ipaddress", "1,'A reply!','A reply!',UTC_TIMESTAMP(),1,UTC_TIMESTAMP(),0,0,'::1'")
/*
Quick Reminder of the HTML layout, so I don't need to flip back and forth between menu_item.html, etc.
{{range .MenuItems}}
<li id="menu_{{.ID}}" class="menu_{{.Position}}"><a href="{{.Path}}" aria-label="{{.Aria}}" title="{{.Tooltip}}"></a></li>
{{end}}
<li class="menu_left menu_topics"><a href="/" aria-label="{{lang "menu_topics_aria"}}" title="{{lang "menu_topics_tooltip"}}"></a></li>
<li id="general_alerts" class="menu_right menu_alerts">
<div class="alert_bell"></div>
<div class="alert_counter" aria-label="{{lang "menu_alert_counter_aria"}}"></div>
<div class="alert_aftercounter"></div>
<div class="alertList" aria-label="{{lang "menu_alert_list_aria"}}"></div>
</li>
qgen.DBTableColumn{"guestOnly", "boolean", 1, false, false, "0"},
qgen.DBTableColumn{"memberOnly", "boolean", 1, false, false, "0"},
@ -229,15 +225,73 @@ func seedTables(adapter qgen.Adapter) error {
qgen.Install.SimpleInsert("menus", "", "")
qgen.Install.SimpleInsert("menu_items", "mid, htmlID, position, path, aria, tooltip, order", "1,'menu_forums','left','/forums/','{lang.menu_forums_aria}','{lang.menu_forums_tooltip}',0")
var order = 0
var mOrder = "mid, htmlID, cssClass, position, path, aria, tooltip, guestOnly, memberOnly, staffOnly, adminOnly"
/*var addMenuItem = func(data map[string]interface{}) {
var cols, values string
for col, value := range data {
cols += col + ","
switch value := value.(type) {
case string:
values += "'" + strings.Replace(value, "'", "\\'", -1) + "',"
case int:
values += strconv.Itoa(value) + ","
case LitStr:
values += string(value) + ","
case bool:
if value {
values += "1,"
} else {
values += "0,"
}
}
}
if cols != "" {
cols = cols[:len(cols)-1]
values = values[:len(values)-1]
}
qgen.Install.SimpleInsert("menu_items", cols+", order", values+","+strconv.Itoa(order))
order++
}*/
qgen.Install.SimpleInsert("menu_items", "mid, htmlID, cssClass, position, path, aria, tooltip, order", "1,'menu_topics','menu_topics','left','/topics/','{lang.menu_topics_aria}','{lang.menu_topics_tooltip}',1")
// Go maps have a random iteration order, so we have to do this, otherwise the schema files will become unstable and harder to audit
var addMenuItem = func(data map[string]interface{}) {
cols, values := qgen.InterfaceMapToInsertStrings(data, mOrder)
qgen.Install.SimpleInsert("menu_items", cols+", order", values+","+strconv.Itoa(order))
order++
}
qgen.Install.SimpleInsert("menu_items", "mid, htmlID, cssClass, position, tmplName, order", "1,'general_alerts','menu_alerts','right','menu_alerts',2")
addMenuItem(map[string]interface{}{"mid": 1, "htmlID": "menu_forums", "position": "left", "path": "/forums/", "aria": "{lang.menu_forums_aria}", "tooltip": "{lang.menu_forums_tooltip}"})
addMenuItem(map[string]interface{}{"mid": 1, "htmlID": "menu_topics", "cssClass": "menu_topics", "position": "left", "path": "/topics/", "aria": "{lang.menu_topics_aria}", "tooltip": "{lang.menu_topics_tooltip}"})
addMenuItem(map[string]interface{}{"mid": 1, "htmlID": "general_alerts", "cssClass": "menu_alerts", "position": "right", "tmplName": "menu_alerts"})
addMenuItem(map[string]interface{}{"mid": 1, "cssClass": "menu_account", "position": "left", "path": "/user/edit/critical/", "aria": "{lang.menu_account_aria}", "tooltip": "{lang.menu_account_tooltip}", "memberOnly": true})
addMenuItem(map[string]interface{}{"mid": 1, "cssClass": "menu_profile", "position": "left", "path": "{me.Link}", "aria": "{lang.menu_profile_aria}", "tooltip": "{lang.menu_profile_tooltip}", "memberOnly": true})
addMenuItem(map[string]interface{}{"mid": 1, "cssClass": "menu_panel menu_account", "position": "left", "path": "/panel/", "aria": "{lang.menu_panel_aria}", "tooltip": "{lang.menu_panel_tooltip}", "memberOnly": true, "staffOnly": true})
addMenuItem(map[string]interface{}{"mid": 1, "cssClass": "menu_logout", "position": "left", "path": "/accounts/logout/?session={me.Session}", "aria": "{lang.menu_logout_aria}", "tooltip": "{lang.menu_logout_tooltip}", "memberOnly": true})
addMenuItem(map[string]interface{}{"mid": 1, "cssClass": "menu_register", "position": "left", "path": "/accounts/create/", "aria": "{lang.menu_register_aria}", "tooltip": "{lang.menu_register_tooltip}", "guestOnly": true})
addMenuItem(map[string]interface{}{"mid": 1, "cssClass": "menu_login", "position": "left", "path": "/accounts/login/", "aria": "{lang.menu_login_aria}", "tooltip": "{lang.menu_login_tooltip}", "guestOnly": true})
return nil
}
func copyInsertMap(in map[string]interface{}) (out map[string]interface{}) {
out = make(map[string]interface{})
for col, value := range in {
out[col] = value
}
return out
}
type LitStr string
func writeSelects(adapter qgen.Adapter) error {
build := adapter.Builder()

View File

@ -10,10 +10,10 @@ INSERT INTO [users_groups] ([name],[permissions],[plugin_perms],[is_mod],[is_adm
INSERT INTO [users_groups] ([name],[permissions],[plugin_perms],[is_mod],[tag]) VALUES ('Moderator','{"BanUsers":true,"ActivateUsers":false,"EditUser":true,"EditUserEmail":false,"EditUserGroup":true,"ViewIPs":true,"UploadFiles":true,"ViewTopic":true,"LikeItem":true,"CreateTopic":true,"EditTopic":true,"DeleteTopic":true,"CreateReply":true,"EditReply":true,"DeleteReply":true,"PinTopic":true,"CloseTopic":true,"MoveTopic":true}','{}',1,'Mod');
INSERT INTO [users_groups] ([name],[permissions],[plugin_perms]) VALUES ('Member','{"UploadFiles":true,"ViewTopic":true,"LikeItem":true,"CreateTopic":true,"CreateReply":true}','{}');
INSERT INTO [users_groups] ([name],[permissions],[plugin_perms],[is_banned]) VALUES ('Banned','{"ViewTopic":true}','{}',1);
INSERT INTO [users_groups] ([name],[permissions],[plugin_perms]) VALUES ('AwaitingActivation','{"ViewTopic":true}','{}');
INSERT INTO [users_groups] ([name],[permissions],[plugin_perms],[tag]) VALUES ('NotLoggedin','{"ViewTopic":true}','{}','Guest');
INSERT INTO [forums] ([name],[active],[desc]) VALUES ('Reports',0,'Allthereportsgohere');
INSERT INTO [forums] ([name],[lastTopicID],[lastReplyerID],[desc]) VALUES ('General',1,1,'Aplaceforgeneraldiscussionswhichdon''tfitelsewhere');
INSERT INTO [users_groups] ([name],[permissions],[plugin_perms]) VALUES ('Awaiting Activation','{"ViewTopic":true}','{}');
INSERT INTO [users_groups] ([name],[permissions],[plugin_perms],[tag]) VALUES ('Not Loggedin','{"ViewTopic":true}','{}','Guest');
INSERT INTO [forums] ([name],[active],[desc]) VALUES ('Reports',0,'All the reports go here');
INSERT INTO [forums] ([name],[lastTopicID],[lastReplyerID],[desc]) VALUES ('General',1,1,'A place for general discussions which don''t fit elsewhere');
INSERT INTO [forums_permissions] ([gid],[fid],[permissions]) VALUES (1,1,'{"ViewTopic":true,"CreateReply":true,"CreateTopic":true,"PinTopic":true,"CloseTopic":true}');
INSERT INTO [forums_permissions] ([gid],[fid],[permissions]) VALUES (2,1,'{"ViewTopic":true,"CreateReply":true,"CloseTopic":true}');
INSERT INTO [forums_permissions] ([gid],[fid],[permissions]) VALUES (3,1,'{}');
@ -26,9 +26,15 @@ INSERT INTO [forums_permissions] ([gid],[fid],[permissions]) VALUES (3,2,'{"View
INSERT INTO [forums_permissions] ([gid],[fid],[permissions]) VALUES (4,2,'{"ViewTopic":true}');
INSERT INTO [forums_permissions] ([gid],[fid],[permissions]) VALUES (5,2,'{"ViewTopic":true}');
INSERT INTO [forums_permissions] ([gid],[fid],[permissions]) VALUES (6,2,'{"ViewTopic":true}');
INSERT INTO [topics] ([title],[content],[parsed_content],[createdAt],[lastReplyAt],[lastReplyBy],[createdBy],[parentID],[ipaddress]) VALUES ('TestTopic','Atopicautomaticallygeneratedbythesoftware.','Atopicautomaticallygeneratedbythesoftware.',GETUTCDATE(),GETUTCDATE(),1,1,2,'::1');
INSERT INTO [replies] ([tid],[content],[parsed_content],[createdAt],[createdBy],[lastUpdated],[lastEdit],[lastEditBy],[ipaddress]) VALUES (1,'Areply!','Areply!',GETUTCDATE(),1,GETUTCDATE(),0,0,'::1');
INSERT INTO [topics] ([title],[content],[parsed_content],[createdAt],[lastReplyAt],[lastReplyBy],[createdBy],[parentID],[ipaddress]) VALUES ('Test Topic','A topic automatically generated by the software.','A topic automatically generated by the software.',GETUTCDATE(),GETUTCDATE(),1,1,2,'::1');
INSERT INTO [replies] ([tid],[content],[parsed_content],[createdAt],[createdBy],[lastUpdated],[lastEdit],[lastEditBy],[ipaddress]) VALUES (1,'A reply!','A reply!',GETUTCDATE(),1,GETUTCDATE(),0,0,'::1');
INSERT INTO [menus];
INSERT INTO [menu_items] ([mid],[htmlID],[position],[path],[aria],[tooltip],[order]) VALUES (1,'menu_forums','left','/forums/','{lang.menu_forums_aria}','{lang.menu_forums_tooltip}',0);
INSERT INTO [menu_items] ([mid],[htmlID],[cssClass],[position],[path],[aria],[tooltip],[order]) VALUES (1,'menu_topics','menu_topics','left','/topics/','{lang.menu_topics_aria}','{lang.menu_topics_tooltip}',1);
INSERT INTO [menu_items] ([mid],[htmlID],[cssClass],[position],[tmplName],[order]) VALUES (1,'general_alerts','menu_alerts','right','menu_alerts',2);
INSERT INTO [menu_items] ([mid],[cssClass],[position],[path],[aria],[tooltip],[memberOnly],[order]) VALUES (1,'menu_account','left','/user/edit/critical/','{lang.menu_account_aria}','{lang.menu_account_tooltip}',1,3);
INSERT INTO [menu_items] ([mid],[cssClass],[position],[path],[aria],[tooltip],[memberOnly],[order]) VALUES (1,'menu_profile','left','{me.Link}','{lang.menu_profile_aria}','{lang.menu_profile_tooltip}',1,4);
INSERT INTO [menu_items] ([mid],[cssClass],[position],[path],[aria],[tooltip],[memberOnly],[staffOnly],[order]) VALUES (1,'menu_panel menu_account','left','/panel/','{lang.menu_panel_aria}','{lang.menu_panel_tooltip}',1,1,5);
INSERT INTO [menu_items] ([mid],[cssClass],[position],[path],[aria],[tooltip],[memberOnly],[order]) VALUES (1,'menu_logout','left','/accounts/logout/?session={me.Session}','{lang.menu_logout_aria}','{lang.menu_logout_tooltip}',1,6);
INSERT INTO [menu_items] ([mid],[cssClass],[position],[path],[aria],[tooltip],[guestOnly],[order]) VALUES (1,'menu_register','left','/accounts/create/','{lang.menu_register_aria}','{lang.menu_register_tooltip}',1,7);
INSERT INTO [menu_items] ([mid],[cssClass],[position],[path],[aria],[tooltip],[guestOnly],[order]) VALUES (1,'menu_login','left','/accounts/login/','{lang.menu_login_aria}','{lang.menu_login_tooltip}',1,8);

View File

@ -10,10 +10,10 @@ INSERT INTO `users_groups`(`name`,`permissions`,`plugin_perms`,`is_mod`,`is_admi
INSERT INTO `users_groups`(`name`,`permissions`,`plugin_perms`,`is_mod`,`tag`) VALUES ('Moderator','{"BanUsers":true,"ActivateUsers":false,"EditUser":true,"EditUserEmail":false,"EditUserGroup":true,"ViewIPs":true,"UploadFiles":true,"ViewTopic":true,"LikeItem":true,"CreateTopic":true,"EditTopic":true,"DeleteTopic":true,"CreateReply":true,"EditReply":true,"DeleteReply":true,"PinTopic":true,"CloseTopic":true,"MoveTopic":true}','{}',1,'Mod');
INSERT INTO `users_groups`(`name`,`permissions`,`plugin_perms`) VALUES ('Member','{"UploadFiles":true,"ViewTopic":true,"LikeItem":true,"CreateTopic":true,"CreateReply":true}','{}');
INSERT INTO `users_groups`(`name`,`permissions`,`plugin_perms`,`is_banned`) VALUES ('Banned','{"ViewTopic":true}','{}',1);
INSERT INTO `users_groups`(`name`,`permissions`,`plugin_perms`) VALUES ('AwaitingActivation','{"ViewTopic":true}','{}');
INSERT INTO `users_groups`(`name`,`permissions`,`plugin_perms`,`tag`) VALUES ('NotLoggedin','{"ViewTopic":true}','{}','Guest');
INSERT INTO `forums`(`name`,`active`,`desc`) VALUES ('Reports',0,'Allthereportsgohere');
INSERT INTO `forums`(`name`,`lastTopicID`,`lastReplyerID`,`desc`) VALUES ('General',1,1,'Aplaceforgeneraldiscussionswhichdon''tfitelsewhere');
INSERT INTO `users_groups`(`name`,`permissions`,`plugin_perms`) VALUES ('Awaiting Activation','{"ViewTopic":true}','{}');
INSERT INTO `users_groups`(`name`,`permissions`,`plugin_perms`,`tag`) VALUES ('Not Loggedin','{"ViewTopic":true}','{}','Guest');
INSERT INTO `forums`(`name`,`active`,`desc`) VALUES ('Reports',0,'All the reports go here');
INSERT INTO `forums`(`name`,`lastTopicID`,`lastReplyerID`,`desc`) VALUES ('General',1,1,'A place for general discussions which don''t fit elsewhere');
INSERT INTO `forums_permissions`(`gid`,`fid`,`permissions`) VALUES (1,1,'{"ViewTopic":true,"CreateReply":true,"CreateTopic":true,"PinTopic":true,"CloseTopic":true}');
INSERT INTO `forums_permissions`(`gid`,`fid`,`permissions`) VALUES (2,1,'{"ViewTopic":true,"CreateReply":true,"CloseTopic":true}');
INSERT INTO `forums_permissions`(`gid`,`fid`,`permissions`) VALUES (3,1,'{}');
@ -26,9 +26,15 @@ INSERT INTO `forums_permissions`(`gid`,`fid`,`permissions`) VALUES (3,2,'{"ViewT
INSERT INTO `forums_permissions`(`gid`,`fid`,`permissions`) VALUES (4,2,'{"ViewTopic":true}');
INSERT INTO `forums_permissions`(`gid`,`fid`,`permissions`) VALUES (5,2,'{"ViewTopic":true}');
INSERT INTO `forums_permissions`(`gid`,`fid`,`permissions`) VALUES (6,2,'{"ViewTopic":true}');
INSERT INTO `topics`(`title`,`content`,`parsed_content`,`createdAt`,`lastReplyAt`,`lastReplyBy`,`createdBy`,`parentID`,`ipaddress`) VALUES ('TestTopic','Atopicautomaticallygeneratedbythesoftware.','Atopicautomaticallygeneratedbythesoftware.',UTC_TIMESTAMP(),UTC_TIMESTAMP(),1,1,2,'::1');
INSERT INTO `replies`(`tid`,`content`,`parsed_content`,`createdAt`,`createdBy`,`lastUpdated`,`lastEdit`,`lastEditBy`,`ipaddress`) VALUES (1,'Areply!','Areply!',UTC_TIMESTAMP(),1,UTC_TIMESTAMP(),0,0,'::1');
INSERT INTO `topics`(`title`,`content`,`parsed_content`,`createdAt`,`lastReplyAt`,`lastReplyBy`,`createdBy`,`parentID`,`ipaddress`) VALUES ('Test Topic','A topic automatically generated by the software.','A topic automatically generated by the software.',UTC_TIMESTAMP(),UTC_TIMESTAMP(),1,1,2,'::1');
INSERT INTO `replies`(`tid`,`content`,`parsed_content`,`createdAt`,`createdBy`,`lastUpdated`,`lastEdit`,`lastEditBy`,`ipaddress`) VALUES (1,'A reply!','A reply!',UTC_TIMESTAMP(),1,UTC_TIMESTAMP(),0,0,'::1');
INSERT INTO `menus`;
INSERT INTO `menu_items`(`mid`,`htmlID`,`position`,`path`,`aria`,`tooltip`,`order`) VALUES (1,'menu_forums','left','/forums/','{lang.menu_forums_aria}','{lang.menu_forums_tooltip}',0);
INSERT INTO `menu_items`(`mid`,`htmlID`,`cssClass`,`position`,`path`,`aria`,`tooltip`,`order`) VALUES (1,'menu_topics','menu_topics','left','/topics/','{lang.menu_topics_aria}','{lang.menu_topics_tooltip}',1);
INSERT INTO `menu_items`(`mid`,`htmlID`,`cssClass`,`position`,`tmplName`,`order`) VALUES (1,'general_alerts','menu_alerts','right','menu_alerts',2);
INSERT INTO `menu_items`(`mid`,`cssClass`,`position`,`path`,`aria`,`tooltip`,`memberOnly`,`order`) VALUES (1,'menu_account','left','/user/edit/critical/','{lang.menu_account_aria}','{lang.menu_account_tooltip}',1,3);
INSERT INTO `menu_items`(`mid`,`cssClass`,`position`,`path`,`aria`,`tooltip`,`memberOnly`,`order`) VALUES (1,'menu_profile','left','{me.Link}','{lang.menu_profile_aria}','{lang.menu_profile_tooltip}',1,4);
INSERT INTO `menu_items`(`mid`,`cssClass`,`position`,`path`,`aria`,`tooltip`,`memberOnly`,`staffOnly`,`order`) VALUES (1,'menu_panel menu_account','left','/panel/','{lang.menu_panel_aria}','{lang.menu_panel_tooltip}',1,1,5);
INSERT INTO `menu_items`(`mid`,`cssClass`,`position`,`path`,`aria`,`tooltip`,`memberOnly`,`order`) VALUES (1,'menu_logout','left','/accounts/logout/?session={me.Session}','{lang.menu_logout_aria}','{lang.menu_logout_tooltip}',1,6);
INSERT INTO `menu_items`(`mid`,`cssClass`,`position`,`path`,`aria`,`tooltip`,`guestOnly`,`order`) VALUES (1,'menu_register','left','/accounts/create/','{lang.menu_register_aria}','{lang.menu_register_tooltip}',1,7);
INSERT INTO `menu_items`(`mid`,`cssClass`,`position`,`path`,`aria`,`tooltip`,`guestOnly`,`order`) VALUES (1,'menu_login','left','/accounts/login/','{lang.menu_login_aria}','{lang.menu_login_tooltip}',1,8);

View File

@ -32,3 +32,9 @@
;
;
;
;
;
;
;
;
;

View File

@ -1,6 +1,6 @@
{
"DBVersion":"0",
"DBVersion":"1",
"DynamicFileVersion":"0",
"MinGoVersion":"1.9",
"MinGoVersion":"1.10",
"MinVersion":""
}

View File

@ -15,18 +15,6 @@ func init() {
common.TmplPtrMap["error"] = &common.Template_error_handle
common.TmplPtrMap["o_error"] = Template_error
error_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
"menu_account_aria",
"menu_account_tooltip",
"menu_profile_aria",
"menu_profile_tooltip",
"menu_panel_aria",
"menu_panel_tooltip",
"menu_logout_aria",
"menu_logout_tooltip",
"menu_register_aria",
"menu_register_tooltip",
"menu_login_aria",
"menu_login_tooltip",
"menu_hamburger_tooltip",
"error_head",
"footer_powered_by",
@ -75,76 +63,41 @@ if !tmpl_error_vars.CurrentUser.IsSuperMod {
w.Write(header_frags[15])
}
w.Write(header_frags[16])
w.Write(menu_frags[0])
w.Write([]byte(common.BuildWidget("leftOfNav",tmpl_error_vars.Header)))
w.Write(menu_frags[1])
w.Write([]byte(tmpl_error_vars.Header.Site.ShortName))
w.Write(menu_frags[2])
w.Write([]byte(common.BuildWidget("topMenu",tmpl_error_vars.Header)))
if tmpl_error_vars.CurrentUser.Loggedin {
w.Write(menu_frags[3])
w.Write(phrases[0])
w.Write(menu_frags[4])
w.Write(phrases[1])
w.Write(menu_frags[5])
w.Write([]byte(tmpl_error_vars.CurrentUser.Link))
w.Write(menu_frags[6])
w.Write(phrases[2])
w.Write(menu_frags[7])
w.Write(phrases[3])
w.Write(menu_frags[8])
w.Write(phrases[4])
w.Write(menu_frags[9])
w.Write(phrases[5])
w.Write(menu_frags[10])
w.Write([]byte(tmpl_error_vars.CurrentUser.Session))
w.Write(menu_frags[11])
w.Write(phrases[6])
w.Write(menu_frags[12])
w.Write(phrases[7])
w.Write(menu_frags[13])
} else {
w.Write(menu_frags[14])
w.Write(phrases[8])
w.Write(menu_frags[15])
w.Write(phrases[9])
w.Write(menu_frags[16])
w.Write(phrases[10])
w.Write(menu_frags[17])
w.Write(phrases[11])
w.Write(menu_frags[18])
}
w.Write(menu_frags[19])
w.Write(phrases[12])
w.Write(menu_frags[20])
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_error_vars.Header)))
w.Write(menu_frags[21])
w.Write(header_frags[17])
if tmpl_error_vars.Header.Widgets.RightSidebar != "" {
w.Write([]byte(tmpl_error_vars.Header.Site.ShortName))
w.Write(header_frags[18])
}
w.Write([]byte(common.BuildWidget("topMenu",tmpl_error_vars.Header)))
w.Write(header_frags[19])
w.Write(phrases[0])
w.Write(header_frags[20])
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_error_vars.Header)))
w.Write(header_frags[21])
if tmpl_error_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_frags[22])
}
w.Write(header_frags[23])
if len(tmpl_error_vars.Header.NoticeList) != 0 {
for _, item := range tmpl_error_vars.Header.NoticeList {
w.Write(header_frags[20])
w.Write(header_frags[24])
w.Write([]byte(item))
w.Write(header_frags[21])
w.Write(header_frags[25])
}
}
w.Write(header_frags[22])
w.Write(header_frags[26])
w.Write(error_frags[0])
w.Write(phrases[13])
w.Write(phrases[1])
w.Write(error_frags[1])
w.Write([]byte(tmpl_error_vars.Something.(string)))
w.Write(error_frags[2])
w.Write(footer_frags[0])
w.Write([]byte(common.BuildWidget("footer",tmpl_error_vars.Header)))
w.Write(footer_frags[1])
w.Write(phrases[14])
w.Write(phrases[2])
w.Write(footer_frags[2])
w.Write(phrases[15])
w.Write(phrases[3])
w.Write(footer_frags[3])
w.Write(phrases[16])
w.Write(phrases[4])
w.Write(footer_frags[4])
if len(tmpl_error_vars.Header.Themes) != 0 {
for _, item := range tmpl_error_vars.Header.Themes {

View File

@ -3,8 +3,8 @@
// 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 "io"
import "./common"
import "io"
import "strconv"
var forum_tmpl_phrase_id int
@ -16,18 +16,6 @@ func init() {
common.TmplPtrMap["forum"] = &common.Template_forum_handle
common.TmplPtrMap["o_forum"] = Template_forum
forum_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
"menu_account_aria",
"menu_account_tooltip",
"menu_profile_aria",
"menu_profile_tooltip",
"menu_panel_aria",
"menu_panel_tooltip",
"menu_logout_aria",
"menu_logout_tooltip",
"menu_register_aria",
"menu_register_tooltip",
"menu_login_aria",
"menu_login_tooltip",
"menu_hamburger_tooltip",
"paginator_prev_page_aria",
"paginator_less_than",
@ -108,83 +96,48 @@ if !tmpl_forum_vars.CurrentUser.IsSuperMod {
w.Write(header_frags[15])
}
w.Write(header_frags[16])
w.Write(menu_frags[0])
w.Write([]byte(common.BuildWidget("leftOfNav",tmpl_forum_vars.Header)))
w.Write(menu_frags[1])
w.Write([]byte(tmpl_forum_vars.Header.Site.ShortName))
w.Write(menu_frags[2])
w.Write([]byte(common.BuildWidget("topMenu",tmpl_forum_vars.Header)))
if tmpl_forum_vars.CurrentUser.Loggedin {
w.Write(menu_frags[3])
w.Write(phrases[0])
w.Write(menu_frags[4])
w.Write(phrases[1])
w.Write(menu_frags[5])
w.Write([]byte(tmpl_forum_vars.CurrentUser.Link))
w.Write(menu_frags[6])
w.Write(phrases[2])
w.Write(menu_frags[7])
w.Write(phrases[3])
w.Write(menu_frags[8])
w.Write(phrases[4])
w.Write(menu_frags[9])
w.Write(phrases[5])
w.Write(menu_frags[10])
w.Write([]byte(tmpl_forum_vars.CurrentUser.Session))
w.Write(menu_frags[11])
w.Write(phrases[6])
w.Write(menu_frags[12])
w.Write(phrases[7])
w.Write(menu_frags[13])
} else {
w.Write(menu_frags[14])
w.Write(phrases[8])
w.Write(menu_frags[15])
w.Write(phrases[9])
w.Write(menu_frags[16])
w.Write(phrases[10])
w.Write(menu_frags[17])
w.Write(phrases[11])
w.Write(menu_frags[18])
}
w.Write(menu_frags[19])
w.Write(phrases[12])
w.Write(menu_frags[20])
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_forum_vars.Header)))
w.Write(menu_frags[21])
w.Write(header_frags[17])
if tmpl_forum_vars.Header.Widgets.RightSidebar != "" {
w.Write([]byte(tmpl_forum_vars.Header.Site.ShortName))
w.Write(header_frags[18])
}
w.Write([]byte(common.BuildWidget("topMenu",tmpl_forum_vars.Header)))
w.Write(header_frags[19])
w.Write(phrases[0])
w.Write(header_frags[20])
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_forum_vars.Header)))
w.Write(header_frags[21])
if tmpl_forum_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_frags[22])
}
w.Write(header_frags[23])
if len(tmpl_forum_vars.Header.NoticeList) != 0 {
for _, item := range tmpl_forum_vars.Header.NoticeList {
w.Write(header_frags[20])
w.Write(header_frags[24])
w.Write([]byte(item))
w.Write(header_frags[21])
w.Write(header_frags[25])
}
}
w.Write(header_frags[22])
w.Write(header_frags[26])
if tmpl_forum_vars.Page > 1 {
w.Write(forum_frags[0])
w.Write(phrases[13])
w.Write(phrases[1])
w.Write(forum_frags[1])
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Forum.ID)))
w.Write(forum_frags[2])
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page - 1)))
w.Write(forum_frags[3])
w.Write(phrases[14])
w.Write(phrases[2])
w.Write(forum_frags[4])
}
if tmpl_forum_vars.LastPage != tmpl_forum_vars.Page {
w.Write(forum_frags[5])
w.Write(phrases[15])
w.Write(phrases[3])
w.Write(forum_frags[6])
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Forum.ID)))
w.Write(forum_frags[7])
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page + 1)))
w.Write(forum_frags[8])
w.Write(phrases[16])
w.Write(phrases[4])
w.Write(forum_frags[9])
}
w.Write(forum_frags[10])
@ -198,22 +151,22 @@ if tmpl_forum_vars.CurrentUser.ID != 0 {
w.Write(forum_frags[14])
if tmpl_forum_vars.CurrentUser.Perms.CreateTopic {
w.Write(forum_frags[15])
w.Write(phrases[17])
w.Write(phrases[5])
w.Write(forum_frags[16])
w.Write(phrases[18])
w.Write(phrases[6])
w.Write(forum_frags[17])
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Forum.ID)))
w.Write(forum_frags[18])
w.Write(forum_frags[19])
w.Write(phrases[19])
w.Write(phrases[7])
w.Write(forum_frags[20])
w.Write(phrases[20])
w.Write(phrases[8])
w.Write(forum_frags[21])
} else {
w.Write(forum_frags[22])
w.Write(phrases[21])
w.Write(phrases[9])
w.Write(forum_frags[23])
w.Write(phrases[22])
w.Write(phrases[10])
w.Write(forum_frags[24])
}
w.Write(forum_frags[25])
@ -221,48 +174,48 @@ w.Write(forum_frags[25])
w.Write(forum_frags[26])
if tmpl_forum_vars.CurrentUser.ID != 0 {
w.Write(forum_frags[27])
w.Write(phrases[23])
w.Write(phrases[11])
w.Write(forum_frags[28])
w.Write(phrases[24])
w.Write(phrases[12])
w.Write(forum_frags[29])
w.Write(phrases[25])
w.Write(phrases[13])
w.Write(forum_frags[30])
w.Write(phrases[26])
w.Write(phrases[14])
w.Write(forum_frags[31])
w.Write(phrases[27])
w.Write(phrases[15])
w.Write(forum_frags[32])
if tmpl_forum_vars.CurrentUser.Perms.CreateTopic {
w.Write(forum_frags[33])
w.Write(phrases[28])
w.Write(phrases[16])
w.Write(forum_frags[34])
w.Write([]byte(tmpl_forum_vars.CurrentUser.Avatar))
w.Write(forum_frags[35])
w.Write(phrases[29])
w.Write(phrases[17])
w.Write(forum_frags[36])
w.Write(phrases[30])
w.Write(phrases[18])
w.Write(forum_frags[37])
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Forum.ID)))
w.Write(forum_frags[38])
w.Write(phrases[31])
w.Write(phrases[19])
w.Write(forum_frags[39])
w.Write(phrases[32])
w.Write(phrases[20])
w.Write(forum_frags[40])
w.Write(phrases[33])
w.Write(phrases[21])
w.Write(forum_frags[41])
w.Write(phrases[34])
w.Write(phrases[22])
w.Write(forum_frags[42])
if tmpl_forum_vars.CurrentUser.Perms.UploadFiles {
w.Write(forum_frags[43])
w.Write(phrases[35])
w.Write(phrases[23])
w.Write(forum_frags[44])
}
w.Write(forum_frags[45])
w.Write(phrases[36])
w.Write(phrases[24])
w.Write(forum_frags[46])
}
}
w.Write(forum_frags[47])
w.Write(phrases[37])
w.Write(phrases[25])
w.Write(forum_frags[48])
if len(tmpl_forum_vars.ItemList) != 0 {
for _, item := range tmpl_forum_vars.ItemList {
@ -299,12 +252,12 @@ w.Write([]byte(item.Creator.Name))
w.Write(forum_frags[63])
if item.IsClosed {
w.Write(forum_frags[64])
w.Write(phrases[38])
w.Write(phrases[26])
w.Write(forum_frags[65])
}
if item.Sticky {
w.Write(forum_frags[66])
w.Write(phrases[39])
w.Write(phrases[27])
w.Write(forum_frags[67])
}
w.Write(forum_frags[68])
@ -339,12 +292,12 @@ w.Write(forum_frags[81])
}
} else {
w.Write(forum_frags[82])
w.Write(phrases[40])
w.Write(phrases[28])
if tmpl_forum_vars.CurrentUser.Perms.CreateTopic {
w.Write(forum_frags[83])
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Forum.ID)))
w.Write(forum_frags[84])
w.Write(phrases[41])
w.Write(phrases[29])
w.Write(forum_frags[85])
}
w.Write(forum_frags[86])
@ -356,9 +309,9 @@ if tmpl_forum_vars.Page > 1 {
w.Write(paginator_frags[1])
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page - 1)))
w.Write(paginator_frags[2])
w.Write(phrases[42])
w.Write(phrases[30])
w.Write(paginator_frags[3])
w.Write(phrases[43])
w.Write(phrases[31])
w.Write(paginator_frags[4])
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page - 1)))
w.Write(paginator_frags[5])
@ -378,9 +331,9 @@ w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page + 1)))
w.Write(paginator_frags[10])
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page + 1)))
w.Write(paginator_frags[11])
w.Write(phrases[44])
w.Write(phrases[32])
w.Write(paginator_frags[12])
w.Write(phrases[45])
w.Write(phrases[33])
w.Write(paginator_frags[13])
}
w.Write(paginator_frags[14])
@ -389,11 +342,11 @@ w.Write(forum_frags[88])
w.Write(footer_frags[0])
w.Write([]byte(common.BuildWidget("footer",tmpl_forum_vars.Header)))
w.Write(footer_frags[1])
w.Write(phrases[46])
w.Write(phrases[34])
w.Write(footer_frags[2])
w.Write(phrases[47])
w.Write(phrases[35])
w.Write(footer_frags[3])
w.Write(phrases[48])
w.Write(phrases[36])
w.Write(footer_frags[4])
if len(tmpl_forum_vars.Header.Themes) != 0 {
for _, item := range tmpl_forum_vars.Header.Themes {

View File

@ -3,8 +3,8 @@
// 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 "io"
import "./common"
import "io"
var forums_tmpl_phrase_id int
@ -15,18 +15,6 @@ func init() {
common.TmplPtrMap["forums"] = &common.Template_forums_handle
common.TmplPtrMap["o_forums"] = Template_forums
forums_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
"menu_account_aria",
"menu_account_tooltip",
"menu_profile_aria",
"menu_profile_tooltip",
"menu_panel_aria",
"menu_panel_tooltip",
"menu_logout_aria",
"menu_logout_tooltip",
"menu_register_aria",
"menu_register_tooltip",
"menu_login_aria",
"menu_login_tooltip",
"menu_hamburger_tooltip",
"forums_head",
"forums_no_description",
@ -78,65 +66,30 @@ if !tmpl_forums_vars.CurrentUser.IsSuperMod {
w.Write(header_frags[15])
}
w.Write(header_frags[16])
w.Write(menu_frags[0])
w.Write([]byte(common.BuildWidget("leftOfNav",tmpl_forums_vars.Header)))
w.Write(menu_frags[1])
w.Write([]byte(tmpl_forums_vars.Header.Site.ShortName))
w.Write(menu_frags[2])
w.Write([]byte(common.BuildWidget("topMenu",tmpl_forums_vars.Header)))
if tmpl_forums_vars.CurrentUser.Loggedin {
w.Write(menu_frags[3])
w.Write(phrases[0])
w.Write(menu_frags[4])
w.Write(phrases[1])
w.Write(menu_frags[5])
w.Write([]byte(tmpl_forums_vars.CurrentUser.Link))
w.Write(menu_frags[6])
w.Write(phrases[2])
w.Write(menu_frags[7])
w.Write(phrases[3])
w.Write(menu_frags[8])
w.Write(phrases[4])
w.Write(menu_frags[9])
w.Write(phrases[5])
w.Write(menu_frags[10])
w.Write([]byte(tmpl_forums_vars.CurrentUser.Session))
w.Write(menu_frags[11])
w.Write(phrases[6])
w.Write(menu_frags[12])
w.Write(phrases[7])
w.Write(menu_frags[13])
} else {
w.Write(menu_frags[14])
w.Write(phrases[8])
w.Write(menu_frags[15])
w.Write(phrases[9])
w.Write(menu_frags[16])
w.Write(phrases[10])
w.Write(menu_frags[17])
w.Write(phrases[11])
w.Write(menu_frags[18])
}
w.Write(menu_frags[19])
w.Write(phrases[12])
w.Write(menu_frags[20])
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_forums_vars.Header)))
w.Write(menu_frags[21])
w.Write(header_frags[17])
if tmpl_forums_vars.Header.Widgets.RightSidebar != "" {
w.Write([]byte(tmpl_forums_vars.Header.Site.ShortName))
w.Write(header_frags[18])
}
w.Write([]byte(common.BuildWidget("topMenu",tmpl_forums_vars.Header)))
w.Write(header_frags[19])
w.Write(phrases[0])
w.Write(header_frags[20])
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_forums_vars.Header)))
w.Write(header_frags[21])
if tmpl_forums_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_frags[22])
}
w.Write(header_frags[23])
if len(tmpl_forums_vars.Header.NoticeList) != 0 {
for _, item := range tmpl_forums_vars.Header.NoticeList {
w.Write(header_frags[20])
w.Write(header_frags[24])
w.Write([]byte(item))
w.Write(header_frags[21])
w.Write(header_frags[25])
}
}
w.Write(header_frags[22])
w.Write(header_frags[26])
w.Write(forums_frags[0])
w.Write(phrases[13])
w.Write(phrases[1])
w.Write(forums_frags[1])
if len(tmpl_forums_vars.ItemList) != 0 {
for _, item := range tmpl_forums_vars.ItemList {
@ -155,7 +108,7 @@ w.Write([]byte(item.Desc))
w.Write(forums_frags[8])
} else {
w.Write(forums_frags[9])
w.Write(phrases[14])
w.Write(phrases[2])
w.Write(forums_frags[10])
}
w.Write(forums_frags[11])
@ -174,7 +127,7 @@ w.Write(forums_frags[17])
if item.LastTopic.Title != "" {
w.Write([]byte(item.LastTopic.Title))
} else {
w.Write(phrases[15])
w.Write(phrases[3])
}
w.Write(forums_frags[18])
if item.LastTopicTime != "" {
@ -186,18 +139,18 @@ w.Write(forums_frags[21])
}
} else {
w.Write(forums_frags[22])
w.Write(phrases[16])
w.Write(phrases[4])
w.Write(forums_frags[23])
}
w.Write(forums_frags[24])
w.Write(footer_frags[0])
w.Write([]byte(common.BuildWidget("footer",tmpl_forums_vars.Header)))
w.Write(footer_frags[1])
w.Write(phrases[17])
w.Write(phrases[5])
w.Write(footer_frags[2])
w.Write(phrases[18])
w.Write(phrases[6])
w.Write(footer_frags[3])
w.Write(phrases[19])
w.Write(phrases[7])
w.Write(footer_frags[4])
if len(tmpl_forums_vars.Header.Themes) != 0 {
for _, item := range tmpl_forums_vars.Header.Themes {

View File

@ -14,18 +14,6 @@ var guilds_guild_list_tmpl_phrase_id int
func init() {
common.TmplPtrMap["o_guilds_guild_list"] = Template_guilds_guild_list
guilds_guild_list_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
"menu_account_aria",
"menu_account_tooltip",
"menu_profile_aria",
"menu_profile_tooltip",
"menu_panel_aria",
"menu_panel_tooltip",
"menu_logout_aria",
"menu_logout_tooltip",
"menu_register_aria",
"menu_register_tooltip",
"menu_login_aria",
"menu_login_tooltip",
"menu_hamburger_tooltip",
"footer_powered_by",
"footer_made_with_love",
@ -73,63 +61,28 @@ if !tmpl_guilds_guild_list_vars.CurrentUser.IsSuperMod {
w.Write(header_frags[15])
}
w.Write(header_frags[16])
w.Write(menu_frags[0])
w.Write([]byte(common.BuildWidget("leftOfNav",tmpl_guilds_guild_list_vars.Header)))
w.Write(menu_frags[1])
w.Write([]byte(tmpl_guilds_guild_list_vars.Header.Site.ShortName))
w.Write(menu_frags[2])
w.Write([]byte(common.BuildWidget("topMenu",tmpl_guilds_guild_list_vars.Header)))
if tmpl_guilds_guild_list_vars.CurrentUser.Loggedin {
w.Write(menu_frags[3])
w.Write(phrases[0])
w.Write(menu_frags[4])
w.Write(phrases[1])
w.Write(menu_frags[5])
w.Write([]byte(tmpl_guilds_guild_list_vars.CurrentUser.Link))
w.Write(menu_frags[6])
w.Write(phrases[2])
w.Write(menu_frags[7])
w.Write(phrases[3])
w.Write(menu_frags[8])
w.Write(phrases[4])
w.Write(menu_frags[9])
w.Write(phrases[5])
w.Write(menu_frags[10])
w.Write([]byte(tmpl_guilds_guild_list_vars.CurrentUser.Session))
w.Write(menu_frags[11])
w.Write(phrases[6])
w.Write(menu_frags[12])
w.Write(phrases[7])
w.Write(menu_frags[13])
} else {
w.Write(menu_frags[14])
w.Write(phrases[8])
w.Write(menu_frags[15])
w.Write(phrases[9])
w.Write(menu_frags[16])
w.Write(phrases[10])
w.Write(menu_frags[17])
w.Write(phrases[11])
w.Write(menu_frags[18])
}
w.Write(menu_frags[19])
w.Write(phrases[12])
w.Write(menu_frags[20])
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_guilds_guild_list_vars.Header)))
w.Write(menu_frags[21])
w.Write(header_frags[17])
if tmpl_guilds_guild_list_vars.Header.Widgets.RightSidebar != "" {
w.Write([]byte(tmpl_guilds_guild_list_vars.Header.Site.ShortName))
w.Write(header_frags[18])
}
w.Write([]byte(common.BuildWidget("topMenu",tmpl_guilds_guild_list_vars.Header)))
w.Write(header_frags[19])
w.Write(phrases[0])
w.Write(header_frags[20])
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_guilds_guild_list_vars.Header)))
w.Write(header_frags[21])
if tmpl_guilds_guild_list_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_frags[22])
}
w.Write(header_frags[23])
if len(tmpl_guilds_guild_list_vars.Header.NoticeList) != 0 {
for _, item := range tmpl_guilds_guild_list_vars.Header.NoticeList {
w.Write(header_frags[20])
w.Write(header_frags[24])
w.Write([]byte(item))
w.Write(header_frags[21])
w.Write(header_frags[25])
}
}
w.Write(header_frags[22])
w.Write(header_frags[26])
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 {
@ -152,11 +105,11 @@ 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_frags[1])
w.Write(phrases[13])
w.Write(phrases[1])
w.Write(footer_frags[2])
w.Write(phrases[14])
w.Write(phrases[2])
w.Write(footer_frags[3])
w.Write(phrases[15])
w.Write(phrases[3])
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 {

View File

@ -3,8 +3,8 @@
// 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 "io"
import "./common"
import "io"
var ip_search_tmpl_phrase_id int
@ -15,18 +15,6 @@ func init() {
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{
"menu_account_aria",
"menu_account_tooltip",
"menu_profile_aria",
"menu_profile_tooltip",
"menu_panel_aria",
"menu_panel_tooltip",
"menu_logout_aria",
"menu_logout_tooltip",
"menu_register_aria",
"menu_register_tooltip",
"menu_login_aria",
"menu_login_tooltip",
"menu_hamburger_tooltip",
"ip_search_head",
"ip_search_search_button",
@ -77,65 +65,30 @@ if !tmpl_ip_search_vars.CurrentUser.IsSuperMod {
w.Write(header_frags[15])
}
w.Write(header_frags[16])
w.Write(menu_frags[0])
w.Write([]byte(common.BuildWidget("leftOfNav",tmpl_ip_search_vars.Header)))
w.Write(menu_frags[1])
w.Write([]byte(tmpl_ip_search_vars.Header.Site.ShortName))
w.Write(menu_frags[2])
w.Write([]byte(common.BuildWidget("topMenu",tmpl_ip_search_vars.Header)))
if tmpl_ip_search_vars.CurrentUser.Loggedin {
w.Write(menu_frags[3])
w.Write(phrases[0])
w.Write(menu_frags[4])
w.Write(phrases[1])
w.Write(menu_frags[5])
w.Write([]byte(tmpl_ip_search_vars.CurrentUser.Link))
w.Write(menu_frags[6])
w.Write(phrases[2])
w.Write(menu_frags[7])
w.Write(phrases[3])
w.Write(menu_frags[8])
w.Write(phrases[4])
w.Write(menu_frags[9])
w.Write(phrases[5])
w.Write(menu_frags[10])
w.Write([]byte(tmpl_ip_search_vars.CurrentUser.Session))
w.Write(menu_frags[11])
w.Write(phrases[6])
w.Write(menu_frags[12])
w.Write(phrases[7])
w.Write(menu_frags[13])
} else {
w.Write(menu_frags[14])
w.Write(phrases[8])
w.Write(menu_frags[15])
w.Write(phrases[9])
w.Write(menu_frags[16])
w.Write(phrases[10])
w.Write(menu_frags[17])
w.Write(phrases[11])
w.Write(menu_frags[18])
}
w.Write(menu_frags[19])
w.Write(phrases[12])
w.Write(menu_frags[20])
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_ip_search_vars.Header)))
w.Write(menu_frags[21])
w.Write(header_frags[17])
if tmpl_ip_search_vars.Header.Widgets.RightSidebar != "" {
w.Write([]byte(tmpl_ip_search_vars.Header.Site.ShortName))
w.Write(header_frags[18])
}
w.Write([]byte(common.BuildWidget("topMenu",tmpl_ip_search_vars.Header)))
w.Write(header_frags[19])
w.Write(phrases[0])
w.Write(header_frags[20])
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_ip_search_vars.Header)))
w.Write(header_frags[21])
if tmpl_ip_search_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_frags[22])
}
w.Write(header_frags[23])
if len(tmpl_ip_search_vars.Header.NoticeList) != 0 {
for _, item := range tmpl_ip_search_vars.Header.NoticeList {
w.Write(header_frags[20])
w.Write(header_frags[24])
w.Write([]byte(item))
w.Write(header_frags[21])
w.Write(header_frags[25])
}
}
w.Write(header_frags[22])
w.Write(header_frags[26])
w.Write(ip_search_frags[0])
w.Write(phrases[13])
w.Write(phrases[1])
w.Write(ip_search_frags[1])
if tmpl_ip_search_vars.IP != "" {
w.Write(ip_search_frags[2])
@ -143,7 +96,7 @@ w.Write([]byte(tmpl_ip_search_vars.IP))
w.Write(ip_search_frags[3])
}
w.Write(ip_search_frags[4])
w.Write(phrases[14])
w.Write(phrases[2])
w.Write(ip_search_frags[5])
if tmpl_ip_search_vars.IP != "" {
w.Write(ip_search_frags[6])
@ -163,7 +116,7 @@ w.Write(ip_search_frags[12])
}
} else {
w.Write(ip_search_frags[13])
w.Write(phrases[15])
w.Write(phrases[3])
w.Write(ip_search_frags[14])
}
@ -173,11 +126,11 @@ 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_frags[1])
w.Write(phrases[16])
w.Write(phrases[4])
w.Write(footer_frags[2])
w.Write(phrases[17])
w.Write(phrases[5])
w.Write(footer_frags[3])
w.Write(phrases[18])
w.Write(phrases[6])
w.Write(footer_frags[4])
if len(tmpl_ip_search_vars.Header.Themes) != 0 {
for _, item := range tmpl_ip_search_vars.Header.Themes {

View File

@ -1,21 +1,20 @@
package main
var paginator_frags = make([][]byte,16)
var register_frags = make([][]byte,9)
var topic_alt_frags = make([][]byte,200)
var profile_comments_row_frags = make([][]byte,51)
var topics_frags = make([][]byte,98)
var error_frags = make([][]byte,4)
var guilds_guild_list_frags = make([][]byte,10)
var topic_frags = make([][]byte,199)
var forums_frags = make([][]byte,26)
var topics_frags = make([][]byte,98)
var register_frags = make([][]byte,9)
var header_frags = make([][]byte,28)
var topic_frags = make([][]byte,199)
var topic_alt_frags = make([][]byte,200)
var login_frags = make([][]byte,8)
var error_frags = make([][]byte,4)
var footer_frags = make([][]byte,13)
var profile_comments_row_frags = make([][]byte,51)
var paginator_frags = make([][]byte,16)
var profile_frags = make([][]byte,50)
var forum_frags = make([][]byte,90)
var login_frags = make([][]byte,8)
var ip_search_frags = make([][]byte,18)
var menu_frags = make([][]byte,23)
var footer_frags = make([][]byte,13)
var header_frags = make([][]byte,24)
// nolint
func init() {
@ -55,64 +54,38 @@ header_frags[13] = []byte(`" />`)
header_frags[14] = []byte(`
</head>
<body>
<style>`)
header_frags[15] = []byte(`.supermod_only { display: none !important; }`)
header_frags[16] = []byte(`</style>
`)
header_frags[15] = []byte(`<style>.supermod_only { display: none !important; }</style>`)
header_frags[16] = []byte(`
<div class="container">
`)
menu_frags[0] = []byte(`<div class="left_of_nav">`)
menu_frags[1] = []byte(`</div>
<nav class="nav">
<div class="move_left">
<div class="move_right">
<ul>
<li id="menu_overview" class="menu_left"><a href="/" rel="home">`)
menu_frags[2] = []byte(`</a></li>
`)
menu_frags[3] = []byte(`
<li class="menu_left menu_account"><a href="/user/edit/critical/" aria-label="`)
menu_frags[4] = []byte(`" title="`)
menu_frags[5] = []byte(`"></a></li>
<li class="menu_left menu_profile"><a href="`)
menu_frags[6] = []byte(`" aria-label="`)
menu_frags[7] = []byte(`" title="`)
menu_frags[8] = []byte(`"></a></li>
<li class="menu_left menu_panel menu_account supermod_only"><a href="/panel/" aria-label="`)
menu_frags[9] = []byte(`" title="`)
menu_frags[10] = []byte(`"></a></li>
<li class="menu_left menu_logout"><a href="/accounts/logout/?session=`)
menu_frags[11] = []byte(`" aria-label="`)
menu_frags[12] = []byte(`" title="`)
menu_frags[13] = []byte(`"></a></li>
`)
menu_frags[14] = []byte(`
<li class="menu_left menu_register"><a href="/accounts/create/" aria-label="`)
menu_frags[15] = []byte(`" title="`)
menu_frags[16] = []byte(`"></a></li>
<li class="menu_left menu_login"><a href="/accounts/login/" aria-label="`)
menu_frags[17] = []byte(`" title="`)
menu_frags[18] = []byte(`"></a></li>
`)
menu_frags[19] = []byte(`
<li class="menu_left menu_hamburger" title="`)
menu_frags[20] = []byte(`"><a></a></li>
</ul>
</div>
</div>
<div style="clear: both;"></div>
</nav>
<div class="right_of_nav">`)
menu_frags[21] = []byte(`</div>`)
header_frags[17] = []byte(`
<div id="back"><div id="main" `)
header_frags[18] = []byte(`class="shrink_main"`)
header_frags[19] = []byte(`>
<div class="alertbox">`)
header_frags[20] = []byte(`
<div class="alert">`)
header_frags[21] = []byte(`</div>`)
header_frags[22] = []byte(`
</div>
<div class="left_of_nav">`)
header_frags[17] = []byte(`</div>
<nav class="nav">
<div class="move_left">
<div class="move_right">
<ul>
<li id="menu_overview" class="menu_left"><a href="/" rel="home">`)
header_frags[18] = []byte(`</a></li>
`)
header_frags[19] = []byte(`
<li class="menu_left menu_hamburger" title="`)
header_frags[20] = []byte(`"><a></a></li>
</ul>
</div>
</div>
<div style="clear: both;"></div>
</nav>
<div class="right_of_nav">`)
header_frags[21] = []byte(`</div>
<div id="back"><div id="main" `)
header_frags[22] = []byte(`class="shrink_main"`)
header_frags[23] = []byte(`>
<div class="alertbox">`)
header_frags[24] = []byte(`
<div class="alert">`)
header_frags[25] = []byte(`</div>`)
header_frags[26] = []byte(`
</div>
`)
topic_frags[0] = []byte(`

View File

@ -15,18 +15,6 @@ func init() {
common.TmplPtrMap["login"] = &common.Template_login_handle
common.TmplPtrMap["o_login"] = Template_login
login_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
"menu_account_aria",
"menu_account_tooltip",
"menu_profile_aria",
"menu_profile_tooltip",
"menu_panel_aria",
"menu_panel_tooltip",
"menu_logout_aria",
"menu_logout_tooltip",
"menu_register_aria",
"menu_register_tooltip",
"menu_login_aria",
"menu_login_tooltip",
"menu_hamburger_tooltip",
"login_head",
"login_account_name",
@ -80,84 +68,49 @@ if !tmpl_login_vars.CurrentUser.IsSuperMod {
w.Write(header_frags[15])
}
w.Write(header_frags[16])
w.Write(menu_frags[0])
w.Write([]byte(common.BuildWidget("leftOfNav",tmpl_login_vars.Header)))
w.Write(menu_frags[1])
w.Write([]byte(tmpl_login_vars.Header.Site.ShortName))
w.Write(menu_frags[2])
w.Write([]byte(common.BuildWidget("topMenu",tmpl_login_vars.Header)))
if tmpl_login_vars.CurrentUser.Loggedin {
w.Write(menu_frags[3])
w.Write(phrases[0])
w.Write(menu_frags[4])
w.Write(phrases[1])
w.Write(menu_frags[5])
w.Write([]byte(tmpl_login_vars.CurrentUser.Link))
w.Write(menu_frags[6])
w.Write(phrases[2])
w.Write(menu_frags[7])
w.Write(phrases[3])
w.Write(menu_frags[8])
w.Write(phrases[4])
w.Write(menu_frags[9])
w.Write(phrases[5])
w.Write(menu_frags[10])
w.Write([]byte(tmpl_login_vars.CurrentUser.Session))
w.Write(menu_frags[11])
w.Write(phrases[6])
w.Write(menu_frags[12])
w.Write(phrases[7])
w.Write(menu_frags[13])
} else {
w.Write(menu_frags[14])
w.Write(phrases[8])
w.Write(menu_frags[15])
w.Write(phrases[9])
w.Write(menu_frags[16])
w.Write(phrases[10])
w.Write(menu_frags[17])
w.Write(phrases[11])
w.Write(menu_frags[18])
}
w.Write(menu_frags[19])
w.Write(phrases[12])
w.Write(menu_frags[20])
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_login_vars.Header)))
w.Write(menu_frags[21])
w.Write(header_frags[17])
if tmpl_login_vars.Header.Widgets.RightSidebar != "" {
w.Write([]byte(tmpl_login_vars.Header.Site.ShortName))
w.Write(header_frags[18])
}
w.Write([]byte(common.BuildWidget("topMenu",tmpl_login_vars.Header)))
w.Write(header_frags[19])
w.Write(phrases[0])
w.Write(header_frags[20])
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_login_vars.Header)))
w.Write(header_frags[21])
if tmpl_login_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_frags[22])
}
w.Write(header_frags[23])
if len(tmpl_login_vars.Header.NoticeList) != 0 {
for _, item := range tmpl_login_vars.Header.NoticeList {
w.Write(header_frags[20])
w.Write(header_frags[24])
w.Write([]byte(item))
w.Write(header_frags[21])
w.Write(header_frags[25])
}
}
w.Write(header_frags[22])
w.Write(header_frags[26])
w.Write(login_frags[0])
w.Write(phrases[13])
w.Write(phrases[1])
w.Write(login_frags[1])
w.Write(phrases[14])
w.Write(phrases[2])
w.Write(login_frags[2])
w.Write(phrases[15])
w.Write(phrases[3])
w.Write(login_frags[3])
w.Write(phrases[16])
w.Write(phrases[4])
w.Write(login_frags[4])
w.Write(phrases[17])
w.Write(phrases[5])
w.Write(login_frags[5])
w.Write(phrases[18])
w.Write(phrases[6])
w.Write(login_frags[6])
w.Write(footer_frags[0])
w.Write([]byte(common.BuildWidget("footer",tmpl_login_vars.Header)))
w.Write(footer_frags[1])
w.Write(phrases[19])
w.Write(phrases[7])
w.Write(footer_frags[2])
w.Write(phrases[20])
w.Write(phrases[8])
w.Write(footer_frags[3])
w.Write(phrases[21])
w.Write(phrases[9])
w.Write(footer_frags[4])
if len(tmpl_login_vars.Header.Themes) != 0 {
for _, item := range tmpl_login_vars.Header.Themes {

View File

@ -16,18 +16,6 @@ func init() {
common.TmplPtrMap["profile"] = &common.Template_profile_handle
common.TmplPtrMap["o_profile"] = Template_profile
profile_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
"menu_account_aria",
"menu_account_tooltip",
"menu_profile_aria",
"menu_profile_tooltip",
"menu_panel_aria",
"menu_panel_tooltip",
"menu_logout_aria",
"menu_logout_tooltip",
"menu_register_aria",
"menu_register_tooltip",
"menu_login_aria",
"menu_login_tooltip",
"menu_hamburger_tooltip",
"profile_login_for_options",
"profile_add_friend",
@ -103,63 +91,28 @@ if !tmpl_profile_vars.CurrentUser.IsSuperMod {
w.Write(header_frags[15])
}
w.Write(header_frags[16])
w.Write(menu_frags[0])
w.Write([]byte(common.BuildWidget("leftOfNav",tmpl_profile_vars.Header)))
w.Write(menu_frags[1])
w.Write([]byte(tmpl_profile_vars.Header.Site.ShortName))
w.Write(menu_frags[2])
w.Write([]byte(common.BuildWidget("topMenu",tmpl_profile_vars.Header)))
if tmpl_profile_vars.CurrentUser.Loggedin {
w.Write(menu_frags[3])
w.Write(phrases[0])
w.Write(menu_frags[4])
w.Write(phrases[1])
w.Write(menu_frags[5])
w.Write([]byte(tmpl_profile_vars.CurrentUser.Link))
w.Write(menu_frags[6])
w.Write(phrases[2])
w.Write(menu_frags[7])
w.Write(phrases[3])
w.Write(menu_frags[8])
w.Write(phrases[4])
w.Write(menu_frags[9])
w.Write(phrases[5])
w.Write(menu_frags[10])
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(menu_frags[11])
w.Write(phrases[6])
w.Write(menu_frags[12])
w.Write(phrases[7])
w.Write(menu_frags[13])
} else {
w.Write(menu_frags[14])
w.Write(phrases[8])
w.Write(menu_frags[15])
w.Write(phrases[9])
w.Write(menu_frags[16])
w.Write(phrases[10])
w.Write(menu_frags[17])
w.Write(phrases[11])
w.Write(menu_frags[18])
}
w.Write(menu_frags[19])
w.Write(phrases[12])
w.Write(menu_frags[20])
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_profile_vars.Header)))
w.Write(menu_frags[21])
w.Write(header_frags[17])
if tmpl_profile_vars.Header.Widgets.RightSidebar != "" {
w.Write([]byte(tmpl_profile_vars.Header.Site.ShortName))
w.Write(header_frags[18])
}
w.Write([]byte(common.BuildWidget("topMenu",tmpl_profile_vars.Header)))
w.Write(header_frags[19])
w.Write(phrases[0])
w.Write(header_frags[20])
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_profile_vars.Header)))
w.Write(header_frags[21])
if tmpl_profile_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_frags[22])
}
w.Write(header_frags[23])
if len(tmpl_profile_vars.Header.NoticeList) != 0 {
for _, item := range tmpl_profile_vars.Header.NoticeList {
w.Write(header_frags[20])
w.Write(header_frags[24])
w.Write([]byte(item))
w.Write(header_frags[21])
w.Write(header_frags[25])
}
}
w.Write(header_frags[22])
w.Write(header_frags[26])
w.Write(profile_frags[0])
w.Write([]byte(tmpl_profile_vars.ProfileOwner.Avatar))
w.Write(profile_frags[1])
@ -181,11 +134,11 @@ w.Write(profile_frags[8])
w.Write(profile_frags[9])
if !tmpl_profile_vars.CurrentUser.Loggedin {
w.Write(profile_frags[10])
w.Write(phrases[13])
w.Write(phrases[1])
w.Write(profile_frags[11])
} else {
w.Write(profile_frags[12])
w.Write(phrases[14])
w.Write(phrases[2])
w.Write(profile_frags[13])
if tmpl_profile_vars.CurrentUser.IsSuperMod && !tmpl_profile_vars.ProfileOwner.IsSuperMod {
w.Write(profile_frags[14])
@ -195,11 +148,11 @@ w.Write([]byte(strconv.Itoa(tmpl_profile_vars.ProfileOwner.ID)))
w.Write(profile_frags[16])
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_frags[17])
w.Write(phrases[15])
w.Write(phrases[3])
w.Write(profile_frags[18])
} else {
w.Write(profile_frags[19])
w.Write(phrases[16])
w.Write(phrases[4])
w.Write(profile_frags[20])
}
w.Write(profile_frags[21])
@ -209,36 +162,36 @@ w.Write([]byte(strconv.Itoa(tmpl_profile_vars.ProfileOwner.ID)))
w.Write(profile_frags[23])
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_frags[24])
w.Write(phrases[17])
w.Write(phrases[5])
w.Write(profile_frags[25])
w.Write(phrases[18])
w.Write(phrases[6])
w.Write(profile_frags[26])
}
w.Write(profile_frags[27])
if tmpl_profile_vars.CurrentUser.Perms.BanUsers {
w.Write(profile_frags[28])
w.Write(phrases[19])
w.Write(phrases[7])
w.Write(profile_frags[29])
w.Write([]byte(strconv.Itoa(tmpl_profile_vars.ProfileOwner.ID)))
w.Write(profile_frags[30])
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_frags[31])
w.Write(profile_frags[32])
w.Write(phrases[20])
w.Write(phrases[8])
w.Write(profile_frags[33])
w.Write(phrases[21])
w.Write(phrases[9])
w.Write(profile_frags[34])
w.Write(phrases[22])
w.Write(phrases[10])
w.Write(profile_frags[35])
w.Write(phrases[23])
w.Write(phrases[11])
w.Write(profile_frags[36])
w.Write(phrases[24])
w.Write(phrases[12])
w.Write(profile_frags[37])
w.Write(phrases[25])
w.Write(phrases[13])
w.Write(profile_frags[38])
}
w.Write(profile_frags[39])
w.Write(phrases[26])
w.Write(phrases[14])
w.Write(profile_frags[40])
if tmpl_profile_vars.Header.Theme.BgAvatars {
if len(tmpl_profile_vars.ItemList) != 0 {
@ -264,17 +217,17 @@ w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(profile_comments_row_frags[9])
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_comments_row_frags[10])
w.Write(phrases[27])
w.Write(phrases[15])
w.Write(profile_comments_row_frags[11])
w.Write(phrases[28])
w.Write(phrases[16])
w.Write(profile_comments_row_frags[12])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(profile_comments_row_frags[13])
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_comments_row_frags[14])
w.Write(phrases[29])
w.Write(phrases[17])
w.Write(profile_comments_row_frags[15])
w.Write(phrases[30])
w.Write(phrases[18])
w.Write(profile_comments_row_frags[16])
}
w.Write(profile_comments_row_frags[17])
@ -282,9 +235,9 @@ w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(profile_comments_row_frags[18])
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_comments_row_frags[19])
w.Write(phrases[31])
w.Write(phrases[19])
w.Write(profile_comments_row_frags[20])
w.Write(phrases[32])
w.Write(phrases[20])
w.Write(profile_comments_row_frags[21])
if item.Tag != "" {
w.Write(profile_comments_row_frags[22])
@ -322,17 +275,17 @@ w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(profile_comments_row_frags[36])
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_comments_row_frags[37])
w.Write(phrases[33])
w.Write(phrases[21])
w.Write(profile_comments_row_frags[38])
w.Write(phrases[34])
w.Write(phrases[22])
w.Write(profile_comments_row_frags[39])
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(profile_comments_row_frags[40])
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_comments_row_frags[41])
w.Write(phrases[35])
w.Write(phrases[23])
w.Write(profile_comments_row_frags[42])
w.Write(phrases[36])
w.Write(phrases[24])
w.Write(profile_comments_row_frags[43])
}
w.Write(profile_comments_row_frags[44])
@ -340,9 +293,9 @@ w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(profile_comments_row_frags[45])
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_comments_row_frags[46])
w.Write(phrases[37])
w.Write(phrases[25])
w.Write(profile_comments_row_frags[47])
w.Write(phrases[38])
w.Write(phrases[26])
w.Write(profile_comments_row_frags[48])
w.Write([]byte(item.ContentHtml))
w.Write(profile_comments_row_frags[49])
@ -356,9 +309,9 @@ w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_frags[43])
w.Write([]byte(strconv.Itoa(tmpl_profile_vars.ProfileOwner.ID)))
w.Write(profile_frags[44])
w.Write(phrases[39])
w.Write(phrases[27])
w.Write(profile_frags[45])
w.Write(phrases[40])
w.Write(phrases[28])
w.Write(profile_frags[46])
}
w.Write(profile_frags[47])
@ -366,11 +319,11 @@ w.Write(profile_frags[48])
w.Write(footer_frags[0])
w.Write([]byte(common.BuildWidget("footer",tmpl_profile_vars.Header)))
w.Write(footer_frags[1])
w.Write(phrases[41])
w.Write(phrases[29])
w.Write(footer_frags[2])
w.Write(phrases[42])
w.Write(phrases[30])
w.Write(footer_frags[3])
w.Write(phrases[43])
w.Write(phrases[31])
w.Write(footer_frags[4])
if len(tmpl_profile_vars.Header.Themes) != 0 {
for _, item := range tmpl_profile_vars.Header.Themes {

View File

@ -15,18 +15,6 @@ func init() {
common.TmplPtrMap["register"] = &common.Template_register_handle
common.TmplPtrMap["o_register"] = Template_register
register_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
"menu_account_aria",
"menu_account_tooltip",
"menu_profile_aria",
"menu_profile_tooltip",
"menu_panel_aria",
"menu_panel_tooltip",
"menu_logout_aria",
"menu_logout_tooltip",
"menu_register_aria",
"menu_register_tooltip",
"menu_login_aria",
"menu_login_tooltip",
"menu_hamburger_tooltip",
"register_head",
"register_account_name",
@ -81,86 +69,51 @@ if !tmpl_register_vars.CurrentUser.IsSuperMod {
w.Write(header_frags[15])
}
w.Write(header_frags[16])
w.Write(menu_frags[0])
w.Write([]byte(common.BuildWidget("leftOfNav",tmpl_register_vars.Header)))
w.Write(menu_frags[1])
w.Write([]byte(tmpl_register_vars.Header.Site.ShortName))
w.Write(menu_frags[2])
w.Write([]byte(common.BuildWidget("topMenu",tmpl_register_vars.Header)))
if tmpl_register_vars.CurrentUser.Loggedin {
w.Write(menu_frags[3])
w.Write(phrases[0])
w.Write(menu_frags[4])
w.Write(phrases[1])
w.Write(menu_frags[5])
w.Write([]byte(tmpl_register_vars.CurrentUser.Link))
w.Write(menu_frags[6])
w.Write(phrases[2])
w.Write(menu_frags[7])
w.Write(phrases[3])
w.Write(menu_frags[8])
w.Write(phrases[4])
w.Write(menu_frags[9])
w.Write(phrases[5])
w.Write(menu_frags[10])
w.Write([]byte(tmpl_register_vars.CurrentUser.Session))
w.Write(menu_frags[11])
w.Write(phrases[6])
w.Write(menu_frags[12])
w.Write(phrases[7])
w.Write(menu_frags[13])
} else {
w.Write(menu_frags[14])
w.Write(phrases[8])
w.Write(menu_frags[15])
w.Write(phrases[9])
w.Write(menu_frags[16])
w.Write(phrases[10])
w.Write(menu_frags[17])
w.Write(phrases[11])
w.Write(menu_frags[18])
}
w.Write(menu_frags[19])
w.Write(phrases[12])
w.Write(menu_frags[20])
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_register_vars.Header)))
w.Write(menu_frags[21])
w.Write(header_frags[17])
if tmpl_register_vars.Header.Widgets.RightSidebar != "" {
w.Write([]byte(tmpl_register_vars.Header.Site.ShortName))
w.Write(header_frags[18])
}
w.Write([]byte(common.BuildWidget("topMenu",tmpl_register_vars.Header)))
w.Write(header_frags[19])
w.Write(phrases[0])
w.Write(header_frags[20])
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_register_vars.Header)))
w.Write(header_frags[21])
if tmpl_register_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_frags[22])
}
w.Write(header_frags[23])
if len(tmpl_register_vars.Header.NoticeList) != 0 {
for _, item := range tmpl_register_vars.Header.NoticeList {
w.Write(header_frags[20])
w.Write(header_frags[24])
w.Write([]byte(item))
w.Write(header_frags[21])
w.Write(header_frags[25])
}
}
w.Write(header_frags[22])
w.Write(header_frags[26])
w.Write(register_frags[0])
w.Write(phrases[13])
w.Write(phrases[1])
w.Write(register_frags[1])
w.Write(phrases[14])
w.Write(phrases[2])
w.Write(register_frags[2])
w.Write(phrases[15])
w.Write(phrases[3])
w.Write(register_frags[3])
w.Write(phrases[16])
w.Write(phrases[4])
w.Write(register_frags[4])
w.Write(phrases[17])
w.Write(phrases[5])
w.Write(register_frags[5])
w.Write(phrases[18])
w.Write(phrases[6])
w.Write(register_frags[6])
w.Write(phrases[19])
w.Write(phrases[7])
w.Write(register_frags[7])
w.Write(footer_frags[0])
w.Write([]byte(common.BuildWidget("footer",tmpl_register_vars.Header)))
w.Write(footer_frags[1])
w.Write(phrases[20])
w.Write(phrases[8])
w.Write(footer_frags[2])
w.Write(phrases[21])
w.Write(phrases[9])
w.Write(footer_frags[3])
w.Write(phrases[22])
w.Write(phrases[10])
w.Write(footer_frags[4])
if len(tmpl_register_vars.Header.Themes) != 0 {
for _, item := range tmpl_register_vars.Header.Themes {

View File

@ -16,18 +16,6 @@ func init() {
common.TmplPtrMap["topic"] = &common.Template_topic_handle
common.TmplPtrMap["o_topic"] = Template_topic
topic_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
"menu_account_aria",
"menu_account_tooltip",
"menu_profile_aria",
"menu_profile_tooltip",
"menu_panel_aria",
"menu_panel_tooltip",
"menu_logout_aria",
"menu_logout_tooltip",
"menu_register_aria",
"menu_register_tooltip",
"menu_login_aria",
"menu_login_tooltip",
"menu_hamburger_tooltip",
"paginator_prev_page_aria",
"paginator_less_than",
@ -134,63 +122,28 @@ if !tmpl_topic_vars.CurrentUser.IsSuperMod {
w.Write(header_frags[15])
}
w.Write(header_frags[16])
w.Write(menu_frags[0])
w.Write([]byte(common.BuildWidget("leftOfNav",tmpl_topic_vars.Header)))
w.Write(menu_frags[1])
w.Write([]byte(tmpl_topic_vars.Header.Site.ShortName))
w.Write(menu_frags[2])
w.Write([]byte(common.BuildWidget("topMenu",tmpl_topic_vars.Header)))
if tmpl_topic_vars.CurrentUser.Loggedin {
w.Write(menu_frags[3])
w.Write(phrases[0])
w.Write(menu_frags[4])
w.Write(phrases[1])
w.Write(menu_frags[5])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Link))
w.Write(menu_frags[6])
w.Write(phrases[2])
w.Write(menu_frags[7])
w.Write(phrases[3])
w.Write(menu_frags[8])
w.Write(phrases[4])
w.Write(menu_frags[9])
w.Write(phrases[5])
w.Write(menu_frags[10])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(menu_frags[11])
w.Write(phrases[6])
w.Write(menu_frags[12])
w.Write(phrases[7])
w.Write(menu_frags[13])
} else {
w.Write(menu_frags[14])
w.Write(phrases[8])
w.Write(menu_frags[15])
w.Write(phrases[9])
w.Write(menu_frags[16])
w.Write(phrases[10])
w.Write(menu_frags[17])
w.Write(phrases[11])
w.Write(menu_frags[18])
}
w.Write(menu_frags[19])
w.Write(phrases[12])
w.Write(menu_frags[20])
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_topic_vars.Header)))
w.Write(menu_frags[21])
w.Write(header_frags[17])
if tmpl_topic_vars.Header.Widgets.RightSidebar != "" {
w.Write([]byte(tmpl_topic_vars.Header.Site.ShortName))
w.Write(header_frags[18])
}
w.Write([]byte(common.BuildWidget("topMenu",tmpl_topic_vars.Header)))
w.Write(header_frags[19])
w.Write(phrases[0])
w.Write(header_frags[20])
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_topic_vars.Header)))
w.Write(header_frags[21])
if tmpl_topic_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_frags[22])
}
w.Write(header_frags[23])
if len(tmpl_topic_vars.Header.NoticeList) != 0 {
for _, item := range tmpl_topic_vars.Header.NoticeList {
w.Write(header_frags[20])
w.Write(header_frags[24])
w.Write([]byte(item))
w.Write(header_frags[21])
w.Write(header_frags[25])
}
}
w.Write(header_frags[22])
w.Write(header_frags[26])
w.Write(topic_frags[0])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_frags[1])
@ -202,13 +155,13 @@ w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_frags[4])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Page - 1)))
w.Write(topic_frags[5])
w.Write(phrases[13])
w.Write(phrases[1])
w.Write(topic_frags[6])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_frags[7])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Page - 1)))
w.Write(topic_frags[8])
w.Write(phrases[14])
w.Write(phrases[2])
w.Write(topic_frags[9])
}
if tmpl_topic_vars.LastPage != tmpl_topic_vars.Page {
@ -217,18 +170,18 @@ w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_frags[11])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Page + 1)))
w.Write(topic_frags[12])
w.Write(phrases[15])
w.Write(phrases[3])
w.Write(topic_frags[13])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_frags[14])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Page + 1)))
w.Write(topic_frags[15])
w.Write(phrases[16])
w.Write(phrases[4])
w.Write(topic_frags[16])
}
w.Write(topic_frags[17])
w.Write(topic_frags[18])
w.Write(phrases[17])
w.Write(phrases[5])
w.Write(topic_frags[19])
if tmpl_topic_vars.Topic.Sticky {
w.Write(topic_frags[20])
@ -244,24 +197,24 @@ w.Write([]byte(tmpl_topic_vars.Topic.Title))
w.Write(topic_frags[24])
if tmpl_topic_vars.Topic.IsClosed {
w.Write(topic_frags[25])
w.Write(phrases[18])
w.Write(phrases[6])
w.Write(topic_frags[26])
w.Write(phrases[19])
w.Write(phrases[7])
w.Write(topic_frags[27])
}
if tmpl_topic_vars.CurrentUser.Perms.EditTopic {
w.Write(topic_frags[28])
w.Write([]byte(tmpl_topic_vars.Topic.Title))
w.Write(topic_frags[29])
w.Write(phrases[20])
w.Write(phrases[8])
w.Write(topic_frags[30])
w.Write(phrases[21])
w.Write(phrases[9])
w.Write(topic_frags[31])
}
w.Write(topic_frags[32])
if tmpl_topic_vars.Poll.ID > 0 {
w.Write(topic_frags[33])
w.Write(phrases[22])
w.Write(phrases[10])
w.Write(topic_frags[34])
w.Write([]byte(tmpl_topic_vars.Topic.ClassName))
w.Write(topic_frags[35])
@ -293,20 +246,20 @@ w.Write(topic_frags[46])
w.Write(topic_frags[47])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Poll.ID)))
w.Write(topic_frags[48])
w.Write(phrases[23])
w.Write(phrases[11])
w.Write(topic_frags[49])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Poll.ID)))
w.Write(topic_frags[50])
w.Write(phrases[24])
w.Write(phrases[12])
w.Write(topic_frags[51])
w.Write(phrases[25])
w.Write(phrases[13])
w.Write(topic_frags[52])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Poll.ID)))
w.Write(topic_frags[53])
}
w.Write(topic_frags[54])
w.Write(topic_frags[55])
w.Write(phrases[26])
w.Write(phrases[14])
w.Write(topic_frags[56])
w.Write([]byte(tmpl_topic_vars.Topic.ClassName))
w.Write(topic_frags[57])
@ -326,7 +279,7 @@ if tmpl_topic_vars.Topic.LikeCount > 0 {
w.Write(topic_frags[64])
}
w.Write(topic_frags[65])
w.Write(phrases[27])
w.Write(phrases[15])
w.Write(topic_frags[66])
w.Write([]byte(tmpl_topic_vars.Topic.UserLink))
w.Write(topic_frags[67])
@ -340,15 +293,15 @@ w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_frags[71])
if tmpl_topic_vars.Topic.Liked {
w.Write(topic_frags[72])
w.Write(phrases[28])
w.Write(phrases[16])
w.Write(topic_frags[73])
w.Write(phrases[29])
w.Write(phrases[17])
w.Write(topic_frags[74])
} else {
w.Write(topic_frags[75])
w.Write(phrases[30])
w.Write(phrases[18])
w.Write(topic_frags[76])
w.Write(phrases[31])
w.Write(phrases[19])
w.Write(topic_frags[77])
}
w.Write(topic_frags[78])
@ -363,9 +316,9 @@ if tmpl_topic_vars.CurrentUser.Perms.EditTopic {
w.Write(topic_frags[82])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_frags[83])
w.Write(phrases[32])
w.Write(phrases[20])
w.Write(topic_frags[84])
w.Write(phrases[33])
w.Write(phrases[21])
w.Write(topic_frags[85])
}
if tmpl_topic_vars.CurrentUser.Perms.DeleteTopic {
@ -374,9 +327,9 @@ w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_frags[87])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_frags[88])
w.Write(phrases[34])
w.Write(phrases[22])
w.Write(topic_frags[89])
w.Write(phrases[35])
w.Write(phrases[23])
w.Write(topic_frags[90])
}
if tmpl_topic_vars.CurrentUser.Perms.CloseTopic {
@ -386,9 +339,9 @@ w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_frags[92])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_frags[93])
w.Write(phrases[36])
w.Write(phrases[24])
w.Write(topic_frags[94])
w.Write(phrases[37])
w.Write(phrases[25])
w.Write(topic_frags[95])
} else {
w.Write(topic_frags[96])
@ -396,9 +349,9 @@ w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_frags[97])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_frags[98])
w.Write(phrases[38])
w.Write(phrases[26])
w.Write(topic_frags[99])
w.Write(phrases[39])
w.Write(phrases[27])
w.Write(topic_frags[100])
}
}
@ -409,9 +362,9 @@ w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_frags[102])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_frags[103])
w.Write(phrases[40])
w.Write(phrases[28])
w.Write(topic_frags[104])
w.Write(phrases[41])
w.Write(phrases[29])
w.Write(topic_frags[105])
} else {
w.Write(topic_frags[106])
@ -419,9 +372,9 @@ w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_frags[107])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_frags[108])
w.Write(phrases[42])
w.Write(phrases[30])
w.Write(topic_frags[109])
w.Write(phrases[43])
w.Write(phrases[31])
w.Write(topic_frags[110])
}
}
@ -429,7 +382,7 @@ if tmpl_topic_vars.CurrentUser.Perms.ViewIPs {
w.Write(topic_frags[111])
w.Write([]byte(tmpl_topic_vars.Topic.IPAddress))
w.Write(topic_frags[112])
w.Write(phrases[44])
w.Write(phrases[32])
w.Write(topic_frags[113])
w.Write([]byte(tmpl_topic_vars.Topic.IPAddress))
w.Write(topic_frags[114])
@ -439,15 +392,15 @@ w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_frags[116])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_frags[117])
w.Write(phrases[45])
w.Write(phrases[33])
w.Write(topic_frags[118])
w.Write(phrases[46])
w.Write(phrases[34])
w.Write(topic_frags[119])
w.Write(phrases[47])
w.Write(phrases[35])
w.Write(topic_frags[120])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.LikeCount)))
w.Write(topic_frags[121])
w.Write(phrases[48])
w.Write(phrases[36])
w.Write(topic_frags[122])
if tmpl_topic_vars.Topic.Tag != "" {
w.Write(topic_frags[123])
@ -455,15 +408,15 @@ w.Write([]byte(tmpl_topic_vars.Topic.Tag))
w.Write(topic_frags[124])
} else {
w.Write(topic_frags[125])
w.Write(phrases[49])
w.Write(phrases[37])
w.Write(topic_frags[126])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.Level)))
w.Write(topic_frags[127])
w.Write(phrases[50])
w.Write(phrases[38])
w.Write(topic_frags[128])
}
w.Write(topic_frags[129])
w.Write(phrases[51])
w.Write(phrases[39])
w.Write(topic_frags[130])
if len(tmpl_topic_vars.ItemList) != 0 {
for _, item := range tmpl_topic_vars.ItemList {
@ -504,9 +457,9 @@ w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_frags[148])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_frags[149])
w.Write(phrases[52])
w.Write(phrases[40])
w.Write(topic_frags[150])
w.Write(phrases[53])
w.Write(phrases[41])
w.Write(topic_frags[151])
} else {
w.Write(topic_frags[152])
@ -514,9 +467,9 @@ w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_frags[153])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_frags[154])
w.Write(phrases[54])
w.Write(phrases[42])
w.Write(topic_frags[155])
w.Write(phrases[55])
w.Write(phrases[43])
w.Write(topic_frags[156])
}
}
@ -526,9 +479,9 @@ w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_frags[158])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_frags[159])
w.Write(phrases[56])
w.Write(phrases[44])
w.Write(topic_frags[160])
w.Write(phrases[57])
w.Write(phrases[45])
w.Write(topic_frags[161])
}
if tmpl_topic_vars.CurrentUser.Perms.DeleteReply {
@ -537,16 +490,16 @@ w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_frags[163])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_frags[164])
w.Write(phrases[58])
w.Write(phrases[46])
w.Write(topic_frags[165])
w.Write(phrases[59])
w.Write(phrases[47])
w.Write(topic_frags[166])
}
if tmpl_topic_vars.CurrentUser.Perms.ViewIPs {
w.Write(topic_frags[167])
w.Write([]byte(item.IPAddress))
w.Write(topic_frags[168])
w.Write(phrases[60])
w.Write(phrases[48])
w.Write(topic_frags[169])
w.Write([]byte(item.IPAddress))
w.Write(topic_frags[170])
@ -556,13 +509,13 @@ w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_frags[172])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_frags[173])
w.Write(phrases[61])
w.Write(phrases[49])
w.Write(topic_frags[174])
w.Write(phrases[62])
w.Write(phrases[50])
w.Write(topic_frags[175])
w.Write([]byte(strconv.Itoa(item.LikeCount)))
w.Write(topic_frags[176])
w.Write(phrases[63])
w.Write(phrases[51])
w.Write(topic_frags[177])
if item.Tag != "" {
w.Write(topic_frags[178])
@ -570,11 +523,11 @@ w.Write([]byte(item.Tag))
w.Write(topic_frags[179])
} else {
w.Write(topic_frags[180])
w.Write(phrases[64])
w.Write(phrases[52])
w.Write(topic_frags[181])
w.Write([]byte(strconv.Itoa(item.Level)))
w.Write(topic_frags[182])
w.Write(phrases[65])
w.Write(phrases[53])
w.Write(topic_frags[183])
}
w.Write(topic_frags[184])
@ -584,23 +537,23 @@ w.Write(topic_frags[184])
w.Write(topic_frags[185])
if tmpl_topic_vars.CurrentUser.Perms.CreateReply {
w.Write(topic_frags[186])
w.Write(phrases[66])
w.Write(phrases[54])
w.Write(topic_frags[187])
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_frags[188])
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_frags[189])
w.Write(phrases[67])
w.Write(phrases[55])
w.Write(topic_frags[190])
w.Write(phrases[68])
w.Write(phrases[56])
w.Write(topic_frags[191])
w.Write(phrases[69])
w.Write(phrases[57])
w.Write(topic_frags[192])
w.Write(phrases[70])
w.Write(phrases[58])
w.Write(topic_frags[193])
if tmpl_topic_vars.CurrentUser.Perms.UploadFiles {
w.Write(topic_frags[194])
w.Write(phrases[71])
w.Write(phrases[59])
w.Write(topic_frags[195])
}
w.Write(topic_frags[196])
@ -609,11 +562,11 @@ w.Write(topic_frags[197])
w.Write(footer_frags[0])
w.Write([]byte(common.BuildWidget("footer",tmpl_topic_vars.Header)))
w.Write(footer_frags[1])
w.Write(phrases[72])
w.Write(phrases[60])
w.Write(footer_frags[2])
w.Write(phrases[73])
w.Write(phrases[61])
w.Write(footer_frags[3])
w.Write(phrases[74])
w.Write(phrases[62])
w.Write(footer_frags[4])
if len(tmpl_topic_vars.Header.Themes) != 0 {
for _, item := range tmpl_topic_vars.Header.Themes {

View File

@ -3,9 +3,9 @@
// 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 "strconv"
import "io"
import "./common"
import "strconv"
var topic_alt_tmpl_phrase_id int
@ -16,18 +16,6 @@ func init() {
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{
"menu_account_aria",
"menu_account_tooltip",
"menu_profile_aria",
"menu_profile_tooltip",
"menu_panel_aria",
"menu_panel_tooltip",
"menu_logout_aria",
"menu_logout_tooltip",
"menu_register_aria",
"menu_register_tooltip",
"menu_login_aria",
"menu_login_tooltip",
"menu_hamburger_tooltip",
"paginator_prev_page_aria",
"paginator_less_than",
@ -121,76 +109,41 @@ if !tmpl_topic_alt_vars.CurrentUser.IsSuperMod {
w.Write(header_frags[15])
}
w.Write(header_frags[16])
w.Write(menu_frags[0])
w.Write([]byte(common.BuildWidget("leftOfNav",tmpl_topic_alt_vars.Header)))
w.Write(menu_frags[1])
w.Write([]byte(tmpl_topic_alt_vars.Header.Site.ShortName))
w.Write(menu_frags[2])
w.Write([]byte(common.BuildWidget("topMenu",tmpl_topic_alt_vars.Header)))
if tmpl_topic_alt_vars.CurrentUser.Loggedin {
w.Write(menu_frags[3])
w.Write(phrases[0])
w.Write(menu_frags[4])
w.Write(phrases[1])
w.Write(menu_frags[5])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Link))
w.Write(menu_frags[6])
w.Write(phrases[2])
w.Write(menu_frags[7])
w.Write(phrases[3])
w.Write(menu_frags[8])
w.Write(phrases[4])
w.Write(menu_frags[9])
w.Write(phrases[5])
w.Write(menu_frags[10])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(menu_frags[11])
w.Write(phrases[6])
w.Write(menu_frags[12])
w.Write(phrases[7])
w.Write(menu_frags[13])
} else {
w.Write(menu_frags[14])
w.Write(phrases[8])
w.Write(menu_frags[15])
w.Write(phrases[9])
w.Write(menu_frags[16])
w.Write(phrases[10])
w.Write(menu_frags[17])
w.Write(phrases[11])
w.Write(menu_frags[18])
}
w.Write(menu_frags[19])
w.Write(phrases[12])
w.Write(menu_frags[20])
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_topic_alt_vars.Header)))
w.Write(menu_frags[21])
w.Write(header_frags[17])
if tmpl_topic_alt_vars.Header.Widgets.RightSidebar != "" {
w.Write([]byte(tmpl_topic_alt_vars.Header.Site.ShortName))
w.Write(header_frags[18])
}
w.Write([]byte(common.BuildWidget("topMenu",tmpl_topic_alt_vars.Header)))
w.Write(header_frags[19])
w.Write(phrases[0])
w.Write(header_frags[20])
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_topic_alt_vars.Header)))
w.Write(header_frags[21])
if tmpl_topic_alt_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_frags[22])
}
w.Write(header_frags[23])
if len(tmpl_topic_alt_vars.Header.NoticeList) != 0 {
for _, item := range tmpl_topic_alt_vars.Header.NoticeList {
w.Write(header_frags[20])
w.Write(header_frags[24])
w.Write([]byte(item))
w.Write(header_frags[21])
w.Write(header_frags[25])
}
}
w.Write(header_frags[22])
w.Write(header_frags[26])
if tmpl_topic_alt_vars.Page > 1 {
w.Write(topic_alt_frags[0])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_frags[1])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Page - 1)))
w.Write(topic_alt_frags[2])
w.Write(phrases[13])
w.Write(phrases[1])
w.Write(topic_alt_frags[3])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_frags[4])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Page - 1)))
w.Write(topic_alt_frags[5])
w.Write(phrases[14])
w.Write(phrases[2])
w.Write(topic_alt_frags[6])
}
if tmpl_topic_alt_vars.LastPage != tmpl_topic_alt_vars.Page {
@ -199,18 +152,18 @@ w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_frags[8])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Page + 1)))
w.Write(topic_alt_frags[9])
w.Write(phrases[15])
w.Write(phrases[3])
w.Write(topic_alt_frags[10])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_frags[11])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Page + 1)))
w.Write(topic_alt_frags[12])
w.Write(phrases[16])
w.Write(phrases[4])
w.Write(topic_alt_frags[13])
}
w.Write(topic_alt_frags[14])
w.Write(topic_alt_frags[15])
w.Write(phrases[17])
w.Write(phrases[5])
w.Write(topic_alt_frags[16])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_frags[17])
@ -230,18 +183,18 @@ w.Write([]byte(tmpl_topic_alt_vars.Topic.Title))
w.Write(topic_alt_frags[23])
if tmpl_topic_alt_vars.Topic.IsClosed {
w.Write(topic_alt_frags[24])
w.Write(phrases[18])
w.Write(phrases[6])
w.Write(topic_alt_frags[25])
w.Write(phrases[19])
w.Write(phrases[7])
w.Write(topic_alt_frags[26])
}
if tmpl_topic_alt_vars.CurrentUser.Perms.EditTopic {
w.Write(topic_alt_frags[27])
w.Write([]byte(tmpl_topic_alt_vars.Topic.Title))
w.Write(topic_alt_frags[28])
w.Write(phrases[20])
w.Write(phrases[8])
w.Write(topic_alt_frags[29])
w.Write(phrases[21])
w.Write(phrases[9])
w.Write(topic_alt_frags[30])
}
w.Write(topic_alt_frags[31])
@ -253,7 +206,7 @@ w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID)))
w.Write(topic_alt_frags[34])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_frags[35])
w.Write(phrases[22])
w.Write(phrases[10])
w.Write(topic_alt_frags[36])
w.Write([]byte(tmpl_topic_alt_vars.Topic.Avatar))
w.Write(topic_alt_frags[37])
@ -267,7 +220,7 @@ w.Write([]byte(tmpl_topic_alt_vars.Topic.Tag))
w.Write(topic_alt_frags[41])
} else {
w.Write(topic_alt_frags[42])
w.Write(phrases[23])
w.Write(phrases[11])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.Level)))
w.Write(topic_alt_frags[43])
}
@ -294,22 +247,22 @@ w.Write(topic_alt_frags[52])
w.Write(topic_alt_frags[53])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID)))
w.Write(topic_alt_frags[54])
w.Write(phrases[24])
w.Write(phrases[12])
w.Write(topic_alt_frags[55])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID)))
w.Write(topic_alt_frags[56])
w.Write(phrases[25])
w.Write(phrases[13])
w.Write(topic_alt_frags[57])
w.Write(phrases[26])
w.Write(phrases[14])
w.Write(topic_alt_frags[58])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID)))
w.Write(topic_alt_frags[59])
}
w.Write(topic_alt_frags[60])
w.Write(topic_alt_frags[61])
w.Write(phrases[27])
w.Write(phrases[15])
w.Write(topic_alt_frags[62])
w.Write(phrases[28])
w.Write(phrases[16])
w.Write(topic_alt_frags[63])
w.Write([]byte(tmpl_topic_alt_vars.Topic.Avatar))
w.Write(topic_alt_frags[64])
@ -323,7 +276,7 @@ w.Write([]byte(tmpl_topic_alt_vars.Topic.Tag))
w.Write(topic_alt_frags[68])
} else {
w.Write(topic_alt_frags[69])
w.Write(phrases[29])
w.Write(phrases[17])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.Level)))
w.Write(topic_alt_frags[70])
}
@ -349,14 +302,14 @@ w.Write(topic_alt_frags[79])
w.Write(topic_alt_frags[80])
}
w.Write(topic_alt_frags[81])
w.Write(phrases[30])
w.Write(phrases[18])
w.Write(topic_alt_frags[82])
}
if tmpl_topic_alt_vars.CurrentUser.Perms.EditTopic {
w.Write(topic_alt_frags[83])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_frags[84])
w.Write(phrases[31])
w.Write(phrases[19])
w.Write(topic_alt_frags[85])
}
if tmpl_topic_alt_vars.CurrentUser.Perms.DeleteTopic {
@ -365,7 +318,7 @@ w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_frags[87])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_frags[88])
w.Write(phrases[32])
w.Write(phrases[20])
w.Write(topic_alt_frags[89])
}
if tmpl_topic_alt_vars.CurrentUser.Perms.CloseTopic {
@ -375,7 +328,7 @@ w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_frags[91])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_frags[92])
w.Write(phrases[33])
w.Write(phrases[21])
w.Write(topic_alt_frags[93])
} else {
w.Write(topic_alt_frags[94])
@ -383,7 +336,7 @@ w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_frags[95])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_frags[96])
w.Write(phrases[34])
w.Write(phrases[22])
w.Write(topic_alt_frags[97])
}
}
@ -394,7 +347,7 @@ w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_frags[99])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_frags[100])
w.Write(phrases[35])
w.Write(phrases[23])
w.Write(topic_alt_frags[101])
} else {
w.Write(topic_alt_frags[102])
@ -402,7 +355,7 @@ w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_frags[103])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_frags[104])
w.Write(phrases[36])
w.Write(phrases[24])
w.Write(topic_alt_frags[105])
}
}
@ -410,9 +363,9 @@ if tmpl_topic_alt_vars.CurrentUser.Perms.ViewIPs {
w.Write(topic_alt_frags[106])
w.Write([]byte(tmpl_topic_alt_vars.Topic.IPAddress))
w.Write(topic_alt_frags[107])
w.Write(phrases[37])
w.Write(phrases[25])
w.Write(topic_alt_frags[108])
w.Write(phrases[38])
w.Write(phrases[26])
w.Write(topic_alt_frags[109])
}
w.Write(topic_alt_frags[110])
@ -420,11 +373,11 @@ w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_frags[111])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_frags[112])
w.Write(phrases[39])
w.Write(phrases[27])
w.Write(topic_alt_frags[113])
}
w.Write(topic_alt_frags[114])
w.Write(phrases[40])
w.Write(phrases[28])
w.Write(topic_alt_frags[115])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.LikeCount)))
w.Write(topic_alt_frags[116])
@ -434,7 +387,7 @@ if tmpl_topic_alt_vars.CurrentUser.Perms.ViewIPs {
w.Write(topic_alt_frags[118])
w.Write([]byte(tmpl_topic_alt_vars.Topic.IPAddress))
w.Write(topic_alt_frags[119])
w.Write(phrases[41])
w.Write(phrases[29])
w.Write(topic_alt_frags[120])
w.Write([]byte(tmpl_topic_alt_vars.Topic.IPAddress))
w.Write(topic_alt_frags[121])
@ -448,7 +401,7 @@ if item.ActionType != "" {
w.Write(topic_alt_frags[125])
}
w.Write(topic_alt_frags[126])
w.Write(phrases[42])
w.Write(phrases[30])
w.Write(topic_alt_frags[127])
w.Write([]byte(item.Avatar))
w.Write(topic_alt_frags[128])
@ -462,7 +415,7 @@ w.Write([]byte(item.Tag))
w.Write(topic_alt_frags[132])
} else {
w.Write(topic_alt_frags[133])
w.Write(phrases[43])
w.Write(phrases[31])
w.Write([]byte(strconv.Itoa(item.Level)))
w.Write(topic_alt_frags[134])
}
@ -498,7 +451,7 @@ w.Write(topic_alt_frags[148])
w.Write(topic_alt_frags[149])
}
w.Write(topic_alt_frags[150])
w.Write(phrases[44])
w.Write(phrases[32])
w.Write(topic_alt_frags[151])
}
if tmpl_topic_alt_vars.CurrentUser.Perms.EditReply {
@ -507,7 +460,7 @@ w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_alt_frags[153])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_frags[154])
w.Write(phrases[45])
w.Write(phrases[33])
w.Write(topic_alt_frags[155])
}
if tmpl_topic_alt_vars.CurrentUser.Perms.DeleteReply {
@ -516,16 +469,16 @@ w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_alt_frags[157])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_frags[158])
w.Write(phrases[46])
w.Write(phrases[34])
w.Write(topic_alt_frags[159])
}
if tmpl_topic_alt_vars.CurrentUser.Perms.ViewIPs {
w.Write(topic_alt_frags[160])
w.Write([]byte(item.IPAddress))
w.Write(topic_alt_frags[161])
w.Write(phrases[47])
w.Write(phrases[35])
w.Write(topic_alt_frags[162])
w.Write(phrases[48])
w.Write(phrases[36])
w.Write(topic_alt_frags[163])
}
w.Write(topic_alt_frags[164])
@ -533,11 +486,11 @@ w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_alt_frags[165])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_frags[166])
w.Write(phrases[49])
w.Write(phrases[37])
w.Write(topic_alt_frags[167])
}
w.Write(topic_alt_frags[168])
w.Write(phrases[50])
w.Write(phrases[38])
w.Write(topic_alt_frags[169])
w.Write([]byte(strconv.Itoa(item.LikeCount)))
w.Write(topic_alt_frags[170])
@ -558,7 +511,7 @@ w.Write(topic_alt_frags[176])
w.Write(topic_alt_frags[177])
if tmpl_topic_alt_vars.CurrentUser.Perms.CreateReply {
w.Write(topic_alt_frags[178])
w.Write(phrases[51])
w.Write(phrases[39])
w.Write(topic_alt_frags[179])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Avatar))
w.Write(topic_alt_frags[180])
@ -572,28 +525,28 @@ w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Tag))
w.Write(topic_alt_frags[184])
} else {
w.Write(topic_alt_frags[185])
w.Write(phrases[52])
w.Write(phrases[40])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.CurrentUser.Level)))
w.Write(topic_alt_frags[186])
}
w.Write(topic_alt_frags[187])
w.Write(phrases[53])
w.Write(phrases[41])
w.Write(topic_alt_frags[188])
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_frags[189])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_frags[190])
w.Write(phrases[54])
w.Write(phrases[42])
w.Write(topic_alt_frags[191])
w.Write(phrases[55])
w.Write(phrases[43])
w.Write(topic_alt_frags[192])
w.Write(phrases[56])
w.Write(phrases[44])
w.Write(topic_alt_frags[193])
w.Write(phrases[57])
w.Write(phrases[45])
w.Write(topic_alt_frags[194])
if tmpl_topic_alt_vars.CurrentUser.Perms.UploadFiles {
w.Write(topic_alt_frags[195])
w.Write(phrases[58])
w.Write(phrases[46])
w.Write(topic_alt_frags[196])
}
w.Write(topic_alt_frags[197])
@ -602,11 +555,11 @@ w.Write(topic_alt_frags[198])
w.Write(footer_frags[0])
w.Write([]byte(common.BuildWidget("footer",tmpl_topic_alt_vars.Header)))
w.Write(footer_frags[1])
w.Write(phrases[59])
w.Write(phrases[47])
w.Write(footer_frags[2])
w.Write(phrases[60])
w.Write(phrases[48])
w.Write(footer_frags[3])
w.Write(phrases[61])
w.Write(phrases[49])
w.Write(footer_frags[4])
if len(tmpl_topic_alt_vars.Header.Themes) != 0 {
for _, item := range tmpl_topic_alt_vars.Header.Themes {

View File

@ -3,8 +3,8 @@
// 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 "io"
import "./common"
import "io"
import "strconv"
var topics_tmpl_phrase_id int
@ -16,18 +16,6 @@ func init() {
common.TmplPtrMap["topics"] = &common.Template_topics_handle
common.TmplPtrMap["o_topics"] = Template_topics
topics_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
"menu_account_aria",
"menu_account_tooltip",
"menu_profile_aria",
"menu_profile_tooltip",
"menu_panel_aria",
"menu_panel_tooltip",
"menu_logout_aria",
"menu_logout_tooltip",
"menu_register_aria",
"menu_register_tooltip",
"menu_login_aria",
"menu_login_tooltip",
"menu_hamburger_tooltip",
"topics_head",
"topic_list_create_topic_tooltip",
@ -108,88 +96,53 @@ if !tmpl_topics_vars.CurrentUser.IsSuperMod {
w.Write(header_frags[15])
}
w.Write(header_frags[16])
w.Write(menu_frags[0])
w.Write([]byte(common.BuildWidget("leftOfNav",tmpl_topics_vars.Header)))
w.Write(menu_frags[1])
w.Write([]byte(tmpl_topics_vars.Header.Site.ShortName))
w.Write(menu_frags[2])
w.Write([]byte(common.BuildWidget("topMenu",tmpl_topics_vars.Header)))
if tmpl_topics_vars.CurrentUser.Loggedin {
w.Write(menu_frags[3])
w.Write(phrases[0])
w.Write(menu_frags[4])
w.Write(phrases[1])
w.Write(menu_frags[5])
w.Write([]byte(tmpl_topics_vars.CurrentUser.Link))
w.Write(menu_frags[6])
w.Write(phrases[2])
w.Write(menu_frags[7])
w.Write(phrases[3])
w.Write(menu_frags[8])
w.Write(phrases[4])
w.Write(menu_frags[9])
w.Write(phrases[5])
w.Write(menu_frags[10])
w.Write([]byte(tmpl_topics_vars.CurrentUser.Session))
w.Write(menu_frags[11])
w.Write(phrases[6])
w.Write(menu_frags[12])
w.Write(phrases[7])
w.Write(menu_frags[13])
} else {
w.Write(menu_frags[14])
w.Write(phrases[8])
w.Write(menu_frags[15])
w.Write(phrases[9])
w.Write(menu_frags[16])
w.Write(phrases[10])
w.Write(menu_frags[17])
w.Write(phrases[11])
w.Write(menu_frags[18])
}
w.Write(menu_frags[19])
w.Write(phrases[12])
w.Write(menu_frags[20])
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_topics_vars.Header)))
w.Write(menu_frags[21])
w.Write(header_frags[17])
if tmpl_topics_vars.Header.Widgets.RightSidebar != "" {
w.Write([]byte(tmpl_topics_vars.Header.Site.ShortName))
w.Write(header_frags[18])
}
w.Write([]byte(common.BuildWidget("topMenu",tmpl_topics_vars.Header)))
w.Write(header_frags[19])
w.Write(phrases[0])
w.Write(header_frags[20])
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_topics_vars.Header)))
w.Write(header_frags[21])
if tmpl_topics_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_frags[22])
}
w.Write(header_frags[23])
if len(tmpl_topics_vars.Header.NoticeList) != 0 {
for _, item := range tmpl_topics_vars.Header.NoticeList {
w.Write(header_frags[20])
w.Write(header_frags[24])
w.Write([]byte(item))
w.Write(header_frags[21])
w.Write(header_frags[25])
}
}
w.Write(header_frags[22])
w.Write(header_frags[26])
w.Write(topics_frags[0])
if tmpl_topics_vars.CurrentUser.ID != 0 {
w.Write(topics_frags[1])
}
w.Write(topics_frags[2])
w.Write(phrases[13])
w.Write(phrases[1])
w.Write(topics_frags[3])
if tmpl_topics_vars.CurrentUser.ID != 0 {
w.Write(topics_frags[4])
if len(tmpl_topics_vars.ForumList) != 0 {
w.Write(topics_frags[5])
w.Write(phrases[14])
w.Write(phrases[2])
w.Write(topics_frags[6])
w.Write(phrases[15])
w.Write(phrases[3])
w.Write(topics_frags[7])
w.Write(topics_frags[8])
w.Write(phrases[16])
w.Write(phrases[4])
w.Write(topics_frags[9])
w.Write(phrases[17])
w.Write(phrases[5])
w.Write(topics_frags[10])
} else {
w.Write(topics_frags[11])
w.Write(phrases[18])
w.Write(phrases[6])
w.Write(topics_frags[12])
w.Write(phrases[19])
w.Write(phrases[7])
w.Write(topics_frags[13])
}
w.Write(topics_frags[14])
@ -197,21 +150,21 @@ w.Write(topics_frags[14])
w.Write(topics_frags[15])
if tmpl_topics_vars.CurrentUser.ID != 0 {
w.Write(topics_frags[16])
w.Write(phrases[20])
w.Write(phrases[8])
w.Write(topics_frags[17])
w.Write(phrases[21])
w.Write(phrases[9])
w.Write(topics_frags[18])
w.Write(phrases[22])
w.Write(phrases[10])
w.Write(topics_frags[19])
w.Write(phrases[23])
w.Write(phrases[11])
w.Write(topics_frags[20])
w.Write(phrases[24])
w.Write(phrases[12])
w.Write(topics_frags[21])
if len(tmpl_topics_vars.ForumList) != 0 {
w.Write(topics_frags[22])
w.Write([]byte(tmpl_topics_vars.CurrentUser.Session))
w.Write(topics_frags[23])
w.Write(phrases[25])
w.Write(phrases[13])
w.Write(topics_frags[24])
if len(tmpl_topics_vars.ForumList) != 0 {
for _, item := range tmpl_topics_vars.ForumList {
@ -225,17 +178,17 @@ w.Write(topics_frags[28])
}
}
w.Write(topics_frags[29])
w.Write(phrases[26])
w.Write(phrases[14])
w.Write(topics_frags[30])
w.Write(phrases[27])
w.Write(phrases[15])
w.Write(topics_frags[31])
w.Write([]byte(tmpl_topics_vars.CurrentUser.Session))
w.Write(topics_frags[32])
w.Write([]byte(tmpl_topics_vars.CurrentUser.Avatar))
w.Write(topics_frags[33])
w.Write(phrases[28])
w.Write(phrases[16])
w.Write(topics_frags[34])
w.Write(phrases[29])
w.Write(phrases[17])
w.Write(topics_frags[35])
if len(tmpl_topics_vars.ForumList) != 0 {
for _, item := range tmpl_topics_vars.ForumList {
@ -251,28 +204,28 @@ w.Write(topics_frags[40])
}
}
w.Write(topics_frags[41])
w.Write(phrases[30])
w.Write(phrases[18])
w.Write(topics_frags[42])
w.Write(phrases[31])
w.Write(phrases[19])
w.Write(topics_frags[43])
w.Write(phrases[32])
w.Write(phrases[20])
w.Write(topics_frags[44])
w.Write(phrases[33])
w.Write(phrases[21])
w.Write(topics_frags[45])
w.Write(phrases[34])
w.Write(phrases[22])
w.Write(topics_frags[46])
if tmpl_topics_vars.CurrentUser.Perms.UploadFiles {
w.Write(topics_frags[47])
w.Write(phrases[35])
w.Write(phrases[23])
w.Write(topics_frags[48])
}
w.Write(topics_frags[49])
w.Write(phrases[36])
w.Write(phrases[24])
w.Write(topics_frags[50])
}
}
w.Write(topics_frags[51])
w.Write(phrases[37])
w.Write(phrases[25])
w.Write(topics_frags[52])
if len(tmpl_topics_vars.TopicList) != 0 {
for _, item := range tmpl_topics_vars.TopicList {
@ -319,12 +272,12 @@ w.Write([]byte(item.Creator.Name))
w.Write(topics_frags[72])
if item.IsClosed {
w.Write(topics_frags[73])
w.Write(phrases[38])
w.Write(phrases[26])
w.Write(topics_frags[74])
}
if item.Sticky {
w.Write(topics_frags[75])
w.Write(phrases[39])
w.Write(phrases[27])
w.Write(topics_frags[76])
}
w.Write(topics_frags[77])
@ -359,10 +312,10 @@ w.Write(topics_frags[90])
}
} else {
w.Write(topics_frags[91])
w.Write(phrases[40])
w.Write(phrases[28])
if tmpl_topics_vars.CurrentUser.Perms.CreateTopic {
w.Write(topics_frags[92])
w.Write(phrases[41])
w.Write(phrases[29])
w.Write(topics_frags[93])
}
w.Write(topics_frags[94])
@ -374,9 +327,9 @@ if tmpl_topics_vars.Page > 1 {
w.Write(paginator_frags[1])
w.Write([]byte(strconv.Itoa(tmpl_topics_vars.Page - 1)))
w.Write(paginator_frags[2])
w.Write(phrases[42])
w.Write(phrases[30])
w.Write(paginator_frags[3])
w.Write(phrases[43])
w.Write(phrases[31])
w.Write(paginator_frags[4])
w.Write([]byte(strconv.Itoa(tmpl_topics_vars.Page - 1)))
w.Write(paginator_frags[5])
@ -396,9 +349,9 @@ w.Write([]byte(strconv.Itoa(tmpl_topics_vars.Page + 1)))
w.Write(paginator_frags[10])
w.Write([]byte(strconv.Itoa(tmpl_topics_vars.Page + 1)))
w.Write(paginator_frags[11])
w.Write(phrases[44])
w.Write(phrases[32])
w.Write(paginator_frags[12])
w.Write(phrases[45])
w.Write(phrases[33])
w.Write(paginator_frags[13])
}
w.Write(paginator_frags[14])
@ -407,11 +360,11 @@ w.Write(topics_frags[96])
w.Write(footer_frags[0])
w.Write([]byte(common.BuildWidget("footer",tmpl_topics_vars.Header)))
w.Write(footer_frags[1])
w.Write(phrases[46])
w.Write(phrases[34])
w.Write(footer_frags[2])
w.Write(phrases[47])
w.Write(phrases[35])
w.Write(footer_frags[3])
w.Write(phrases[48])
w.Write(phrases[36])
w.Write(footer_frags[4])
if len(tmpl_topics_vars.Header.Themes) != 0 {
for _, item := range tmpl_topics_vars.Header.Themes {

View File

@ -20,10 +20,23 @@
{{if .Header.MetaDesc}}<meta name="description" content="{{.Header.MetaDesc}}" />{{end}}
</head>
<body>
<style>{{if not .CurrentUser.IsSuperMod}}.supermod_only { display: none !important; }{{end}}</style>
{{if not .CurrentUser.IsSuperMod}}<style>.supermod_only { display: none !important; }</style>{{end}}
<div class="container">
{{template "menu.html" .}}
<div id="back"><div id="main" {{if .Header.Widgets.RightSidebar}}class="shrink_main"{{end}}>
<div class="alertbox">{{range .Header.NoticeList}}
<div class="alert">{{.}}</div>{{end}}
</div>
<div class="left_of_nav">{{dock "leftOfNav" .Header }}</div>
<nav class="nav">
<div class="move_left">
<div class="move_right">
<ul>
<li id="menu_overview" class="menu_left"><a href="/" rel="home">{{.Header.Site.ShortName}}</a></li>
{{dock "topMenu" .Header }}
<li class="menu_left menu_hamburger" title="{{lang "menu_hamburger_tooltip"}}"><a></a></li>
</ul>
</div>
</div>
<div style="clear: both;"></div>
</nav>
<div class="right_of_nav">{{dock "rightOfNav" .Header }}</div>
<div id="back"><div id="main" {{if .Header.Widgets.RightSidebar}}class="shrink_main"{{end}}>
<div class="alertbox">{{range .Header.NoticeList}}
<div class="alert">{{.}}</div>{{end}}
</div>

View File

@ -1,23 +0,0 @@
<div class="left_of_nav">{{dock "leftOfNav" .Header }}</div>
<nav class="nav">
<div class="move_left">
<div class="move_right">
<ul>
<li id="menu_overview" class="menu_left"><a href="/" rel="home">{{.Header.Site.ShortName}}</a></li>
{{dock "topMenu" .Header }}
{{if .CurrentUser.Loggedin}}
<li class="menu_left menu_account"><a href="/user/edit/critical/" aria-label="{{lang "menu_account_aria"}}" title="{{lang "menu_account_tooltip"}}"></a></li>
<li class="menu_left menu_profile"><a href="{{.CurrentUser.Link}}" aria-label="{{lang "menu_profile_aria"}}" title="{{lang "menu_profile_tooltip"}}"></a></li>
<li class="menu_left menu_panel menu_account supermod_only"><a href="/panel/" aria-label="{{lang "menu_panel_aria"}}" title="{{lang "menu_panel_tooltip"}}"></a></li>
<li class="menu_left menu_logout"><a href="/accounts/logout/?session={{.CurrentUser.Session}}" aria-label="{{lang "menu_logout_aria"}}" title="{{lang "menu_logout_tooltip"}}"></a></li>
{{else}}
<li class="menu_left menu_register"><a href="/accounts/create/" aria-label="{{lang "menu_register_aria"}}" title="{{lang "menu_register_tooltip"}}"></a></li>
<li class="menu_left menu_login"><a href="/accounts/login/" aria-label="{{lang "menu_login_aria"}}" title="{{lang "menu_login_tooltip"}}"></a></li>
{{end}}
<li class="menu_left menu_hamburger" title="{{lang "menu_hamburger_tooltip"}}"><a></a></li>
</ul>
</div>
</div>
<div style="clear: both;"></div>
</nav>
<div class="right_of_nav">{{dock "rightOfNav" .Header }}</div>