Archived
1
0

fix pubkey tripcode

This commit is contained in:
Jeff 2017-07-30 18:20:14 -04:00
parent 2074e49d75
commit 741ded6694
3 changed files with 7 additions and 2 deletions

View File

@ -57,6 +57,7 @@ type PostModel interface {
Board() string Board() string
Sage() bool Sage() bool
Pubkey() string Pubkey() string
PubkeyHex() string
Reference() string Reference() string
ReferenceHash() string ReferenceHash() string

View File

@ -376,6 +376,10 @@ func (self *post) ShortHash() string {
return ShortHashMessageID(self.MessageID()) return ShortHashMessageID(self.MessageID())
} }
func (self *post) PubkeyHex() string {
return self.Key
}
func (self *post) Pubkey() string { func (self *post) Pubkey() string {
if len(self.Key) > 0 { if len(self.Key) > 0 {
return fmt.Sprintf("<label title=\"%s\">%s</label>", self.Key, makeTripcode(self.Key)) return fmt.Sprintf("<label title=\"%s\">%s</label>", self.Key, makeTripcode(self.Key))

View File

@ -12,7 +12,7 @@
data-msgidhash="{{post.PostHash}}" data-msgidhash="{{post.PostHash}}"
data-rootmsgid="{{post.Reference}}" data-rootmsgid="{{post.Reference}}"
data-rootmsgidhash="{{post.ReferenceHash}}" data-rootmsgidhash="{{post.ReferenceHash}}"
data-pubkey="{{post.Pubkey}}" data-pubkey="{{post.PubkeyHex}}"
{{#post.Sage}} {{#post.Sage}}
data-sage="1" data-sage="1"
{{/post.Sage}} {{/post.Sage}}
@ -29,7 +29,7 @@
{{#post.Attachments}} {{#post.Attachments}}
<a href="{{Source}}" class="image_link" target="_blank" title="{{Filename}}"><img src="{{Thumbnail}}" class="image" /></a> <a href="{{Source}}" class="image_link" target="_blank" title="{{Filename}}"><img src="{{Thumbnail}}" class="image" /></a>
{{/post.Attachments}} {{/post.Attachments}}
<a name="{{post.PostHash}}"></a><span class="topicline"><b data-subject="{{post.Subject}}" class="subject">{{post.Subject}}</b> {{post.Name}} <span class="published">{{post.Date}}</span> {{post.Pubkey}} <a href="{{post.PostURL}}">&#8470;</a> <a name="{{post.PostHash}}"></a><span class="topicline"><b data-subject="{{post.Subject}}" class="subject">{{post.Subject}}</b> {{post.Name}} <span class="published">{{post.Date}}</span> {{{post.Pubkey}}} <a href="{{post.PostURL}}">&#8470;</a>
<a href="#" onclick="return quickreply('{{post.ShortHash}}', '{{post.PostHash}}', '{{post.PostURL}}');"> {{post.ShortHash}}</a> <a href="#" onclick="return quickreply('{{post.ShortHash}}', '{{post.PostHash}}', '{{post.PostURL}}');"> {{post.ShortHash}}</a>
</span> </span>
<br /><br /> <br /><br />