Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 How to increase Max. Number of Poll Mod Answers?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
Zenfor Posted - 15 December 2015 : 18:16:04
I want to do a US president poll and there are more than 15 running right now. How can I increase the Max. number above 15? Thanks.
4   L A T E S T    R E P L I E S    (Newest First)
cripto9t Posted - 18 December 2015 : 10:54:18
I wrote my own poll mod years ago. I put my choices on a separate table than the questions. That way you could have as many or few choices as you wanted and their wasn't a lot of wasted space on the Poll table

The code is long gone but the choice columns probably looked something like this.

ChoiceID(auto)- PollID- ChoiceTxt- Votes
Carefree Posted - 18 December 2015 : 10:47:08
You're welcome.
Zenfor Posted - 18 December 2015 : 08:59:11
Thank you!
Carefree Posted - 15 December 2015 : 19:43:25
First, you'll need to add additional fields to the forum_polls table, following the same pattern as the ANSWER15, COUNT15 currently provided. To do that, you can either manually add them, or use something like this. It's untested, but should work.

"pollchange.asp"


<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp" -->
<!--#INCLUDE FILE="inc_header.asp" -->
<%
If (Session(strCookieURL & "Approval") <> "15916941253") Or (MemberID <> intAdminMemberID) Then
	scriptname = Split(Request.ServerVariables("SCRIPT_NAME"),"/")
	Response.Redirect "admin_login.asp?target=" & scriptname(UBound(scriptname)) & "?" & Request.ServerVariables("Query_String")
End If
If Request("Qty") > "" Then
	If IsNumeric(Request("Qty")) Then
		For i = 16 to 15 + Request("Qty")
			strSql = "ALTER TABLE " & strTablePrefix & "POLLS ADD COLUMN ANSWER" & CSTR(I) & " VARCHAR(100) NULL"
			my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
			strSql = "ALTER TABLE " & strTablePrefix & "POLLS ADD COLUMN COUNT" & CSTR(I) & " INT NULL 0"
			my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
		Next
		Response.Write "Completed."
		WriteFooter
		Response.End
	End If
Else
	Response.Write	"<form action=""pollchange.asp"" method=""post"">" & vbNewLine & _
		"	<table align=""center"" width=""300"" border=""1"" bgColor=""" & strPageBGColor & """ cellpadding=""4"">" & vbNewLine & _
		"		<tr>" & vbNewLine & _
		"			<td align=""right"" width=""250"" bgColor=""" & strPopUpTableColor & """>" & vbNewLine & _
		"				<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Additional Answers: </font>" & vbNewLine & _
		"			</td>" & vbNewLine & _
		"			<td align=""center"" bgColor=""" & strPopUpTableColor & """>" & vbNewLine & _
		"				<input type=""text"" style=""width:98%; align:center; text-align:center; color:maroon; font-weight:bold;"" name=""Qty"" maxlength=""2"" />" & vbNewLine & _
		"			</td>" & vbNewLine & _
		"		</tr>" & vbNewLine & _
		"		<tr>" & vbNewLine & _
		"			<td style=""line-height:50%;"" bgColor=""transparent"" align=""center"" colspan=""2"">" & vbNewLine & _
		"       <input style=""color:" & strHeadFontColor & "; font-weight:bold; font-family:" & strDefaultFontFace & "; padding:3px 6px 3px 6px; border:1px solid " & strTableBorderColor & "; text-shadow:0px 1px 1px #000; font-weight:bold; text-decoration:none; border-radius:25px; -webkit-border-radius:25px; background:"&strHColor&";"" type=""Submit"" class=""button2"" name=""submit"" value=""Submit"" />" & vbNewLine & _
		"			</td>" & vbNewLine & _
		"		</tr>" & vbNewLine & _
		"	</table>" & vbNewLine & _
		"</form>" & vbNewLine
	WriteFooter
End If
%>


Look in the following files and change instances of 15 to the desired quantity:

config.asp
Dim strHidePoll, strVResults, PCount, nCount, txtAns(), vPercent(100), vAnswers(15), vCount(15)


active_polls.asp - all
admin_poll.asp - all
inc_poll.asp - all
pop_poll.asp - all
post.asp - those related to poll mod (should be seven)
topic.asp - those related to poll mod (should be twelve)

admin_poll.asp will take a bit more work, sorry. You'll need to expand the <select></select> for strMaxVotes or replace it with a input type=text.

I redid this whole thing on my modular to use a new variable in lieu of the 15 throughout. That way it can be changed in the admin page and not have to edit all the pages each time.

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000 Version 3.4.07