ustj/sur/forum.hoon

47 lines
978 B
Plaintext
Raw Permalink Normal View History

2024-06-01 08:45:45 +00:00
/- tp=post
|%
2024-06-28 19:14:46 +00:00
+$ pokes [%ui ship=@p eyre-id=@ta p=ui-pokes]
2024-06-27 04:44:31 +00:00
+$ ui-pokes
$% [%submit-comment ted=thread text=@t]
[%submit-reply =comment:tp text=@t]
[%submit-thread title=@t url=@t text=@t]
[%vote ted=? =pid:tp vote=?]
2024-06-28 19:14:46 +00:00
[%del ted=? =pid:tp]
2024-06-27 04:44:31 +00:00
==
2024-06-01 08:45:45 +00:00
+$ state
$% state-0
==
+$ state-0
$: %0
=threads
popular=pfeed
comments=gfeed:tp
2024-06-27 04:44:31 +00:00
karma=(map @p @sd)
2024-06-01 08:45:45 +00:00
::
mods=(set @p)
admins=(set @p)
2024-06-28 19:14:46 +00:00
blacklist=(set @p)
2024-06-01 08:45:45 +00:00
==
+$ threads ((mop pid:tp thread) ggth:tp)
++ torm ((on pid:tp thread) ggth:tp)
+$ pfeed ((mop sd pid:tp) cmp)
++ porm ((on sd pid:tp) cmp)
+$ sd [s=? d=@ud]
++ cmp |= [a=sd b=sd] ?: .=(s.a s.b) (gte d.a d.b) s.a
+$ thread-page
$: page=@ud
threads=(list thread)
==
+$ thread
$: =pid:tp
title=@t
=content
replies=(list pid:tp) :: key should be the head of this list
=votes:tp
==
+$ content
$% [%link @t]
[%text content-list:tp]
==
--