The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
This update hides the results of polls until a specified number of days have passed.
When you create a poll, you will set a number of days before the poll closes. The poll results will remain hidden until that number of days have passed, and at the time of the poll's creation, it will automatically close and allow the results to be viewed.
If you edit a closed poll and use any positive integer for the days, it will reopen the poll and hide the results pending the new date. If you edit a poll that is still open, it will simply change the closing date until the new number of days is reached.
For those who already downloaded this sub-mod, a small change needs to be made to prevent system errors if someone puts a value other than a whole number in the quantity of days field. Please edit the first section of the mod's code in "post_info.asp" as follows:
When you create a poll, you will set a number of days before the poll closes. The poll results will remain hidden until that number of days have passed, and at the time of the poll's creation, it will automatically close and allow the results to be viewed.
If you edit a closed poll and use any positive integer for the days, it will reopen the poll and hide the results pending the new date. If you edit a poll that is still open, it will simply change the closing date until the new number of days is reached.
For those who already downloaded this sub-mod, a small change needs to be made to prevent system errors if someone puts a value other than a whole number in the quantity of days field. Please edit the first section of the mod's code in "post_info.asp" as follows:
Code:
Look for these lines (appx 71-80):
' ## Poll Below
If Request.Form("PEndDate")>"" Then
If isNumeric(Request.Form("PEndDate")) and Request.Form("PEndDate")>0 Then
strNewDate=datetostr(DateAdd("d",Request.Form("PEndDate"),strtoDate(strForumTimeAdjust)))
ElseIf Request.Form("PEndDate")=0 Then
strNewDate=DatetoStr(strForumTimeAdjust)
End If
End If
' ## Poll Above
Replace them with the following:
' ## Poll Below
If Request.Form("PEndDate")>"" Then
If isNumeric(Request.Form("PEndDate")) and Request.Form("PEndDate")>"0" Then
strNewDate=datetostr(DateAdd("d",cInt(Request.Form("PEndDate")),strtoDate(strForumTimeAdjust)))
ElseIf Request.Form("PEndDate")="0" Then
strNewDate=DatetoStr(strForumTimeAdjust)
Else
Go_Result "Number of days must be an positive number.",0
End If
End If
' ## Poll Above