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

Dravis
Starting Member

46 Posts

Posted - 28 April 2002 :  13:04:06  Show Profile
Can someone give me instructions on how to display the featured poll from the poll mod on a different page? I don't want it to be displayed on the top of my forums/default.asp, I'd rather have it on a different page of my site outside of the forums. Thanks in advance for the help.

Dravis

Dravis
Starting Member

46 Posts

Posted - 28 April 2002 :  19:39:48  Show Profile
I hate to bump my own post, but I'm sure someone out there has done this. I don't need to have my hand held, I just need to be pointed in the right direction.

I'd also like to move the Login/Logout from the top of the forums to a column on the left if anyone could offer a hand with that as well. Thanks again.

Dravis
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 29 April 2002 :  01:17:13  Show Profile
Well, first you need to grab the Featured Poll Mod code from the default.asp page. I am sure you got that by now.

Now you would need the config.asp from the forum included into your website, so the featured poll can get the variables and connect to your database etc. Are you or will you be using your own custom connection to your database for your website or using the connection from the config.asp file?

Then you would need to set the cookie location to Website in your admin options. Although this is the first thing you would need to do.

There was another user who was doing this too. Had a few problems but he got it working in the end. Will see if I can find the topic.

«------------------------------------------------------»
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 - 29 April 2002 :  10:59:22  Show Profile
quote:

Well, first you need to grab the Featured Poll Mod code from the default.asp page. I am sure you got that by now.



Check. I took all the code between the comments and added them to my index.asp home page in the table I want the active poll to be displayed in and enclosed the code in <% %> tags.

quote:

Now you would need the config.asp from the forum included into your website, so the featured poll can get the variables and connect to your database etc. Are you or will you be using your own custom connection to your database for your website or using the connection from the config.asp file?



Check. At the very top of the index.asp page I included config.asp. I am using the config.asp file to set up the connection to the database. I'm not using my own custom connection.

quote:

Then you would need to set the cookie location to Website in your admin options. Although this is the first thing you would need to do.



Check.


After all that, when I load up the index.asp page nothing displays when the display active poll option is turned off (of course). When I turn the option on, the active poll is displayed at the top of the forums default.asp page, but not displayed on my index.asp page.

Do I need to remove the code from default.asp? Or is there something else I need to do or am possibly doing wrong? I have all the poll code from default.asp in a table in the index.asp, that's alright I hope? Should I maybe create a function out of the poll code and call the function in the appropriate place of my index.asp instead of including the code in the table? Thanks for your help Davio.

Dravis
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 29 April 2002 :  13:41:41  Show Profile
Yeah I know, it won't work with what I just told you. I found the topic another member and I had, in getting him to setup the featured poll on his front page. I want you to read these 2 posts by me in particular:

http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=17367#78725
http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=17367#78142

Make the changes I posted in those 2 posts. You can read the whole topic if you would like too.

«------------------------------------------------------»
Want to know when the next version comes out,
as soon as possible? Join our Mailing Lists !
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 29 April 2002 :  13:44:10  Show Profile
And remember to delete your cookies from the Cookies folder and your Cache and restart your browsers (meaning close them down then open them back).

«------------------------------------------------------»
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 :  01:44:55  Show Profile
OK. I read up on that topic and that's all key information which I have updated. This issue that I'm having though isn't to do with keeping track of votes or cookies or whatnot, I actually haven't even gotten to that part yet. I'm still hung up on making the active poll display somewhere other than the top of default.asp. I've tried cutting and pasting the code into my index.asp file and that didn't work. I also tried creating a new file called poll.asp and including that where I wanted it to display on my index.asp page and that didn't work either. As soon as I can get it to display I'm sure I can figure out the rest from your other posts.

Any ideas as to why it won't display for me?

Dravis
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 30 April 2002 :  09:37:50  Show Profile
It is not showing up because it is not reading the forum varables from your config.asp file. You will need to change the location of the poll variable from:
strAdminPolls = Application(strCookieURL & "strAdminPolls")
to
strAdminPolls = Application("/forum/strAdminPolls")
And the /forum/ is where the folder your forum is in from your root folder.

Have you deleted your cookies yet??

And I need you to follow my instructions carefully. Don't guess if my instructions won't work, just do it. Here is the instructions I wanted you to do from the other topic:
quote:
First, let me start with your number 2 problem since that is easier to explain.

