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
 Poll MOD behavior in pop_poll.asp
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

leatherlips
Senior Member

USA
1838 Posts

Posted - 22 July 2006 :  17:57:04  Show Profile  Visit leatherlips's Homepage
I'm really getting into this poll mod I just installed. However, I seem to have found a minor issue.

If I set a poll to be voted on by members only, it works as expected when it is within the forum. If a non member tries to vote, it tells them they must be logged in.

However, if I have the same poll as a featured poll and it is set to open in a pop up window (pop_poll.asp), then anyone can vote, even though it says its for members only.

How can I fix this?

As a side question...How can I make the default poll creation to be set for members only instead of everyone?

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 23 July 2006 :  00:47:06  Show Profile
Hmm, let me look into this.

quote:
As a side question...How can I make the default poll creation to be set for members only instead of everyone?
You can't. Not from the current admin options. You would have to change the code to accomplish that. Shouldn't be too hard though.

Support Snitz Forums
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 23 July 2006 :  01:01:00  Show Profile
You are correct, this is a bug. Will post a fix for you.

EDIT: Here's the fix.
Look for the following code on line 151 in pop_poll.asp:
elseif strWhoVotes = "members" and Member_ID = "-1" then
Remove the underscore character in red. It should be MemberID.

Let me know if it fixes the problem.

Support Snitz Forums
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 23 July 2006 :  08:33:03  Show Profile  Visit leatherlips's Homepage
Davio, thanks for responding. I removed the underscore as you suggested, but it did not fix it.

You can try the poll out for yourself here. It is set as members only, but you'll be able to vote without logging in.

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 23 July 2006 :  18:30:27  Show Profile
Ok, that was one bug fixed but not THE fix.

Here is THE fix :
Look for the code between lines 206 - 242.
Line 206 starts with:
Dim vAnswers(15)

And line 242 ends with:
set rsPoll = nothing

Now you will move all that code after line 119.
Response.End
end if 'line 119
          <--- move code here
blnVoted = GetVote(Topic_ID)

If that's too confusing, maybe this comparison report can help you:
http://www.dsilvera.com/misc/Report.html

On the left is the correct fixes. On the right is the old file.

Support Snitz Forums
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 23 July 2006 :  20:36:12  Show Profile  Visit leatherlips's Homepage
Davio, I implemented your fix and it works now. Thanks!

I have noticed however, another minor issue now...

Now when you vote in the pop up poll, it does not show your vote immediately. You have to close it and then reopen it.

Example: After you select your choice in the poll and click vote now, the screen that appears did not record your vote. If you close the window and try to vote again, then it shows your vote was recorded. Is this fixable?

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 23 July 2006 :  23:13:13  Show Profile
LoL! Why are you finding so many bugs in this file? Look how long the poll mod has been out. Here I thought all bugs have been squashed.

Ok, gonna check that out. You are voting in a members only poll, in the popup window, logged in as a registered member and you don't see the poll results updated after you vote?

Support Snitz Forums
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 24 July 2006 :  06:55:01  Show Profile  Visit leatherlips's Homepage
quote:
Originally posted by Davio

You are voting in a members only poll, in the popup window, logged in as a registered member and you don't see the poll results updated after you vote?
Correct. After you vote, the pop up screen shows the results minus your vote. But if you close the pop up and then reopen it, the result is there.

Sorry about finding these bugs after your MOD has already been out for a long time...Maybe these bugs are like cicadas...they only show themselves after so many years...

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 24 July 2006 :  07:15:47  Show Profile
You are right. The file needs some more working on. Because I moved that bit of code to fix one bug, it created another problem. I'll give you a new pop_poll.asp file later.

Support Snitz Forums
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 25 July 2006 :  10:53:02  Show Profile  Visit leatherlips's Homepage
quote:
Originally posted by Davio

You are right. The file needs some more working on. Because I moved that bit of code to fix one bug, it created another problem. I'll give you a new pop_poll.asp file later.

Any luck with this fix?

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 26 July 2006 :  12:45:48  Show Profile  Visit leatherlips's Homepage
Which file do I need to look in to change the default choice for who can vote in the polls? Currently its set for everyone, but I'd like it to be members only. I've played with the code in post.asp but it doesn't seem to work no matter what I do. The code I am referring to is:

if Request.QueryString("poll") = "1" and (strRqMethod = "Topic" or strRqMethod = "EditTopic") then
	Response.Write "	<tr>" & vbNewline & _
			"        <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" 
align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>
<b>Who Votes:</b></font></td>" & vbNewline & _
			"        <td bgColor=""" & strPopUpTableColor & """>" & vbNewline & _
			"		<select name=""WhoVotes"" size=""1"">" & vbNewline & _
			"			<option value=""everyone"""
	if strWhoVotes = "everyone" or strRqMethod = "Topic" then Response.Write(" selected") 
	Response.Write ">Everyone</option>" & vbNewline & _
			"			<option value=""members"""
	if strWhoVotes = "members" then Response.Write(" selected") 
	Response.Write ">Members Only</option>" & vbNewline & _
			"		</select></td>" & vbNewline & _
			"    </tr>" & vbNewline
end if

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD

Edited by - leatherlips on 26 July 2006 12:47:35
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 27 July 2006 :  21:05:58  Show Profile  Visit leatherlips's Homepage
Davio, have you given up on this? I really hope you are able to fix this as I would love to add this to my site.

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 27 July 2006 :  22:06:17  Show Profile
I'm still working on it leatherlips.

Support Snitz Forums
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 28 July 2006 :  04:52:57  Show Profile
Leatherlips, I found the problem and fixed it. You can download the file from my site: pop_poll.zip at DSilvera.com

Just overwrite your current pop_poll.asp file with the one in the file. Let me know if it works ok for you.

For your other problem, in the code you just posted, move the code in red, to where it is in green below:
if Request.QueryString("poll") = "1" and (strRqMethod = "Topic" or strRqMethod = "EditTopic") then
	Response.Write "	<tr>" & vbNewline & _
			"        <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" 
align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>
<b>Who Votes:</b></font></td>" & vbNewline & _
			"        <td bgColor=""" & strPopUpTableColor & """>" & vbNewline & _
			"		<select name=""WhoVotes"" size=""1"">" & vbNewline & _
			"			<option value=""everyone"""
	if strWhoVotes = "everyone" or strRqMethod = "Topic" then Response.Write(" selected") 
	Response.Write ">Everyone</option>" & vbNewline & _
			"			<option value=""members"""
	if strWhoVotes = "members" or strRqMethod = "Topic" then Response.Write(" selected") 
	Response.Write ">Members Only</option>" & vbNewline & _
			"		</select></td>" & vbNewline & _
			"    </tr>" & vbNewline
end if

Support Snitz Forums

Edited by - Davio on 28 July 2006 04:56:33
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 28 July 2006 :  13:45:48  Show Profile  Visit leatherlips's Homepage
Davio,

You are the man! Works great now! Also thanks for the Members Only/Everyone tweak.

This is a great MOD!

(Now if you could look into my other topic, all will be well )

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

thermal_seeker
Junior Member

United Kingdom
430 Posts

Posted - 30 July 2006 :  07:44:08  Show Profile
I have just followed all this and have changed my files accordingly. I have a minor glitch still (logged in as Admin) I create a new poll, enter the question and answers, make topic sticky, and then "post". I get an error "problem with details.. go back to change" but then the page changes and the poll is there in the forum.

Any Ideas??

Dave

No good at coding, but I can plough a field !!
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 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.43 seconds. Powered By: Snitz Forums 2000 Version 3.4.07