9fce51a3d7
Hid the themes which aren't under construction yet from the Theme Manager. Fixed a bug in the BBCode parser where every post had ten spaces appended to them. Added the get_reply() internal API function for plugins to make use of. Added the bell to the theme. Fixed some bits of the Cosmo theme where the rowhead wasn't appearing. Added a "Don't have an account?" link to the login page. I began work on the alerts system, I took a little break, so it's a little further behind than you might expect, but it shouldn't take too long for me to finish it up. I haven't finished the back-end portions of it yet, so there's not much to see yet!
51 lines
956 B
Go
51 lines
956 B
Go
/* Copyright Azareal 2016 - 2017 */
|
|
package main
|
|
import "html/template"
|
|
|
|
type Reply struct /* Should probably rename this to ReplyUser and rename ReplyShort to Reply */
|
|
{
|
|
ID int
|
|
ParentID int
|
|
Content string
|
|
ContentHtml string
|
|
CreatedBy int
|
|
CreatedByName string
|
|
Group int
|
|
CreatedAt string
|
|
LastEdit int
|
|
LastEditBy int
|
|
Avatar string
|
|
Css template.CSS
|
|
ContentLines int
|
|
Tag string
|
|
URL string
|
|
URLPrefix string
|
|
URLName string
|
|
Level int
|
|
IpAddress string
|
|
Liked bool
|
|
LikeCount int
|
|
}
|
|
|
|
type ReplyShort struct
|
|
{
|
|
ID int
|
|
ParentID int
|
|
Content string
|
|
CreatedBy int
|
|
Group int
|
|
CreatedAt string
|
|
LastEdit int
|
|
LastEditBy int
|
|
ContentLines int
|
|
IpAddress string
|
|
Liked bool
|
|
LikeCount int
|
|
}
|
|
|
|
func get_reply(id int) (*ReplyShort, error) {
|
|
reply := ReplyShort{ID:id}
|
|
err := get_post_stmt.QueryRow(id).Scan(&reply.Content, &reply.CreatedBy, &reply.CreatedAt, &reply.LastEdit, &reply.LastEditBy, &reply.IpAddress, &reply.LikeCount)
|
|
return &reply, err
|
|
}
|