Author |
Topic  |
|
Webbo
Average Member
  
United Kingdom
982 Posts |
Posted - 18 August 2004 : 05:03:07
|
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
|
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 |
 |
|
Webbo
Average Member
  
United Kingdom
982 Posts |
Posted - 19 August 2004 : 05:06:51
|
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 |
 |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 19 August 2004 : 05:45:04
|
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 |
 |
|
Webbo
Average Member
  
United Kingdom
982 Posts |
Posted - 20 August 2004 : 05:03:24
|
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 |
 |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 20 August 2004 : 14:50:38
|
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
|
 |
|
Webbo
Average Member
  
United Kingdom
982 Posts |
Posted - 22 August 2004 : 19:08:55
|
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 |
 |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 23 August 2004 : 00:44:22
|
oh? I didn't know you changed it from i's. Ok, you are right. Redo your changes.  |
Support Snitz Forums
|
 |
|
Webbo
Average Member
  
United Kingdom
982 Posts |
Posted - 23 August 2004 : 04:37:08
|
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 |
 |
|
|
Topic  |
|