Poll Mod Hidden Results Add-On - نوشته شده در (1294 Views)
Advanced Member
Carefree
مطلب: 4224
4224
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:

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
 پیش‌فرض مرتب‌سازی برای تاریخ DESC به معنی جدیدترین است  
 تعداد در صفحه 
نوشته شده در
Forum Admin
HuwR
مطلب: 20611
20611
I suppose I should look into incorporating this into the .Net version as I have included Polls in the base code smile may be a little more difficult though, as in the .Net version you can actually create a poll using forumcode tags, will take a look and see what I can do.
نوشته شده در
Advanced Member
Carefree
مطلب: 4224
4224
Don't envy you that job, not sure I would learn .Net coding at all, especially since my brain behaves like a bowl of silly putty some days.
نوشته شده در
Forum Admin
HuwR
مطلب: 20611
20611
you would be surprised, it is not as daunting as you think and a lot easier than classic ASP bigsmile
نوشته شده در
Advanced Member
Carefree
مطلب: 4224
4224
The difference is that I learned classic ASP before my dementia and short-term memory issues. Now I meet someone and within 30 seconds, I've forgotten their name. Within 5 minutes after we separate, I've forgotten the meeting. Learning new programming languages or words in a new language are almost impossible for me.
نوشته شده در
Forum Admin
HuwR
مطلب: 20611
20611
That would make it a little more difficult smile however using something like Visual Studio would help as code insight means you don't have to remember everything, just a few basics which knowing classic ASP you already have a fair grasp of, you should give it a try, you never know, it might even help by giving your brain a bit of a work out.
نوشته شده در
Average Member
Webbo
مطلب: 982
982
Originally posted by Carefree
...... Now I meet someone and within 30 seconds, I've forgotten their name. Within 5 minutes after we separate, I've forgotten the meeting. Learning new programming languages or words in a new language are almost impossible for me.


I'm the same but put it down to age clown
As for languages - I struggle with my native tongue at times (English) and all that seems to come out is gobeleygook cool
 
شما باید یک متن وارد کنید