Shadow is now fully responsive and almost done! Just a few places like the dashboard and a few glitches to patch up!
Fixed the indentation in alerts.go, Atom replaced the tabs with spaces for some reason x.x Made the friendly URL logic more flexible. Made the supermod menu item hiding more JS friendly. strconv is now an optional dependency for compiled template files. Revamped the profile template.
|
@ -136,6 +136,8 @@ We're looking for ways to clean-up the plugin system so that all of them (except
|
||||||
|
|
||||||
|
|
||||||
# Images
|
# Images
|
||||||
|
![Shadow Theme](https://github.com/Azareal/Gosora/blob/master/images/shadow.png)
|
||||||
|
|
||||||
![Tempra Simple Theme](https://github.com/Azareal/Gosora/blob/master/images/tempra-simple.png)
|
![Tempra Simple Theme](https://github.com/Azareal/Gosora/blob/master/images/tempra-simple.png)
|
||||||
|
|
||||||
![Tempra Simple Topic List](https://github.com/Azareal/Gosora/blob/master/images/topic-list.png)
|
![Tempra Simple Topic List](https://github.com/Azareal/Gosora/blob/master/images/topic-list.png)
|
||||||
|
@ -154,6 +156,8 @@ We're looking for ways to clean-up the plugin system so that all of them (except
|
||||||
|
|
||||||
![Cosmo Theme](https://github.com/Azareal/Gosora/blob/master/images/cosmo.png)
|
![Cosmo Theme](https://github.com/Azareal/Gosora/blob/master/images/cosmo.png)
|
||||||
|
|
||||||
|
More images in the /images/ folder. Beware though, some of them are *really* outdated.
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
|
||||||
* Go 1.8
|
* Go 1.8
|
||||||
|
|
11
alerts.go
|
@ -2,7 +2,6 @@ package main
|
||||||
|
|
||||||
import "log"
|
import "log"
|
||||||
import "strings"
|
import "strings"
|
||||||
import "strconv"
|
|
||||||
import "errors"
|
import "errors"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -36,7 +35,7 @@ func build_alert(event string, elementType string, actor_id int, targetUser_id i
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
if event == "friend_invite" {
|
if event == "friend_invite" {
|
||||||
return `{"msg":"You received a friend invite from {0}","sub":["` + actor.Name + `"],"path":"\/user\/`+actor.Slug+`.`+strconv.Itoa(actor.ID)+`","avatar":"`+strings.Replace(actor.Avatar,"/","\\/",-1)+`"}`, nil
|
return `{"msg":"You received a friend invite from {0}","sub":["` + actor.Name + `"],"path":"`+actor.Link+`","avatar":"`+strings.Replace(actor.Avatar,"/","\\/",-1)+`"}`, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var act, post_act, url, area string
|
var act, post_act, url, area string
|
||||||
|
@ -49,7 +48,7 @@ func build_alert(event string, elementType string, actor_id int, targetUser_id i
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", errors.New("Unable to find the linked topic")
|
return "", errors.New("Unable to find the linked topic")
|
||||||
}
|
}
|
||||||
url = build_topic_url(topic.Slug,elementID)
|
url = topic.Link
|
||||||
area = topic.Title
|
area = topic.Title
|
||||||
// Store the forum ID in the targetUser column instead of making a new one? o.O
|
// Store the forum ID in the targetUser column instead of making a new one? o.O
|
||||||
// Add an additional column for extra information later on when we add the ability to link directly to posts. We don't need the forum data for now...
|
// Add an additional column for extra information later on when we add the ability to link directly to posts. We don't need the forum data for now...
|
||||||
|
@ -61,7 +60,7 @@ func build_alert(event string, elementType string, actor_id int, targetUser_id i
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", errors.New("Unable to find the linked topic")
|
return "", errors.New("Unable to find the linked topic")
|
||||||
}
|
}
|
||||||
url = build_topic_url(topic.Slug,elementID)
|
url = topic.Link
|
||||||
area = topic.Title
|
area = topic.Title
|
||||||
|
|
||||||
if targetUser_id == user.ID {
|
if targetUser_id == user.ID {
|
||||||
|
@ -74,13 +73,13 @@ func build_alert(event string, elementType string, actor_id int, targetUser_id i
|
||||||
}
|
}
|
||||||
area = targetUser.Name
|
area = targetUser.Name
|
||||||
end_frag = "'s profile"
|
end_frag = "'s profile"
|
||||||
url = build_profile_url(targetUser.Slug,elementID)
|
url = targetUser.Link
|
||||||
case "post":
|
case "post":
|
||||||
topic, err := get_topic_by_reply(elementID)
|
topic, err := get_topic_by_reply(elementID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", errors.New("Unable to find the linked reply or parent topic")
|
return "", errors.New("Unable to find the linked reply or parent topic")
|
||||||
}
|
}
|
||||||
url = build_topic_url(topic.Slug,topic.ID)
|
url = topic.Link
|
||||||
area = topic.Title
|
area = topic.Title
|
||||||
if targetUser_id == user.ID {
|
if targetUser_id == user.ID {
|
||||||
post_act = " your post in"
|
post_act = " your post in"
|
||||||
|
|
|
@ -2,7 +2,7 @@ package main
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// Site Info
|
// Site Info
|
||||||
site.Name = "Test Site" // Should be a setting in the database
|
site.Name = "TS" // Should be a setting in the database
|
||||||
site.Email = "" // Should be a setting in the database
|
site.Email = "" // Should be a setting in the database
|
||||||
site.Url = "localhost"
|
site.Url = "localhost"
|
||||||
site.Port = "8080"
|
site.Port = "8080"
|
||||||
|
|
2
forum.go
|
@ -26,7 +26,7 @@ type Forum struct
|
||||||
ParentID int
|
ParentID int
|
||||||
ParentType string
|
ParentType string
|
||||||
TopicCount int
|
TopicCount int
|
||||||
LastTopicSlug string
|
LastTopicLink string
|
||||||
LastTopic string
|
LastTopic string
|
||||||
LastTopicID int
|
LastTopicID int
|
||||||
LastReplyer string
|
LastReplyer string
|
||||||
|
|
|
@ -97,7 +97,7 @@ func (sfs *StaticForumStore) LoadForums() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
forum.Link = build_forum_url(name_to_slug(forum.Name),forum.ID)
|
forum.Link = build_forum_url(name_to_slug(forum.Name),forum.ID)
|
||||||
forum.LastTopicSlug = build_slug(name_to_slug(forum.LastTopic),forum.LastTopicID)
|
forum.LastTopicLink = build_topic_url(name_to_slug(forum.LastTopic),forum.LastTopicID)
|
||||||
forums = append(forums,&forum)
|
forums = append(forums,&forum)
|
||||||
}
|
}
|
||||||
err = rows.Err()
|
err = rows.Err()
|
||||||
|
@ -306,7 +306,7 @@ func (sfs *StaticForumStore) CreateForum(forum_name string, forum_desc string, a
|
||||||
}
|
}
|
||||||
fid = int(fid64)
|
fid = int(fid64)
|
||||||
|
|
||||||
sfs.forums = append(sfs.forums, &Forum{fid,name_to_slug(forum_name),forum_name,forum_desc,active,preset,0,"",0,"","",0,"",0,""})
|
sfs.forums = append(sfs.forums, &Forum{fid,build_forum_url(name_to_slug(forum_name),fid),forum_name,forum_desc,active,preset,0,"",0,"","",0,"",0,""})
|
||||||
sfs.forumCapCount++
|
sfs.forumCapCount++
|
||||||
|
|
||||||
// TO-DO: Add a GroupStore. How would it interact with the ForumStore?
|
// TO-DO: Add a GroupStore. How would it interact with the ForumStore?
|
||||||
|
|
|
@ -171,16 +171,16 @@ func BenchmarkTopicsTemplateSerial(b *testing.B) {
|
||||||
admin := User{1,"admin-alice","Admin Alice","admin@localhost",0,true,true,true,true,true,false,AllPerms,make(map[string]bool),"",false,"","","","","",-1,58,"127.0.0.1"}
|
admin := User{1,"admin-alice","Admin Alice","admin@localhost",0,true,true,true,true,true,false,AllPerms,make(map[string]bool),"",false,"","","","","",-1,58,"127.0.0.1"}
|
||||||
|
|
||||||
var topicList []TopicsRow
|
var topicList []TopicsRow
|
||||||
topicList = append(topicList, TopicsRow{Title: "Hey everyone!",Content: "Hey everyone!",CreatedBy: 1,CreatedAt: "0000-00-00 00:00:00",ParentID: 1,UserSlug:"admin-alice",CreatedByName:"Admin Alice",Css: no_css_tmpl,Tag: "Admin", Level: 58, IpAddress: "127.0.0.1"})
|
topicList = append(topicList, TopicsRow{Title: "Hey everyone!",Content: "Hey everyone!",CreatedBy: 1,CreatedAt: "0000-00-00 00:00:00",ParentID: 1,UserLink:build_profile_url("admin-alice",1),CreatedByName:"Admin Alice",Css: no_css_tmpl,Tag: "Admin", Level: 58, IpAddress: "127.0.0.1"})
|
||||||
topicList = append(topicList, TopicsRow{Title: "Hey everyone!",Content: "Hey everyone!",CreatedBy: 1,CreatedAt: "0000-00-00 00:00:00",ParentID: 1,UserSlug:"admin-alice",CreatedByName:"Admin Alice",Css: no_css_tmpl,Tag: "Admin", Level: 58, IpAddress: "127.0.0.1"})
|
topicList = append(topicList, TopicsRow{Title: "Hey everyone!",Content: "Hey everyone!",CreatedBy: 1,CreatedAt: "0000-00-00 00:00:00",ParentID: 1,UserLink:build_profile_url("admin-alice",1),CreatedByName:"Admin Alice",Css: no_css_tmpl,Tag: "Admin", Level: 58, IpAddress: "127.0.0.1"})
|
||||||
topicList = append(topicList, TopicsRow{Title: "Hey everyone!",Content: "Hey everyone!",CreatedBy: 1,CreatedAt: "0000-00-00 00:00:00",ParentID: 1,UserSlug:"admin-alice",CreatedByName:"Admin Alice",Css: no_css_tmpl,Tag: "Admin", Level: 58, IpAddress: "127.0.0.1"})
|
topicList = append(topicList, TopicsRow{Title: "Hey everyone!",Content: "Hey everyone!",CreatedBy: 1,CreatedAt: "0000-00-00 00:00:00",ParentID: 1,UserLink:build_profile_url("admin-alice",1),CreatedByName:"Admin Alice",Css: no_css_tmpl,Tag: "Admin", Level: 58, IpAddress: "127.0.0.1"})
|
||||||
topicList = append(topicList, TopicsRow{Title: "Hey everyone!",Content: "Hey everyone!",CreatedBy: 1,CreatedAt: "0000-00-00 00:00:00",ParentID: 1,UserSlug:"admin-alice",CreatedByName:"Admin Alice",Css: no_css_tmpl,Tag: "Admin", Level: 58, IpAddress: "127.0.0.1"})
|
topicList = append(topicList, TopicsRow{Title: "Hey everyone!",Content: "Hey everyone!",CreatedBy: 1,CreatedAt: "0000-00-00 00:00:00",ParentID: 1,UserLink:build_profile_url("admin-alice",1),CreatedByName:"Admin Alice",Css: no_css_tmpl,Tag: "Admin", Level: 58, IpAddress: "127.0.0.1"})
|
||||||
topicList = append(topicList, TopicsRow{Title: "Hey everyone!",Content: "Hey everyone!",CreatedBy: 1,CreatedAt: "0000-00-00 00:00:00",ParentID: 1,UserSlug:"admin-alice",CreatedByName:"Admin Alice",Css: no_css_tmpl,Tag: "Admin", Level: 58, IpAddress: "127.0.0.1"})
|
topicList = append(topicList, TopicsRow{Title: "Hey everyone!",Content: "Hey everyone!",CreatedBy: 1,CreatedAt: "0000-00-00 00:00:00",ParentID: 1,UserLink:build_profile_url("admin-alice",1),CreatedByName:"Admin Alice",Css: no_css_tmpl,Tag: "Admin", Level: 58, IpAddress: "127.0.0.1"})
|
||||||
topicList = append(topicList, TopicsRow{Title: "Hey everyone!",Content: "Hey everyone!",CreatedBy: 1,CreatedAt: "0000-00-00 00:00:00",ParentID: 1,UserSlug:"admin-alice",CreatedByName:"Admin Alice",Css: no_css_tmpl,Tag: "Admin", Level: 58, IpAddress: "127.0.0.1"})
|
topicList = append(topicList, TopicsRow{Title: "Hey everyone!",Content: "Hey everyone!",CreatedBy: 1,CreatedAt: "0000-00-00 00:00:00",ParentID: 1,UserLink:build_profile_url("admin-alice",1),CreatedByName:"Admin Alice",Css: no_css_tmpl,Tag: "Admin", Level: 58, IpAddress: "127.0.0.1"})
|
||||||
topicList = append(topicList, TopicsRow{Title: "Hey everyone!",Content: "Hey everyone!",CreatedBy: 1,CreatedAt: "0000-00-00 00:00:00",ParentID: 1,UserSlug:"admin-alice",CreatedByName:"Admin Alice",Css: no_css_tmpl,Tag: "Admin", Level: 58, IpAddress: "127.0.0.1"})
|
topicList = append(topicList, TopicsRow{Title: "Hey everyone!",Content: "Hey everyone!",CreatedBy: 1,CreatedAt: "0000-00-00 00:00:00",ParentID: 1,UserLink:build_profile_url("admin-alice",1),CreatedByName:"Admin Alice",Css: no_css_tmpl,Tag: "Admin", Level: 58, IpAddress: "127.0.0.1"})
|
||||||
topicList = append(topicList, TopicsRow{Title: "Hey everyone!",Content: "Hey everyone!",CreatedBy: 1,CreatedAt: "0000-00-00 00:00:00",ParentID: 1,UserSlug:"admin-alice",CreatedByName:"Admin Alice",Css: no_css_tmpl,Tag: "Admin", Level: 58, IpAddress: "127.0.0.1"})
|
topicList = append(topicList, TopicsRow{Title: "Hey everyone!",Content: "Hey everyone!",CreatedBy: 1,CreatedAt: "0000-00-00 00:00:00",ParentID: 1,UserLink:build_profile_url("admin-alice",1),CreatedByName:"Admin Alice",Css: no_css_tmpl,Tag: "Admin", Level: 58, IpAddress: "127.0.0.1"})
|
||||||
topicList = append(topicList, TopicsRow{Title: "Hey everyone!",Content: "Hey everyone!",CreatedBy: 1,CreatedAt: "0000-00-00 00:00:00",ParentID: 1,UserSlug:"admin-alice",CreatedByName:"Admin Alice",Css: no_css_tmpl,Tag: "Admin", Level: 58, IpAddress: "127.0.0.1"})
|
topicList = append(topicList, TopicsRow{Title: "Hey everyone!",Content: "Hey everyone!",CreatedBy: 1,CreatedAt: "0000-00-00 00:00:00",ParentID: 1,UserLink:build_profile_url("admin-alice",1),CreatedByName:"Admin Alice",Css: no_css_tmpl,Tag: "Admin", Level: 58, IpAddress: "127.0.0.1"})
|
||||||
topicList = append(topicList, TopicsRow{Title: "Hey everyone!",Content: "Hey everyone!",CreatedBy: 1,CreatedAt: "0000-00-00 00:00:00",ParentID: 1,UserSlug:"admin-alice",CreatedByName:"Admin Alice",Css: no_css_tmpl,Tag: "Admin", Level: 58, IpAddress: "127.0.0.1"})
|
topicList = append(topicList, TopicsRow{Title: "Hey everyone!",Content: "Hey everyone!",CreatedBy: 1,CreatedAt: "0000-00-00 00:00:00",ParentID: 1,UserLink:build_profile_url("admin-alice",1),CreatedByName:"Admin Alice",Css: no_css_tmpl,Tag: "Admin", Level: 58, IpAddress: "127.0.0.1"})
|
||||||
|
|
||||||
headerVars := HeaderVars{
|
headerVars := HeaderVars{
|
||||||
NoticeList:[]string{"test"},
|
NoticeList:[]string{"test"},
|
||||||
|
|
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 162 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 77 KiB |
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 236 KiB |
After Width: | Height: | Size: 322 KiB |
After Width: | Height: | Size: 160 KiB |
After Width: | Height: | Size: 222 KiB |
After Width: | Height: | Size: 118 KiB |
After Width: | Height: | Size: 191 KiB |
After Width: | Height: | Size: 208 KiB |
4
main.go
|
@ -47,7 +47,7 @@ var template_create_topic_handle func(CreateTopicPage,io.Writer) = nil
|
||||||
|
|
||||||
func compile_templates() error {
|
func compile_templates() error {
|
||||||
var c CTemplateSet
|
var c CTemplateSet
|
||||||
user := User{62,"fake-user","Fake User","compiler@localhost",0,false,false,false,false,false,false,GuestPerms,make(map[string]bool),"",false,"","","","","",0,0,"0.0.0.0.0"}
|
user := User{62,build_profile_url("fake-user",62),"Fake User","compiler@localhost",0,false,false,false,false,false,false,GuestPerms,make(map[string]bool),"",false,"","","","","",0,0,"0.0.0.0.0"}
|
||||||
headerVars := HeaderVars{
|
headerVars := HeaderVars{
|
||||||
Site:site,
|
Site:site,
|
||||||
NoticeList:[]string{"test"},
|
NoticeList:[]string{"test"},
|
||||||
|
@ -60,7 +60,7 @@ func compile_templates() error {
|
||||||
|
|
||||||
log.Print("Compiling the templates")
|
log.Print("Compiling the templates")
|
||||||
|
|
||||||
topic := TopicUser{1,"blah","Blah","Hey there!",0,false,false,"Date","Date",0,"","127.0.0.1",0,1,"classname","weird-data","fake-user","Fake User",config.DefaultGroup,"",0,"","","","",58,false}
|
topic := TopicUser{1,"blah","Blah","Hey there!",0,false,false,"Date","Date",0,"","127.0.0.1",0,1,"classname","weird-data",build_profile_url("fake-user",62),"Fake User",config.DefaultGroup,"",0,"","","","",58,false}
|
||||||
var replyList []Reply
|
var replyList []Reply
|
||||||
replyList = append(replyList, Reply{0,0,"Yo!","Yo!",0,"alice","Alice",config.DefaultGroup,"",0,0,"","",0,"","","","",0,"127.0.0.1",false,1,"",""})
|
replyList = append(replyList, Reply{0,0,"Yo!","Yo!",0,"alice","Alice",config.DefaultGroup,"",0,0,"","",0,"","","","",0,"127.0.0.1",false,1,"",""})
|
||||||
|
|
||||||
|
|
2
pages.go
|
@ -509,7 +509,7 @@ func parse_message(msg string/*, user User*/) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
outbytes = append(outbytes, url_open...)
|
outbytes = append(outbytes, url_open...)
|
||||||
var url_bit []byte = []byte(build_profile_url(menUser.Slug,uid))
|
var url_bit []byte = []byte(menUser.Link)
|
||||||
outbytes = append(outbytes, url_bit...)
|
outbytes = append(outbytes, url_bit...)
|
||||||
outbytes = append(outbytes, bytes_singlequote...)
|
outbytes = append(outbytes, bytes_singlequote...)
|
||||||
outbytes = append(outbytes, url_mention...)
|
outbytes = append(outbytes, url_mention...)
|
||||||
|
|
|
@ -1734,64 +1734,64 @@ func route_panel_logs_mod(w http.ResponseWriter, r *http.Request, user User){
|
||||||
|
|
||||||
actor, err := users.CascadeGet(actorID)
|
actor, err := users.CascadeGet(actorID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
actor = &User{Name:"Unknown",Slug:"unknown"}
|
actor = &User{Name:"Unknown",Link:build_profile_url("unknown",0)}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(action) {
|
switch(action) {
|
||||||
case "lock":
|
case "lock":
|
||||||
topic, err := topics.CascadeGet(elementID)
|
topic, err := topics.CascadeGet(elementID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
topic = &Topic{Title:"Unknown",Slug:"unknown"}
|
topic = &Topic{Title:"Unknown",Link:build_profile_url("unknown",0)}
|
||||||
}
|
}
|
||||||
action = "<a href='" + build_topic_url(topic.Slug,elementID) + "'>" + topic.Title + "</a> was locked by <a href='" + build_profile_url(actor.Slug,actorID) + "'>"+actor.Name+"</a>"
|
action = "<a href='" + topic.Link + "'>" + topic.Title + "</a> was locked by <a href='" + actor.Link + "'>"+actor.Name+"</a>"
|
||||||
case "unlock":
|
case "unlock":
|
||||||
topic, err := topics.CascadeGet(elementID)
|
topic, err := topics.CascadeGet(elementID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
topic = &Topic{Title:"Unknown",Slug:"unknown"}
|
topic = &Topic{Title:"Unknown",Link:build_profile_url("unknown",0)}
|
||||||
}
|
}
|
||||||
action = "<a href='" + build_topic_url(topic.Slug,elementID) + "'>" + topic.Title + "</a> was reopened by <a href='" + build_profile_url(actor.Slug,actorID) + "'>"+actor.Name+"</a>"
|
action = "<a href='" + topic.Link + "'>" + topic.Title + "</a> was reopened by <a href='" + actor.Link + "'>"+actor.Name+"</a>"
|
||||||
case "stick":
|
case "stick":
|
||||||
topic, err := topics.CascadeGet(elementID)
|
topic, err := topics.CascadeGet(elementID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
topic = &Topic{Title:"Unknown",Slug:"unknown"}
|
topic = &Topic{Title:"Unknown",Link:build_profile_url("unknown",0)}
|
||||||
}
|
}
|
||||||
action = "<a href='" + build_topic_url(topic.Slug,elementID) + "'>" + topic.Title + "</a> was pinned by <a href='" + build_profile_url(actor.Slug,actorID) + "'>"+actor.Name+"</a>"
|
action = "<a href='" + topic.Link + "'>" + topic.Title + "</a> was pinned by <a href='" + actor.Link + "'>"+actor.Name+"</a>"
|
||||||
case "unstick":
|
case "unstick":
|
||||||
topic, err := topics.CascadeGet(elementID)
|
topic, err := topics.CascadeGet(elementID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
topic = &Topic{Title:"Unknown",Slug:"unknown"}
|
topic = &Topic{Title:"Unknown",Link:build_profile_url("unknown",0)}
|
||||||
}
|
}
|
||||||
action = "<a href='" + build_topic_url(topic.Slug,elementID) + "'>" + topic.Title + "</a> was unpinned by <a href='" + build_profile_url(actor.Slug,actorID) + "'>"+actor.Name+"</a>"
|
action = "<a href='" + topic.Link + "'>" + topic.Title + "</a> was unpinned by <a href='" + actor.Link + "'>"+actor.Name+"</a>"
|
||||||
case "delete":
|
case "delete":
|
||||||
if elementType == "topic" {
|
if elementType == "topic" {
|
||||||
action = "Topic #" + strconv.Itoa(elementID) + " was deleted by <a href='" + build_profile_url(actor.Slug,actorID) + "'>"+actor.Name+"</a>"
|
action = "Topic #" + strconv.Itoa(elementID) + " was deleted by <a href='" + actor.Link + "'>"+actor.Name+"</a>"
|
||||||
} else {
|
} else {
|
||||||
topic, err := get_topic_by_reply(elementID)
|
topic, err := get_topic_by_reply(elementID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
topic = &Topic{Title:"Unknown",Slug:"unknown"}
|
topic = &Topic{Title:"Unknown",Link:build_profile_url("unknown",0)}
|
||||||
}
|
}
|
||||||
action = "A reply in <a href='" + build_topic_url(topic.Slug,topic.ID) + "'>" + topic.Title + "</a> was deleted by <a href='" + build_profile_url(actor.Slug,actorID) + "'>"+actor.Name+"</a>"
|
action = "A reply in <a href='" + topic.Link + "'>" + topic.Title + "</a> was deleted by <a href='" + actor.Link + "'>"+actor.Name+"</a>"
|
||||||
}
|
}
|
||||||
case "ban":
|
case "ban":
|
||||||
targetUser, err := users.CascadeGet(elementID)
|
targetUser, err := users.CascadeGet(elementID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
targetUser = &User{Name:"Unknown",Slug:"unknown"}
|
targetUser = &User{Name:"Unknown",Link:build_profile_url("unknown",0)}
|
||||||
}
|
}
|
||||||
action = "<a href='" + build_profile_url(targetUser.Slug,elementID) + "'>" + targetUser.Name + "</a> was banned by <a href='" + build_profile_url(actor.Slug,actorID) + "'>"+actor.Name+"</a>"
|
action = "<a href='" + targetUser.Link + "'>" + targetUser.Name + "</a> was banned by <a href='" + actor.Link + "'>"+actor.Name+"</a>"
|
||||||
case "unban":
|
case "unban":
|
||||||
targetUser, err := users.CascadeGet(elementID)
|
targetUser, err := users.CascadeGet(elementID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
targetUser = &User{Name:"Unknown",Slug:"unknown"}
|
targetUser = &User{Name:"Unknown",Link:build_profile_url("unknown",0)}
|
||||||
}
|
}
|
||||||
action = "<a href='" + build_profile_url(targetUser.Slug,elementID) + "'>" + targetUser.Name + "</a> was unbanned by <a href='" + build_profile_url(actor.Slug,actorID) + "'>"+actor.Name+"</a>"
|
action = "<a href='" + targetUser.Link + "'>" + targetUser.Name + "</a> was unbanned by <a href='" + actor.Link + "'>"+actor.Name+"</a>"
|
||||||
case "activate":
|
case "activate":
|
||||||
targetUser, err := users.CascadeGet(elementID)
|
targetUser, err := users.CascadeGet(elementID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
targetUser = &User{Name:"Unknown",Slug:"unknown"}
|
targetUser = &User{Name:"Unknown",Link:build_profile_url("unknown",0)}
|
||||||
}
|
}
|
||||||
action = "<a href='" + build_profile_url(targetUser.Slug,elementID) + "'>" + targetUser.Name + "</a> was activated by <a href='" + build_profile_url(actor.Slug,actorID) + "'>"+actor.Name+"</a>"
|
action = "<a href='" + targetUser.Link + "'>" + targetUser.Name + "</a> was activated by <a href='" + actor.Link + "'>"+actor.Name+"</a>"
|
||||||
default:
|
default:
|
||||||
action = "Unknown action '" + action + "' by <a href='" + build_profile_url(actor.Slug,actorID) + "'>"+actor.Name+"</a>"
|
action = "Unknown action '" + action + "' by <a href='" + actor.Link + "'>"+actor.Name+"</a>"
|
||||||
}
|
}
|
||||||
logs = append(logs, Log{Action:template.HTML(action),IPAddress:ipaddress,DoneAt:doneAt})
|
logs = append(logs, Log{Action:template.HTML(action),IPAddress:ipaddress,DoneAt:doneAt})
|
||||||
}
|
}
|
||||||
|
|
2
reply.go
|
@ -10,7 +10,7 @@ type Reply struct /* Should probably rename this to ReplyUser and rename ReplySh
|
||||||
Content string
|
Content string
|
||||||
ContentHtml string
|
ContentHtml string
|
||||||
CreatedBy int
|
CreatedBy int
|
||||||
UserSlug string
|
UserLink string
|
||||||
CreatedByName string
|
CreatedByName string
|
||||||
Group int
|
Group int
|
||||||
CreatedAt string
|
CreatedAt string
|
||||||
|
|
20
routes.go
|
@ -155,8 +155,8 @@ func route_topics(w http.ResponseWriter, r *http.Request, user User){
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
topicItem.Slug = name_to_slug(topicItem.Title)
|
topicItem.Link = build_topic_url(name_to_slug(topicItem.Title),topicItem.ID)
|
||||||
topicItem.UserSlug = name_to_slug(topicItem.CreatedByName)
|
topicItem.UserLink = build_profile_url(name_to_slug(topicItem.CreatedByName),topicItem.CreatedBy)
|
||||||
|
|
||||||
if topicItem.Avatar != "" {
|
if topicItem.Avatar != "" {
|
||||||
if topicItem.Avatar[0] == '.' {
|
if topicItem.Avatar[0] == '.' {
|
||||||
|
@ -278,8 +278,8 @@ func route_forum(w http.ResponseWriter, r *http.Request, user User, sfid string)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
topicItem.Slug = name_to_slug(topicItem.Title)
|
topicItem.Link = build_topic_url(name_to_slug(topicItem.Title),topicItem.ID)
|
||||||
topicItem.UserSlug = name_to_slug(topicItem.CreatedByName)
|
topicItem.UserLink = build_profile_url(name_to_slug(topicItem.CreatedByName),topicItem.CreatedBy)
|
||||||
|
|
||||||
if topicItem.Avatar != "" {
|
if topicItem.Avatar != "" {
|
||||||
if topicItem.Avatar[0] == '.' {
|
if topicItem.Avatar[0] == '.' {
|
||||||
|
@ -491,7 +491,7 @@ func route_topic_id(w http.ResponseWriter, r *http.Request, user User){
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
replyItem.UserSlug = name_to_slug(replyItem.CreatedByName)
|
replyItem.UserLink = build_profile_url(name_to_slug(replyItem.CreatedByName),replyItem.CreatedBy)
|
||||||
replyItem.ParentID = topic.ID
|
replyItem.ParentID = topic.ID
|
||||||
replyItem.ContentHtml = parse_message(replyItem.Content)
|
replyItem.ContentHtml = parse_message(replyItem.Content)
|
||||||
replyItem.ContentLines = strings.Count(replyItem.Content,"\n")
|
replyItem.ContentLines = strings.Count(replyItem.Content,"\n")
|
||||||
|
@ -532,16 +532,16 @@ func route_topic_id(w http.ResponseWriter, r *http.Request, user User){
|
||||||
if replyItem.ActionType != "" {
|
if replyItem.ActionType != "" {
|
||||||
switch(replyItem.ActionType) {
|
switch(replyItem.ActionType) {
|
||||||
case "lock":
|
case "lock":
|
||||||
replyItem.ActionType = "This topic has been locked by <a href='" + build_profile_url(replyItem.UserSlug,replyItem.CreatedBy) + "'>" + replyItem.CreatedByName + "</a>"
|
replyItem.ActionType = "This topic has been locked by <a href='" + replyItem.UserLink + "'>" + replyItem.CreatedByName + "</a>"
|
||||||
replyItem.ActionIcon = "🔒︎"
|
replyItem.ActionIcon = "🔒︎"
|
||||||
case "unlock":
|
case "unlock":
|
||||||
replyItem.ActionType = "This topic has been reopened by <a href='" + build_profile_url(replyItem.UserSlug,replyItem.CreatedBy) + "'>" + replyItem.CreatedByName + "</a>"
|
replyItem.ActionType = "This topic has been reopened by <a href='" + replyItem.UserLink + "'>" + replyItem.CreatedByName + "</a>"
|
||||||
replyItem.ActionIcon = "🔓︎"
|
replyItem.ActionIcon = "🔓︎"
|
||||||
case "stick":
|
case "stick":
|
||||||
replyItem.ActionType = "This topic has been pinned by <a href='" + build_profile_url(replyItem.UserSlug,replyItem.CreatedBy) + "'>" + replyItem.CreatedByName + "</a>"
|
replyItem.ActionType = "This topic has been pinned by <a href='" + replyItem.UserLink + "'>" + replyItem.CreatedByName + "</a>"
|
||||||
replyItem.ActionIcon = "📌︎"
|
replyItem.ActionIcon = "📌︎"
|
||||||
case "unstick":
|
case "unstick":
|
||||||
replyItem.ActionType = "This topic has been unpinned by <a href='" + build_profile_url(replyItem.UserSlug,replyItem.CreatedBy) + "'>" + replyItem.CreatedByName + "</a>"
|
replyItem.ActionType = "This topic has been unpinned by <a href='" + replyItem.UserLink + "'>" + replyItem.CreatedByName + "</a>"
|
||||||
replyItem.ActionIcon = "📌︎"
|
replyItem.ActionIcon = "📌︎"
|
||||||
default:
|
default:
|
||||||
replyItem.ActionType = replyItem.ActionType + " has happened"
|
replyItem.ActionType = replyItem.ActionType + " has happened"
|
||||||
|
@ -665,7 +665,7 @@ func route_profile(w http.ResponseWriter, r *http.Request, user User){
|
||||||
|
|
||||||
// TO-DO: Add a hook here
|
// TO-DO: Add a hook here
|
||||||
|
|
||||||
replyList = append(replyList, Reply{rid,puser.ID,replyContent,parse_message(replyContent),replyCreatedBy,name_to_slug(replyCreatedByName),replyCreatedByName,replyGroup,replyCreatedAt,replyLastEdit,replyLastEditBy,replyAvatar,replyClassName,replyLines,replyTag,"","","",0,"",replyLiked,replyLikeCount,"",""})
|
replyList = append(replyList, Reply{rid,puser.ID,replyContent,parse_message(replyContent),replyCreatedBy,build_profile_url(name_to_slug(replyCreatedByName),replyCreatedBy),replyCreatedByName,replyGroup,replyCreatedAt,replyLastEdit,replyLastEditBy,replyAvatar,replyClassName,replyLines,replyTag,"","","",0,"",replyLiked,replyLikeCount,"",""})
|
||||||
}
|
}
|
||||||
err = rows.Err()
|
err = rows.Err()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
/* This file was automatically generated by the software. Please don't edit it as your changes may be overwritten at any moment. */
|
/* This file was automatically generated by the software. Please don't edit it as your changes may be overwritten at any moment. */
|
||||||
// +build !no_templategen
|
// +build !no_templategen
|
||||||
package main
|
package main
|
||||||
import "io"
|
|
||||||
import "strconv"
|
import "strconv"
|
||||||
|
import "io"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
template_forum_handle = template_forum
|
template_forum_handle = template_forum
|
||||||
|
@ -35,35 +35,33 @@ w.Write(header_6)
|
||||||
w.Write(header_7)
|
w.Write(header_7)
|
||||||
w.Write([]byte(tmpl_forum_vars.CurrentUser.Session))
|
w.Write([]byte(tmpl_forum_vars.CurrentUser.Session))
|
||||||
w.Write(header_8)
|
w.Write(header_8)
|
||||||
|
if !tmpl_forum_vars.CurrentUser.Is_Super_Mod {
|
||||||
|
w.Write(header_9)
|
||||||
|
}
|
||||||
|
w.Write(header_10)
|
||||||
w.Write(menu_0)
|
w.Write(menu_0)
|
||||||
w.Write([]byte(tmpl_forum_vars.Header.Site.Name))
|
w.Write([]byte(tmpl_forum_vars.Header.Site.Name))
|
||||||
w.Write(menu_1)
|
w.Write(menu_1)
|
||||||
if tmpl_forum_vars.CurrentUser.Loggedin {
|
if tmpl_forum_vars.CurrentUser.Loggedin {
|
||||||
w.Write(menu_2)
|
w.Write(menu_2)
|
||||||
w.Write([]byte(tmpl_forum_vars.CurrentUser.Slug))
|
w.Write([]byte(tmpl_forum_vars.CurrentUser.Link))
|
||||||
w.Write(menu_3)
|
w.Write(menu_3)
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.CurrentUser.ID)))
|
w.Write([]byte(tmpl_forum_vars.CurrentUser.Session))
|
||||||
w.Write(menu_4)
|
w.Write(menu_4)
|
||||||
if tmpl_forum_vars.CurrentUser.Is_Super_Mod {
|
} else {
|
||||||
w.Write(menu_5)
|
w.Write(menu_5)
|
||||||
}
|
}
|
||||||
w.Write(menu_6)
|
w.Write(menu_6)
|
||||||
w.Write([]byte(tmpl_forum_vars.CurrentUser.Session))
|
|
||||||
w.Write(menu_7)
|
|
||||||
} else {
|
|
||||||
w.Write(menu_8)
|
|
||||||
}
|
|
||||||
w.Write(menu_9)
|
|
||||||
w.Write(header_9)
|
|
||||||
if tmpl_forum_vars.Header.Widgets.RightSidebar != "" {
|
|
||||||
w.Write(header_10)
|
|
||||||
}
|
|
||||||
w.Write(header_11)
|
w.Write(header_11)
|
||||||
|
if tmpl_forum_vars.Header.Widgets.RightSidebar != "" {
|
||||||
|
w.Write(header_12)
|
||||||
|
}
|
||||||
|
w.Write(header_13)
|
||||||
if len(tmpl_forum_vars.Header.NoticeList) != 0 {
|
if len(tmpl_forum_vars.Header.NoticeList) != 0 {
|
||||||
for _, item := range tmpl_forum_vars.Header.NoticeList {
|
for _, item := range tmpl_forum_vars.Header.NoticeList {
|
||||||
w.Write(header_12)
|
w.Write(header_14)
|
||||||
w.Write([]byte(item))
|
w.Write([]byte(item))
|
||||||
w.Write(header_13)
|
w.Write(header_15)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if tmpl_forum_vars.Page > 1 {
|
if tmpl_forum_vars.Page > 1 {
|
||||||
|
@ -123,33 +121,29 @@ w.Write([]byte(strconv.Itoa(item.PostCount)))
|
||||||
w.Write(forum_24)
|
w.Write(forum_24)
|
||||||
w.Write([]byte(item.LastReplyAt))
|
w.Write([]byte(item.LastReplyAt))
|
||||||
w.Write(forum_25)
|
w.Write(forum_25)
|
||||||
w.Write([]byte(item.Slug))
|
w.Write([]byte(item.Link))
|
||||||
w.Write(forum_26)
|
w.Write(forum_26)
|
||||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
|
||||||
w.Write(forum_27)
|
|
||||||
w.Write([]byte(item.Title))
|
w.Write([]byte(item.Title))
|
||||||
|
w.Write(forum_27)
|
||||||
|
w.Write([]byte(item.UserLink))
|
||||||
w.Write(forum_28)
|
w.Write(forum_28)
|
||||||
w.Write([]byte(item.UserSlug))
|
|
||||||
w.Write(forum_29)
|
|
||||||
w.Write([]byte(strconv.Itoa(item.CreatedBy)))
|
|
||||||
w.Write(forum_30)
|
|
||||||
w.Write([]byte(item.CreatedByName))
|
w.Write([]byte(item.CreatedByName))
|
||||||
w.Write(forum_31)
|
w.Write(forum_29)
|
||||||
if item.Is_Closed {
|
if item.Is_Closed {
|
||||||
w.Write(forum_32)
|
w.Write(forum_30)
|
||||||
}
|
}
|
||||||
w.Write(forum_33)
|
w.Write(forum_31)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
w.Write(forum_34)
|
w.Write(forum_32)
|
||||||
if tmpl_forum_vars.CurrentUser.Perms.CreateTopic {
|
if tmpl_forum_vars.CurrentUser.Perms.CreateTopic {
|
||||||
w.Write(forum_35)
|
w.Write(forum_33)
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Forum.ID)))
|
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Forum.ID)))
|
||||||
|
w.Write(forum_34)
|
||||||
|
}
|
||||||
|
w.Write(forum_35)
|
||||||
|
}
|
||||||
w.Write(forum_36)
|
w.Write(forum_36)
|
||||||
}
|
|
||||||
w.Write(forum_37)
|
|
||||||
}
|
|
||||||
w.Write(forum_38)
|
|
||||||
w.Write(footer_0)
|
w.Write(footer_0)
|
||||||
if tmpl_forum_vars.Header.Widgets.RightSidebar != "" {
|
if tmpl_forum_vars.Header.Widgets.RightSidebar != "" {
|
||||||
w.Write(footer_1)
|
w.Write(footer_1)
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
// +build !no_templategen
|
// +build !no_templategen
|
||||||
package main
|
package main
|
||||||
import "io"
|
import "io"
|
||||||
import "strconv"
|
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
template_forums_handle = template_forums
|
template_forums_handle = template_forums
|
||||||
|
@ -35,35 +34,33 @@ w.Write(header_6)
|
||||||
w.Write(header_7)
|
w.Write(header_7)
|
||||||
w.Write([]byte(tmpl_forums_vars.CurrentUser.Session))
|
w.Write([]byte(tmpl_forums_vars.CurrentUser.Session))
|
||||||
w.Write(header_8)
|
w.Write(header_8)
|
||||||
|
if !tmpl_forums_vars.CurrentUser.Is_Super_Mod {
|
||||||
|
w.Write(header_9)
|
||||||
|
}
|
||||||
|
w.Write(header_10)
|
||||||
w.Write(menu_0)
|
w.Write(menu_0)
|
||||||
w.Write([]byte(tmpl_forums_vars.Header.Site.Name))
|
w.Write([]byte(tmpl_forums_vars.Header.Site.Name))
|
||||||
w.Write(menu_1)
|
w.Write(menu_1)
|
||||||
if tmpl_forums_vars.CurrentUser.Loggedin {
|
if tmpl_forums_vars.CurrentUser.Loggedin {
|
||||||
w.Write(menu_2)
|
w.Write(menu_2)
|
||||||
w.Write([]byte(tmpl_forums_vars.CurrentUser.Slug))
|
w.Write([]byte(tmpl_forums_vars.CurrentUser.Link))
|
||||||
w.Write(menu_3)
|
w.Write(menu_3)
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_forums_vars.CurrentUser.ID)))
|
w.Write([]byte(tmpl_forums_vars.CurrentUser.Session))
|
||||||
w.Write(menu_4)
|
w.Write(menu_4)
|
||||||
if tmpl_forums_vars.CurrentUser.Is_Super_Mod {
|
} else {
|
||||||
w.Write(menu_5)
|
w.Write(menu_5)
|
||||||
}
|
}
|
||||||
w.Write(menu_6)
|
w.Write(menu_6)
|
||||||
w.Write([]byte(tmpl_forums_vars.CurrentUser.Session))
|
|
||||||
w.Write(menu_7)
|
|
||||||
} else {
|
|
||||||
w.Write(menu_8)
|
|
||||||
}
|
|
||||||
w.Write(menu_9)
|
|
||||||
w.Write(header_9)
|
|
||||||
if tmpl_forums_vars.Header.Widgets.RightSidebar != "" {
|
|
||||||
w.Write(header_10)
|
|
||||||
}
|
|
||||||
w.Write(header_11)
|
w.Write(header_11)
|
||||||
|
if tmpl_forums_vars.Header.Widgets.RightSidebar != "" {
|
||||||
|
w.Write(header_12)
|
||||||
|
}
|
||||||
|
w.Write(header_13)
|
||||||
if len(tmpl_forums_vars.Header.NoticeList) != 0 {
|
if len(tmpl_forums_vars.Header.NoticeList) != 0 {
|
||||||
for _, item := range tmpl_forums_vars.Header.NoticeList {
|
for _, item := range tmpl_forums_vars.Header.NoticeList {
|
||||||
w.Write(header_12)
|
w.Write(header_14)
|
||||||
w.Write([]byte(item))
|
w.Write([]byte(item))
|
||||||
w.Write(header_13)
|
w.Write(header_15)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
w.Write(forums_0)
|
w.Write(forums_0)
|
||||||
|
@ -90,7 +87,7 @@ w.Write([]byte(item.Name))
|
||||||
w.Write(forums_10)
|
w.Write(forums_10)
|
||||||
}
|
}
|
||||||
w.Write(forums_11)
|
w.Write(forums_11)
|
||||||
w.Write([]byte(item.LastTopicSlug))
|
w.Write([]byte(item.LastTopicLink))
|
||||||
w.Write(forums_12)
|
w.Write(forums_12)
|
||||||
w.Write([]byte(item.LastTopic))
|
w.Write([]byte(item.LastTopic))
|
||||||
w.Write(forums_13)
|
w.Write(forums_13)
|
||||||
|
|
399
template_list.go
|
@ -20,12 +20,16 @@ var header_6 []byte = []byte(`"></script>
|
||||||
`)
|
`)
|
||||||
var header_7 []byte = []byte(`
|
var header_7 []byte = []byte(`
|
||||||
<script type="text/javascript">var session = "`)
|
<script type="text/javascript">var session = "`)
|
||||||
var header_8 []byte = []byte(`";
|
var header_8 []byte = []byte(`";</script>
|
||||||
</script>
|
|
||||||
<script type="text/javascript" src="/static/global.js"></script>
|
<script type="text/javascript" src="/static/global.js"></script>
|
||||||
<meta name="viewport" content="width=device-width,initial-scale = 1.0, maximum-scale=1.0,user-scalable=no" />
|
<meta name="viewport" content="width=device-width,initial-scale = 1.0, maximum-scale=1.0,user-scalable=no" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<style>
|
||||||
|
`)
|
||||||
|
var header_9 []byte = []byte(`.supermod_only { display: none !important; }`)
|
||||||
|
var header_10 []byte = []byte(`
|
||||||
|
</style>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
`)
|
`)
|
||||||
var menu_0 []byte = []byte(`<div class="nav">
|
var menu_0 []byte = []byte(`<div class="nav">
|
||||||
|
@ -46,33 +50,30 @@ var menu_1 []byte = []byte(`</a></li>
|
||||||
`)
|
`)
|
||||||
var menu_2 []byte = []byte(`
|
var menu_2 []byte = []byte(`
|
||||||
<li class="menu_left menu_account"><a href="/user/edit/critical/">Account</a></li>
|
<li class="menu_left menu_account"><a href="/user/edit/critical/">Account</a></li>
|
||||||
<li class="menu_left menu_profile"><a href="/user/`)
|
<li class="menu_left menu_profile"><a href="`)
|
||||||
var menu_3 []byte = []byte(`.`)
|
var menu_3 []byte = []byte(`">Profile</a></li>
|
||||||
var menu_4 []byte = []byte(`">Profile</a></li>
|
<li class="menu_left menu_account supermod_only"><a href="/panel/">Panel</a></li>
|
||||||
`)
|
|
||||||
var menu_5 []byte = []byte(`<li class="menu_left menu_account"><a href="/panel/">Panel</a></li>`)
|
|
||||||
var menu_6 []byte = []byte(`
|
|
||||||
<li class="menu_left menu_logout"><a href="/accounts/logout/?session=`)
|
<li class="menu_left menu_logout"><a href="/accounts/logout/?session=`)
|
||||||
var menu_7 []byte = []byte(`">Logout</a></li>
|
var menu_4 []byte = []byte(`">Logout</a></li>
|
||||||
`)
|
`)
|
||||||
var menu_8 []byte = []byte(`
|
var menu_5 []byte = []byte(`
|
||||||
<li class="menu_left menu_register"><a href="/accounts/create/">Register</a></li>
|
<li class="menu_left menu_register"><a href="/accounts/create/">Register</a></li>
|
||||||
<li class="menu_left menu_login"><a href="/accounts/login/">Login</a></li>
|
<li class="menu_left menu_login"><a href="/accounts/login/">Login</a></li>
|
||||||
`)
|
`)
|
||||||
var menu_9 []byte = []byte(`
|
var menu_6 []byte = []byte(`
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="clear: both;"></div>
|
<div style="clear: both;"></div>
|
||||||
</div>
|
</div>
|
||||||
`)
|
`)
|
||||||
var header_9 []byte = []byte(`
|
var header_11 []byte = []byte(`
|
||||||
<div id="back"><div id="main" `)
|
<div id="back"><div id="main" `)
|
||||||
var header_10 []byte = []byte(`class="shrink_main"`)
|
var header_12 []byte = []byte(`class="shrink_main"`)
|
||||||
var header_11 []byte = []byte(`>
|
var header_13 []byte = []byte(`>
|
||||||
`)
|
`)
|
||||||
var header_12 []byte = []byte(`<div class="alert">`)
|
var header_14 []byte = []byte(`<div class="alert">`)
|
||||||
var header_13 []byte = []byte(`</div>`)
|
var header_15 []byte = []byte(`</div>`)
|
||||||
var topic_0 []byte = []byte(`
|
var topic_0 []byte = []byte(`
|
||||||
|
|
||||||
<form id="edit_topic_form" action='/topic/edit/submit/`)
|
<form id="edit_topic_form" action='/topic/edit/submit/`)
|
||||||
|
@ -130,101 +131,99 @@ var topic_28 []byte = []byte(`</textarea>
|
||||||
|
|
||||||
<span class="controls">
|
<span class="controls">
|
||||||
|
|
||||||
<a href="/user/`)
|
<a href="`)
|
||||||
var topic_29 []byte = []byte(`.`)
|
var topic_29 []byte = []byte(`" class="username real_username">`)
|
||||||
var topic_30 []byte = []byte(`" class="username real_username">`)
|
var topic_30 []byte = []byte(`</a>
|
||||||
var topic_31 []byte = []byte(`</a>
|
|
||||||
`)
|
`)
|
||||||
var topic_32 []byte = []byte(`<a href="/topic/like/submit/`)
|
var topic_31 []byte = []byte(`<a href="/topic/like/submit/`)
|
||||||
var topic_33 []byte = []byte(`" class="mod_button" title="Love it" style="color:#202020;">
|
var topic_32 []byte = []byte(`" class="mod_button" title="Love it" style="color:#202020;">
|
||||||
<button class="username like_label" style="`)
|
<button class="username like_label" style="`)
|
||||||
var topic_34 []byte = []byte(`background-color:/*#eaffea*/#D6FFD6;`)
|
var topic_33 []byte = []byte(`background-color:/*#eaffea*/#D6FFD6;`)
|
||||||
var topic_35 []byte = []byte(`"></button></a>`)
|
var topic_34 []byte = []byte(`"></button></a>`)
|
||||||
var topic_36 []byte = []byte(`<a href='/topic/edit/`)
|
var topic_35 []byte = []byte(`<a href='/topic/edit/`)
|
||||||
var topic_37 []byte = []byte(`' class="mod_button open_edit" style="font-weight:normal;" title="Edit Topic"><button class="username edit_label"></button></a>`)
|
var topic_36 []byte = []byte(`' class="mod_button open_edit" style="font-weight:normal;" title="Edit Topic"><button class="username edit_label"></button></a>`)
|
||||||
var topic_38 []byte = []byte(`<a href='/topic/delete/submit/`)
|
var topic_37 []byte = []byte(`<a href='/topic/delete/submit/`)
|
||||||
var topic_39 []byte = []byte(`' class="mod_button" style="font-weight:normal;" title="Delete Topic"><button class="username trash_label"></button></a>`)
|
var topic_38 []byte = []byte(`' class="mod_button" style="font-weight:normal;" title="Delete Topic"><button class="username trash_label"></button></a>`)
|
||||||
var topic_40 []byte = []byte(`<a class="mod_button" href='/topic/unstick/submit/`)
|
var topic_39 []byte = []byte(`<a class="mod_button" href='/topic/unstick/submit/`)
|
||||||
var topic_41 []byte = []byte(`' style="font-weight:normal;" title="Unpin Topic"><button class="username unpin_label"></button></a>`)
|
var topic_40 []byte = []byte(`' style="font-weight:normal;" title="Unpin Topic"><button class="username unpin_label"></button></a>`)
|
||||||
var topic_42 []byte = []byte(`<a href='/topic/stick/submit/`)
|
var topic_41 []byte = []byte(`<a href='/topic/stick/submit/`)
|
||||||
var topic_43 []byte = []byte(`' class="mod_button" style="font-weight:normal;" title="Pin Topic"><button class="username pin_label"></button></a>`)
|
var topic_42 []byte = []byte(`' class="mod_button" style="font-weight:normal;" title="Pin Topic"><button class="username pin_label"></button></a>`)
|
||||||
var topic_44 []byte = []byte(`
|
var topic_43 []byte = []byte(`
|
||||||
<a class="mod_button" href="/report/submit/`)
|
<a class="mod_button" href="/report/submit/`)
|
||||||
var topic_45 []byte = []byte(`?session=`)
|
var topic_44 []byte = []byte(`?session=`)
|
||||||
var topic_46 []byte = []byte(`&type=topic" class="mod_button report_item" style="font-weight:normal;" title="Flag Topic"><button class="username flag_label"></button></a>
|
var topic_45 []byte = []byte(`&type=topic" class="mod_button report_item" style="font-weight:normal;" title="Flag Topic"><button class="username flag_label"></button></a>
|
||||||
|
|
||||||
`)
|
`)
|
||||||
var topic_47 []byte = []byte(`<a class="username hide_on_micro like_count">`)
|
var topic_46 []byte = []byte(`<a class="username hide_on_micro like_count">`)
|
||||||
var topic_48 []byte = []byte(`</a><a class="username hide_on_micro like_count_label" title="Like Count"></a>`)
|
var topic_47 []byte = []byte(`</a><a class="username hide_on_micro like_count_label" title="Like Count"></a>`)
|
||||||
var topic_49 []byte = []byte(`<a class="username hide_on_micro user_tag">`)
|
var topic_48 []byte = []byte(`<a class="username hide_on_micro user_tag">`)
|
||||||
var topic_50 []byte = []byte(`</a>`)
|
var topic_49 []byte = []byte(`</a>`)
|
||||||
var topic_51 []byte = []byte(`<a class="username hide_on_micro level">`)
|
var topic_50 []byte = []byte(`<a class="username hide_on_micro level">`)
|
||||||
var topic_52 []byte = []byte(`</a><a class="username hide_on_micro level_label" style="float:right;" title="Level"></a>`)
|
var topic_51 []byte = []byte(`</a><a class="username hide_on_micro level_label" style="float:right;" title="Level"></a>`)
|
||||||
var topic_53 []byte = []byte(`
|
var topic_52 []byte = []byte(`
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rowblock post_container" style="overflow: hidden;">`)
|
<div class="rowblock post_container" style="overflow: hidden;">`)
|
||||||
var topic_54 []byte = []byte(`
|
var topic_53 []byte = []byte(`
|
||||||
<div class="rowitem passive deletable_block editable_parent post_item action_item">
|
<div class="rowitem passive deletable_block editable_parent post_item action_item">
|
||||||
<span class="action_icon" style="font-size: 18px;padding-right: 5px;">`)
|
<span class="action_icon" style="font-size: 18px;padding-right: 5px;">`)
|
||||||
var topic_55 []byte = []byte(`</span>
|
var topic_54 []byte = []byte(`</span>
|
||||||
<span>`)
|
<span>`)
|
||||||
var topic_56 []byte = []byte(`</span>
|
var topic_55 []byte = []byte(`</span>
|
||||||
</div>
|
</div>
|
||||||
`)
|
`)
|
||||||
var topic_57 []byte = []byte(`
|
var topic_56 []byte = []byte(`
|
||||||
<div class="rowitem passive deletable_block editable_parent post_item `)
|
<div class="rowitem passive deletable_block editable_parent post_item `)
|
||||||
var topic_58 []byte = []byte(`" style="`)
|
var topic_57 []byte = []byte(`" style="`)
|
||||||
var topic_59 []byte = []byte(`background-image:url(`)
|
var topic_58 []byte = []byte(`background-image:url(`)
|
||||||
var topic_60 []byte = []byte(`), url(/static/post-avatar-bg.jpg);background-position: 0px `)
|
var topic_59 []byte = []byte(`), url(/static/post-avatar-bg.jpg);background-position: 0px `)
|
||||||
var topic_61 []byte = []byte(`-1`)
|
var topic_60 []byte = []byte(`-1`)
|
||||||
var topic_62 []byte = []byte(`0px;background-repeat:no-repeat, repeat-y;`)
|
var topic_61 []byte = []byte(`0px;background-repeat:no-repeat, repeat-y;`)
|
||||||
var topic_63 []byte = []byte(`">
|
var topic_62 []byte = []byte(`">
|
||||||
<p class="editable_block user_content" style="margin:0;padding:0;">`)
|
<p class="editable_block user_content" style="margin:0;padding:0;">`)
|
||||||
var topic_64 []byte = []byte(`</p>
|
var topic_63 []byte = []byte(`</p>
|
||||||
|
|
||||||
<span class="controls">
|
<span class="controls">
|
||||||
|
|
||||||
<a href="/user/`)
|
<a href="`)
|
||||||
var topic_65 []byte = []byte(`.`)
|
var topic_64 []byte = []byte(`" class="username real_username">`)
|
||||||
var topic_66 []byte = []byte(`" class="username real_username">`)
|
var topic_65 []byte = []byte(`</a>
|
||||||
var topic_67 []byte = []byte(`</a>
|
|
||||||
`)
|
`)
|
||||||
var topic_68 []byte = []byte(`<a href="/reply/like/submit/`)
|
var topic_66 []byte = []byte(`<a href="/reply/like/submit/`)
|
||||||
var topic_69 []byte = []byte(`" class="mod_button" title="Love it" style="color:#202020;"><button class="username like_label" style="`)
|
var topic_67 []byte = []byte(`" class="mod_button" title="Love it" style="color:#202020;"><button class="username like_label" style="`)
|
||||||
var topic_70 []byte = []byte(`background-color:/*#eaffea*/#D6FFD6;`)
|
var topic_68 []byte = []byte(`background-color:/*#eaffea*/#D6FFD6;`)
|
||||||
var topic_71 []byte = []byte(`"></button></a>`)
|
var topic_69 []byte = []byte(`"></button></a>`)
|
||||||
var topic_72 []byte = []byte(`<a href="/reply/edit/submit/`)
|
var topic_70 []byte = []byte(`<a href="/reply/edit/submit/`)
|
||||||
var topic_73 []byte = []byte(`" class="mod_button" title="Edit Reply"><button class="username edit_item edit_label"></button></a>`)
|
var topic_71 []byte = []byte(`" class="mod_button" title="Edit Reply"><button class="username edit_item edit_label"></button></a>`)
|
||||||
var topic_74 []byte = []byte(`<a href="/reply/delete/submit/`)
|
var topic_72 []byte = []byte(`<a href="/reply/delete/submit/`)
|
||||||
var topic_75 []byte = []byte(`" class="mod_button" title="Delete Reply"><button class="username delete_item trash_label"></button></a>`)
|
var topic_73 []byte = []byte(`" class="mod_button" title="Delete Reply"><button class="username delete_item trash_label"></button></a>`)
|
||||||
var topic_76 []byte = []byte(`
|
var topic_74 []byte = []byte(`
|
||||||
<a class="mod_button" href="/report/submit/`)
|
<a class="mod_button" href="/report/submit/`)
|
||||||
var topic_77 []byte = []byte(`?session=`)
|
var topic_75 []byte = []byte(`?session=`)
|
||||||
var topic_78 []byte = []byte(`&type=reply" class="mod_button report_item" title="Flag Reply"><button class="username report_item flag_label"></button></a>
|
var topic_76 []byte = []byte(`&type=reply" class="mod_button report_item" title="Flag Reply"><button class="username report_item flag_label"></button></a>
|
||||||
|
|
||||||
`)
|
`)
|
||||||
var topic_79 []byte = []byte(`<a class="username hide_on_micro like_count">`)
|
var topic_77 []byte = []byte(`<a class="username hide_on_micro like_count">`)
|
||||||
var topic_80 []byte = []byte(`</a><a class="username hide_on_micro like_count_label" title="Like Count"></a>`)
|
var topic_78 []byte = []byte(`</a><a class="username hide_on_micro like_count_label" title="Like Count"></a>`)
|
||||||
var topic_81 []byte = []byte(`<a class="username hide_on_micro user_tag">`)
|
var topic_79 []byte = []byte(`<a class="username hide_on_micro user_tag">`)
|
||||||
var topic_82 []byte = []byte(`</a>`)
|
var topic_80 []byte = []byte(`</a>`)
|
||||||
var topic_83 []byte = []byte(`<a class="username hide_on_micro level">`)
|
var topic_81 []byte = []byte(`<a class="username hide_on_micro level">`)
|
||||||
var topic_84 []byte = []byte(`</a><a class="username hide_on_micro level_label" style="float:right;" title="Level">`)
|
var topic_82 []byte = []byte(`</a><a class="username hide_on_micro level_label" style="float:right;" title="Level">`)
|
||||||
var topic_85 []byte = []byte(`</a>
|
var topic_83 []byte = []byte(`</a>
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
`)
|
`)
|
||||||
var topic_86 []byte = []byte(`</div>
|
var topic_84 []byte = []byte(`</div>
|
||||||
|
|
||||||
`)
|
`)
|
||||||
var topic_87 []byte = []byte(`
|
var topic_85 []byte = []byte(`
|
||||||
<div class="rowblock topic_reply_form">
|
<div class="rowblock topic_reply_form">
|
||||||
<form action="/reply/create/" method="post">
|
<form action="/reply/create/" method="post">
|
||||||
<input name="tid" value='`)
|
<input name="tid" value='`)
|
||||||
var topic_88 []byte = []byte(`' type="hidden" />
|
var topic_86 []byte = []byte(`' type="hidden" />
|
||||||
<div class="formrow real_first_child">
|
<div class="formrow real_first_child">
|
||||||
<div class="formitem"><textarea name="reply-content" placeholder="Insert reply here"></textarea></div>
|
<div class="formitem"><textarea name="reply-content" placeholder="Insert reply here"></textarea></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -289,119 +288,117 @@ var topic_alt_19 []byte = []byte(`
|
||||||
<div class="userinfo">
|
<div class="userinfo">
|
||||||
<div class="avatar_item" style="background-image: url(`)
|
<div class="avatar_item" style="background-image: url(`)
|
||||||
var topic_alt_20 []byte = []byte(`), url(/static/white-dot.jpg);background-position: 0px -10px;"> </div>
|
var topic_alt_20 []byte = []byte(`), url(/static/white-dot.jpg);background-position: 0px -10px;"> </div>
|
||||||
<a href="/user/`)
|
<a href="`)
|
||||||
var topic_alt_21 []byte = []byte(`.`)
|
var topic_alt_21 []byte = []byte(`" class="the_name">`)
|
||||||
var topic_alt_22 []byte = []byte(`" class="the_name">`)
|
var topic_alt_22 []byte = []byte(`</a>
|
||||||
var topic_alt_23 []byte = []byte(`</a>
|
|
||||||
`)
|
`)
|
||||||
var topic_alt_24 []byte = []byte(`<div class="tag_block"><div class="tag_pre"></div><div class="post_tag">`)
|
var topic_alt_23 []byte = []byte(`<div class="tag_block"><div class="tag_pre"></div><div class="post_tag">`)
|
||||||
var topic_alt_25 []byte = []byte(`</div><div class="tag_post"></div></div>`)
|
var topic_alt_24 []byte = []byte(`</div><div class="tag_post"></div></div>`)
|
||||||
var topic_alt_26 []byte = []byte(`<div class="tag_block"><div class="tag_pre"></div><div class="post_tag post_level">Level `)
|
var topic_alt_25 []byte = []byte(`<div class="tag_block"><div class="tag_pre"></div><div class="post_tag post_level">Level `)
|
||||||
var topic_alt_27 []byte = []byte(`</div><div class="tag_post"></div></div>`)
|
var topic_alt_26 []byte = []byte(`</div><div class="tag_post"></div></div>`)
|
||||||
var topic_alt_28 []byte = []byte(`
|
var topic_alt_27 []byte = []byte(`
|
||||||
</div>
|
</div>
|
||||||
<div class="content_container">
|
<div class="content_container">
|
||||||
<div class="hide_on_edit topic_content user_content">`)
|
<div class="hide_on_edit topic_content user_content">`)
|
||||||
var topic_alt_29 []byte = []byte(`</div>
|
var topic_alt_28 []byte = []byte(`</div>
|
||||||
<textarea name="topic_content" class="show_on_edit topic_content_input">`)
|
<textarea name="topic_content" class="show_on_edit topic_content_input">`)
|
||||||
var topic_alt_30 []byte = []byte(`</textarea>
|
var topic_alt_29 []byte = []byte(`</textarea>
|
||||||
<div class="button_container">
|
<div class="button_container">
|
||||||
`)
|
`)
|
||||||
var topic_alt_31 []byte = []byte(`<a href="/topic/like/submit/`)
|
var topic_alt_30 []byte = []byte(`<a href="/topic/like/submit/`)
|
||||||
var topic_alt_32 []byte = []byte(`" class="action_button">+1</a>`)
|
var topic_alt_31 []byte = []byte(`" class="action_button">+1</a>`)
|
||||||
var topic_alt_33 []byte = []byte(`<a href="/topic/edit/`)
|
var topic_alt_32 []byte = []byte(`<a href="/topic/edit/`)
|
||||||
var topic_alt_34 []byte = []byte(`" class="action_button open_edit">Edit</a>`)
|
var topic_alt_33 []byte = []byte(`" class="action_button open_edit">Edit</a>`)
|
||||||
var topic_alt_35 []byte = []byte(`<a href="/topic/delete/submit/`)
|
var topic_alt_34 []byte = []byte(`<a href="/topic/delete/submit/`)
|
||||||
var topic_alt_36 []byte = []byte(`" class="action_button delete_item">Delete</a>`)
|
var topic_alt_35 []byte = []byte(`" class="action_button delete_item">Delete</a>`)
|
||||||
var topic_alt_37 []byte = []byte(`<a href='/topic/unstick/submit/`)
|
var topic_alt_36 []byte = []byte(`<a href='/topic/unstick/submit/`)
|
||||||
var topic_alt_38 []byte = []byte(`' class="action_button">Unpin</a>`)
|
var topic_alt_37 []byte = []byte(`' class="action_button">Unpin</a>`)
|
||||||
var topic_alt_39 []byte = []byte(`<a href='/topic/stick/submit/`)
|
var topic_alt_38 []byte = []byte(`<a href='/topic/stick/submit/`)
|
||||||
var topic_alt_40 []byte = []byte(`' class="action_button">Pin</a>`)
|
var topic_alt_39 []byte = []byte(`' class="action_button">Pin</a>`)
|
||||||
var topic_alt_41 []byte = []byte(`
|
var topic_alt_40 []byte = []byte(`
|
||||||
<a href="/report/submit/`)
|
<a href="/report/submit/`)
|
||||||
var topic_alt_42 []byte = []byte(`?session=`)
|
var topic_alt_41 []byte = []byte(`?session=`)
|
||||||
var topic_alt_43 []byte = []byte(`&type=topic" class="action_button report_item">Report</a>
|
var topic_alt_42 []byte = []byte(`&type=topic" class="action_button report_item">Report</a>
|
||||||
`)
|
`)
|
||||||
var topic_alt_44 []byte = []byte(`<a href="#" title="IP Address" class="action_button action_button_right ip_item hide_on_mobile">`)
|
var topic_alt_43 []byte = []byte(`<a href="#" title="IP Address" class="action_button action_button_right ip_item hide_on_mobile">`)
|
||||||
var topic_alt_45 []byte = []byte(`</a>`)
|
var topic_alt_44 []byte = []byte(`</a>`)
|
||||||
var topic_alt_46 []byte = []byte(`
|
var topic_alt_45 []byte = []byte(`
|
||||||
<a class="action_button action_button_right hide_on_mobile">`)
|
<a class="action_button action_button_right hide_on_mobile">`)
|
||||||
var topic_alt_47 []byte = []byte(`</a>
|
var topic_alt_46 []byte = []byte(`</a>
|
||||||
`)
|
`)
|
||||||
var topic_alt_48 []byte = []byte(`<a class="action_button action_button_right hide_on_micro">`)
|
var topic_alt_47 []byte = []byte(`<a class="action_button action_button_right hide_on_micro">`)
|
||||||
var topic_alt_49 []byte = []byte(` up</a>`)
|
var topic_alt_48 []byte = []byte(` up</a>`)
|
||||||
var topic_alt_50 []byte = []byte(`
|
var topic_alt_49 []byte = []byte(`
|
||||||
</div>
|
</div>
|
||||||
</div><div style="clear:both;"></div>
|
</div><div style="clear:both;"></div>
|
||||||
</div>
|
</div>
|
||||||
`)
|
`)
|
||||||
var topic_alt_51 []byte = []byte(`
|
var topic_alt_50 []byte = []byte(`
|
||||||
<div class="rowitem passive deletable_block editable_parent post_item `)
|
<div class="rowitem passive deletable_block editable_parent post_item `)
|
||||||
var topic_alt_52 []byte = []byte(`action_item`)
|
var topic_alt_51 []byte = []byte(`action_item`)
|
||||||
var topic_alt_53 []byte = []byte(`">
|
var topic_alt_52 []byte = []byte(`">
|
||||||
<div class="userinfo">
|
<div class="userinfo">
|
||||||
<div class="avatar_item" style="background-image: url(`)
|
<div class="avatar_item" style="background-image: url(`)
|
||||||
var topic_alt_54 []byte = []byte(`), url(/static/white-dot.jpg);background-position: 0px -10px;"> </div>
|
var topic_alt_53 []byte = []byte(`), url(/static/white-dot.jpg);background-position: 0px -10px;"> </div>
|
||||||
<a href="/user/`)
|
<a href="`)
|
||||||
var topic_alt_55 []byte = []byte(`.`)
|
var topic_alt_54 []byte = []byte(`" class="the_name">`)
|
||||||
var topic_alt_56 []byte = []byte(`" class="the_name">`)
|
var topic_alt_55 []byte = []byte(`</a>
|
||||||
var topic_alt_57 []byte = []byte(`</a>
|
|
||||||
`)
|
`)
|
||||||
var topic_alt_58 []byte = []byte(`<div class="tag_block"><div class="tag_pre"></div><div class="post_tag">`)
|
var topic_alt_56 []byte = []byte(`<div class="tag_block"><div class="tag_pre"></div><div class="post_tag">`)
|
||||||
|
var topic_alt_57 []byte = []byte(`</div><div class="tag_post"></div></div>`)
|
||||||
|
var topic_alt_58 []byte = []byte(`<div class="tag_block"><div class="tag_pre"></div><div class="post_tag post_level">Level `)
|
||||||
var topic_alt_59 []byte = []byte(`</div><div class="tag_post"></div></div>`)
|
var topic_alt_59 []byte = []byte(`</div><div class="tag_post"></div></div>`)
|
||||||
var topic_alt_60 []byte = []byte(`<div class="tag_block"><div class="tag_pre"></div><div class="post_tag post_level">Level `)
|
var topic_alt_60 []byte = []byte(`
|
||||||
var topic_alt_61 []byte = []byte(`</div><div class="tag_post"></div></div>`)
|
|
||||||
var topic_alt_62 []byte = []byte(`
|
|
||||||
</div>
|
</div>
|
||||||
<div class="content_container" `)
|
<div class="content_container" `)
|
||||||
var topic_alt_63 []byte = []byte(`style="margin-left: 0px;"`)
|
var topic_alt_61 []byte = []byte(`style="margin-left: 0px;"`)
|
||||||
var topic_alt_64 []byte = []byte(`>
|
var topic_alt_62 []byte = []byte(`>
|
||||||
`)
|
`)
|
||||||
var topic_alt_65 []byte = []byte(`
|
var topic_alt_63 []byte = []byte(`
|
||||||
<span class="action_icon" style="font-size: 18px;padding-right: 5px;">`)
|
<span class="action_icon" style="font-size: 18px;padding-right: 5px;">`)
|
||||||
var topic_alt_66 []byte = []byte(`</span>
|
var topic_alt_64 []byte = []byte(`</span>
|
||||||
<span>`)
|
<span>`)
|
||||||
var topic_alt_67 []byte = []byte(`</span>
|
var topic_alt_65 []byte = []byte(`</span>
|
||||||
`)
|
`)
|
||||||
var topic_alt_68 []byte = []byte(`
|
var topic_alt_66 []byte = []byte(`
|
||||||
<div class="editable_block user_content">`)
|
<div class="editable_block user_content">`)
|
||||||
var topic_alt_69 []byte = []byte(`</div>
|
var topic_alt_67 []byte = []byte(`</div>
|
||||||
<div class="button_container">
|
<div class="button_container">
|
||||||
`)
|
`)
|
||||||
var topic_alt_70 []byte = []byte(`<a href="/reply/like/submit/`)
|
var topic_alt_68 []byte = []byte(`<a href="/reply/like/submit/`)
|
||||||
var topic_alt_71 []byte = []byte(`" class="action_button">+1</a>`)
|
var topic_alt_69 []byte = []byte(`" class="action_button">+1</a>`)
|
||||||
var topic_alt_72 []byte = []byte(`<a href="/reply/edit/submit/`)
|
var topic_alt_70 []byte = []byte(`<a href="/reply/edit/submit/`)
|
||||||
var topic_alt_73 []byte = []byte(`" class="action_button edit_item">Edit</a>`)
|
var topic_alt_71 []byte = []byte(`" class="action_button edit_item">Edit</a>`)
|
||||||
var topic_alt_74 []byte = []byte(`<a href="/reply/delete/submit/`)
|
var topic_alt_72 []byte = []byte(`<a href="/reply/delete/submit/`)
|
||||||
var topic_alt_75 []byte = []byte(`" class="action_button delete_item">Delete</a>`)
|
var topic_alt_73 []byte = []byte(`" class="action_button delete_item">Delete</a>`)
|
||||||
var topic_alt_76 []byte = []byte(`
|
var topic_alt_74 []byte = []byte(`
|
||||||
<a href="/report/submit/`)
|
<a href="/report/submit/`)
|
||||||
var topic_alt_77 []byte = []byte(`?session=`)
|
var topic_alt_75 []byte = []byte(`?session=`)
|
||||||
var topic_alt_78 []byte = []byte(`&type=reply" class="action_button report_item">Report</a>
|
var topic_alt_76 []byte = []byte(`&type=reply" class="action_button report_item">Report</a>
|
||||||
`)
|
`)
|
||||||
var topic_alt_79 []byte = []byte(`<a href="#" title="IP Address" class="action_button action_button_right ip_item hide_on_mobile">`)
|
var topic_alt_77 []byte = []byte(`<a href="#" title="IP Address" class="action_button action_button_right ip_item hide_on_mobile">`)
|
||||||
var topic_alt_80 []byte = []byte(`</a>`)
|
var topic_alt_78 []byte = []byte(`</a>`)
|
||||||
var topic_alt_81 []byte = []byte(`
|
var topic_alt_79 []byte = []byte(`
|
||||||
<a class="action_button action_button_right hide_on_mobile">`)
|
<a class="action_button action_button_right hide_on_mobile">`)
|
||||||
var topic_alt_82 []byte = []byte(`</a>
|
var topic_alt_80 []byte = []byte(`</a>
|
||||||
`)
|
`)
|
||||||
var topic_alt_83 []byte = []byte(`<a class="action_button action_button_right hide_on_micro">`)
|
var topic_alt_81 []byte = []byte(`<a class="action_button action_button_right hide_on_micro">`)
|
||||||
var topic_alt_84 []byte = []byte(` up</a>`)
|
var topic_alt_82 []byte = []byte(` up</a>`)
|
||||||
var topic_alt_85 []byte = []byte(`
|
var topic_alt_83 []byte = []byte(`
|
||||||
</div>
|
</div>
|
||||||
`)
|
`)
|
||||||
var topic_alt_86 []byte = []byte(`
|
var topic_alt_84 []byte = []byte(`
|
||||||
</div>
|
</div>
|
||||||
<div style="clear:both;"></div>
|
<div style="clear:both;"></div>
|
||||||
</div>
|
</div>
|
||||||
`)
|
`)
|
||||||
var topic_alt_87 []byte = []byte(`</div>
|
var topic_alt_85 []byte = []byte(`</div>
|
||||||
`)
|
`)
|
||||||
var topic_alt_88 []byte = []byte(`
|
var topic_alt_86 []byte = []byte(`
|
||||||
<div class="rowblock topic_reply_form" style="border-top: none;">
|
<div class="rowblock topic_reply_form" style="border-top: none;">
|
||||||
<form action="/reply/create/" method="post">
|
<form action="/reply/create/" method="post">
|
||||||
<input name="tid" value='`)
|
<input name="tid" value='`)
|
||||||
var topic_alt_89 []byte = []byte(`' type="hidden" />
|
var topic_alt_87 []byte = []byte(`' type="hidden" />
|
||||||
<div class="formrow">
|
<div class="formrow">
|
||||||
<div class="formitem"><textarea name="reply-content" placeholder="Insert reply here"></textarea></div>
|
<div class="formitem"><textarea name="reply-content" placeholder="Insert reply here"></textarea></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -462,42 +459,44 @@ var profile_17 []byte = []byte(`
|
||||||
<div class="rowitem passive deletable_block editable_parent simple `)
|
<div class="rowitem passive deletable_block editable_parent simple `)
|
||||||
var profile_18 []byte = []byte(`" style="`)
|
var profile_18 []byte = []byte(`" style="`)
|
||||||
var profile_19 []byte = []byte(`background-image: url(`)
|
var profile_19 []byte = []byte(`background-image: url(`)
|
||||||
var profile_20 []byte = []byte(`), url(/static/white-dot.jpg);background-position: 0px `)
|
var profile_20 []byte = []byte(`), url(/static/post-avatar-bg.jpg);background-position: 0px `)
|
||||||
var profile_21 []byte = []byte(`-1`)
|
var profile_21 []byte = []byte(`-1`)
|
||||||
var profile_22 []byte = []byte(`0px;background-repeat: no-repeat, repeat-y;background-size: 128px;padding-left: 136px;`)
|
var profile_22 []byte = []byte(`0px;`)
|
||||||
var profile_23 []byte = []byte(`">
|
var profile_23 []byte = []byte(`">
|
||||||
<span class="editable_block user_content simple">`)
|
<span class="editable_block user_content simple">`)
|
||||||
var profile_24 []byte = []byte(`</span><br /><br />
|
var profile_24 []byte = []byte(`</span>
|
||||||
<a href="/user/`)
|
|
||||||
var profile_25 []byte = []byte(`.`)
|
<span class="controls">
|
||||||
var profile_26 []byte = []byte(`" class="real_username username">`)
|
<a href="`)
|
||||||
var profile_27 []byte = []byte(`</a>
|
var profile_25 []byte = []byte(`" class="real_username username">`)
|
||||||
|
var profile_26 []byte = []byte(`</a>
|
||||||
|
|
||||||
`)
|
`)
|
||||||
var profile_28 []byte = []byte(`<a href="/profile/reply/edit/submit/`)
|
var profile_27 []byte = []byte(`<a href="/profile/reply/edit/submit/`)
|
||||||
var profile_29 []byte = []byte(`" class="mod_button" title="Edit Item"><button class="username edit_item edit_label"></button></a>
|
var profile_28 []byte = []byte(`" class="mod_button" title="Edit Item"><button class="username edit_item edit_label"></button></a>
|
||||||
|
|
||||||
<a href="/profile/reply/delete/submit/`)
|
<a href="/profile/reply/delete/submit/`)
|
||||||
var profile_30 []byte = []byte(`" class="mod_button" title="Delete Item"><button class="username delete_item trash_label"></button></a>`)
|
var profile_29 []byte = []byte(`" class="mod_button" title="Delete Item"><button class="username delete_item trash_label"></button></a>`)
|
||||||
var profile_31 []byte = []byte(`
|
var profile_30 []byte = []byte(`
|
||||||
|
|
||||||
<a class="mod_button" href="/report/submit/`)
|
<a class="mod_button" href="/report/submit/`)
|
||||||
var profile_32 []byte = []byte(`?session=`)
|
var profile_31 []byte = []byte(`?session=`)
|
||||||
var profile_33 []byte = []byte(`&type=user-reply"><button class="username report_item flag_label"></button></a>
|
var profile_32 []byte = []byte(`&type=user-reply"><button class="username report_item flag_label"></button></a>
|
||||||
|
|
||||||
`)
|
`)
|
||||||
var profile_34 []byte = []byte(`<a class="username hide_on_mobile user_tag" style="float: right;">`)
|
var profile_33 []byte = []byte(`<a class="username hide_on_mobile user_tag" style="float: right;">`)
|
||||||
var profile_35 []byte = []byte(`</a>`)
|
var profile_34 []byte = []byte(`</a>`)
|
||||||
var profile_36 []byte = []byte(`
|
var profile_35 []byte = []byte(`
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
`)
|
`)
|
||||||
var profile_37 []byte = []byte(`</div>
|
var profile_36 []byte = []byte(`</div>
|
||||||
|
|
||||||
`)
|
`)
|
||||||
var profile_38 []byte = []byte(`
|
var profile_37 []byte = []byte(`
|
||||||
<form action="/profile/reply/create/" method="post">
|
<form action="/profile/reply/create/" method="post">
|
||||||
<input name="uid" value='`)
|
<input name="uid" value='`)
|
||||||
var profile_39 []byte = []byte(`' type="hidden" />
|
var profile_38 []byte = []byte(`' type="hidden" />
|
||||||
<div class="colstack_item topic_reply_form" style="border-top: none;">
|
<div class="colstack_item topic_reply_form" style="border-top: none;">
|
||||||
<div class="formrow">
|
<div class="formrow">
|
||||||
<div class="formitem"><textarea name="reply-content" placeholder="Insert reply here"></textarea></div>
|
<div class="formitem"><textarea name="reply-content" placeholder="Insert reply here"></textarea></div>
|
||||||
|
@ -508,7 +507,7 @@ var profile_39 []byte = []byte(`' type="hidden" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
`)
|
`)
|
||||||
var profile_40 []byte = []byte(`
|
var profile_39 []byte = []byte(`
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
`)
|
`)
|
||||||
|
@ -538,7 +537,7 @@ var forums_10 []byte = []byte(`</a>
|
||||||
var forums_11 []byte = []byte(`
|
var forums_11 []byte = []byte(`
|
||||||
|
|
||||||
<span style="float: right;">
|
<span style="float: right;">
|
||||||
<a href="/topic/`)
|
<a href="`)
|
||||||
var forums_12 []byte = []byte(`" style="float: right;font-size: 14px;">`)
|
var forums_12 []byte = []byte(`" style="float: right;font-size: 14px;">`)
|
||||||
var forums_13 []byte = []byte(`</a>
|
var forums_13 []byte = []byte(`</a>
|
||||||
`)
|
`)
|
||||||
|
@ -573,28 +572,26 @@ var topics_8 []byte = []byte(` replies</span><br />
|
||||||
var topics_9 []byte = []byte(`</span>
|
var topics_9 []byte = []byte(`</span>
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
<a class="rowtopic" href="/topic/`)
|
<a class="rowtopic" href="`)
|
||||||
var topics_10 []byte = []byte(`.`)
|
var topics_10 []byte = []byte(`">`)
|
||||||
var topics_11 []byte = []byte(`">`)
|
var topics_11 []byte = []byte(`</a> `)
|
||||||
var topics_12 []byte = []byte(`</a> `)
|
var topics_12 []byte = []byte(`<a class="rowsmall" href="`)
|
||||||
var topics_13 []byte = []byte(`<a class="rowsmall" href="`)
|
var topics_13 []byte = []byte(`">`)
|
||||||
var topics_14 []byte = []byte(`">`)
|
var topics_14 []byte = []byte(`</a>`)
|
||||||
var topics_15 []byte = []byte(`</a>`)
|
var topics_15 []byte = []byte(`
|
||||||
var topics_16 []byte = []byte(`
|
<br /><a class="rowsmall" href="`)
|
||||||
<br /><a class="rowsmall" href="/user/`)
|
var topics_16 []byte = []byte(`">Starter: `)
|
||||||
var topics_17 []byte = []byte(`.`)
|
var topics_17 []byte = []byte(`</a>
|
||||||
var topics_18 []byte = []byte(`">Starter: `)
|
|
||||||
var topics_19 []byte = []byte(`</a>
|
|
||||||
`)
|
`)
|
||||||
var topics_20 []byte = []byte(`<span class="rowsmall topic_status_e topic_status_closed" title="Status: Closed"> | 🔒︎`)
|
var topics_18 []byte = []byte(`<span class="rowsmall topic_status_e topic_status_closed" title="Status: Closed"> | 🔒︎`)
|
||||||
var topics_21 []byte = []byte(`</span>
|
var topics_19 []byte = []byte(`</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
`)
|
`)
|
||||||
var topics_22 []byte = []byte(`<div class="rowitem passive">There aren't any topics yet.`)
|
var topics_20 []byte = []byte(`<div class="rowitem passive">There aren't any topics yet.`)
|
||||||
var topics_23 []byte = []byte(` <a href="/topics/create/">Start one?</a>`)
|
var topics_21 []byte = []byte(` <a href="/topics/create/">Start one?</a>`)
|
||||||
var topics_24 []byte = []byte(`</div>`)
|
var topics_22 []byte = []byte(`</div>`)
|
||||||
var topics_25 []byte = []byte(`
|
var topics_23 []byte = []byte(`
|
||||||
</div>
|
</div>
|
||||||
`)
|
`)
|
||||||
var forum_0 []byte = []byte(`<div id="prevFloat" class="prev_button"><a class="prev_link" href="/forum/`)
|
var forum_0 []byte = []byte(`<div id="prevFloat" class="prev_button"><a class="prev_link" href="/forum/`)
|
||||||
|
@ -641,24 +638,22 @@ var forum_24 []byte = []byte(` replies</span><br />
|
||||||
var forum_25 []byte = []byte(`</span>
|
var forum_25 []byte = []byte(`</span>
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
<a class="rowtopic" href="/topic/`)
|
<a class="rowtopic" href="`)
|
||||||
var forum_26 []byte = []byte(`.`)
|
var forum_26 []byte = []byte(`">`)
|
||||||
var forum_27 []byte = []byte(`">`)
|
var forum_27 []byte = []byte(`</a>
|
||||||
var forum_28 []byte = []byte(`</a>
|
<br /><a class="rowsmall" href="`)
|
||||||
<br /><a class="rowsmall" href="/user/`)
|
var forum_28 []byte = []byte(`">Starter: `)
|
||||||
var forum_29 []byte = []byte(`.`)
|
var forum_29 []byte = []byte(`</a>
|
||||||
var forum_30 []byte = []byte(`">Starter: `)
|
|
||||||
var forum_31 []byte = []byte(`</a>
|
|
||||||
`)
|
`)
|
||||||
var forum_32 []byte = []byte(`<span class="rowsmall topic_status_e topic_status_closed" title="Status: Closed"> | 🔒︎`)
|
var forum_30 []byte = []byte(`<span class="rowsmall topic_status_e topic_status_closed" title="Status: Closed"> | 🔒︎`)
|
||||||
var forum_33 []byte = []byte(`</span>
|
var forum_31 []byte = []byte(`</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
`)
|
`)
|
||||||
var forum_34 []byte = []byte(`<div class="rowitem passive">There aren't any topics in this forum yet.`)
|
var forum_32 []byte = []byte(`<div class="rowitem passive">There aren't any topics in this forum yet.`)
|
||||||
var forum_35 []byte = []byte(` <a href="/topics/create/`)
|
var forum_33 []byte = []byte(` <a href="/topics/create/`)
|
||||||
var forum_36 []byte = []byte(`">Start one?</a>`)
|
var forum_34 []byte = []byte(`">Start one?</a>`)
|
||||||
var forum_37 []byte = []byte(`</div>`)
|
var forum_35 []byte = []byte(`</div>`)
|
||||||
var forum_38 []byte = []byte(`
|
var forum_36 []byte = []byte(`
|
||||||
</div>
|
</div>
|
||||||
`)
|
`)
|
||||||
|
|
|
@ -35,35 +35,33 @@ w.Write(header_6)
|
||||||
w.Write(header_7)
|
w.Write(header_7)
|
||||||
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
|
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
|
||||||
w.Write(header_8)
|
w.Write(header_8)
|
||||||
|
if !tmpl_profile_vars.CurrentUser.Is_Super_Mod {
|
||||||
|
w.Write(header_9)
|
||||||
|
}
|
||||||
|
w.Write(header_10)
|
||||||
w.Write(menu_0)
|
w.Write(menu_0)
|
||||||
w.Write([]byte(tmpl_profile_vars.Header.Site.Name))
|
w.Write([]byte(tmpl_profile_vars.Header.Site.Name))
|
||||||
w.Write(menu_1)
|
w.Write(menu_1)
|
||||||
if tmpl_profile_vars.CurrentUser.Loggedin {
|
if tmpl_profile_vars.CurrentUser.Loggedin {
|
||||||
w.Write(menu_2)
|
w.Write(menu_2)
|
||||||
w.Write([]byte(tmpl_profile_vars.CurrentUser.Slug))
|
w.Write([]byte(tmpl_profile_vars.CurrentUser.Link))
|
||||||
w.Write(menu_3)
|
w.Write(menu_3)
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_profile_vars.CurrentUser.ID)))
|
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
|
||||||
w.Write(menu_4)
|
w.Write(menu_4)
|
||||||
if tmpl_profile_vars.CurrentUser.Is_Super_Mod {
|
} else {
|
||||||
w.Write(menu_5)
|
w.Write(menu_5)
|
||||||
}
|
}
|
||||||
w.Write(menu_6)
|
w.Write(menu_6)
|
||||||
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
|
|
||||||
w.Write(menu_7)
|
|
||||||
} else {
|
|
||||||
w.Write(menu_8)
|
|
||||||
}
|
|
||||||
w.Write(menu_9)
|
|
||||||
w.Write(header_9)
|
|
||||||
if tmpl_profile_vars.Header.Widgets.RightSidebar != "" {
|
|
||||||
w.Write(header_10)
|
|
||||||
}
|
|
||||||
w.Write(header_11)
|
w.Write(header_11)
|
||||||
|
if tmpl_profile_vars.Header.Widgets.RightSidebar != "" {
|
||||||
|
w.Write(header_12)
|
||||||
|
}
|
||||||
|
w.Write(header_13)
|
||||||
if len(tmpl_profile_vars.Header.NoticeList) != 0 {
|
if len(tmpl_profile_vars.Header.NoticeList) != 0 {
|
||||||
for _, item := range tmpl_profile_vars.Header.NoticeList {
|
for _, item := range tmpl_profile_vars.Header.NoticeList {
|
||||||
w.Write(header_12)
|
w.Write(header_14)
|
||||||
w.Write([]byte(item))
|
w.Write([]byte(item))
|
||||||
w.Write(header_13)
|
w.Write(header_15)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
w.Write(profile_0)
|
w.Write(profile_0)
|
||||||
|
@ -116,39 +114,37 @@ w.Write(profile_22)
|
||||||
w.Write(profile_23)
|
w.Write(profile_23)
|
||||||
w.Write([]byte(item.ContentHtml))
|
w.Write([]byte(item.ContentHtml))
|
||||||
w.Write(profile_24)
|
w.Write(profile_24)
|
||||||
w.Write([]byte(item.UserSlug))
|
w.Write([]byte(item.UserLink))
|
||||||
w.Write(profile_25)
|
w.Write(profile_25)
|
||||||
w.Write([]byte(strconv.Itoa(item.CreatedBy)))
|
|
||||||
w.Write(profile_26)
|
|
||||||
w.Write([]byte(item.CreatedByName))
|
w.Write([]byte(item.CreatedByName))
|
||||||
w.Write(profile_27)
|
w.Write(profile_26)
|
||||||
if tmpl_profile_vars.CurrentUser.Is_Mod {
|
if tmpl_profile_vars.CurrentUser.Is_Mod {
|
||||||
|
w.Write(profile_27)
|
||||||
|
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||||
w.Write(profile_28)
|
w.Write(profile_28)
|
||||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||||
w.Write(profile_29)
|
w.Write(profile_29)
|
||||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
|
||||||
w.Write(profile_30)
|
|
||||||
}
|
}
|
||||||
w.Write(profile_31)
|
w.Write(profile_30)
|
||||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||||
w.Write(profile_32)
|
w.Write(profile_31)
|
||||||
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
|
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
|
||||||
w.Write(profile_33)
|
w.Write(profile_32)
|
||||||
if item.Tag != "" {
|
if item.Tag != "" {
|
||||||
w.Write(profile_34)
|
w.Write(profile_33)
|
||||||
w.Write([]byte(item.Tag))
|
w.Write([]byte(item.Tag))
|
||||||
|
w.Write(profile_34)
|
||||||
|
}
|
||||||
w.Write(profile_35)
|
w.Write(profile_35)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
w.Write(profile_36)
|
w.Write(profile_36)
|
||||||
}
|
|
||||||
}
|
|
||||||
w.Write(profile_37)
|
|
||||||
if !tmpl_profile_vars.CurrentUser.Is_Banned {
|
if !tmpl_profile_vars.CurrentUser.Is_Banned {
|
||||||
w.Write(profile_38)
|
w.Write(profile_37)
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_profile_vars.ProfileOwner.ID)))
|
w.Write([]byte(strconv.Itoa(tmpl_profile_vars.ProfileOwner.ID)))
|
||||||
w.Write(profile_39)
|
w.Write(profile_38)
|
||||||
}
|
}
|
||||||
w.Write(profile_40)
|
w.Write(profile_39)
|
||||||
w.Write(footer_0)
|
w.Write(footer_0)
|
||||||
if tmpl_profile_vars.Header.Widgets.RightSidebar != "" {
|
if tmpl_profile_vars.Header.Widgets.RightSidebar != "" {
|
||||||
w.Write(footer_1)
|
w.Write(footer_1)
|
||||||
|
|
|
@ -35,35 +35,33 @@ w.Write(header_6)
|
||||||
w.Write(header_7)
|
w.Write(header_7)
|
||||||
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
|
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
|
||||||
w.Write(header_8)
|
w.Write(header_8)
|
||||||
|
if !tmpl_topic_vars.CurrentUser.Is_Super_Mod {
|
||||||
|
w.Write(header_9)
|
||||||
|
}
|
||||||
|
w.Write(header_10)
|
||||||
w.Write(menu_0)
|
w.Write(menu_0)
|
||||||
w.Write([]byte(tmpl_topic_vars.Header.Site.Name))
|
w.Write([]byte(tmpl_topic_vars.Header.Site.Name))
|
||||||
w.Write(menu_1)
|
w.Write(menu_1)
|
||||||
if tmpl_topic_vars.CurrentUser.Loggedin {
|
if tmpl_topic_vars.CurrentUser.Loggedin {
|
||||||
w.Write(menu_2)
|
w.Write(menu_2)
|
||||||
w.Write([]byte(tmpl_topic_vars.CurrentUser.Slug))
|
w.Write([]byte(tmpl_topic_vars.CurrentUser.Link))
|
||||||
w.Write(menu_3)
|
w.Write(menu_3)
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.CurrentUser.ID)))
|
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
|
||||||
w.Write(menu_4)
|
w.Write(menu_4)
|
||||||
if tmpl_topic_vars.CurrentUser.Is_Super_Mod {
|
} else {
|
||||||
w.Write(menu_5)
|
w.Write(menu_5)
|
||||||
}
|
}
|
||||||
w.Write(menu_6)
|
w.Write(menu_6)
|
||||||
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
|
|
||||||
w.Write(menu_7)
|
|
||||||
} else {
|
|
||||||
w.Write(menu_8)
|
|
||||||
}
|
|
||||||
w.Write(menu_9)
|
|
||||||
w.Write(header_9)
|
|
||||||
if tmpl_topic_vars.Header.Widgets.RightSidebar != "" {
|
|
||||||
w.Write(header_10)
|
|
||||||
}
|
|
||||||
w.Write(header_11)
|
w.Write(header_11)
|
||||||
|
if tmpl_topic_vars.Header.Widgets.RightSidebar != "" {
|
||||||
|
w.Write(header_12)
|
||||||
|
}
|
||||||
|
w.Write(header_13)
|
||||||
if len(tmpl_topic_vars.Header.NoticeList) != 0 {
|
if len(tmpl_topic_vars.Header.NoticeList) != 0 {
|
||||||
for _, item := range tmpl_topic_vars.Header.NoticeList {
|
for _, item := range tmpl_topic_vars.Header.NoticeList {
|
||||||
w.Write(header_12)
|
w.Write(header_14)
|
||||||
w.Write([]byte(item))
|
w.Write([]byte(item))
|
||||||
w.Write(header_13)
|
w.Write(header_15)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
w.Write(topic_0)
|
w.Write(topic_0)
|
||||||
|
@ -127,139 +125,135 @@ w.Write([]byte(tmpl_topic_vars.Topic.Content))
|
||||||
w.Write(topic_27)
|
w.Write(topic_27)
|
||||||
w.Write([]byte(tmpl_topic_vars.Topic.Content))
|
w.Write([]byte(tmpl_topic_vars.Topic.Content))
|
||||||
w.Write(topic_28)
|
w.Write(topic_28)
|
||||||
w.Write([]byte(tmpl_topic_vars.Topic.UserSlug))
|
w.Write([]byte(tmpl_topic_vars.Topic.UserLink))
|
||||||
w.Write(topic_29)
|
w.Write(topic_29)
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.CreatedBy)))
|
|
||||||
w.Write(topic_30)
|
|
||||||
w.Write([]byte(tmpl_topic_vars.Topic.CreatedByName))
|
w.Write([]byte(tmpl_topic_vars.Topic.CreatedByName))
|
||||||
w.Write(topic_31)
|
w.Write(topic_30)
|
||||||
if tmpl_topic_vars.CurrentUser.Perms.LikeItem {
|
if tmpl_topic_vars.CurrentUser.Perms.LikeItem {
|
||||||
w.Write(topic_32)
|
w.Write(topic_31)
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
||||||
w.Write(topic_33)
|
w.Write(topic_32)
|
||||||
if tmpl_topic_vars.Topic.Liked {
|
if tmpl_topic_vars.Topic.Liked {
|
||||||
|
w.Write(topic_33)
|
||||||
|
}
|
||||||
w.Write(topic_34)
|
w.Write(topic_34)
|
||||||
}
|
}
|
||||||
w.Write(topic_35)
|
|
||||||
}
|
|
||||||
if tmpl_topic_vars.CurrentUser.Perms.EditTopic {
|
if tmpl_topic_vars.CurrentUser.Perms.EditTopic {
|
||||||
w.Write(topic_36)
|
w.Write(topic_35)
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
||||||
w.Write(topic_37)
|
w.Write(topic_36)
|
||||||
}
|
}
|
||||||
if tmpl_topic_vars.CurrentUser.Perms.DeleteTopic {
|
if tmpl_topic_vars.CurrentUser.Perms.DeleteTopic {
|
||||||
w.Write(topic_38)
|
w.Write(topic_37)
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
||||||
w.Write(topic_39)
|
w.Write(topic_38)
|
||||||
}
|
}
|
||||||
if tmpl_topic_vars.CurrentUser.Perms.PinTopic {
|
if tmpl_topic_vars.CurrentUser.Perms.PinTopic {
|
||||||
if tmpl_topic_vars.Topic.Sticky {
|
if tmpl_topic_vars.Topic.Sticky {
|
||||||
|
w.Write(topic_39)
|
||||||
|
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
||||||
w.Write(topic_40)
|
w.Write(topic_40)
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
|
||||||
w.Write(topic_41)
|
|
||||||
} else {
|
} else {
|
||||||
|
w.Write(topic_41)
|
||||||
|
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
||||||
w.Write(topic_42)
|
w.Write(topic_42)
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
}
|
||||||
|
}
|
||||||
w.Write(topic_43)
|
w.Write(topic_43)
|
||||||
}
|
|
||||||
}
|
|
||||||
w.Write(topic_44)
|
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
||||||
w.Write(topic_45)
|
w.Write(topic_44)
|
||||||
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
|
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
|
||||||
w.Write(topic_46)
|
w.Write(topic_45)
|
||||||
if tmpl_topic_vars.Topic.LikeCount > 0 {
|
if tmpl_topic_vars.Topic.LikeCount > 0 {
|
||||||
w.Write(topic_47)
|
w.Write(topic_46)
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.LikeCount)))
|
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.LikeCount)))
|
||||||
w.Write(topic_48)
|
w.Write(topic_47)
|
||||||
}
|
}
|
||||||
if tmpl_topic_vars.Topic.Tag != "" {
|
if tmpl_topic_vars.Topic.Tag != "" {
|
||||||
w.Write(topic_49)
|
w.Write(topic_48)
|
||||||
w.Write([]byte(tmpl_topic_vars.Topic.Tag))
|
w.Write([]byte(tmpl_topic_vars.Topic.Tag))
|
||||||
w.Write(topic_50)
|
w.Write(topic_49)
|
||||||
} else {
|
} else {
|
||||||
w.Write(topic_51)
|
w.Write(topic_50)
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.Level)))
|
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.Level)))
|
||||||
w.Write(topic_52)
|
w.Write(topic_51)
|
||||||
}
|
}
|
||||||
w.Write(topic_53)
|
w.Write(topic_52)
|
||||||
if len(tmpl_topic_vars.ItemList) != 0 {
|
if len(tmpl_topic_vars.ItemList) != 0 {
|
||||||
for _, item := range tmpl_topic_vars.ItemList {
|
for _, item := range tmpl_topic_vars.ItemList {
|
||||||
if item.ActionType != "" {
|
if item.ActionType != "" {
|
||||||
w.Write(topic_54)
|
w.Write(topic_53)
|
||||||
w.Write([]byte(item.ActionIcon))
|
w.Write([]byte(item.ActionIcon))
|
||||||
w.Write(topic_55)
|
w.Write(topic_54)
|
||||||
w.Write([]byte(item.ActionType))
|
w.Write([]byte(item.ActionType))
|
||||||
w.Write(topic_56)
|
w.Write(topic_55)
|
||||||
} else {
|
} else {
|
||||||
w.Write(topic_57)
|
w.Write(topic_56)
|
||||||
w.Write([]byte(item.ClassName))
|
w.Write([]byte(item.ClassName))
|
||||||
w.Write(topic_58)
|
w.Write(topic_57)
|
||||||
if item.Avatar != "" {
|
if item.Avatar != "" {
|
||||||
w.Write(topic_59)
|
w.Write(topic_58)
|
||||||
w.Write([]byte(item.Avatar))
|
w.Write([]byte(item.Avatar))
|
||||||
w.Write(topic_60)
|
w.Write(topic_59)
|
||||||
if item.ContentLines <= 5 {
|
if item.ContentLines <= 5 {
|
||||||
|
w.Write(topic_60)
|
||||||
|
}
|
||||||
w.Write(topic_61)
|
w.Write(topic_61)
|
||||||
}
|
}
|
||||||
w.Write(topic_62)
|
w.Write(topic_62)
|
||||||
}
|
|
||||||
w.Write(topic_63)
|
|
||||||
w.Write([]byte(item.ContentHtml))
|
w.Write([]byte(item.ContentHtml))
|
||||||
|
w.Write(topic_63)
|
||||||
|
w.Write([]byte(item.UserLink))
|
||||||
w.Write(topic_64)
|
w.Write(topic_64)
|
||||||
w.Write([]byte(item.UserSlug))
|
|
||||||
w.Write(topic_65)
|
|
||||||
w.Write([]byte(strconv.Itoa(item.CreatedBy)))
|
|
||||||
w.Write(topic_66)
|
|
||||||
w.Write([]byte(item.CreatedByName))
|
w.Write([]byte(item.CreatedByName))
|
||||||
w.Write(topic_67)
|
w.Write(topic_65)
|
||||||
if tmpl_topic_vars.CurrentUser.Perms.LikeItem {
|
if tmpl_topic_vars.CurrentUser.Perms.LikeItem {
|
||||||
w.Write(topic_68)
|
w.Write(topic_66)
|
||||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||||
w.Write(topic_69)
|
w.Write(topic_67)
|
||||||
if item.Liked {
|
if item.Liked {
|
||||||
w.Write(topic_70)
|
w.Write(topic_68)
|
||||||
}
|
}
|
||||||
w.Write(topic_71)
|
w.Write(topic_69)
|
||||||
}
|
}
|
||||||
if tmpl_topic_vars.CurrentUser.Perms.EditReply {
|
if tmpl_topic_vars.CurrentUser.Perms.EditReply {
|
||||||
|
w.Write(topic_70)
|
||||||
|
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||||
|
w.Write(topic_71)
|
||||||
|
}
|
||||||
|
if tmpl_topic_vars.CurrentUser.Perms.DeleteReply {
|
||||||
w.Write(topic_72)
|
w.Write(topic_72)
|
||||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||||
w.Write(topic_73)
|
w.Write(topic_73)
|
||||||
}
|
}
|
||||||
if tmpl_topic_vars.CurrentUser.Perms.DeleteReply {
|
|
||||||
w.Write(topic_74)
|
w.Write(topic_74)
|
||||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||||
w.Write(topic_75)
|
w.Write(topic_75)
|
||||||
}
|
|
||||||
w.Write(topic_76)
|
|
||||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
|
||||||
w.Write(topic_77)
|
|
||||||
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
|
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
|
||||||
w.Write(topic_78)
|
w.Write(topic_76)
|
||||||
if item.LikeCount > 0 {
|
if item.LikeCount > 0 {
|
||||||
w.Write(topic_79)
|
w.Write(topic_77)
|
||||||
w.Write([]byte(strconv.Itoa(item.LikeCount)))
|
w.Write([]byte(strconv.Itoa(item.LikeCount)))
|
||||||
w.Write(topic_80)
|
w.Write(topic_78)
|
||||||
}
|
}
|
||||||
if item.Tag != "" {
|
if item.Tag != "" {
|
||||||
w.Write(topic_81)
|
w.Write(topic_79)
|
||||||
w.Write([]byte(item.Tag))
|
w.Write([]byte(item.Tag))
|
||||||
w.Write(topic_82)
|
w.Write(topic_80)
|
||||||
} else {
|
} else {
|
||||||
w.Write(topic_83)
|
w.Write(topic_81)
|
||||||
w.Write([]byte(strconv.Itoa(item.Level)))
|
w.Write([]byte(strconv.Itoa(item.Level)))
|
||||||
|
w.Write(topic_82)
|
||||||
|
}
|
||||||
|
w.Write(topic_83)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
w.Write(topic_84)
|
w.Write(topic_84)
|
||||||
}
|
|
||||||
w.Write(topic_85)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
w.Write(topic_86)
|
|
||||||
if tmpl_topic_vars.CurrentUser.Perms.CreateReply {
|
if tmpl_topic_vars.CurrentUser.Perms.CreateReply {
|
||||||
w.Write(topic_87)
|
w.Write(topic_85)
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
||||||
w.Write(topic_88)
|
w.Write(topic_86)
|
||||||
}
|
}
|
||||||
w.Write(footer_0)
|
w.Write(footer_0)
|
||||||
if tmpl_topic_vars.Header.Widgets.RightSidebar != "" {
|
if tmpl_topic_vars.Header.Widgets.RightSidebar != "" {
|
||||||
|
|
|
@ -35,35 +35,33 @@ w.Write(header_6)
|
||||||
w.Write(header_7)
|
w.Write(header_7)
|
||||||
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
|
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
|
||||||
w.Write(header_8)
|
w.Write(header_8)
|
||||||
|
if !tmpl_topic_alt_vars.CurrentUser.Is_Super_Mod {
|
||||||
|
w.Write(header_9)
|
||||||
|
}
|
||||||
|
w.Write(header_10)
|
||||||
w.Write(menu_0)
|
w.Write(menu_0)
|
||||||
w.Write([]byte(tmpl_topic_alt_vars.Header.Site.Name))
|
w.Write([]byte(tmpl_topic_alt_vars.Header.Site.Name))
|
||||||
w.Write(menu_1)
|
w.Write(menu_1)
|
||||||
if tmpl_topic_alt_vars.CurrentUser.Loggedin {
|
if tmpl_topic_alt_vars.CurrentUser.Loggedin {
|
||||||
w.Write(menu_2)
|
w.Write(menu_2)
|
||||||
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Slug))
|
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Link))
|
||||||
w.Write(menu_3)
|
w.Write(menu_3)
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.CurrentUser.ID)))
|
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
|
||||||
w.Write(menu_4)
|
w.Write(menu_4)
|
||||||
if tmpl_topic_alt_vars.CurrentUser.Is_Super_Mod {
|
} else {
|
||||||
w.Write(menu_5)
|
w.Write(menu_5)
|
||||||
}
|
}
|
||||||
w.Write(menu_6)
|
w.Write(menu_6)
|
||||||
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
|
|
||||||
w.Write(menu_7)
|
|
||||||
} else {
|
|
||||||
w.Write(menu_8)
|
|
||||||
}
|
|
||||||
w.Write(menu_9)
|
|
||||||
w.Write(header_9)
|
|
||||||
if tmpl_topic_alt_vars.Header.Widgets.RightSidebar != "" {
|
|
||||||
w.Write(header_10)
|
|
||||||
}
|
|
||||||
w.Write(header_11)
|
w.Write(header_11)
|
||||||
|
if tmpl_topic_alt_vars.Header.Widgets.RightSidebar != "" {
|
||||||
|
w.Write(header_12)
|
||||||
|
}
|
||||||
|
w.Write(header_13)
|
||||||
if len(tmpl_topic_alt_vars.Header.NoticeList) != 0 {
|
if len(tmpl_topic_alt_vars.Header.NoticeList) != 0 {
|
||||||
for _, item := range tmpl_topic_alt_vars.Header.NoticeList {
|
for _, item := range tmpl_topic_alt_vars.Header.NoticeList {
|
||||||
w.Write(header_12)
|
w.Write(header_14)
|
||||||
w.Write([]byte(item))
|
w.Write([]byte(item))
|
||||||
w.Write(header_13)
|
w.Write(header_15)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if tmpl_topic_alt_vars.Page > 1 {
|
if tmpl_topic_alt_vars.Page > 1 {
|
||||||
|
@ -112,157 +110,153 @@ w.Write(topic_alt_18)
|
||||||
w.Write(topic_alt_19)
|
w.Write(topic_alt_19)
|
||||||
w.Write([]byte(tmpl_topic_alt_vars.Topic.Avatar))
|
w.Write([]byte(tmpl_topic_alt_vars.Topic.Avatar))
|
||||||
w.Write(topic_alt_20)
|
w.Write(topic_alt_20)
|
||||||
w.Write([]byte(tmpl_topic_alt_vars.Topic.UserSlug))
|
w.Write([]byte(tmpl_topic_alt_vars.Topic.UserLink))
|
||||||
w.Write(topic_alt_21)
|
w.Write(topic_alt_21)
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.CreatedBy)))
|
|
||||||
w.Write(topic_alt_22)
|
|
||||||
w.Write([]byte(tmpl_topic_alt_vars.Topic.CreatedByName))
|
w.Write([]byte(tmpl_topic_alt_vars.Topic.CreatedByName))
|
||||||
w.Write(topic_alt_23)
|
w.Write(topic_alt_22)
|
||||||
if tmpl_topic_alt_vars.Topic.Tag != "" {
|
if tmpl_topic_alt_vars.Topic.Tag != "" {
|
||||||
w.Write(topic_alt_24)
|
w.Write(topic_alt_23)
|
||||||
w.Write([]byte(tmpl_topic_alt_vars.Topic.Tag))
|
w.Write([]byte(tmpl_topic_alt_vars.Topic.Tag))
|
||||||
w.Write(topic_alt_25)
|
w.Write(topic_alt_24)
|
||||||
} else {
|
} else {
|
||||||
w.Write(topic_alt_26)
|
w.Write(topic_alt_25)
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.Level)))
|
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.Level)))
|
||||||
w.Write(topic_alt_27)
|
w.Write(topic_alt_26)
|
||||||
}
|
}
|
||||||
|
w.Write(topic_alt_27)
|
||||||
|
w.Write([]byte(tmpl_topic_alt_vars.Topic.Content))
|
||||||
w.Write(topic_alt_28)
|
w.Write(topic_alt_28)
|
||||||
w.Write([]byte(tmpl_topic_alt_vars.Topic.Content))
|
w.Write([]byte(tmpl_topic_alt_vars.Topic.Content))
|
||||||
w.Write(topic_alt_29)
|
w.Write(topic_alt_29)
|
||||||
w.Write([]byte(tmpl_topic_alt_vars.Topic.Content))
|
|
||||||
w.Write(topic_alt_30)
|
|
||||||
if tmpl_topic_alt_vars.CurrentUser.Loggedin {
|
if tmpl_topic_alt_vars.CurrentUser.Loggedin {
|
||||||
if tmpl_topic_alt_vars.CurrentUser.Perms.LikeItem {
|
if tmpl_topic_alt_vars.CurrentUser.Perms.LikeItem {
|
||||||
w.Write(topic_alt_31)
|
w.Write(topic_alt_30)
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
||||||
w.Write(topic_alt_32)
|
w.Write(topic_alt_31)
|
||||||
}
|
}
|
||||||
if tmpl_topic_alt_vars.CurrentUser.Perms.EditTopic {
|
if tmpl_topic_alt_vars.CurrentUser.Perms.EditTopic {
|
||||||
w.Write(topic_alt_33)
|
w.Write(topic_alt_32)
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
||||||
w.Write(topic_alt_34)
|
w.Write(topic_alt_33)
|
||||||
}
|
}
|
||||||
if tmpl_topic_alt_vars.CurrentUser.Perms.DeleteTopic {
|
if tmpl_topic_alt_vars.CurrentUser.Perms.DeleteTopic {
|
||||||
w.Write(topic_alt_35)
|
w.Write(topic_alt_34)
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
||||||
w.Write(topic_alt_36)
|
w.Write(topic_alt_35)
|
||||||
}
|
}
|
||||||
if tmpl_topic_alt_vars.CurrentUser.Perms.PinTopic {
|
if tmpl_topic_alt_vars.CurrentUser.Perms.PinTopic {
|
||||||
if tmpl_topic_alt_vars.Topic.Sticky {
|
if tmpl_topic_alt_vars.Topic.Sticky {
|
||||||
|
w.Write(topic_alt_36)
|
||||||
|
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
||||||
w.Write(topic_alt_37)
|
w.Write(topic_alt_37)
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
|
||||||
w.Write(topic_alt_38)
|
|
||||||
} else {
|
} else {
|
||||||
|
w.Write(topic_alt_38)
|
||||||
|
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
||||||
w.Write(topic_alt_39)
|
w.Write(topic_alt_39)
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
}
|
||||||
|
}
|
||||||
w.Write(topic_alt_40)
|
w.Write(topic_alt_40)
|
||||||
}
|
|
||||||
}
|
|
||||||
w.Write(topic_alt_41)
|
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
||||||
w.Write(topic_alt_42)
|
w.Write(topic_alt_41)
|
||||||
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
|
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
|
||||||
w.Write(topic_alt_43)
|
w.Write(topic_alt_42)
|
||||||
if tmpl_topic_alt_vars.CurrentUser.Perms.ViewIPs {
|
if tmpl_topic_alt_vars.CurrentUser.Perms.ViewIPs {
|
||||||
w.Write(topic_alt_44)
|
w.Write(topic_alt_43)
|
||||||
w.Write([]byte(tmpl_topic_alt_vars.Topic.IpAddress))
|
w.Write([]byte(tmpl_topic_alt_vars.Topic.IpAddress))
|
||||||
|
w.Write(topic_alt_44)
|
||||||
|
}
|
||||||
|
}
|
||||||
w.Write(topic_alt_45)
|
w.Write(topic_alt_45)
|
||||||
}
|
|
||||||
}
|
|
||||||
w.Write(topic_alt_46)
|
|
||||||
w.Write([]byte(tmpl_topic_alt_vars.Topic.CreatedAt))
|
w.Write([]byte(tmpl_topic_alt_vars.Topic.CreatedAt))
|
||||||
w.Write(topic_alt_47)
|
w.Write(topic_alt_46)
|
||||||
if tmpl_topic_alt_vars.Topic.LikeCount > 0 {
|
if tmpl_topic_alt_vars.Topic.LikeCount > 0 {
|
||||||
w.Write(topic_alt_48)
|
w.Write(topic_alt_47)
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.LikeCount)))
|
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.LikeCount)))
|
||||||
w.Write(topic_alt_49)
|
w.Write(topic_alt_48)
|
||||||
}
|
}
|
||||||
w.Write(topic_alt_50)
|
w.Write(topic_alt_49)
|
||||||
if len(tmpl_topic_alt_vars.ItemList) != 0 {
|
if len(tmpl_topic_alt_vars.ItemList) != 0 {
|
||||||
for _, item := range tmpl_topic_alt_vars.ItemList {
|
for _, item := range tmpl_topic_alt_vars.ItemList {
|
||||||
w.Write(topic_alt_51)
|
w.Write(topic_alt_50)
|
||||||
if item.ActionType != "" {
|
if item.ActionType != "" {
|
||||||
w.Write(topic_alt_52)
|
w.Write(topic_alt_51)
|
||||||
}
|
}
|
||||||
w.Write(topic_alt_53)
|
w.Write(topic_alt_52)
|
||||||
w.Write([]byte(item.Avatar))
|
w.Write([]byte(item.Avatar))
|
||||||
|
w.Write(topic_alt_53)
|
||||||
|
w.Write([]byte(item.UserLink))
|
||||||
w.Write(topic_alt_54)
|
w.Write(topic_alt_54)
|
||||||
w.Write([]byte(item.UserSlug))
|
|
||||||
w.Write(topic_alt_55)
|
|
||||||
w.Write([]byte(strconv.Itoa(item.CreatedBy)))
|
|
||||||
w.Write(topic_alt_56)
|
|
||||||
w.Write([]byte(item.CreatedByName))
|
w.Write([]byte(item.CreatedByName))
|
||||||
w.Write(topic_alt_57)
|
w.Write(topic_alt_55)
|
||||||
if item.Tag != "" {
|
if item.Tag != "" {
|
||||||
w.Write(topic_alt_58)
|
w.Write(topic_alt_56)
|
||||||
w.Write([]byte(item.Tag))
|
w.Write([]byte(item.Tag))
|
||||||
w.Write(topic_alt_59)
|
w.Write(topic_alt_57)
|
||||||
} else {
|
} else {
|
||||||
w.Write(topic_alt_60)
|
w.Write(topic_alt_58)
|
||||||
w.Write([]byte(strconv.Itoa(item.Level)))
|
w.Write([]byte(strconv.Itoa(item.Level)))
|
||||||
|
w.Write(topic_alt_59)
|
||||||
|
}
|
||||||
|
w.Write(topic_alt_60)
|
||||||
|
if item.ActionType != "" {
|
||||||
w.Write(topic_alt_61)
|
w.Write(topic_alt_61)
|
||||||
}
|
}
|
||||||
w.Write(topic_alt_62)
|
w.Write(topic_alt_62)
|
||||||
if item.ActionType != "" {
|
if item.ActionType != "" {
|
||||||
w.Write(topic_alt_63)
|
w.Write(topic_alt_63)
|
||||||
}
|
|
||||||
w.Write(topic_alt_64)
|
|
||||||
if item.ActionType != "" {
|
|
||||||
w.Write(topic_alt_65)
|
|
||||||
w.Write([]byte(item.ActionIcon))
|
w.Write([]byte(item.ActionIcon))
|
||||||
w.Write(topic_alt_66)
|
w.Write(topic_alt_64)
|
||||||
w.Write([]byte(item.ActionType))
|
w.Write([]byte(item.ActionType))
|
||||||
w.Write(topic_alt_67)
|
w.Write(topic_alt_65)
|
||||||
} else {
|
} else {
|
||||||
w.Write(topic_alt_68)
|
w.Write(topic_alt_66)
|
||||||
w.Write([]byte(item.ContentHtml))
|
w.Write([]byte(item.ContentHtml))
|
||||||
w.Write(topic_alt_69)
|
w.Write(topic_alt_67)
|
||||||
if tmpl_topic_alt_vars.CurrentUser.Loggedin {
|
if tmpl_topic_alt_vars.CurrentUser.Loggedin {
|
||||||
if tmpl_topic_alt_vars.CurrentUser.Perms.LikeItem {
|
if tmpl_topic_alt_vars.CurrentUser.Perms.LikeItem {
|
||||||
|
w.Write(topic_alt_68)
|
||||||
|
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||||
|
w.Write(topic_alt_69)
|
||||||
|
}
|
||||||
|
if tmpl_topic_alt_vars.CurrentUser.Perms.EditReply {
|
||||||
w.Write(topic_alt_70)
|
w.Write(topic_alt_70)
|
||||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||||
w.Write(topic_alt_71)
|
w.Write(topic_alt_71)
|
||||||
}
|
}
|
||||||
if tmpl_topic_alt_vars.CurrentUser.Perms.EditReply {
|
if tmpl_topic_alt_vars.CurrentUser.Perms.DeleteReply {
|
||||||
w.Write(topic_alt_72)
|
w.Write(topic_alt_72)
|
||||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||||
w.Write(topic_alt_73)
|
w.Write(topic_alt_73)
|
||||||
}
|
}
|
||||||
if tmpl_topic_alt_vars.CurrentUser.Perms.DeleteReply {
|
|
||||||
w.Write(topic_alt_74)
|
w.Write(topic_alt_74)
|
||||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||||
w.Write(topic_alt_75)
|
w.Write(topic_alt_75)
|
||||||
}
|
|
||||||
w.Write(topic_alt_76)
|
|
||||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
|
||||||
w.Write(topic_alt_77)
|
|
||||||
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
|
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
|
||||||
w.Write(topic_alt_78)
|
w.Write(topic_alt_76)
|
||||||
if tmpl_topic_alt_vars.CurrentUser.Perms.ViewIPs {
|
if tmpl_topic_alt_vars.CurrentUser.Perms.ViewIPs {
|
||||||
w.Write(topic_alt_79)
|
w.Write(topic_alt_77)
|
||||||
w.Write([]byte(item.IpAddress))
|
w.Write([]byte(item.IpAddress))
|
||||||
w.Write(topic_alt_80)
|
w.Write(topic_alt_78)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
w.Write(topic_alt_81)
|
w.Write(topic_alt_79)
|
||||||
w.Write([]byte(item.CreatedAt))
|
w.Write([]byte(item.CreatedAt))
|
||||||
w.Write(topic_alt_82)
|
w.Write(topic_alt_80)
|
||||||
if item.LikeCount > 0 {
|
if item.LikeCount > 0 {
|
||||||
w.Write(topic_alt_83)
|
w.Write(topic_alt_81)
|
||||||
w.Write([]byte(strconv.Itoa(item.LikeCount)))
|
w.Write([]byte(strconv.Itoa(item.LikeCount)))
|
||||||
|
w.Write(topic_alt_82)
|
||||||
|
}
|
||||||
|
w.Write(topic_alt_83)
|
||||||
|
}
|
||||||
w.Write(topic_alt_84)
|
w.Write(topic_alt_84)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
w.Write(topic_alt_85)
|
w.Write(topic_alt_85)
|
||||||
}
|
|
||||||
w.Write(topic_alt_86)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
w.Write(topic_alt_87)
|
|
||||||
if tmpl_topic_alt_vars.CurrentUser.Perms.CreateReply {
|
if tmpl_topic_alt_vars.CurrentUser.Perms.CreateReply {
|
||||||
w.Write(topic_alt_88)
|
w.Write(topic_alt_86)
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
||||||
w.Write(topic_alt_89)
|
w.Write(topic_alt_87)
|
||||||
}
|
}
|
||||||
w.Write(footer_0)
|
w.Write(footer_0)
|
||||||
if tmpl_topic_alt_vars.Header.Widgets.RightSidebar != "" {
|
if tmpl_topic_alt_vars.Header.Widgets.RightSidebar != "" {
|
||||||
|
|
|
@ -35,35 +35,33 @@ w.Write(header_6)
|
||||||
w.Write(header_7)
|
w.Write(header_7)
|
||||||
w.Write([]byte(tmpl_topics_vars.CurrentUser.Session))
|
w.Write([]byte(tmpl_topics_vars.CurrentUser.Session))
|
||||||
w.Write(header_8)
|
w.Write(header_8)
|
||||||
|
if !tmpl_topics_vars.CurrentUser.Is_Super_Mod {
|
||||||
|
w.Write(header_9)
|
||||||
|
}
|
||||||
|
w.Write(header_10)
|
||||||
w.Write(menu_0)
|
w.Write(menu_0)
|
||||||
w.Write([]byte(tmpl_topics_vars.Header.Site.Name))
|
w.Write([]byte(tmpl_topics_vars.Header.Site.Name))
|
||||||
w.Write(menu_1)
|
w.Write(menu_1)
|
||||||
if tmpl_topics_vars.CurrentUser.Loggedin {
|
if tmpl_topics_vars.CurrentUser.Loggedin {
|
||||||
w.Write(menu_2)
|
w.Write(menu_2)
|
||||||
w.Write([]byte(tmpl_topics_vars.CurrentUser.Slug))
|
w.Write([]byte(tmpl_topics_vars.CurrentUser.Link))
|
||||||
w.Write(menu_3)
|
w.Write(menu_3)
|
||||||
w.Write([]byte(strconv.Itoa(tmpl_topics_vars.CurrentUser.ID)))
|
w.Write([]byte(tmpl_topics_vars.CurrentUser.Session))
|
||||||
w.Write(menu_4)
|
w.Write(menu_4)
|
||||||
if tmpl_topics_vars.CurrentUser.Is_Super_Mod {
|
} else {
|
||||||
w.Write(menu_5)
|
w.Write(menu_5)
|
||||||
}
|
}
|
||||||
w.Write(menu_6)
|
w.Write(menu_6)
|
||||||
w.Write([]byte(tmpl_topics_vars.CurrentUser.Session))
|
|
||||||
w.Write(menu_7)
|
|
||||||
} else {
|
|
||||||
w.Write(menu_8)
|
|
||||||
}
|
|
||||||
w.Write(menu_9)
|
|
||||||
w.Write(header_9)
|
|
||||||
if tmpl_topics_vars.Header.Widgets.RightSidebar != "" {
|
|
||||||
w.Write(header_10)
|
|
||||||
}
|
|
||||||
w.Write(header_11)
|
w.Write(header_11)
|
||||||
|
if tmpl_topics_vars.Header.Widgets.RightSidebar != "" {
|
||||||
|
w.Write(header_12)
|
||||||
|
}
|
||||||
|
w.Write(header_13)
|
||||||
if len(tmpl_topics_vars.Header.NoticeList) != 0 {
|
if len(tmpl_topics_vars.Header.NoticeList) != 0 {
|
||||||
for _, item := range tmpl_topics_vars.Header.NoticeList {
|
for _, item := range tmpl_topics_vars.Header.NoticeList {
|
||||||
w.Write(header_12)
|
w.Write(header_14)
|
||||||
w.Write([]byte(item))
|
w.Write([]byte(item))
|
||||||
w.Write(header_13)
|
w.Write(header_15)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
w.Write(topics_0)
|
w.Write(topics_0)
|
||||||
|
@ -88,39 +86,35 @@ w.Write([]byte(strconv.Itoa(item.PostCount)))
|
||||||
w.Write(topics_8)
|
w.Write(topics_8)
|
||||||
w.Write([]byte(item.LastReplyAt))
|
w.Write([]byte(item.LastReplyAt))
|
||||||
w.Write(topics_9)
|
w.Write(topics_9)
|
||||||
w.Write([]byte(item.Slug))
|
w.Write([]byte(item.Link))
|
||||||
w.Write(topics_10)
|
w.Write(topics_10)
|
||||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
|
||||||
w.Write(topics_11)
|
|
||||||
w.Write([]byte(item.Title))
|
w.Write([]byte(item.Title))
|
||||||
w.Write(topics_12)
|
w.Write(topics_11)
|
||||||
if item.ForumName != "" {
|
if item.ForumName != "" {
|
||||||
w.Write(topics_13)
|
w.Write(topics_12)
|
||||||
w.Write([]byte(item.ForumLink))
|
w.Write([]byte(item.ForumLink))
|
||||||
w.Write(topics_14)
|
w.Write(topics_13)
|
||||||
w.Write([]byte(item.ForumName))
|
w.Write([]byte(item.ForumName))
|
||||||
|
w.Write(topics_14)
|
||||||
|
}
|
||||||
w.Write(topics_15)
|
w.Write(topics_15)
|
||||||
}
|
w.Write([]byte(item.UserLink))
|
||||||
w.Write(topics_16)
|
w.Write(topics_16)
|
||||||
w.Write([]byte(item.UserSlug))
|
|
||||||
w.Write(topics_17)
|
|
||||||
w.Write([]byte(strconv.Itoa(item.CreatedBy)))
|
|
||||||
w.Write(topics_18)
|
|
||||||
w.Write([]byte(item.CreatedByName))
|
w.Write([]byte(item.CreatedByName))
|
||||||
w.Write(topics_19)
|
w.Write(topics_17)
|
||||||
if item.Is_Closed {
|
if item.Is_Closed {
|
||||||
w.Write(topics_20)
|
w.Write(topics_18)
|
||||||
}
|
}
|
||||||
w.Write(topics_21)
|
w.Write(topics_19)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
w.Write(topics_22)
|
w.Write(topics_20)
|
||||||
if tmpl_topics_vars.CurrentUser.Perms.CreateTopic {
|
if tmpl_topics_vars.CurrentUser.Perms.CreateTopic {
|
||||||
|
w.Write(topics_21)
|
||||||
|
}
|
||||||
|
w.Write(topics_22)
|
||||||
|
}
|
||||||
w.Write(topics_23)
|
w.Write(topics_23)
|
||||||
}
|
|
||||||
w.Write(topics_24)
|
|
||||||
}
|
|
||||||
w.Write(topics_25)
|
|
||||||
w.Write(footer_0)
|
w.Write(footer_0)
|
||||||
if tmpl_topics_vars.Header.Widgets.RightSidebar != "" {
|
if tmpl_topics_vars.Header.Widgets.RightSidebar != "" {
|
||||||
w.Write(footer_1)
|
w.Write(footer_1)
|
||||||
|
|
|
@ -78,7 +78,6 @@ func (c *CTemplateSet) compile_template(name string, dir string, expects string,
|
||||||
|
|
||||||
c.importMap = map[string]string{
|
c.importMap = map[string]string{
|
||||||
"io":"io",
|
"io":"io",
|
||||||
"strconv":"strconv",
|
|
||||||
}
|
}
|
||||||
c.varList = varList
|
c.varList = varList
|
||||||
//c.pVarList = ""
|
//c.pVarList = ""
|
||||||
|
@ -889,6 +888,7 @@ func (c *CTemplateSet) compile_varsub(varname string, val reflect.Value) string
|
||||||
|
|
||||||
switch val.Kind() {
|
switch val.Kind() {
|
||||||
case reflect.Int:
|
case reflect.Int:
|
||||||
|
c.importMap["strconv"] = "strconv"
|
||||||
return "w.Write([]byte(strconv.Itoa(" + varname + ")))\n"
|
return "w.Write([]byte(strconv.Itoa(" + varname + ")))\n"
|
||||||
case reflect.Bool:
|
case reflect.Bool:
|
||||||
return "if " + varname + " {\nw.Write([]byte(\"true\"))} else {\nw.Write([]byte(\"false\"))\n}\n"
|
return "if " + varname + " {\nw.Write([]byte(\"true\"))} else {\nw.Write([]byte(\"false\"))\n}\n"
|
||||||
|
@ -899,6 +899,7 @@ func (c *CTemplateSet) compile_varsub(varname string, val reflect.Value) string
|
||||||
return "w.Write([]byte(" + varname + "))\n"
|
return "w.Write([]byte(" + varname + "))\n"
|
||||||
}
|
}
|
||||||
case reflect.Int64:
|
case reflect.Int64:
|
||||||
|
c.importMap["strconv"] = "strconv"
|
||||||
return "w.Write([]byte(strconv.FormatInt(" + varname + ", 10)))"
|
return "w.Write([]byte(strconv.FormatInt(" + varname + ", 10)))"
|
||||||
default:
|
default:
|
||||||
if !val.IsValid() {
|
if !val.IsValid() {
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
<span class="lastReplyAt">{{.LastReplyAt}}</span>
|
<span class="lastReplyAt">{{.LastReplyAt}}</span>
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
<a class="rowtopic" href="/topic/{{.Slug}}.{{.ID}}">{{.Title}}</a>
|
<a class="rowtopic" href="{{.Link}}">{{.Title}}</a>
|
||||||
<br /><a class="rowsmall" href="/user/{{.UserSlug}}.{{.CreatedBy}}">Starter: {{.CreatedByName}}</a>
|
<br /><a class="rowsmall" href="{{.UserLink}}">Starter: {{.CreatedByName}}</a>
|
||||||
{{if .Is_Closed}}<span class="rowsmall topic_status_e topic_status_closed" title="Status: Closed"> | 🔒︎{{end}}</span>
|
{{if .Is_Closed}}<span class="rowsmall topic_status_e topic_status_closed" title="Status: Closed"> | 🔒︎{{end}}</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
</span>{{end}}
|
</span>{{end}}
|
||||||
|
|
||||||
<span style="float: right;">
|
<span style="float: right;">
|
||||||
<a href="/topic/{{.LastTopicSlug}}" style="float: right;font-size: 14px;">{{.LastTopic}}</a>
|
<a href="{{.LastTopicLink}}" style="float: right;font-size: 14px;">{{.LastTopic}}</a>
|
||||||
{{if .LastTopicTime}}<br /><span class="rowsmall">{{.LastTopicTime}}</span>{{end}}
|
{{if .LastTopicTime}}<br /><span class="rowsmall">{{.LastTopicTime}}</span>{{end}}
|
||||||
</span>
|
</span>
|
||||||
<div style="clear: both;"></div>
|
<div style="clear: both;"></div>
|
||||||
|
|
|
@ -10,12 +10,14 @@
|
||||||
{{range .Header.Scripts}}
|
{{range .Header.Scripts}}
|
||||||
<script type="text/javascript" src="/static/{{.}}"></script>
|
<script type="text/javascript" src="/static/{{.}}"></script>
|
||||||
{{end}}
|
{{end}}
|
||||||
<script type="text/javascript">var session = "{{.CurrentUser.Session}}";
|
<script type="text/javascript">var session = "{{.CurrentUser.Session}}";</script>
|
||||||
</script>
|
|
||||||
<script type="text/javascript" src="/static/global.js"></script>
|
<script type="text/javascript" src="/static/global.js"></script>
|
||||||
<meta name="viewport" content="width=device-width,initial-scale = 1.0, maximum-scale=1.0,user-scalable=no" />
|
<meta name="viewport" content="width=device-width,initial-scale = 1.0, maximum-scale=1.0,user-scalable=no" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<style>
|
||||||
|
{{if not .CurrentUser.Is_Super_Mod}}.supermod_only { display: none !important; }{{end}}
|
||||||
|
</style>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{{template "menu.html" .}}
|
{{template "menu.html" .}}
|
||||||
<div id="back"><div id="main" {{if .Header.Widgets.RightSidebar}}class="shrink_main"{{end}}>
|
<div id="back"><div id="main" {{if .Header.Widgets.RightSidebar}}class="shrink_main"{{end}}>
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
</li>
|
</li>
|
||||||
{{if .CurrentUser.Loggedin}}
|
{{if .CurrentUser.Loggedin}}
|
||||||
<li class="menu_left menu_account"><a href="/user/edit/critical/">Account</a></li>
|
<li class="menu_left menu_account"><a href="/user/edit/critical/">Account</a></li>
|
||||||
<li class="menu_left menu_profile"><a href="/user/{{.CurrentUser.Slug}}.{{.CurrentUser.ID}}">Profile</a></li>
|
<li class="menu_left menu_profile"><a href="{{.CurrentUser.Link}}">Profile</a></li>
|
||||||
{{if .CurrentUser.Is_Super_Mod}}<li class="menu_left menu_account"><a href="/panel/">Panel</a></li>{{end}}
|
<li class="menu_left menu_account supermod_only"><a href="/panel/">Panel</a></li>
|
||||||
<li class="menu_left menu_logout"><a href="/accounts/logout/?session={{.CurrentUser.Session}}">Logout</a></li>
|
<li class="menu_left menu_logout"><a href="/accounts/logout/?session={{.CurrentUser.Session}}">Logout</a></li>
|
||||||
{{else}}
|
{{else}}
|
||||||
<li class="menu_left menu_register"><a href="/accounts/create/">Register</a></li>
|
<li class="menu_left menu_register"><a href="/accounts/create/">Register</a></li>
|
||||||
|
|
|
@ -29,9 +29,11 @@
|
||||||
<div class="rowitem"><a>Comments</a></div>
|
<div class="rowitem"><a>Comments</a></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="profile_comments" class="colstack_item" style="overflow: hidden;border-top: none;">{{range .ItemList}}
|
<div id="profile_comments" class="colstack_item" style="overflow: hidden;border-top: none;">{{range .ItemList}}
|
||||||
<div class="rowitem passive deletable_block editable_parent simple {{.ClassName}}" style="{{if .Avatar}}background-image: url({{.Avatar}}), url(/static/white-dot.jpg);background-position: 0px {{if le .ContentLines 5}}-1{{end}}0px;background-repeat: no-repeat, repeat-y;background-size: 128px;padding-left: 136px;{{end}}">
|
<div class="rowitem passive deletable_block editable_parent simple {{.ClassName}}" style="{{if .Avatar}}background-image: url({{.Avatar}}), url(/static/post-avatar-bg.jpg);background-position: 0px {{if le .ContentLines 5}}-1{{end}}0px;{{end}}">
|
||||||
<span class="editable_block user_content simple">{{.ContentHtml}}</span><br /><br />
|
<span class="editable_block user_content simple">{{.ContentHtml}}</span>
|
||||||
<a href="/user/{{.UserSlug}}.{{.CreatedBy}}" class="real_username username">{{.CreatedByName}}</a>
|
|
||||||
|
<span class="controls">
|
||||||
|
<a href="{{.UserLink}}" class="real_username username">{{.CreatedByName}}</a>
|
||||||
|
|
||||||
{{if $.CurrentUser.Is_Mod}}<a href="/profile/reply/edit/submit/{{.ID}}" class="mod_button" title="Edit Item"><button class="username edit_item edit_label"></button></a>
|
{{if $.CurrentUser.Is_Mod}}<a href="/profile/reply/edit/submit/{{.ID}}" class="mod_button" title="Edit Item"><button class="username edit_item edit_label"></button></a>
|
||||||
|
|
||||||
|
@ -40,6 +42,7 @@
|
||||||
<a class="mod_button" href="/report/submit/{{.ID}}?session={{$.CurrentUser.Session}}&type=user-reply"><button class="username report_item flag_label"></button></a>
|
<a class="mod_button" href="/report/submit/{{.ID}}?session={{$.CurrentUser.Session}}&type=user-reply"><button class="username report_item flag_label"></button></a>
|
||||||
|
|
||||||
{{if .Tag}}<a class="username hide_on_mobile user_tag" style="float: right;">{{.Tag}}</a>{{end}}
|
{{if .Tag}}<a class="username hide_on_mobile user_tag" style="float: right;">{{.Tag}}</a>{{end}}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{{end}}</div>
|
{{end}}</div>
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
<span class="lastReplyAt">{{.LastReplyAt}}</span>
|
<span class="lastReplyAt">{{.LastReplyAt}}</span>
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
<a class="rowtopic" href="/topic/{{.Slug}}.{{.ID}}">{{.Title}}</a>
|
<a class="rowtopic" href="{{.Link}}">{{.Title}}</a>
|
||||||
<br /><a class="rowsmall" href="/user/{{.UserSlug}}.{{.CreatedBy}}">Starter: {{.CreatedByName}}</a>
|
<br /><a class="rowsmall" href="{{.UserLink}}">Starter: {{.CreatedByName}}</a>
|
||||||
{{if .Is_Closed}}<span class="rowsmall topic_status_e topic_status_closed" title="Status: Closed"> | 🔒︎{{end}}</span>
|
{{if .Is_Closed}}<span class="rowsmall topic_status_e topic_status_closed" title="Status: Closed"> | 🔒︎{{end}}</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
<span class="controls">
|
<span class="controls">
|
||||||
|
|
||||||
<a href="/user/{{.Topic.UserSlug}}.{{.Topic.CreatedBy}}" class="username real_username">{{.Topic.CreatedByName}}</a>
|
<a href="{{.Topic.UserLink}}" class="username real_username">{{.Topic.CreatedByName}}</a>
|
||||||
{{if .CurrentUser.Perms.LikeItem}}<a href="/topic/like/submit/{{.Topic.ID}}" class="mod_button" title="Love it" style="color:#202020;">
|
{{if .CurrentUser.Perms.LikeItem}}<a href="/topic/like/submit/{{.Topic.ID}}" class="mod_button" title="Love it" style="color:#202020;">
|
||||||
<button class="username like_label" style="{{if .Topic.Liked}}background-color:/*#eaffea*/#D6FFD6;{{end}}"></button></a>{{end}}
|
<button class="username like_label" style="{{if .Topic.Liked}}background-color:/*#eaffea*/#D6FFD6;{{end}}"></button></a>{{end}}
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
|
|
||||||
<span class="controls">
|
<span class="controls">
|
||||||
|
|
||||||
<a href="/user/{{.UserSlug}}.{{.CreatedBy}}" class="username real_username">{{.CreatedByName}}</a>
|
<a href="{{.UserLink}}" class="username real_username">{{.CreatedByName}}</a>
|
||||||
{{if $.CurrentUser.Perms.LikeItem}}<a href="/reply/like/submit/{{.ID}}" class="mod_button" title="Love it" style="color:#202020;"><button class="username like_label" style="{{if .Liked}}background-color:/*#eaffea*/#D6FFD6;{{end}}"></button></a>{{end}}
|
{{if $.CurrentUser.Perms.LikeItem}}<a href="/reply/like/submit/{{.ID}}" class="mod_button" title="Love it" style="color:#202020;"><button class="username like_label" style="{{if .Liked}}background-color:/*#eaffea*/#D6FFD6;{{end}}"></button></a>{{end}}
|
||||||
|
|
||||||
{{if $.CurrentUser.Perms.EditReply}}<a href="/reply/edit/submit/{{.ID}}" class="mod_button" title="Edit Reply"><button class="username edit_item edit_label"></button></a>{{end}}
|
{{if $.CurrentUser.Perms.EditReply}}<a href="/reply/edit/submit/{{.ID}}" class="mod_button" title="Edit Reply"><button class="username edit_item edit_label"></button></a>{{end}}
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
<div class="rowitem passive deletable_block editable_parent post_item top_post" style="background-color: #eaeaea;padding-top: 4px;padding-left: 5px;clear: both;border-bottom: none;padding-right: 4px;padding-bottom: 2px;">
|
<div class="rowitem passive deletable_block editable_parent post_item top_post" style="background-color: #eaeaea;padding-top: 4px;padding-left: 5px;clear: both;border-bottom: none;padding-right: 4px;padding-bottom: 2px;">
|
||||||
<div class="userinfo">
|
<div class="userinfo">
|
||||||
<div class="avatar_item" style="background-image: url({{.Topic.Avatar}}), url(/static/white-dot.jpg);background-position: 0px -10px;"> </div>
|
<div class="avatar_item" style="background-image: url({{.Topic.Avatar}}), url(/static/white-dot.jpg);background-position: 0px -10px;"> </div>
|
||||||
<a href="/user/{{.Topic.UserSlug}}.{{.Topic.CreatedBy}}" class="the_name">{{.Topic.CreatedByName}}</a>
|
<a href="{{.Topic.UserLink}}" class="the_name">{{.Topic.CreatedByName}}</a>
|
||||||
{{if .Topic.Tag}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag">{{.Topic.Tag}}</div><div class="tag_post"></div></div>{{else}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag post_level">Level {{.Topic.Level}}</div><div class="tag_post"></div></div>{{end}}
|
{{if .Topic.Tag}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag">{{.Topic.Tag}}</div><div class="tag_post"></div></div>{{else}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag post_level">Level {{.Topic.Level}}</div><div class="tag_post"></div></div>{{end}}
|
||||||
</div>
|
</div>
|
||||||
<div class="content_container">
|
<div class="content_container">
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
<div class="rowitem passive deletable_block editable_parent post_item {{if .ActionType}}action_item{{end}}">
|
<div class="rowitem passive deletable_block editable_parent post_item {{if .ActionType}}action_item{{end}}">
|
||||||
<div class="userinfo">
|
<div class="userinfo">
|
||||||
<div class="avatar_item" style="background-image: url({{.Avatar}}), url(/static/white-dot.jpg);background-position: 0px -10px;"> </div>
|
<div class="avatar_item" style="background-image: url({{.Avatar}}), url(/static/white-dot.jpg);background-position: 0px -10px;"> </div>
|
||||||
<a href="/user/{{.UserSlug}}.{{.CreatedBy}}" class="the_name">{{.CreatedByName}}</a>
|
<a href="{{.UserLink}}" class="the_name">{{.CreatedByName}}</a>
|
||||||
{{if .Tag}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag">{{.Tag}}</div><div class="tag_post"></div></div>{{else}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag post_level">Level {{.Level}}</div><div class="tag_post"></div></div>{{end}}
|
{{if .Tag}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag">{{.Tag}}</div><div class="tag_post"></div></div>{{else}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag post_level">Level {{.Level}}</div><div class="tag_post"></div></div>{{end}}
|
||||||
</div>
|
</div>
|
||||||
<div class="content_container" {{if .ActionType}}style="margin-left: 0px;"{{end}}>
|
<div class="content_container" {{if .ActionType}}style="margin-left: 0px;"{{end}}>
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
<span class="lastReplyAt">{{.LastReplyAt}}</span>
|
<span class="lastReplyAt">{{.LastReplyAt}}</span>
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
<a class="rowtopic" href="/topic/{{.Slug}}.{{.ID}}">{{.Title}}</a> {{if .ForumName}}<a class="rowsmall" href="{{.ForumLink}}">{{.ForumName}}</a>{{end}}
|
<a class="rowtopic" href="{{.Link}}">{{.Title}}</a> {{if .ForumName}}<a class="rowsmall" href="{{.ForumLink}}">{{.ForumName}}</a>{{end}}
|
||||||
<br /><a class="rowsmall" href="/user/{{.UserSlug}}.{{.CreatedBy}}">Starter: {{.CreatedByName}}</a>
|
<br /><a class="rowsmall" href="{{.UserLink}}">Starter: {{.CreatedByName}}</a>
|
||||||
{{if .Is_Closed}}<span class="rowsmall topic_status_e topic_status_closed" title="Status: Closed"> | 🔒︎{{end}}</span>
|
{{if .Is_Closed}}<span class="rowsmall topic_status_e topic_status_closed" title="Status: Closed"> | 🔒︎{{end}}</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -467,6 +467,12 @@ button .big { padding: 6px; }*/
|
||||||
padding-bottom: 3px;
|
padding-bottom: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#profile_comments .rowitem {
|
||||||
|
background-repeat: no-repeat, repeat-y;
|
||||||
|
background-size: 128px;
|
||||||
|
padding-left: 136px;
|
||||||
|
}
|
||||||
|
|
||||||
.postQuote {
|
.postQuote {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
border: 1px solid rgb(200,200,200);
|
border: 1px solid rgb(200,200,200);
|
||||||
|
|
|
@ -447,6 +447,12 @@ button .big { padding: 6px; }*/
|
||||||
padding-bottom: 3px;
|
padding-bottom: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#profile_comments .rowitem {
|
||||||
|
background-repeat: no-repeat, repeat-y;
|
||||||
|
background-size: 128px;
|
||||||
|
padding-left: 136px;
|
||||||
|
}
|
||||||
|
|
||||||
.postQuote {
|
.postQuote {
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
|
|
|
@ -446,6 +446,12 @@ input, select, textarea {
|
||||||
.simple .user_tag {
|
.simple .user_tag {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
/* TO-DO: Have a has_avatar class for profile comments and topic replies to allow posts without avatars? Won't that look inconsistent next to everything else for just about every theme though? */
|
||||||
|
#profile_comments .rowitem {
|
||||||
|
background-repeat: no-repeat, repeat-y;
|
||||||
|
background-size: 128px;
|
||||||
|
padding-left: 136px;
|
||||||
|
}
|
||||||
|
|
||||||
@media(max-width: 935px) {
|
@media(max-width: 935px) {
|
||||||
.simple .user_tag {
|
.simple .user_tag {
|
||||||
|
@ -530,16 +536,50 @@ input, select, textarea {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media(max-width: 470px) {
|
@media(max-width: 520px) {
|
||||||
.menu_create_topic {
|
.user_tag, .level_label, .level {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
#profile_left_lane {
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
#profile_comments .rowitem {
|
||||||
|
background-size: 80px;
|
||||||
|
padding-left: calc(80px + 12px);
|
||||||
|
}
|
||||||
|
#profile_left_lane .avatarRow {
|
||||||
|
max-height: 100px;
|
||||||
|
}
|
||||||
|
#profile_right_lane {
|
||||||
|
width: calc(100% - 125px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media(max-width: 470px) {
|
||||||
|
.menu_create_topic, .like_count_label, .like_count {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.post_item {
|
||||||
|
background-size: 100px;
|
||||||
|
padding-left: calc(100px + 12px);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media(max-width: 370px) {
|
@media(max-width: 370px) {
|
||||||
.menu_profile {
|
.menu_profile {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
.post_item {
|
||||||
|
background-size: 80px;
|
||||||
|
padding-left: calc(80px + 12px);
|
||||||
|
}
|
||||||
|
.controls {
|
||||||
|
margin-top: 14px;
|
||||||
|
}
|
||||||
|
#profile_comments .rowitem {
|
||||||
|
background-image: none !important;
|
||||||
|
padding-left: 10px !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media(max-width: 324px) {
|
@media(max-width: 324px) {
|
||||||
|
|
After Width: | Height: | Size: 208 KiB |
|
@ -3,6 +3,7 @@
|
||||||
"FriendlyName": "Shadow",
|
"FriendlyName": "Shadow",
|
||||||
"Version": "0.0.1",
|
"Version": "0.0.1",
|
||||||
"Creator": "Azareal",
|
"Creator": "Azareal",
|
||||||
|
"FullImage": "shadow.png",
|
||||||
"URL": "github.com/Azareal/Gosora",
|
"URL": "github.com/Azareal/Gosora",
|
||||||
"Tag": "WIP"
|
"Tag": "WIP"
|
||||||
}
|
}
|
||||||
|
|
|
@ -473,6 +473,12 @@ button.username {
|
||||||
background: none;
|
background: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#profile_comments .rowitem {
|
||||||
|
background-repeat: no-repeat, repeat-y;
|
||||||
|
background-size: 128px;
|
||||||
|
padding-left: 136px;
|
||||||
|
}
|
||||||
|
|
||||||
.simple {
|
.simple {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
|
@ -520,6 +520,12 @@ button.username {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#profile_comments .rowitem {
|
||||||
|
background-repeat: no-repeat, repeat-y;
|
||||||
|
background-size: 128px;
|
||||||
|
padding-left: 136px;
|
||||||
|
}
|
||||||
|
|
||||||
/* Media Queries */
|
/* Media Queries */
|
||||||
|
|
||||||
@media(min-width: 881px) {
|
@media(min-width: 881px) {
|
||||||
|
|
|
@ -553,4 +553,10 @@ button.username {
|
||||||
top: -2px;
|
top: -2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#profile_comments .rowitem {
|
||||||
|
background-repeat: no-repeat, repeat-y;
|
||||||
|
background-size: 128px;
|
||||||
|
padding-left: 136px;
|
||||||
|
}
|
||||||
|
|
||||||
{{template "media.partial.css" }}
|
{{template "media.partial.css" }}
|
||||||
|
|
22
topic.go
|
@ -6,7 +6,7 @@ import "html/template"
|
||||||
type Topic struct
|
type Topic struct
|
||||||
{
|
{
|
||||||
ID int
|
ID int
|
||||||
Slug string
|
Link string
|
||||||
Title string
|
Title string
|
||||||
Content string
|
Content string
|
||||||
CreatedBy int
|
CreatedBy int
|
||||||
|
@ -27,7 +27,7 @@ type Topic struct
|
||||||
type TopicUser struct
|
type TopicUser struct
|
||||||
{
|
{
|
||||||
ID int
|
ID int
|
||||||
Slug string
|
Link string
|
||||||
Title string
|
Title string
|
||||||
Content string
|
Content string
|
||||||
CreatedBy int
|
CreatedBy int
|
||||||
|
@ -44,7 +44,7 @@ type TopicUser struct
|
||||||
ClassName string
|
ClassName string
|
||||||
Data string // Used for report metadata
|
Data string // Used for report metadata
|
||||||
|
|
||||||
UserSlug string
|
UserLink string
|
||||||
CreatedByName string
|
CreatedByName string
|
||||||
Group int
|
Group int
|
||||||
Avatar string
|
Avatar string
|
||||||
|
@ -60,7 +60,7 @@ type TopicUser struct
|
||||||
type TopicsRow struct
|
type TopicsRow struct
|
||||||
{
|
{
|
||||||
ID int
|
ID int
|
||||||
Slug string
|
Link string
|
||||||
Title string
|
Title string
|
||||||
Content string
|
Content string
|
||||||
CreatedBy int
|
CreatedBy int
|
||||||
|
@ -76,7 +76,7 @@ type TopicsRow struct
|
||||||
LikeCount int
|
LikeCount int
|
||||||
ClassName string
|
ClassName string
|
||||||
|
|
||||||
UserSlug string
|
UserLink string
|
||||||
CreatedByName string
|
CreatedByName string
|
||||||
Avatar string
|
Avatar string
|
||||||
Css template.CSS
|
Css template.CSS
|
||||||
|
@ -120,10 +120,10 @@ func get_topicuser(tid int) (TopicUser,error) {
|
||||||
|
|
||||||
tu := TopicUser{ID:tid}
|
tu := TopicUser{ID:tid}
|
||||||
err := get_topic_user_stmt.QueryRow(tid).Scan(&tu.Title, &tu.Content, &tu.CreatedBy, &tu.CreatedAt, &tu.Is_Closed, &tu.Sticky, &tu.ParentID, &tu.IpAddress, &tu.PostCount, &tu.LikeCount, &tu.CreatedByName, &tu.Avatar, &tu.Group, &tu.URLPrefix, &tu.URLName, &tu.Level)
|
err := get_topic_user_stmt.QueryRow(tid).Scan(&tu.Title, &tu.Content, &tu.CreatedBy, &tu.CreatedAt, &tu.Is_Closed, &tu.Sticky, &tu.ParentID, &tu.IpAddress, &tu.PostCount, &tu.LikeCount, &tu.CreatedByName, &tu.Avatar, &tu.Group, &tu.URLPrefix, &tu.URLName, &tu.Level)
|
||||||
tu.Slug = name_to_slug(tu.Title)
|
tu.Link = build_topic_url(name_to_slug(tu.Title),tu.ID)
|
||||||
tu.UserSlug = name_to_slug(tu.CreatedByName)
|
tu.UserLink = build_profile_url(name_to_slug(tu.CreatedByName),tu.CreatedBy)
|
||||||
|
|
||||||
the_topic := Topic{ID:tu.ID, Slug:tu.Slug, Title:tu.Title, Content:tu.Content, CreatedBy:tu.CreatedBy, Is_Closed:tu.Is_Closed, Sticky:tu.Sticky, CreatedAt:tu.CreatedAt, LastReplyAt:tu.LastReplyAt, ParentID:tu.ParentID, IpAddress:tu.IpAddress, PostCount:tu.PostCount, LikeCount:tu.LikeCount}
|
the_topic := Topic{ID:tu.ID, Link:tu.Link, Title:tu.Title, Content:tu.Content, CreatedBy:tu.CreatedBy, Is_Closed:tu.Is_Closed, Sticky:tu.Sticky, CreatedAt:tu.CreatedAt, LastReplyAt:tu.LastReplyAt, ParentID:tu.ParentID, IpAddress:tu.IpAddress, PostCount:tu.PostCount, LikeCount:tu.LikeCount}
|
||||||
//fmt.Printf("%+v\n", the_topic)
|
//fmt.Printf("%+v\n", the_topic)
|
||||||
tu.Tag = groups[tu.Group].Tag
|
tu.Tag = groups[tu.Group].Tag
|
||||||
topics.Add(&the_topic)
|
topics.Add(&the_topic)
|
||||||
|
@ -131,7 +131,7 @@ func get_topicuser(tid int) (TopicUser,error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func copy_topic_to_topicuser(topic *Topic, user *User) (tu TopicUser) {
|
func copy_topic_to_topicuser(topic *Topic, user *User) (tu TopicUser) {
|
||||||
tu.UserSlug = user.Slug
|
tu.UserLink = user.Link
|
||||||
tu.CreatedByName = user.Name
|
tu.CreatedByName = user.Name
|
||||||
tu.Group = user.Group
|
tu.Group = user.Group
|
||||||
tu.Avatar = user.Avatar
|
tu.Avatar = user.Avatar
|
||||||
|
@ -140,7 +140,7 @@ func copy_topic_to_topicuser(topic *Topic, user *User) (tu TopicUser) {
|
||||||
tu.Level = user.Level
|
tu.Level = user.Level
|
||||||
|
|
||||||
tu.ID = topic.ID
|
tu.ID = topic.ID
|
||||||
tu.Slug = topic.Slug
|
tu.Link = topic.Link
|
||||||
tu.Title = topic.Title
|
tu.Title = topic.Title
|
||||||
tu.Content = topic.Content
|
tu.Content = topic.Content
|
||||||
tu.CreatedBy = topic.CreatedBy
|
tu.CreatedBy = topic.CreatedBy
|
||||||
|
@ -160,7 +160,7 @@ func copy_topic_to_topicuser(topic *Topic, user *User) (tu TopicUser) {
|
||||||
func get_topic_by_reply(rid int) (*Topic, error) {
|
func get_topic_by_reply(rid int) (*Topic, error) {
|
||||||
topic := Topic{ID:0}
|
topic := Topic{ID:0}
|
||||||
err := get_topic_by_reply_stmt.QueryRow(rid).Scan(&topic.ID, &topic.Title, &topic.Content, &topic.CreatedBy, &topic.CreatedAt, &topic.Is_Closed, &topic.Sticky, &topic.ParentID, &topic.IpAddress, &topic.PostCount, &topic.LikeCount, &topic.Data)
|
err := get_topic_by_reply_stmt.QueryRow(rid).Scan(&topic.ID, &topic.Title, &topic.Content, &topic.CreatedBy, &topic.CreatedAt, &topic.Is_Closed, &topic.Sticky, &topic.ParentID, &topic.IpAddress, &topic.PostCount, &topic.LikeCount, &topic.Data)
|
||||||
topic.Slug = name_to_slug(topic.Title)
|
topic.Link = build_topic_url(name_to_slug(topic.Title),topic.ID)
|
||||||
return &topic, err
|
return &topic, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ func (sts *MemoryTopicStore) CascadeGet(id int) (*Topic, error) {
|
||||||
topic = &Topic{ID:id}
|
topic = &Topic{ID:id}
|
||||||
err := sts.get.QueryRow(id).Scan(&topic.Title, &topic.Content, &topic.CreatedBy, &topic.CreatedAt, &topic.Is_Closed, &topic.Sticky, &topic.ParentID, &topic.IpAddress, &topic.PostCount, &topic.LikeCount, &topic.Data)
|
err := sts.get.QueryRow(id).Scan(&topic.Title, &topic.Content, &topic.CreatedBy, &topic.CreatedAt, &topic.Is_Closed, &topic.Sticky, &topic.ParentID, &topic.IpAddress, &topic.PostCount, &topic.LikeCount, &topic.Data)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
topic.Slug = name_to_slug(topic.Title)
|
topic.Link = build_topic_url(name_to_slug(topic.Title),id)
|
||||||
sts.Add(topic)
|
sts.Add(topic)
|
||||||
}
|
}
|
||||||
return topic, err
|
return topic, err
|
||||||
|
@ -82,7 +82,7 @@ func (sts *MemoryTopicStore) CascadeGet(id int) (*Topic, error) {
|
||||||
func (sts *MemoryTopicStore) BypassGet(id int) (*Topic, error) {
|
func (sts *MemoryTopicStore) BypassGet(id int) (*Topic, error) {
|
||||||
topic := &Topic{ID:id}
|
topic := &Topic{ID:id}
|
||||||
err := sts.get.QueryRow(id).Scan(&topic.Title, &topic.Content, &topic.CreatedBy, &topic.CreatedAt, &topic.Is_Closed, &topic.Sticky, &topic.ParentID, &topic.IpAddress, &topic.PostCount, &topic.LikeCount, &topic.Data)
|
err := sts.get.QueryRow(id).Scan(&topic.Title, &topic.Content, &topic.CreatedBy, &topic.CreatedAt, &topic.Is_Closed, &topic.Sticky, &topic.ParentID, &topic.IpAddress, &topic.PostCount, &topic.LikeCount, &topic.Data)
|
||||||
topic.Slug = name_to_slug(topic.Title)
|
topic.Link = build_topic_url(name_to_slug(topic.Title),id)
|
||||||
return topic, err
|
return topic, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ func (sts *MemoryTopicStore) Load(id int) error {
|
||||||
topic := &Topic{ID:id}
|
topic := &Topic{ID:id}
|
||||||
err := sts.get.QueryRow(id).Scan(&topic.Title, &topic.Content, &topic.CreatedBy, &topic.CreatedAt, &topic.Is_Closed, &topic.Sticky, &topic.ParentID, &topic.IpAddress, &topic.PostCount, &topic.LikeCount, &topic.Data)
|
err := sts.get.QueryRow(id).Scan(&topic.Title, &topic.Content, &topic.CreatedBy, &topic.CreatedAt, &topic.Is_Closed, &topic.Sticky, &topic.ParentID, &topic.IpAddress, &topic.PostCount, &topic.LikeCount, &topic.Data)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
topic.Slug = name_to_slug(topic.Title)
|
topic.Link = build_topic_url(name_to_slug(topic.Title),id)
|
||||||
sts.Set(topic)
|
sts.Set(topic)
|
||||||
} else {
|
} else {
|
||||||
sts.Remove(id)
|
sts.Remove(id)
|
||||||
|
@ -180,35 +180,35 @@ func NewSqlTopicStore() *SqlTopicStore {
|
||||||
func (sts *SqlTopicStore) Get(id int) (*Topic, error) {
|
func (sts *SqlTopicStore) Get(id int) (*Topic, error) {
|
||||||
topic := Topic{ID:id}
|
topic := Topic{ID:id}
|
||||||
err := sts.get.QueryRow(id).Scan(&topic.Title, &topic.Content, &topic.CreatedBy, &topic.CreatedAt, &topic.Is_Closed, &topic.Sticky, &topic.ParentID, &topic.IpAddress, &topic.PostCount, &topic.LikeCount, &topic.Data)
|
err := sts.get.QueryRow(id).Scan(&topic.Title, &topic.Content, &topic.CreatedBy, &topic.CreatedAt, &topic.Is_Closed, &topic.Sticky, &topic.ParentID, &topic.IpAddress, &topic.PostCount, &topic.LikeCount, &topic.Data)
|
||||||
topic.Slug = name_to_slug(topic.Title)
|
topic.Link = build_topic_url(name_to_slug(topic.Title),id)
|
||||||
return &topic, err
|
return &topic, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (sts *SqlTopicStore) GetUnsafe(id int) (*Topic, error) {
|
func (sts *SqlTopicStore) GetUnsafe(id int) (*Topic, error) {
|
||||||
topic := Topic{ID:id}
|
topic := Topic{ID:id}
|
||||||
err := sts.get.QueryRow(id).Scan(&topic.Title, &topic.Content, &topic.CreatedBy, &topic.CreatedAt, &topic.Is_Closed, &topic.Sticky, &topic.ParentID, &topic.IpAddress, &topic.PostCount, &topic.LikeCount, &topic.Data)
|
err := sts.get.QueryRow(id).Scan(&topic.Title, &topic.Content, &topic.CreatedBy, &topic.CreatedAt, &topic.Is_Closed, &topic.Sticky, &topic.ParentID, &topic.IpAddress, &topic.PostCount, &topic.LikeCount, &topic.Data)
|
||||||
topic.Slug = name_to_slug(topic.Title)
|
topic.Link = build_topic_url(name_to_slug(topic.Title),id)
|
||||||
return &topic, err
|
return &topic, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (sts *SqlTopicStore) CascadeGet(id int) (*Topic, error) {
|
func (sts *SqlTopicStore) CascadeGet(id int) (*Topic, error) {
|
||||||
topic := Topic{ID:id}
|
topic := Topic{ID:id}
|
||||||
err := sts.get.QueryRow(id).Scan(&topic.Title, &topic.Content, &topic.CreatedBy, &topic.CreatedAt, &topic.Is_Closed, &topic.Sticky, &topic.ParentID, &topic.IpAddress, &topic.PostCount, &topic.LikeCount, &topic.Data)
|
err := sts.get.QueryRow(id).Scan(&topic.Title, &topic.Content, &topic.CreatedBy, &topic.CreatedAt, &topic.Is_Closed, &topic.Sticky, &topic.ParentID, &topic.IpAddress, &topic.PostCount, &topic.LikeCount, &topic.Data)
|
||||||
topic.Slug = name_to_slug(topic.Title)
|
topic.Link = build_topic_url(name_to_slug(topic.Title),id)
|
||||||
return &topic, err
|
return &topic, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (sts *SqlTopicStore) BypassGet(id int) (*Topic, error) {
|
func (sts *SqlTopicStore) BypassGet(id int) (*Topic, error) {
|
||||||
topic := &Topic{ID:id}
|
topic := &Topic{ID:id}
|
||||||
err := sts.get.QueryRow(id).Scan(&topic.Title, &topic.Content, &topic.CreatedBy, &topic.CreatedAt, &topic.Is_Closed, &topic.Sticky, &topic.ParentID, &topic.IpAddress, &topic.PostCount, &topic.LikeCount, &topic.Data)
|
err := sts.get.QueryRow(id).Scan(&topic.Title, &topic.Content, &topic.CreatedBy, &topic.CreatedAt, &topic.Is_Closed, &topic.Sticky, &topic.ParentID, &topic.IpAddress, &topic.PostCount, &topic.LikeCount, &topic.Data)
|
||||||
topic.Slug = name_to_slug(topic.Title)
|
topic.Link = build_topic_url(name_to_slug(topic.Title),id)
|
||||||
return topic, err
|
return topic, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (sts *SqlTopicStore) Load(id int) error {
|
func (sts *SqlTopicStore) Load(id int) error {
|
||||||
topic := Topic{ID:id}
|
topic := Topic{ID:id}
|
||||||
err := sts.get.QueryRow(id).Scan(&topic.Title, &topic.Content, &topic.CreatedBy, &topic.CreatedAt, &topic.Is_Closed, &topic.Sticky, &topic.ParentID, &topic.IpAddress, &topic.PostCount, &topic.LikeCount, &topic.Data)
|
err := sts.get.QueryRow(id).Scan(&topic.Title, &topic.Content, &topic.CreatedBy, &topic.CreatedAt, &topic.Is_Closed, &topic.Sticky, &topic.ParentID, &topic.IpAddress, &topic.PostCount, &topic.LikeCount, &topic.Data)
|
||||||
topic.Slug = name_to_slug(topic.Title)
|
topic.Link = build_topic_url(name_to_slug(topic.Title),id)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
4
user.go
|
@ -11,7 +11,7 @@ import (
|
||||||
"golang.org/x/crypto/bcrypt"
|
"golang.org/x/crypto/bcrypt"
|
||||||
)
|
)
|
||||||
|
|
||||||
var guest_user User = User{ID:0,Group:6,Perms:GuestPerms}
|
var guest_user User = User{ID:0,Link:"#",Group:6,Perms:GuestPerms}
|
||||||
|
|
||||||
var PreRoute func(http.ResponseWriter, *http.Request) (User,bool) = _pre_route
|
var PreRoute func(http.ResponseWriter, *http.Request) (User,bool) = _pre_route
|
||||||
var PanelSessionCheck func(http.ResponseWriter, *http.Request, *User) (HeaderVars,bool) = _panel_session_check
|
var PanelSessionCheck func(http.ResponseWriter, *http.Request, *User) (HeaderVars,bool) = _panel_session_check
|
||||||
|
@ -26,7 +26,7 @@ var GeneratePassword func(password string) (hashed_password string, salt string,
|
||||||
type User struct
|
type User struct
|
||||||
{
|
{
|
||||||
ID int
|
ID int
|
||||||
Slug string
|
Link string
|
||||||
Name string
|
Name string
|
||||||
Email string
|
Email string
|
||||||
Group int
|
Group int
|
||||||
|
|
|
@ -103,7 +103,7 @@ func (sus *MemoryUserStore) CascadeGet(id int) (*User, error) {
|
||||||
} else {
|
} else {
|
||||||
user.Avatar = strings.Replace(config.Noavatar,"{id}",strconv.Itoa(user.ID),1)
|
user.Avatar = strings.Replace(config.Noavatar,"{id}",strconv.Itoa(user.ID),1)
|
||||||
}
|
}
|
||||||
user.Slug = name_to_slug(user.Name)
|
user.Link = build_profile_url(name_to_slug(user.Name),id)
|
||||||
user.Tag = groups[user.Group].Tag
|
user.Tag = groups[user.Group].Tag
|
||||||
init_user_perms(user)
|
init_user_perms(user)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
@ -123,7 +123,7 @@ func (sus *MemoryUserStore) BypassGet(id int) (*User, error) {
|
||||||
} else {
|
} else {
|
||||||
user.Avatar = strings.Replace(config.Noavatar,"{id}",strconv.Itoa(user.ID),1)
|
user.Avatar = strings.Replace(config.Noavatar,"{id}",strconv.Itoa(user.ID),1)
|
||||||
}
|
}
|
||||||
user.Slug = name_to_slug(user.Name)
|
user.Link = build_profile_url(name_to_slug(user.Name),id)
|
||||||
user.Tag = groups[user.Group].Tag
|
user.Tag = groups[user.Group].Tag
|
||||||
init_user_perms(user)
|
init_user_perms(user)
|
||||||
return user, err
|
return user, err
|
||||||
|
@ -144,7 +144,7 @@ func (sus *MemoryUserStore) Load(id int) error {
|
||||||
} else {
|
} else {
|
||||||
user.Avatar = strings.Replace(config.Noavatar,"{id}",strconv.Itoa(user.ID),1)
|
user.Avatar = strings.Replace(config.Noavatar,"{id}",strconv.Itoa(user.ID),1)
|
||||||
}
|
}
|
||||||
user.Slug = name_to_slug(user.Name)
|
user.Link = build_profile_url(name_to_slug(user.Name),id)
|
||||||
user.Tag = groups[user.Group].Tag
|
user.Tag = groups[user.Group].Tag
|
||||||
init_user_perms(user)
|
init_user_perms(user)
|
||||||
sus.Set(user)
|
sus.Set(user)
|
||||||
|
@ -282,7 +282,7 @@ func (sus *SqlUserStore) Get(id int) (*User, error) {
|
||||||
} else {
|
} else {
|
||||||
user.Avatar = strings.Replace(config.Noavatar,"{id}",strconv.Itoa(user.ID),1)
|
user.Avatar = strings.Replace(config.Noavatar,"{id}",strconv.Itoa(user.ID),1)
|
||||||
}
|
}
|
||||||
user.Slug = name_to_slug(user.Name)
|
user.Link = build_profile_url(name_to_slug(user.Name),id)
|
||||||
user.Tag = groups[user.Group].Tag
|
user.Tag = groups[user.Group].Tag
|
||||||
init_user_perms(&user)
|
init_user_perms(&user)
|
||||||
return &user, err
|
return &user, err
|
||||||
|
@ -299,7 +299,7 @@ func (sus *SqlUserStore) GetUnsafe(id int) (*User, error) {
|
||||||
} else {
|
} else {
|
||||||
user.Avatar = strings.Replace(config.Noavatar,"{id}",strconv.Itoa(user.ID),1)
|
user.Avatar = strings.Replace(config.Noavatar,"{id}",strconv.Itoa(user.ID),1)
|
||||||
}
|
}
|
||||||
user.Slug = name_to_slug(user.Name)
|
user.Link = build_profile_url(name_to_slug(user.Name),id)
|
||||||
user.Tag = groups[user.Group].Tag
|
user.Tag = groups[user.Group].Tag
|
||||||
init_user_perms(&user)
|
init_user_perms(&user)
|
||||||
return &user, err
|
return &user, err
|
||||||
|
@ -316,7 +316,7 @@ func (sus *SqlUserStore) CascadeGet(id int) (*User, error) {
|
||||||
} else {
|
} else {
|
||||||
user.Avatar = strings.Replace(config.Noavatar,"{id}",strconv.Itoa(user.ID),1)
|
user.Avatar = strings.Replace(config.Noavatar,"{id}",strconv.Itoa(user.ID),1)
|
||||||
}
|
}
|
||||||
user.Slug = name_to_slug(user.Name)
|
user.Link = build_profile_url(name_to_slug(user.Name),id)
|
||||||
user.Tag = groups[user.Group].Tag
|
user.Tag = groups[user.Group].Tag
|
||||||
init_user_perms(&user)
|
init_user_perms(&user)
|
||||||
return &user, err
|
return &user, err
|
||||||
|
@ -333,7 +333,7 @@ func (sus *SqlUserStore) BypassGet(id int) (*User, error) {
|
||||||
} else {
|
} else {
|
||||||
user.Avatar = strings.Replace(config.Noavatar,"{id}",strconv.Itoa(user.ID),1)
|
user.Avatar = strings.Replace(config.Noavatar,"{id}",strconv.Itoa(user.ID),1)
|
||||||
}
|
}
|
||||||
user.Slug = name_to_slug(user.Name)
|
user.Link = build_profile_url(name_to_slug(user.Name),id)
|
||||||
user.Tag = groups[user.Group].Tag
|
user.Tag = groups[user.Group].Tag
|
||||||
init_user_perms(&user)
|
init_user_perms(&user)
|
||||||
return &user, err
|
return &user, err
|
||||||
|
|