Author |
Topic  |
leatherlips
Senior Member
   
USA
1838 Posts |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 23 July 2006 : 00:47:06
|
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
|
 |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 23 July 2006 : 01:01:00
|
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
|
 |
|
leatherlips
Senior Member
   
USA
1838 Posts |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 23 July 2006 : 18:30:27
|
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
|
 |
|
leatherlips
Senior Member
   
USA
1838 Posts |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 23 July 2006 : 23:13:13
|
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
|
 |
|
leatherlips
Senior Member
   
USA
1838 Posts |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 24 July 2006 : 07:15:47
|
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
|
 |
|
leatherlips
Senior Member
   
USA
1838 Posts |
|
leatherlips
Senior Member
   
USA
1838 Posts |
Posted - 26 July 2006 : 12:45:48
|
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 |
 |
|
leatherlips
Senior Member
   
USA
1838 Posts |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 28 July 2006 : 04:52:57
|
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 |
 |
|
leatherlips
Senior Member
   
USA
1838 Posts |
|
thermal_seeker
Junior Member
 
United Kingdom
430 Posts |
Posted - 30 July 2006 : 07:44:08
|
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 !! |
 |
|
Topic  |
|