Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 MOD: Poll (by slemieux)
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 16

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 11 June 2001 :  14:45:44  Show Profile
I don't have a problem setting a cookie with the last time they visited Dan. Bjlt's problem is that he wants to be able to give users who use the same computer, an option to vote. But since the user that voted before on the same computer, the cookie has been set that they voted, and the second user comes and wants to vote, but it sees the cookie that says they already voted.

Hopefully that make sense. But that can't be done with users that aren't a member.

Go to Top of Page

Dan Martin
Average Member

USA
528 Posts

Posted - 11 June 2001 :  15:07:30  Show Profile  Visit Dan Martin's Homepage  Send Dan Martin an AOL message  Send Dan Martin an ICQ Message  Send Dan Martin a Yahoo! Message
You misunderstood. LastVisit was just an example. The important thing is to pay attention to "Name" as a variable, not a constant(notice no quotes around Name). The variable containing your Login Name (M_NAME, M_USERNAME....whatever).

I'll show you what I mean:
Here's the contents of my cookie, assuming TWO users, named Dan and Davio

Dan=LastVisit=6%2F11%2F2001+11%3A10%3A35+AM; Davio=LastVisit=6%2F11%2F2001+2%3A01%3A01+PM;

When I log on to Snitz as Name = "Dan", this:

session("LastVisit")=Request.Cookies(Name)("LastVisit")

retreives the LastVisit for ME, and only ME.

When you log on, Name=Davio, so it retrieves the LastVisit for YOU and only YOU.

Now, lets adapt that to your Poll mod:
Response.Cookies(Name)("poll") = & pollNumber (sorry, I don't have the poll code in front of me)

If I logged in and voted, and then you logged in and voted, it would produce a cookie like this:
Dan=poll=46; Davio=poll=46

Later, those can be retrieved by:
Request.Cookies(Name)("poll")

Does that make more sense?

Edited by - Dan Martin on 11 June 2001 16:28:33
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 11 June 2001 :  16:40:15  Show Profile
Ok, I get what you're talking about. But we are talking for non-registered members. So we can't take thier name from the database as they aren't registered.
And the second problem either bjlt or someone else said, was that the user could delete the cookie and vote again. So we would have to keep that info in the database for each member who voted.

Go to Top of Page

Dan Martin
Average Member

USA
528 Posts

Posted - 11 June 2001 :  17:36:01  Show Profile  Visit Dan Martin's Homepage  Send Dan Martin an AOL message  Send Dan Martin an ICQ Message  Send Dan Martin a Yahoo! Message
quote:

Ok, I get what you're talking about. But we are talking for non-registered members. So we can't take thier name from the database as they aren't registered.
And the second problem either bjlt or someone else said, was that the user could delete the cookie and vote again. So we would have to keep that info in the database for each member who voted.



Agreed, my code above would allow multi users sharing a computer to vote individually, but no cookie code will stop the fact that right now I can vote once from work and once from home. I think my average user doesn't have the slightest clue that he could re-vote by deleting his cookie. But I know many of them visit from work and home.

Perhaps a database implementation, with an option in the Admin controls to turn on/off anonymous voting.

In the case that you keep anonymous voting, you could change Name to "poll" & Name in my code above, and this would allow both anonymous voting, and one vote per account.

Go to Top of Page

Markp
New Member

54 Posts

Posted - 11 June 2001 :  22:40:46  Show Profile
quote:

Sorry about that guys. On line 147 you should see this line of code:



Thanks you very much!

Go to Top of Page

tomasalsbro
Average Member

Sweden
818 Posts

Posted - 12 June 2001 :  18:33:57  Show Profile  Visit tomasalsbro's Homepage
quote:

tomas, you probably messed up the code in your default.asp file when you added the poll mod code. I'll take a look at it if you email me your default.asp file. .....



Hi Davio,
did you recieved my mail with the file?
Tomas

!-Keep distance in traffic-!
www.whiplash.pp.se
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 12 June 2001 :  19:31:53  Show Profile
Yes I did. And I replied to you.
It has nothing to do with the Poll Mod. You messed up the SQL statement when you added the Forum Sorting mod by Richard.

Let me know if it works for you. If it doesn't, let me know where you downloaded the mod and I'll install the mod for you.

Go to Top of Page

SalmanKhana
Average Member

USA
961 Posts

Posted - 12 June 2001 :  22:07:04  Show Profile
There is one problem in the begining itself.
When I Extract the poll_dbsetup.dbs and the mod_dbsetup.asp files to your forum folder.
And open the mod_dbsetup.asp file from my browser.


It does not show Slemmie's Poll from the list of dropdown mods. How do I fix it ?

Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 13 June 2001 :  08:07:17  Show Profile
I've never heard of a user having that problem. Make sure the poll_dbsetup.dbs file is in the forum folder and the mod_dbsetup.asp file. Also try refreshing the page just to make sure.
What other mods appear in the drop down list instead?

Go to Top of Page

@tomic
Senior Member

USA
1790 Posts

Posted - 22 June 2001 :  14:23:59  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
I've had this poll MOD working for a good 2 months now, but members have started pointing out that every day a poll shows a new post(comment on the poll, not a vote)by the last person to vote. This is shows up on forum.asp and active.asp

Oddly enough, if I go in and hit "edit" and post changes even though I change nothing, the problem goes away. The poll no longer shows new activity when there is none.

Has anyone else noticed this activity or have any ideas on how to fix it?

@tomic

Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 22 June 2001 :  23:08:00  Show Profile
@tomic, whenever someone votes in a poll, it updates the last post date to the time the user voted. That way users can keep up-to-date with the current results of the poll, each time a user votes.

- David
Go to Top of Page

@tomic
Senior Member

USA
1790 Posts

Posted - 23 June 2001 :  03:56:31  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
OK, thanks a lot. There was just some concern over the person that last posted a comment accumulating post counts every time someone voted, but I guess it doesn't really hurt anything.

@tomic

Go to Top of Page

Freeman II
Junior Member

232 Posts

Posted - 23 June 2001 :  19:17:30  Show Profile
im trying to find the code that updates T_LAST_POST each time someone voted.

it's really annoying when the poll topics are always on top.

can you tell me where the code is?

thanks

Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 23 June 2001 :  22:52:15  Show Profile
It's in the topic.asp file. You will see this bit of sql code:
'## Forum_SQL - 
strSql = "UPDATE " & strTablePrefix & "TOPICS "
strSql = strSql & " SET count" & nNumber & " = count" & nNumber & " +1"
strSql = strSql & ", T_LAST_POST = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & " WHERE TOPIC_ID = " & Request.Form("TOPIC_ID")
Comment out the code in red if you don't want it to update the last post date.

- David
Go to Top of Page

blackinwhite
Average Member

Turkey
657 Posts

Posted - 25 June 2001 :  06:27:48  Show Profile
is it possible to use it as an include file, and include other files instead of default.asp?

____
"I am a legal alien"
Go to Top of Page
Page: of 16 Previous Topic Topic Next Topic  
Previous Page | 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.19 seconds. Powered By: Snitz Forums 2000 Version 3.4.07