PathrockNetwork Gno Explorer
HomeBlocksTransactionsTokensRealmsPackagesValidatorsAnalytics

PathrockNetwork Gno Explorer — an independent explorer for Gno.land Mainnet (gnoland-1), operated by PathrockNetwork. Not an official Gno.land service.

gnowebarchive RPC

gno.land/r/gnoland/boards2/v0

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
v0
Namespace
gnoland / boards2
Files
252 (README)(gnomod.toml)
Exported functions
51
Module
gno.land/r/gnoland/boards2/v0
gno
0.9

Files (252)

  • README.mdmarkdown
  • gnomod.tomltoml
  • boards.gnogno
  • doc.gnogno
  • flag.gnogno
  • format.gnogno
  • hub.gnogno
  • meta.gnogno
  • permissions_validators_basic.gnogno
  • permissions_validators_open.gnogno
  • permissions.gnogno
  • public_ban.gnogno
  • public_flag.gnogno
  • public_freeze.gnogno
  • public_invite.gnogno
  • public_lock.gnogno
  • public.gnogno
  • render_board.gnogno
  • render_post.gnogno
  • render_reply.gnogno
  • render_thread.gnogno
  • render.gnogno
  • uris_board.gnogno
  • uris_post.gnogno
  • z_accept_invite_00_filetest.gnogno
  • z_accept_invite_01_filetest.gnogno
  • z_accept_invite_02_filetest.gnogno
  • z_accept_invite_03_filetest.gnogno
  • z_ban_00_filetest.gnogno
  • z_ban_01_filetest.gnogno
  • z_ban_02_filetest.gnogno
  • z_change_member_role_00_filetest.gnogno
  • z_change_member_role_01_filetest.gnogno
  • z_change_member_role_02_filetest.gnogno
  • z_change_member_role_03_filetest.gnogno
  • z_change_member_role_04_filetest.gnogno
  • z_change_member_role_05_filetest.gnogno
  • z_change_member_role_06_filetest.gnogno
  • z_change_member_role_07_filetest.gnogno
  • z_create_board_00_filetest.gnogno
  • z_create_board_01_filetest.gnogno
  • z_create_board_02_filetest.gnogno
  • z_create_board_03_filetest.gnogno
  • z_create_board_04_filetest.gnogno
  • z_create_board_05_filetest.gnogno
  • z_create_board_06_filetest.gnogno
  • z_create_board_07_filetest.gnogno
  • z_create_board_08_filetest.gnogno
  • z_create_board_09_filetest.gnogno
  • z_create_board_10_filetest.gnogno
  • z_create_reply_00_filetest.gnogno
  • z_create_reply_01_filetest.gnogno
  • z_create_reply_02_filetest.gnogno
  • z_create_reply_03_filetest.gnogno
  • z_create_reply_04_filetest.gnogno
  • z_create_reply_05_filetest.gnogno
  • z_create_reply_06_filetest.gnogno
  • z_create_reply_07_filetest.gnogno
  • z_create_reply_08_filetest.gnogno
  • z_create_reply_09_filetest.gnogno
  • z_create_reply_10_filetest.gnogno
  • z_create_reply_11_filetest.gnogno
  • z_create_reply_12_filetest.gnogno
  • z_create_reply_13_filetest.gnogno
  • z_create_reply_14_filetest.gnogno
  • z_create_reply_15_filetest.gnogno
  • z_create_reply_16_filetest.gnogno
  • z_create_repost_00_filetest.gnogno
  • z_create_repost_01_filetest.gnogno
  • z_create_repost_02_filetest.gnogno
  • z_create_repost_03_filetest.gnogno
  • z_create_repost_04_filetest.gnogno
  • z_create_thread_00_filetest.gnogno
  • z_create_thread_01_filetest.gnogno
  • z_create_thread_02_filetest.gnogno
  • z_create_thread_03_filetest.gnogno
  • z_create_thread_04_filetest.gnogno
  • z_create_thread_05_filetest.gnogno
  • z_create_thread_06_filetest.gnogno
  • z_delete_reply_00_filetest.gnogno
  • z_delete_reply_01_filetest.gnogno
  • z_delete_reply_02_filetest.gnogno
  • z_delete_reply_03_filetest.gnogno
  • z_delete_reply_04_filetest.gnogno
  • z_delete_reply_05_filetest.gnogno
  • z_delete_reply_06_filetest.gnogno
  • z_delete_reply_07_filetest.gnogno
  • z_delete_reply_08_filetest.gnogno
  • z_delete_reply_09_filetest.gnogno
  • z_delete_thread_00_filetest.gnogno
  • z_delete_thread_01_filetest.gnogno
  • z_delete_thread_02_filetest.gnogno
  • z_delete_thread_03_filetest.gnogno
  • z_delete_thread_04_filetest.gnogno
  • z_delete_thread_05_filetest.gnogno
  • z_delete_thread_06_filetest.gnogno
  • z_edit_reply_00_filetest.gnogno
  • z_edit_reply_01_filetest.gnogno
  • z_edit_reply_02_filetest.gnogno
  • z_edit_reply_03_filetest.gnogno
  • z_edit_reply_04_filetest.gnogno
  • z_edit_reply_05_filetest.gnogno
  • z_edit_reply_06_filetest.gnogno
  • z_edit_reply_07_filetest.gnogno
  • z_edit_reply_08_filetest.gnogno
  • z_edit_thread_00_filetest.gnogno
  • z_edit_thread_01_filetest.gnogno
  • z_edit_thread_02_filetest.gnogno
  • z_edit_thread_03_filetest.gnogno
  • z_edit_thread_04_filetest.gnogno
  • z_edit_thread_05_filetest.gnogno
  • z_edit_thread_06_filetest.gnogno
  • z_edit_thread_07_filetest.gnogno
  • z_flag_reply_00_filetest.gnogno
  • z_flag_reply_01_filetest.gnogno
  • z_flag_reply_02_filetest.gnogno
  • z_flag_reply_03_filetest.gnogno
  • z_flag_reply_04_filetest.gnogno
  • z_flag_reply_05_filetest.gnogno
  • z_flag_reply_06_filetest.gnogno
  • z_flag_reply_07_filetest.gnogno
  • z_flag_reply_08_filetest.gnogno
  • z_flag_reply_09_filetest.gnogno
  • z_flag_thread_00_filetest.gnogno
  • z_flag_thread_01_filetest.gnogno
  • z_flag_thread_02_filetest.gnogno
  • z_flag_thread_03_filetest.gnogno
  • z_flag_thread_04_filetest.gnogno
  • z_flag_thread_05_filetest.gnogno
  • z_flag_thread_06_filetest.gnogno
  • z_flag_thread_07_filetest.gnogno
  • z_flag_thread_08_filetest.gnogno
  • z_freeze_board_00_filetest.gnogno
  • z_freeze_board_01_filetest.gnogno
  • z_freeze_thread_00_filetest.gnogno
  • z_freeze_thread_01_filetest.gnogno
  • z_freeze_thread_02_filetest.gnogno
  • z_get_board_id_from_name_00_filetest.gnogno
  • z_get_board_id_from_name_01_filetest.gnogno
  • z_hub_0_a_filetest.gnogno
  • z_hub_0_b_filetest.gnogno
  • z_hub_0_c_filetest.gnogno
  • z_hub_1_a_filetest.gnogno
  • z_hub_1_b_filetest.gnogno
  • z_hub_1_c_filetest.gnogno
  • z_hub_2_a_filetest.gnogno
  • z_hub_2_b_filetest.gnogno
  • z_hub_3_a_filetest.gnogno
  • z_hub_3_b_filetest.gnogno
  • z_hub_4_a_filetest.gnogno
  • z_hub_4_b_filetest.gnogno
  • z_hub_5_a_filetest.gnogno
  • z_hub_5_b_filetest.gnogno
  • z_hub_6_a_filetest.gnogno
  • z_hub_6_b_filetest.gnogno
  • z_hub_6_c_filetest.gnogno
  • z_hub_6_d_filetest.gnogno
  • z_hub_6_e_filetest.gnogno
  • z_hub_7_a_filetest.gnogno
  • z_hub_7_b_filetest.gnogno
  • z_hub_8_a_filetest.gnogno
  • z_hub_8_b_filetest.gnogno
  • z_hub_8_c_filetest.gnogno
  • z_hub_9_a_filetest.gnogno
  • z_hub_9_b_filetest.gnogno
  • z_hub_9_c_filetest.gnogno
  • z_invite_member_00_filetest.gnogno
  • z_invite_member_01_filetest.gnogno
  • z_invite_member_02_filetest.gnogno
  • z_invite_member_03_filetest.gnogno
  • z_invite_member_04_filetest.gnogno
  • z_invite_member_05_filetest.gnogno
  • z_invite_member_06_filetest.gnogno
  • z_is_banned_00_filetest.gnogno
  • z_is_banned_01_filetest.gnogno
  • z_is_member_00_filetest.gnogno
  • z_is_member_01_filetest.gnogno
  • z_lock_realm_00_filetest.gnogno
  • z_lock_realm_01_filetest.gnogno
  • z_lock_realm_02_filetest.gnogno
  • z_lock_realm_03_filetest.gnogno
  • z_lock_realm_04_filetest.gnogno
  • z_lock_realm_05_filetest.gnogno
  • z_remove_member_00_filetest.gnogno
  • z_remove_member_01_filetest.gnogno
  • z_remove_member_02_filetest.gnogno
  • z_remove_member_03_filetest.gnogno
  • z_rename_board_00_filetest.gnogno
  • z_rename_board_01_filetest.gnogno
  • z_rename_board_02_filetest.gnogno
  • z_rename_board_03_filetest.gnogno
  • z_rename_board_04_filetest.gnogno
  • z_rename_board_05_filetest.gnogno
  • z_rename_board_06_filetest.gnogno
  • z_rename_board_07_filetest.gnogno
  • z_rename_board_08_filetest.gnogno
  • z_rename_board_09_filetest.gnogno
  • z_request_invite_00_filetest.gnogno
  • z_request_invite_01_filetest.gnogno
  • z_request_invite_02_filetest.gnogno
  • z_request_invite_03_filetest.gnogno
  • z_request_invite_04_filetest.gnogno
  • z_revoke_invite_00_filetest.gnogno
  • z_revoke_invite_01_filetest.gnogno
  • z_revoke_invite_02_filetest.gnogno
  • z_set_flagging_threshold_00_filetest.gnogno
  • z_set_flagging_threshold_01_filetest.gnogno
  • z_set_flagging_threshold_02_filetest.gnogno
  • z_set_permissions_00_filetest.gnogno
  • z_set_permissions_01_filetest.gnogno
  • z_set_permissions_02_filetest.gnogno
  • z_set_realm_notice_00_filetest.gnogno
  • z_set_realm_notice_01_filetest.gnogno
  • z_set_realm_notice_02_filetest.gnogno
  • z_set_realm_notice_03_filetest.gnogno
  • z_set_required_account_amount_00_filetest.gnogno
  • z_set_required_account_amount_01_filetest.gnogno
  • z_set_required_account_amount_02_filetest.gnogno
  • z_ui_admin_users_00_filetest.gnogno
  • z_ui_board_00_filetest.gnogno
  • z_ui_board_01_filetest.gnogno
  • z_ui_board_02_filetest.gnogno
  • z_ui_board_03_filetest.gnogno
  • z_ui_board_04_filetest.gnogno
  • z_ui_board_05_filetest.gnogno
  • z_ui_board_members_00_filetest.gnogno
  • z_ui_home_00_filetest.gnogno
  • z_ui_home_01_filetest.gnogno
  • z_ui_home_02_filetest.gnogno
  • z_ui_reply_00_filetest.gnogno
  • z_ui_reply_01_filetest.gnogno
  • z_ui_reply_02_filetest.gnogno
  • z_ui_reply_03_filetest.gnogno
  • z_ui_reply_04_filetest.gnogno
  • z_ui_thread_00_filetest.gnogno
  • z_ui_thread_01_filetest.gnogno
  • z_ui_thread_02_filetest.gnogno
  • z_ui_thread_03_filetest.gnogno
  • z_ui_thread_04_filetest.gnogno
  • z_ui_thread_05_filetest.gnogno
  • z_ui_thread_06_filetest.gnogno
  • z_ui_thread_07_filetest.gnogno
  • z_ui_thread_08_filetest.gnogno
  • z_ui_thread_09_filetest.gnogno
  • z_ui_thread_10_filetest.gnogno
  • z_ui_thread_11_filetest.gnogno
  • z_ui_thread_12_filetest.gnogno
  • z_ui_thread_13_filetest.gnogno
  • z_ui_thread_14_filetest.gnogno
  • z_unban_00_filetest.gnogno
  • z_unban_01_filetest.gnogno
  • z_unban_02_filetest.gnogno
  • render_reply.gnogno
    1package boards223import (4	"strconv"5	"strings"67	"gno.land/p/gnoland/boards/v0"8

    Functions

    • AcceptInvite(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, boardID uint64, user string)

    • AreRealmMembersLocked() bool

    • Ban(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, boardID uint64, user string, hours uint, reason string)

    • BoardCount() int

    • ChangeMemberRole(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, boardID uint64, member string, role string)

    • CreateBoard(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, name string, listed bool, open bool) uint64

    • CreateReply(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, boardID uint64, threadID uint64, replyID uint64, body string) uint64

    • CreateRepost(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, boardID uint64, threadID uint64, destinationBoardID uint64, title string, body string) uint64

    • CreateThread(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, boardID uint64, title string, body string) uint64

    • DeleteReply(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, boardID uint64, threadID uint64, replyID uint64)

    • DeleteThread(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, boardID uint64, threadID uint64)

    • EditReply(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, boardID uint64, threadID uint64, replyID uint64, body string)

    • EditThread(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, boardID uint64, threadID uint64, title string, body string)

    • FlagReply(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, boardID uint64, threadID uint64, replyID uint64, reason string)

    • FlagThread(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, boardID uint64, threadID uint64, reason string)

    • FreezeBoard(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, boardID uint64)

    • FreezeThread(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, boardID uint64, threadID uint64)

    • GetBoard(id uint64) (struct{id uint64; name string; aliases []string; readonly bool; threadCount int; memberCount int; creator .uverse.address; createdAt int64; updatedAt int64}, bool)

    • GetBoardIDFromName(interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, name string) (uint64, found bool)

    • GetBoards(start int, count int) []gno.land/p/gnoland/boards/exts/hub/v0.Board

    • GetComment(boardID uint64, threadID uint64, commentID uint64) (struct{id uint64; boardID uint64; threadID uint64; parentID uint64; body string; hidden bool; replyCount int; flagCount int; creator .uverse.address; createdAt int64; updatedAt int64}, bool)

    • GetComments(boardID uint64, threadID uint64, start int, count int) []gno.land/p/gnoland/boards/exts/hub/v0.Comment

    • GetFlaggingThreshold(boardID uint64) int

    • GetFlags(boardID uint64, threadID uint64, commentID uint64, start int, count int) []gno.land/p/gnoland/boards/exts/hub/v0.Flag

    • GetMembers(boardID uint64, start int, count int) []gno.land/p/gnoland/boards/exts/hub/v0.Member

    • GetReplies(boardID uint64, threadID uint64, commentID uint64, start int, count int) []gno.land/p/gnoland/boards/exts/hub/v0.Comment

    • GetReposts(boardID uint64, threadID uint64, start int, count int) []gno.land/p/gnoland/boards/exts/hub/v0.Thread

    • GetThread(boardID uint64, threadID uint64) (struct{id uint64; originalBoardID uint64; originalThreadID uint64; boardID uint64; title string; body string; hidden bool; readonly bool; commentCount int; repostCount int; flagCount int; creator .uverse.address; createdAt int64; updatedAt int64}, bool)

    • GetThreads(boardID uint64, start int, count int) []gno.land/p/gnoland/boards/exts/hub/v0.Thread

    • HasMemberRole(boardID uint64, member string, role string) bool

    • InviteMember(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, boardID uint64, user string, role string)

    • InviteMembers(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, boardID uint64, invites ...gno.land/r/gnoland/boards2/v0.Invite)

    • IsBanned(boardID uint64, user string) bool

    • IsBoardFrozen(boardID uint64) bool

    • IsMember(boardID uint64, user string) bool

    • IsRealmLocked() bool

    • IsThreadFrozen(boardID uint64, threadID uint64) bool

    • LockRealm(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, lockRealmMembers bool)

    • RemoveMember(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, boardID uint64, member string)

    • RenameBoard(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, name string, newName string)

    • Render(path string) string

    • RequestInvite(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, boardID uint64)

    • RevokeInvite(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, boardID uint64, user string)

    • SetFlaggingThreshold(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, boardID uint64, threshold int)

    • SetHelp(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, content string)

    • SetPermissions(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, boardID uint64, p interface {HasPermission func(.uverse.address, gno.land/p/gnoland/boards/v0.Permission) bool; HasRole func(.uverse.address, gno.land/p/gnoland/boards/v0.Role) bool; HasUser func(.uverse.address) bool; IterateUsers func(int, int, gno.land/p/gnoland/boards/v0.UsersIterFn) bool; RemoveUser func(.uverse.address) bool; SetUserRoles func(.uverse.address, ...gno.land/p/gnoland/boards/v0.Role); UsersCount func() int; WithPermission func(.uverse.address, gno.land/p/gnoland/boards/v0.Permission, gno.land/p/gnoland/boards/v0.Args, func())})

    • SetRealmNotice(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, message string)

    • SetRequiredAccountAmount(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, amount int64)

    • Unban(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, boardID uint64, user string, reason string)

    • UnfreezeBoard(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, boardID uint64)

    • UnfreezeThread(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, boardID uint64, threadID uint64)

    Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.

    Rendered

    RenderedRawgnoweb ↗

    vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.

    "gno.land/p/jeronimoalbi/mdform/v0"
    9 "gno.land/p/jeronimoalbi/pager/v0"
    10 "gno.land/p/leon/svgbtn/v0"
    11 "gno.land/p/moul/md/v0"
    12 "gno.land/p/nt/mux/v0"
    13 "gno.land/p/nt/ufmt/v0"
    14)
    15
    16func renderReply(res *mux.ResponseWriter, req *mux.Request) {
    17 name := req.GetVar("board")
    18 board, found := gBoards.GetByName(name)
    19 if !found {
    20 res.Write("Board not found")
    21 return
    22 }
    23
    24 rawID := req.GetVar("thread")
    25 threadID, err := strconv.Atoi(rawID)
    26 if err != nil {
    27 res.Write("Invalid thread ID: " + md.EscapeText(rawID))
    28 return
    29 }
    30
    31 rawID = req.GetVar("reply")
    32 replyID, err := strconv.Atoi(rawID)
    33 if err != nil {
    34 res.Write("Invalid reply ID: " + md.EscapeText(rawID))
    35 return
    36 }
    37
    38 thread, found := getThread(board, boards.ID(threadID))
    39 if !found {
    40 res.Write("Thread not found")
    41 return
    42 }
    43
    44 reply, found := getReply(thread, boards.ID(replyID))
    45 if !found {
    46 res.Write("Reply not found")
    47 return
    48 }
    49
    50 // Call render even for hidden replies to display children.
    51 // Original comment content will be hidden under the hood.
    52 // See: #3480
    53 res.Write(renderPostInner(reply, req.RawPath))
    54}
    55
    56// newClampedPager builds a pager, clamping an out-of-range, zero, negative,
    57// or malformed ?page= to the last valid page instead of erroring. pager.New
    58// rejects page==0, page>pageCount, and non-numeric pages with
    59// ErrInvalidPageNumber, which the callers would otherwise surface as a panic
    60// (aborting the whole render) or an error page in place of the list. A
    61// NEGATIVE page is not rejected by pager.New (it only checks ==0 and
    62// >pageCount), so it must be caught here too — otherwise it renders a broken
    63// "page -N of M" picker with both arrows disabled. Triggers on a stale deep
    64// link after deletions, or a hand-edited URL.
    65func newClampedPager(path string, size, pageSize int) pager.Pager {
    66 p, err := pager.New(path, size, pager.WithPageSize(pageSize))
    67 if err == nil && p.Page() >= 1 {
    68 return p
    69 }
    70 // Re-parse without ?page= to get a valid page-1 pager and read the real
    71 // page count, then jump to the last page when there is more than one.
    72 r := parseRealmPath(path)
    73 r.Query.Del("page")
    74 first, ferr := pager.New(r.String(), size, pager.WithPageSize(pageSize))
    75 if ferr != nil {
    76 // A page-less path is valid for every current route, so this is
    77 // unreachable today; fall back to the original pager rather than
    78 // asserting the invariant with a panic that would abort the render.
    79 return p
    80 }
    81 if last := first.PageCount(); last > 1 {
    82 r.Query.Set("page", strconv.Itoa(last))
    83 if clamped, e := pager.New(r.String(), size, pager.WithPageSize(pageSize)); e == nil {
    84 return clamped
    85 }
    86 }
    87 return first
    88}
    89
    90func renderTopLevelReplies(post *boards.Post, path, indent string, levels int, budget *int) string {
    91 p := newClampedPager(path, post.Replies.Size(), pageSizeReplies)
    92 link, desc := sortToggleLink(path)
    93
    94 var (
    95 b strings.Builder
    96 commentsIndent = indent + "> "
    97 truncated bool
    98 )
    99
    100 render := func(reply *boards.Post) bool {
    101 if *budget <= 0 {
    102 truncated = true
    103 return true // stop: render budget exhausted (see maxRenderedBodies)
    104 }
    105 // Forward the page order so this reply's nested children match it.
    106 b.WriteString(indent + "\n" + renderPost(reply, "", commentsIndent, levels-1, budget, desc))
    107 return false
    108 }
    109
    110 b.WriteString("\n" + md.HorizontalRule() + "Sort by: " + link + "\n")
    111
    112 count := p.PageSize()
    113 if desc {
    114 count = -count // Reverse iterate
    115 }
    116
    117 post.Replies.Iterate(p.Offset(), count, render)
    118
    119 if truncated {
    120 b.WriteString(indent + "\n" + commentsIndent + "_Some replies not shown — " +
    121 md.Link("view all comments", makeThreadFlatURI(post)) + "._\n")
    122 }
    123
    124 // Suppress the page picker when the budget truncated this page: later
    125 // replies in the page were skipped, so the offset-based "next page" would
    126 // jump past them. The flat link above is the complete, reachable view.
    127 if !truncated && p.HasPages() {
    128 b.WriteString(md.HorizontalRule())
    129 b.WriteString(pager.Picker(p))
    130 }
    131 return b.String()
    132}
    133
    134func renderSubReplies(post *boards.Post, indent string, levels int, budget *int, desc bool) string {
    135 var (
    136 b strings.Builder
    137 commentsIndent = indent + "> "
    138 truncated bool
    139 )
    140
    141 // Cap inline children at pageSizeReplies. A nested reply list can't have
    142 // its own pager (it would collide with the page's ?page=), so instead of
    143 // dumping every child here a comment with more links to its own re-rooted
    144 // view, which paginates them. Keeps every view bounded to <=pageSizeReplies
    145 // children per post. count's sign follows the page order so the inline
    146 // children match the view they appear in (desc → the newest ones).
    147 count := pageSizeReplies
    148 if desc {
    149 count = -count
    150 }
    151 post.Replies.Iterate(0, count, func(reply *boards.Post) bool {
    152 if *budget <= 0 {
    153 truncated = true
    154 return true // stop: render budget exhausted (see maxRenderedBodies)
    155 }
    156 b.WriteString(indent + "\n" + renderPost(reply, "", commentsIndent, levels-1, budget, desc))
    157 return false
    158 })
    159
    160 notice := func(text, uri string) {
    161 b.WriteString(indent + "\n" + commentsIndent + md.Link(text, uri) + "\n")
    162 }
    163 switch {
    164 case truncated:
    165 // Budget exhausted: the whole-thread flat view is the reachable backstop.
    166 notice("More replies — view all comments", makeThreadFlatURI(post))
    167 case post.Replies.Size() > pageSizeReplies:
    168 // Breadth cap hit: re-root at this comment to page the rest, carrying
    169 // the page's sort order so the re-root opens the same way (its first
    170 // page then matches the newest-first children shown inline here).
    171 uri := makeReplyURI(post)
    172 if desc {
    173 uri += "?order=desc"
    174 }
    175 notice("View all "+strconv.Itoa(post.Replies.Size())+" replies", uri)
    176 }
    177 return b.String()
    178}
    179
    180func renderEditReply(res *mux.ResponseWriter, req *mux.Request) {
    181 name := req.GetVar("board")
    182 board, found := gBoards.GetByName(name)
    183 if !found {
    184 res.Write("Board not found")
    185 return
    186 }
    187
    188 rawID := req.GetVar("thread")
    189 threadID, err := strconv.Atoi(rawID)
    190 if err != nil {
    191 res.Write("Invalid thread ID: " + md.EscapeText(rawID))
    192 return
    193 }
    194
    195 rawID = req.GetVar("reply")
    196 replyID, err := strconv.Atoi(rawID)
    197 if err != nil {
    198 res.Write("Invalid reply ID: " + md.EscapeText(rawID))
    199 return
    200 }
    201
    202 thread, found := getThread(board, boards.ID(threadID))
    203 if !found {
    204 res.Write("Thread not found")
    205 return
    206 }
    207
    208 reply, found := getReply(thread, boards.ID(replyID))
    209 if !found {
    210 res.Write("Reply not found")
    211 return
    212 }
    213
    214 form := mdform.New("exec", "EditReply")
    215 form.Input(
    216 "boardID",
    217 "placeholder", "Board ID",
    218 "value", board.ID.String(),
    219 "readonly", "true",
    220 )
    221 form.Input(
    222 "threadID",
    223 "placeholder", "Thread ID",
    224 "value", thread.ID.String(),
    225 "readonly", "true",
    226 )
    227 form.Input(
    228 "replyID",
    229 "placeholder", "Reply ID",
    230 "value", reply.ID.String(),
    231 "readonly", "true",
    232 )
    233 form.Textarea(
    234 "body",
    235 "placeholder", "Comment",
    236 "value", reply.Body,
    237 "required", "true",
    238 )
    239
    240 res.Write(md.H1(board.Name + ": Edit Comment"))
    241 res.Write(md.Link("← Back to thread", makeThreadURI(thread)) + "\n\n")
    242 res.Write(
    243 md.Paragraph(
    244 ufmt.Sprintf("Editing a comment from the thread: %s", md.Link(thread.Title, makeThreadURI(thread))),
    245 ),
    246 )
    247 res.Write(form.String())
    248 res.Write("\n\n**Done?** " + svgbtn.ButtonWithRadius(136, 32, 4, "#E2E2E2", "#54595D", "Return to thread", makeThreadURI(thread)) + "\n")
    249}
    250