Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Poll Mod Hidden Results Add-On
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 28 August 2013 :  03:06:23  Show Profile  Reply with Quote
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:


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

Edited by - Carefree on 30 August 2013 04:33:17

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 30 August 2013 :  05:22:14  Show Profile  Visit HuwR's Homepage  Reply with Quote
I suppose I should look into incorporating this into the .Net version as I have included Polls in the base code 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.

MVC .net dev/test site | MVC .net running on Raspberry Pi
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 30 August 2013 :  05:51:27  Show Profile  Reply with Quote
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.
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 30 August 2013 :  05:55:23  Show Profile  Visit HuwR's Homepage  Reply with Quote
you would be surprised, it is not as daunting as you think and a lot easier than classic ASP

MVC .net dev/test site | MVC .net running on Raspberry Pi
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 30 August 2013 :  22:48:19  Show Profile  Reply with Quote
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.
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 31 August 2013 :  03:54:43  Show Profile  Visit HuwR's Homepage  Reply with Quote
That would make it a little more difficult 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.

MVC .net dev/test site | MVC .net running on Raspberry Pi
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 31 August 2013 :  09:55:19  Show Profile  Visit Webbo's Homepage  Reply with Quote
quote:
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

As for languages - I struggle with my native tongue at times (English) and all that seems to come out is gobeleygook
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.19 seconds. Powered By: Snitz Forums 2000 Version 3.4.07