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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Editing Poll Mod - Poll answers disappear
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Webbo
Average Member

United Kingdom
982 Posts

Posted - 18 August 2004 :  05:03:07  Show Profile  Visit Webbo's Homepage
I've found when a user edits their Poll, the poll answers are not saved on edit

Is this the same for all installations or just mine?

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 18 August 2004 :  15:48:05  Show Profile
quote:
Is this the same for all installations or just mine?
[sarcastic comment]
Oh sure. That's how the mod author has it setup, to remove the poll answers when they are edited. It helps get the forum users frustrated and leave the forum, which is the aim of the mod.
[/sarcastic comment]

Just kidding Webbo. You want to give a link to your forum and an example poll that this has happened to?
Also post a link to a txt version of your post.asp and post_info.asp file.

Support Snitz Forums

Edited by - Davio on 18 August 2004 15:48:49
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 19 August 2004 :  05:06:51  Show Profile  Visit Webbo's Homepage
Thanks for the reply Davio

Here you are:

post.txt
post_info.txt

Anf the forum where Polls are enabled is Here

I've set you up as a member and emailed you with username and passord

Cheers,

Dave
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 19 August 2004 :  05:45:04  Show Profile
Lines 467 - 471 in your post_info.asp file:
For AnsCount = 1 To CInt(count)
	if trim(Request.Form("answer" & CStr(AnsCount))) <> "" then
		txtAns(i) = chkString(Request.Form("answer" & CStr(i)),"SQLString")
	else
		txtAns(i) = ""
	end if
Next
Change it to this:
For AnsCount = 1 To CInt(count)
	if trim(Request.Form("answer" & CStr(AnsCount))) <> "" then
		txtAns(AnsCount) = chkString(Request.Form("answer" & CStr(AnsCount)),"SQLString")
	else
		txtAns(AnsCount) = ""
	end if
Next

BTW, those poll mod code changes look familiar.

Support Snitz Forums

Edited by - Davio on 19 August 2004 05:46:52
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 20 August 2004 :  05:03:24  Show Profile  Visit Webbo's Homepage
Look familiar ? - some guy in Jamaica did them for me lol

Any way, I did the changes above and also editted the lines 606-613 as so:

			for AnsCount = 1 to CInt(Request.Form("count"))
				strSql = strSql & "ANSWER" & CStr(AnsCount) & " = '" & chkString(txtAns(AnsCount),"") & "'"
				if txtAns(AnsCount) = "" or chkString(Request.Form("resetpoll"),"SQLString") = "1" then
					strSql = strSql & ", COUNT" & CStr(AnsCount) & " = " & 0
				end if
				if ubound(txtAns) <> AnsCount then
					strSql = strSql & ", "
				end if


And everything works well now

Great stuff Davio and give my respect to the guy in Jamaica next time you meet him


Dave
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 20 August 2004 :  14:50:38  Show Profile
No no no no!! Don't change anything else. If I remember correctly, what that other guy did from Jamaica () he renamed all the counter variables to another variable. So each poll mod counter variable is named differently. The first one being AnsCount and the others increasing in number: AnsCount1, AnsCount2 etc.

So don't change anything else.

Support Snitz Forums
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 22 August 2004 :  19:08:55  Show Profile  Visit Webbo's Homepage
Sorry for the delay in getting back Davio

If I left the lines 606-613 as they were, ie:

			for i = 1 to CInt(Request.Form("count"))
				strSql = strSql & "ANSWER" & CStr(i) & " = '" & chkString(txtAns(i),"") & "'"
				if txtAns(i) = "" or chkString(Request.Form("resetpoll"),"SQLString") = "1" then
					strSql = strSql & ", COUNT" & CStr(i) & " = " & 0
				end if
				if ubound(txtAns) <> i then
					strSql = strSql & ", "
				end if




I get the following error:

Microsoft VBScript runtime error '800a0009'

Subscript out of range: 'i'

/forum/post_info.asp, line 608

By altering them as previous post, everything appears to work fine - or does it? Is there something I've missed?

Cheers,

Dave
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 23 August 2004 :  00:44:22  Show Profile
oh? I didn't know you changed it from i's. Ok, you are right. Redo your changes.

Support Snitz Forums
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 23 August 2004 :  04:37:08  Show Profile  Visit Webbo's Homepage
Okay Davio, all done and working well

I still owe the other guy a drink, if you see him will you buy him one for me and I'll reimburse you later


Thanks,

Dave
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.3 seconds. Powered By: Snitz Forums 2000 Version 3.4.07