Author |
Topic  |
Dravis
Starting Member
46 Posts |
Posted - 01 May 2002 : 02:01:42
|
OK you logged in and voted. Now delete your cookies and close IE. Then come back to the forums, log in and see the poll results at the top of default.asp because you had voted on a previous log in. But then goto untitled.asp. You won't see the results there, even if you refresh...
It looks like if you get rid of the cookie, untitled.asp can't figure out that you've voted before, as if it can't access the database. Are there any other files I need to include in untitled.asp?
Dravis
Edited by - Dravis on 01 May 2002 02:12:02 |
 |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 01 May 2002 : 02:17:01
|
I don't see the results on the default.asp page either. It shows me the pol answers to choose from. It might be that the poll is not storing the poll you voted in, in the M_POLL field. But I can't be certain unless you look in the database and see what value is there for M_POLL for my account.
Also in your topic.asp file, starting at line 483 you have an extra code that is setting the cookie location. You only need it once. If you scroll up a bit before that you will see you already have the code there.if strSetCookieToForum = 1 then Response.Cookies(strUniqueID & "poll").Path = strCookieURL else Response.Cookies(strUniqueID & "poll").Path = "/" end if
«------------------------------------------------------» Want to know when the next version comes out, as soon as possible? Join our Mailing Lists ! |
 |
|
Dravis
Starting Member
46 Posts |
Posted - 01 May 2002 : 02:22:56
|
Wait.. You don't see the results at the top of default.asp or untitled.asp? I've always seen them at the top of default.asp, it's been untitled.asp that's giving me the problems.
I just checked M_POLL for your account in the database and it is set to 109 which is the ID of the poll.
I took out the extra code from topic.asp as well.
Dravis |
 |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 01 May 2002 : 02:42:21
|
Ok, it is doing it the way you described.
Only thing I can think of is it is failing to get the vote. Try this, in your poll.asp file, right after this code, add the code in red:if mlev > 0 then if not(GetVote(pTopic_id)) then Response.Write "1" PollID = Request.Cookies(strCookieURL & "poll")("" & pTopic_id & "") And about 11 lines down from that, put the red code in:else Response.Write "2" PollID = Request.Cookies(strCookieURL & "poll")("" & pTopic_id & "") That should print 1 or 2 depending on which code is executing.
«------------------------------------------------------» Want to know when the next version comes out, as soon as possible? Join our Mailing Lists ! |
 |
|
Dravis
Starting Member
46 Posts |
Posted - 01 May 2002 : 07:45:31
|
Done. 2 is the result every time which obviously means mlev isn't being set correctly for some reason. If you look at my txt files you'll see the line:
mLev = cint(chkUser(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword")))
At the top of the poll.asp file. I've actually removed it from the poll.asp file and it is now at the top of the untitled.asp instead, I just haven't had a chance to update the txt files yet. I assume it's either something wrong with this line, the location of this line, or something in addition to this line. This also explains why I've never been able to see any of the admin options on untitled.asp.
Dravis
Edited by - Dravis on 01 May 2002 08:43:59 |
 |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 01 May 2002 : 10:43:05
|
Ok. You need to have this bit of code too, right above your mLev code:strDBNTUserName = Request.Cookies(strUniqueID & "User")("Name")
«------------------------------------------------------» Want to know when the next version comes out, as soon as possible? Join our Mailing Lists ! |
 |
|
Dravis
Starting Member
46 Posts |
Posted - 01 May 2002 : 11:02:53
|
That did it man. I think it's all set now. One last question. From a coding standpoint, is it best to have this code:
<% set my_Conn = Server.CreateObject("ADODB.Connection") my_Conn.Open strConnString strDBNTUserName = Request.Cookies(strUniqueID & "User")("Name") mLev = cint(chkUser(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword"))) %>
...at the top of my poll.asp file or at the top of the file that includes poll.asp (in this case untitled.asp) or does it really not matter?
Dravis
P.S. Now I just need to format the way the poll table is created so it will display more like a vertical column instead of in horizontal rows. You don't happen to have that code tweak laying around do you? If not, I'm fairly confident I can figure it out. Thanks again for all your help. |
 |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 01 May 2002 : 11:12:02
|
quote: ...at the top of my poll.asp file or at the top of the file that includes poll.asp (in this case untitled.asp) or does it really not matter?
I would put it in the untitled.asp file instead. quote: P.S. Now I just need to format the way the poll table is created so it will display more like a vertical column instead of in horizontal rows. You don't happen to have that code tweak laying around do you?
No I don't.
Glad you finally got it working. 
«------------------------------------------------------» Want to know when the next version comes out, as soon as possible? Join our Mailing Lists ! |
 |
|
Dravis
Starting Member
46 Posts |
Posted - 03 May 2002 : 15:44:12
|
Hey Davio, I got everything put together and it went live on my site about 2 days ago. Since then all is well with one exception. Two or three times a day I'll load up my home page the poll is gone. I can delete cookies, refresh, delete files, reload you name it and it just won't come back. If I go into my admin configuration and resubmit the poll configurations, it suddenly reappears. It's as if the poll variables are being randomly reset for some reason. Do you know how to fix this? I hope so because resubmitting the poll configurations two or three times a day just isn't going to work. 
Dravis |
 |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 03 May 2002 : 17:16:16
|
What do you mean the poll is gone? The whole poll table doesn't show up?
«------------------------------------------------------» Want to know when the next version comes out, as soon as possible? Join our Mailing Lists ! |
 |
|
Dravis
Starting Member
46 Posts |
Posted - 03 May 2002 : 17:49:01
|
Yeah the whole table doesn't display at all. It's as if strAdminPolls in poll.asp gets set to 0 disabling the featured poll feature all together... When I resubmit the featured poll configs in the admin section, the table displays again.
Dravis |
 |
|
Dravis
Starting Member
46 Posts |
Posted - 04 May 2002 : 22:09:34
|
No ideas Davio? It's happened twice today as well. I'd load up my home page and the whole poll table isn't visable. This time, before I resubmitted the poll configs, I checked the value of the forum variables in the admin area. The variables for the poll mod were still set correctly but I couldn't get the table to display without resubmitting the config. I really have no idea what could be causing it.
Dravis |
 |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 04 May 2002 : 23:29:29
|
I have no idea Dravis. I have been thinking it through and I can't come up with a solution. Can you give me a link to where you have the featured poll mod on your front page? Or are you still using the untitled.asp as the front page?
It might be the change in the config.asp file, where we hard coded the polls application variables. You can try changing them back to how the rest of the application are coded. Using the strCookieURL. If you undersstand what I am talking about. Then go to setup.asp to reload the application variables, or just submit something in your admin options. It will reload the variables too.
That's just a long shot though. I don't really know what to try.
«------------------------------------------------------» Want to know when the next version comes out, as soon as possible? Join our Mailing Lists ! |
 |
|
Dravis
Starting Member
46 Posts |
Posted - 05 May 2002 : 00:10:48
|
I'm not using untitled.asp any more. That was just for testing. I moved the active poll to my home page www.dravispaypal.com I went ahead and changed the poll config variables back to using strCookieURL instead of the hard coded path. So far everything displays correctly this way. I'll keep an eye on it and see if any more random disappearings happen.
On a side note, I've got two different instances of the slash mod running on the same page, but I can't see how that would get in the way.
Dravis |
 |
|
Topic  |
|