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
 help with poll mod please
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

jak
Starting Member

18 Posts

Posted - 14 January 2004 :  00:38:01  Show Profile
Hi, I recently installed the poll mod, and did everything as instructed. Everything seems to be working. I wanted to change the poll answers because I have 21 different options. can someone please tell me where I should make the changes at, besides the database. Thank you.

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 14 January 2004 :  01:11:44  Show Profile
Edit the Poll the same way you would edit a Topic. Click the Pencil icon above the poll.

Support Snitz Forums
Go to Top of Page

jak
Starting Member

18 Posts

Posted - 14 January 2004 :  01:14:53  Show Profile
the max answer option is only 15. I have 21 different options. I have to change many files, but not sure exactly where in the files I should change.
Go to Top of Page

jak
Starting Member

18 Posts

Posted - 14 January 2004 :  01:29:17  Show Profile
when i try to edit the poll, i get an error after the 15 option

Microsoft VBScript runtime error '800a0009'

Subscript out of range: 'M'

/jak1/forum/post.asp, line 1231

I can't figure out why. it seems to be around this area:

if strRqMethod = "Topic" then
ReDim txtAns(strMaxVotes)
for i = 1 to strMaxVotes
txtAns(i) = ""
next
nCount = strMaxVotes
end if

for m = 1 to nCount
Response.Write "<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & m & ":<input name=""answer" & m & """ type=""text"" value=""" & Trim(CleanCode(txtAns(m))) & """ size=""40"" maxlength=""100""></font><br />" & vbNewLine
next
Response.Write "</p>" & vbNewLine

Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 14 January 2004 :  01:30:17  Show Profile
Oh, now I understand what you want to do. (I'm pretty tired right now, so if I don't explain this correctly, I'll do so after a good nights rest)

Some pointers to help you.
- You first will need to add the extra fields to the POLLS table. You can create a dbs file to add the fields. You can look at the dbs_poll_mod.asp file that came with the mod for some help.
[ALTER]
POLLS
ADD#ANSWER16#varchar(100)#NULL#
ADD#COUNT16#int#NULL#0
ADD#ANSWER17#varchar(100)#NULL#
ADD#COUNT17#int#NULL#0
[END]
That code will add 2 more fields. You can go up to 21.

- You will need to add the extra form fields to post.asp, along with adjusting the sql code to get the extra values. In post.asp, look for some poll mod code looking like this:
for i = 1 to 15
	strSql = strSql & strTablePrefix & "POLLS.ANSWER" & CStr(i) & ", "
	strSql = strSql & strTablePrefix & "POLLS.COUNT" & CStr(i)
next
It is looping through the poll answers from the database. Set the number 15 to 21. So it will loop through the extra values. You will find a few loops with for i = 1 to 15. Adjust them accordingly.

- In post_info.asp, you will also find similar loops like in post.asp. Change the number 15 to 21 too.

There are probably some more places in the other files, but I'll check later for them for you.

Support Snitz Forums
Go to Top of Page

jak
Starting Member

18 Posts

Posted - 14 January 2004 :  14:55:52  Show Profile
well, I went through all the files and changed 15 to 21, so far everything is still working and it looks good (at 3:30 am), I just hope that the results will work correctly. Do you have any suggestions on that? I appreciate you help and input Davio I really do. Thanks!
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.58 seconds. Powered By: Snitz Forums 2000 Version 3.4.07