#LOCAL("VisibilityPrefix", "Visible")#IF(#INPUT.IsEditorMode)#SET("VisibilityPrefix", "")#ENDIF #INCLUDE("Content-BreadCrumb") #IF(#ISACTIONALLOWED("RSS", #Object, #System.Child.Groups.Child.Everyone.Object)) {RSSFeed} #ENDIF #BLOCK("Pager", #FUNCTION("SORT", #FUNCTION("GREP", #GET(#VisibilityPrefix . "Posts"), "IsVisible"), "CreationDate"), 10, "CreationDate") #IF(#Thread.IsClosed)
{NoFurtherRepliesAllowed}
#ELSE #IF(NOT #FUNCTION("ISACTIONALLOWED", "AddReply")) #IF(NOT #DEFINED(#Session.User) OR #Session.User.IsAnonymous) {LoginAndAddReply} {RegisterNow} #ELSE
{ReplyNotAllowedForGroup}
#ENDIF #ENDIF #ENDIF
#LOOP(#Pager.Items) #LOCAL("IsFirstItem", #Pager.ItemOffset == 0 AND #ItemNo == 0)
#IF(#User) #IF(#DEFINED(#User.BillingAddress))#WITH(#User.BillingAddress) #IF(#DisplayName)#DisplayName#ELSE#FirstName #LastName#ENDIF #ENDWITH#ELSE #User.NameOrAlias #ENDIF #ELSE#SPACE[0]{Guest}#ENDIF
#IF(#Spam==1) #ENDIF
#CreationDate[datetime]
#IF(#Spam == 0 AND #FUNCTION("ISACTIONALLOWED", "ReportSpam") AND #FUNCTION("ISACTIONALLOWED", "AddReply"))
#ELSIF (#Spam == 1) {MarkedAsSpam} #ENDIF
#BLOCK("InlineEditor", "text", #Object, "Subject", "Tag=h3")

#IF(#Subject)#Subject#ELSE({NoSubject})#ENDIF

#ENDBLOCK
#BLOCK("InlineEditor", "text", #Object, "Message", "Tag=div")
#Message[preline]
#ENDBLOCK
#IF(#FUNCTION("ISACTIONALLOWED", "AddReply")) #ENDIF
#ENDLOCAL #ENDLOOP
#IF(#Pager.CountOfPages > 1)#INCLUDE("Pager")#ENDIF
#ENDBLOCK
#LOCAL("CurrentThread", #Thread.ID) #LOCAL("LoopPosition", 0) #LOCAL("Count", 0) #LOOP(#FUNCTION("SORT", #Parent.VisibleThreads, "LastPost.CreationDate")) #SET("Count", #Count + 1) #IF(#CurrentThread == #ID) #SET("LoopPosition", #Count) #ENDIF #ENDLOOP #SET("Count", 0) #LOOP(#FUNCTION("SORT", #Parent.VisibleThreads, "LastPost.CreationDate")) #SET("Count", #Count + 1) #IF(#Count + 1 == #LoopPosition) << {PreviousThread} #ENDIF #IF(#Count - 1 == #LoopPosition) {NextThread} >> #ENDIF #ENDLOOP #ENDLOCAL #ENDLOCAL #ENDLOCAL
#IF(#FUNCTION("ISACTIONALLOWED", "AddReply")) #IF(NOT #Thread.IsClosed)
{Reply}
#ENDIF #ENDIF #ENDLOCAL