Author |
Topic |
wii
Free ASP Hosts Moderator
Denmark
2632 Posts |
Posted - 22 May 2001 : 16:58:28
|
Davio,
Would it be possible to add more answers to a poll instead of just 8? I would like 15 or something like that.
thanks, I really enjoy this MOD.
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 22 May 2001 : 17:35:14
|
I don't know how you would do that. There is 8 database fields created to store the 8 answers. You would have to hard code the 7 more answers into the mod. Would take a some code changing. Not something I can do right now.
|
|
|
wii
Free ASP Hosts Moderator
Denmark
2632 Posts |
Posted - 04 June 2001 : 19:41:58
|
Is anyone else up for it? I could really, really, really use more poll answers. I think I saw another forum that had it ?!
|
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 04 June 2001 : 23:40:05
|
I am getting ready to do it and it can be done somewhat easily. I know someone that did it using this mod. His website is:
http://www.someplacesomewhere.com
he made it so 20 distractors were available....
Dayve |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 05 June 2001 : 00:38:45
|
I will probably include the option to have more than 8 answers to the polls when I next update the mod. Should be in a few days time, hopefully. Along with other updates.
|
|
|
wii
Free ASP Hosts Moderator
Denmark
2632 Posts |
Posted - 05 June 2001 : 07:26:02
|
That would be fantastic - thanks !
|
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 06 June 2001 : 01:09:29
|
ok, I've done some initial testing and was successful in adding additional distractors. in the meantime I can tell you that the only files you need to update are:
topic.asp post.asp post_info.asp
and of course additional fields need to be inserted in the members tables respectively named COUNT# and ANSWER# where # is the increments you want to add. THIS WILL MAKE YOUR MEMBERS TABLE LARGER!
I will review all my edits and return with more explicit directions as soon as I can... in the meantime I would suggest looking at the code and changing all poll areas where you see 8 add the number you want. examples are:
For nCount = 1 To 9 If trim(vAnswers(nCount)) <> "" Then vPercent(nCount) = FormatNumber(vCount(nCount)/nTotal*100,1) End If Next
and
strSql = strSql & ", '" & txtSub9 & "'"
and so on...
Dayve
Edited by - dayve on 07 June 2001 16:52:30 |
|
|
wii
Free ASP Hosts Moderator
Denmark
2632 Posts |
Posted - 06 June 2001 : 16:00:23
|
Great, let me know when the code is ready. I canīt wait to implement the new version. Itīs really a problem for us at our forum to have only 8 choices, specially when itīs about music and CDs that have usually at least 10-12 songs.
|
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 06 June 2001 : 16:28:05
|
I will post it this weekend for you. I will offer 20 choices... is that too many? also, I don't know how to use the mod_dbsetup for increasing the amount of fields you will need so my instructions will explain how to add the needed fields using Access table design, pretty simple though...as long as you have Access. If you don't have Access then maybe someone can create the necessary script to work with mod_dbsetup for increasing the members table with fields for ANSWER# and COUNT#...
Dayve
Edited by - dayve on 06 June 2001 16:30:31 |
|
|
wii
Free ASP Hosts Moderator
Denmark
2632 Posts |
Posted - 06 June 2001 : 16:43:42
|
20 is perfect ! I would rather have too many than few!
I would prefer, if I could use the mod_dbsetup for this, maybe Richard or Huwr can help with it, since my database is over 7MB already and Iīm on a 56 modem.
thanks, I really appreciate this - cheers !
Edited by - wii on 06 June 2001 16:45:00 |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 06 June 2001 : 17:01:34
|
Gee, why Richard or HuwR? Doesn't anyone notice Davio around here? Looks like I'm gonna have to jack up my posts by another 1000 posts before anyone would "recommend" Davio to do anything. lol j/k
Anyways dayve, if you take a look at the poll_dbsetup.dbs file, you can see how it's done. It's easy. Just change the COUNT numbers and ANSWER numbers from 1-8 to 9-20. For example:
ADD#answer1#varchar(100)#NULL# ADD#count1#int#NULL#0
would become:
ADD#answer9#varchar(100)#NULL# ADD#count9#int#NULL#0
and so on. You would need to delete this code:
[ALTER] CONFIG ADD#C_ADMINPOLLS#int#NULL#0 ADD#C_USERPOLLS#int#NULL#1 ADD#C_ACTIVEPOLL#int#NULL#0 [END]
at the end since you're not installing those fields in the config table over again. You can change the title from "Slemmies Poll" to "Dayve's Poll Addon" or something. It's the first line at the top of the file.
|
|
|
wii
Free ASP Hosts Moderator
Denmark
2632 Posts |
Posted - 06 June 2001 : 17:15:59
|
Oh sorry Davio - itīs just that these guys helped with this in the past.
Iīm a big fan of your work !!!!!
quote:
Gee, why Richard or HuwR? Doesn't anyone notice Davio around here?
|
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 06 June 2001 : 19:50:53
|
Thanks Davio, I found an archived subject today showing how to use the mod_dbsetup, very nice...I like it a lot...gives me lots of ideas!!
So keep your eyes peeled, I will be finishing this up shortly...
Dayve
Dayve |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 07 June 2001 : 14:17:55
|
hey Davio, trying to automate the additions of fields for the polls and I get this error
Dayve's Poll Mentor Addition Microsoft VBScript runtime error '800a0009'
Subscript out of range: 'rec'
/forum/mod_dbsetup.asp, line 96
here is my polls_more.dbs
Dayve's Poll Mentor Addition [ALTER] TOPICS ADD#answer9#varchar(100)#NULL# ADD#count9#int#NULL#0 ADD#answer10#varchar(100)#NULL# ADD#count10#int#NULL#0 ADD#answer11#varchar(100)#NULL# ADD#count11#int#NULL#0 ADD#answer12#varchar(100)#NULL# ADD#count12#int#NULL#0 ADD#answer13#varchar(100)#NULL# ADD#count13#int#NULL#0 ADD#answer14#varchar(100)#NULL# ADD#count14#int#NULL#0 ADD#answer15#varchar(100)#NULL# ADD#count15#int#NULL#0 ADD#answer16#varchar(100)#NULL# ADD#count16#int#NULL#0 ADD#answer17#varchar(100)#NULL# ADD#count17#int#NULL#0 ADD#answer18#varchar(100)#NULL# ADD#count18#int#NULL#0 ADD#answer19#varchar(100)#NULL# ADD#count19#int#NULL#0 ADD#answer20#varchar(100)#NULL# ADD#count20#int#NULL#0 [END]
is there something else I should know about using mod_dbsetup.asp??
Dayve |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 07 June 2001 : 14:21:49
|
forget it, wasn't using the latest mod_dbsetup.asp -- by the way.. this is fun...
Dayve |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 07 June 2001 : 16:51:29
|
I am in the testing phase...everything is going good. I will gather all my documentation and include the auto database setup as well. However, I will be expecting everyone to have least installed the Poll MOD first, this will be an ADD ON, not an actual MOD.
Dayve |
|
|
Topic |
|