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 | Next Page
Author Previous Topic Topic Next Topic
Page: of 3

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 30 April 2002 :  12:04:19  Show Profile
Oh yea. You need this bit of code from the inc_top.asp file:
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
You can put it after the include of the config.asp file in your untitled.asp file.

«------------------------------------------------------»
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 - 30 April 2002 :  12:12:39  Show Profile
WOO! We have progress. I now have a black box. Check it out:

http://www.dravispaypal.com/untitled.asp

What's next?

Dravis
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 30 April 2002 :  12:25:52  Show Profile
You need to include the inc_functions.asp file into your untitled.asp file too. Forgot about that.

«------------------------------------------------------»
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 - 30 April 2002 :  12:33:40  Show Profile
WOO! That's it! Now the only thing that isn't working is the images. I'm assuming I need to set something in config.asp to hard code the path to the image files as well correct?

EDIT: Scratch that. It's not just the images. The links are also incorrect. The images and links point to the forum files off of my root directory without including a /forums/ in front of the paths. My guess is it has something to do with the cookies but I'm far from an expert.

Dravis



Edited by - Dravis on 30 April 2002 12:45:19
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 30 April 2002 :  19:36:19  Show Profile
Not a cookie problem. Just change the links in the page. Look for this bit of code:
if strGfxButtons <> "0" then
That checks to see if you want graphics displayed or not. After that comes the code for the images and the links. Just go through each line and change the links to include the /forums/ part.

«------------------------------------------------------»
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 - 30 April 2002 :  21:03:07  Show Profile
OK here's the most recent update. All images and links are working. If I cast a vote on my untitled.asp page outside of the forums the tally is updated and I am forwarded to the appropriate forum to see the results. (Side note: Voting in a public poll which is posted in a private forum will get any user into that forum when it forwards them to the results, even if they don’t have permission to view that forum.) I can then go back and refresh to see the results of the poll on untitled.asp.

The problem now is if I cast a vote from within the forums or log in with a user that has already voted, when I load up the untitled.asp page, it does not display the results, instead it waits for me to vote and when I do, it tells me I can't vote more than once in a poll, so I go back to untitled.asp and refresh and it still doesn't display the results.

Short description: Voting on untitled.asp works. Voting from within the forums and then viewing results on untitled.asp does not work.

Help please.

Dravis

Edited by - Dravis on 30 April 2002 22:50:24
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 30 April 2002 :  23:33:10  Show Profile
Well, I knew you were gonna have that problem. I would have explained it to you in my last post but you wouldn't have understand what I was talking about so I let you experience it, then I'll explain how to fix it.

Here's what I quoted above:
quote:
For your #1 problem. I realized you needed to do both to get the cookie set properly. In your topic.asp file, look for this bit of code:
elseif trim(Request.Form("R1")) <> "" then
The section that follows is what stores the value of what poll you just voted in. You should see some SQL statement which updates the database with the value and selects the answers. (hopefully you see where I am talking). Now a little further down, it checks who votes:
if strWhoVotes = "members" then
I want you to put the following code in the "Else" part of that if statement.
if strSetCookieToForum = 1 then
Response.Cookies(strUniqueID & "poll").Path = strCookieURL
else
Response.Cookies(strUniqueID & "poll").Path = "/"
end if

if mlev > 0 then
if trim(mpoll) <> "" then
mpoll = mpoll & "|" & Topic_ID
It should set the cookie path of the polls. Then change all Response.Cookies and Request.Cookies that requests the poll cookie, to use the "strUniqueID" instead of the "strCookieURL". Both in the topic.asp and default.asp. eg.
Response.Cookies(strUniqueID & "poll")("" & Topic_ID & "") = ("" & Topic_ID & "")
Response.Cookies(strUniqueID & "poll").Expires = Date + 365
That should work.


«------------------------------------------------------»
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 - 30 April 2002 :  23:45:24  Show Profile
OK got it covered man. Check it out:

http://www.dravispaypal.com/forums/topic.txt
http://www.dravispaypal.com/forums/poll.txt

Still same results as I posted above... What's next?

Also of note. I can't get the admin options to show up in untitled.asp even though I'm logged in as an admin and I added /forums/ to the admin image paths in the poll.asp file...

Dravis

Edited by - Dravis on 30 April 2002 23:58:48
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 01 May 2002 :  00:39:13  Show Profile
Well, you will need to clear out your cookies folder and the cookies from your cache. Make sure to close your browsers and open it again.

BUT before you do that, make these changes first. You didn't change all of the Response.Cookies like I told you. You need to change them on lines 213, 221 and 385 in your topic.asp file.

For your admin options not showing up, you need another piece of code from your inc_top.asp file:
mLev = cint(chkUser(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword")))
You can put that anywhere after your includes. But before your poll code.

«------------------------------------------------------»
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 :  00:59:15  Show Profile
OK I made the changes to topic.asp I don't know how I missed those, I've been over every file 10 times each but anyway... Updated and uploaded, same results. Please assume that between each test I'm deleting files, history, cookies, closing and reopening a new browser. (I've got that part figured out by now ) Same results...

I also added that line of code to the top of my poll.asp file for the admin functionality. Same results there as well. You said to put it in the inc_top.asp? I can see the admin functionaility on the featured poll in the forums. It's the featured poll on untitled.asp that I can't see the admin options for. Am I suppose to be including the inc_top.asp file somewhere for this 'out of the forums' poll?

The txt files have been updated if you want to take a look at them.

Dravis

Edited by - Dravis on 01 May 2002 01:05:19
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 01 May 2002 :  01:23:19  Show Profile
No put it in your untitled.asp file, after the includes.

I voted in the poll. And when i returned to the untitled.asp page, it showed me the results instead. So it is reading the cookie and see's that I have voted already.

«------------------------------------------------------»
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 :  01:28:53  Show Profile
Yes. You just tried the part that works. Now, delete your cookies and go straight to my forums:

http://www.dravispaypal.com/forums

Log in and you should then see the poll results at the top of the page because it knows you've already voted right?

OK now goto:

http://www.dravispaypal.com/untitled.asp

And it will ask you to vote. It won't show you the results like it should because you're already logged in and you've already voted. I hope that explains the problem.

EDIT: OK I just followed the same steps you took above and it did in fact work so it has something to do with logging in. If I log in with an account which has already voted and then try to load up untitled.asp it doesn't display the poll's results.

Also for some reason the admin options still aren't available on the upper right hand corner of the poll box on untitled.asp even after adding that line of code to the file.

Dravis

Edited by - Dravis on 01 May 2002 01:34:47
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 01 May 2002 :  01:36:50  Show Profile
quote:
Log in and you should then see the poll results at the top of the page because it knows you've already voted right?
Nope. If you vote while logged out, it stores it in a cookie. If you delete that cookie, you can vote again.

While logged in, it stores the vote in the database and the cookie.

I will register on your forum and check it. I will have to ask you to delete the account after I am done.

«------------------------------------------------------»
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 :  01:41:40  Show Profile
Just let me know when you're done and I'll give you the delete. Thanks again for all your help man. I know I/it's been a major pain in the you know what. Oh, congrats on your 5000th post by the way.

Dravis
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 01 May 2002 :  01:59:07  Show Profile
Well I logged in, voted on the default.asp page. Went to your untitled.asp page, and it showed the results. Make sure you refresh the page and not getting it from your cache.

«------------------------------------------------------»
Want to know when the next version comes out,
as soon as possible? Join our Mailing Lists !
Go to Top of Page
Page: of 3 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.46 seconds. Powered By: Snitz Forums 2000 Version 3.4.07