The featured forum on your front page is not accessing the same application variables that your forum are using. The front page accesses the application variables from the root "/". Since that is what the strCookieURL returns. In your forum, the application variables are set with "/forum". So your featured poll doesn't see the same values of the forum.

What I suggest you do is hard code the location of the poll mod application variables. So change these in your config.asp file:
strAdminPolls = Application(strCookieURL & "strAdminPolls")
strUserPolls = Application(strCookieURL & "strUserPolls")
strActivePoll = Application(strCookieURL & "strActivePoll")
strWhoVotes = Application(strCookieURL & "strWhoVotes")
to this:
strAdminPolls = Application("/forums/strAdminPolls")
strUserPolls = Application("/forums/strUserPolls")
strActivePoll = Application("/forums/strActivePoll")
strWhoVotes = Application("/forums/strWhoVotes")
That should now access the variables from the forum and fix your problem.

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
That section 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 the 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 path of the polls. The 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 and your include poll file. 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 :  10:21:17  Show Profile
Hey Davio. If you can, take a moment to go over my files and tell me what I'm doing wrong? I've followed your instructions exactly and I just can't figure out what I've missed.

Here are the txt versions of the files I figured you'd need to look at. Please let me know if you need to see any other files.

http://www.dravispaypal.com/forums/default.txt
http://www.dravispaypal.com/forums/config.txt
http://www.dravispaypal.com/forums/topic.txt

This is the page I'm trying to display the featured poll on which is outside of the forums:
http://www.dravispaypal.com/untitled.txt

I'm sure it's something newbieish and stupid that I'm missing but it's always the little things that stump me the longest. Thanks again for your patience and help.

Oh and yes I have deleted cookies several times.

Dravis
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 30 April 2002 :  10:58:17  Show Profile
After making the changes in the config.as file try visiting your setup.asp page. It should reload the application variables. You can then check in your admin options, the Forum Variables and see if the Application /forums/strAdminPolls, along with the other poll mod applications are set, with a value.

«------------------------------------------------------»
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 :  11:16:29  Show Profile
Here's what I found:

/forums/STRADMINPOLLS 1
/forums/STRUSERPOLLS 1
/forums/STRACTIVEPOLL 109

What's next? I'm about ready to pack it up as far as this one goes unless you happen to see anything else. I'm really rather frustrated with it.

Dravis
Go to Top of Page

SalmanKhana
Average Member

USA
961 Posts

Posted - 30 April 2002 :  11:39:52  Show Profile
I also have the same problem but i gave up hope.. now when i see this topic. the hope has come back again

my problem :- the featured poll shows good in forum/portal_content.asp but when i move it one directory above inside the home / directory and include the same inc_featured_poll2.asp file , it does not show the featured poll.

I will go through what davio posted and get back.

Thanks

Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 30 April 2002 :  11:41:42  Show Profile
Well, it won't be easy. It took us a little while with that other guy to get it working. A lot of things need to be tweaked. Especially with getting your site to see the forum variables. It's really tricky. Not just add this code and change this code and it will work. If you don't have the patience to get it working well, you might as well give up on it. Because you will need some patience to get 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 - 30 April 2002 :  11:47:34  Show Profile
I have the patience I just don't have the direction. I've done everything you've asked me to do so far and I myself am fresh out of ideas. I am a software engineer so I know a thing or two about code and whatnot, but I really don't know asp all that well. Could you look at the source of the untitled.asp for me? For all I know, I'm not even calling the 'show featured poll' code correctly.

If you give up on me, I will have to pack it up cause I can't get any further on my own.

Dravis
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 30 April 2002 :  11:53:25  Show Profile
Give up? me?
That's not in my vocab.

I will run through the steps in getting this displayed on the front page on my computer and I will get back to you guys. But this will be later this evening as I need to get through the door now.

«------------------------------------------------------»
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 :  11:57:47  Show Profile
Here's some additional information that may help. When I load up the untitled.asp page I get this error:

Microsoft VBScript runtime error '800a01a8'

Object required: ''

/untitled.asp, line 29

And line 29 of the untitled.asp file is as follows:

set rsPoll = my_Conn.Execute (strSql)

Which is in the poll mod code that I stripped out of default.asp

Dravis



Edited by - Dravis on 30 April 2002 11:59:22
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
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.34 seconds. Powered By: Snitz Forums 2000 Version 3.4.07