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
 Show Featured Poll on a Different Web Page?
 New Topic  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 3

Dravis
Starting Member

46 Posts

Posted - 01 May 2002 :  02:01:42  Show Profile
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
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 01 May 2002 :  02:17:01  Show Profile
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 !
Go to Top of Page

Dravis
Starting Member

46 Posts

Posted - 01 May 2002 :  02:22:56  Show Profile
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
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 01 May 2002 :  02:42:21  Show Profile
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 !
Go to Top of Page

Dravis
Starting Member

46 Posts

Posted - 01 May 2002 :  07:45:31  Show Profile
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
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 01 May 2002 :  10:43:05  Show Profile
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 !
Go to Top of Page

Dravis
Starting Member

46 Posts

Posted - 01 May 2002 :  11:02:53  Show Profile
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.
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 01 May 2002 :  11:12:02  Show Profile
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 !
Go to Top of Page

Dravis
Starting Member

46 Posts

Posted - 03 May 2002 :  15:44:12  Show Profile
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
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 03 May 2002 :  17:16:16  Show Profile
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 !
Go to Top of Page

Dravis
Starting Member

46 Posts

Posted - 03 May 2002 :  17:49:01  Show Profile
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
Go to Top of Page

Dravis
Starting Member

46 Posts

Posted - 04 May 2002 :  22:09:34  Show Profile
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
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 04 May 2002 :  23:29:29  Show Profile
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 !
Go to Top of Page

Dravis
Starting Member

46 Posts

Posted - 05 May 2002 :  00:10:48  Show Profile
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
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous 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.41 seconds. Powered By: Snitz Forums 2000 Version 3.4.07