Author |
Topic |
Dravis
Starting Member
46 Posts |
Posted - 28 April 2002 : 13:04:06
|
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
|
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 |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 29 April 2002 : 01:17:13
|
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 ! |
|
|
Dravis
Starting Member
46 Posts |
Posted - 29 April 2002 : 10:59:22
|
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 |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 29 April 2002 : 13:44:10
|
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 ! |
|
|
Dravis
Starting Member
46 Posts |
Posted - 30 April 2002 : 01:44:55
|
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 |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 30 April 2002 : 09:37:50
|
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") tostrAdminPolls = 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 ! |
|
|
Dravis
Starting Member
46 Posts |
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 30 April 2002 : 10:58:17
|
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 ! |
|
|
Dravis
Starting Member
46 Posts |
Posted - 30 April 2002 : 11:16:29
|
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
|
|
|
SalmanKhana
Average Member
USA
961 Posts |
Posted - 30 April 2002 : 11:39:52
|
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
|
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 30 April 2002 : 11:41:42
|
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 ! |
|
|
Dravis
Starting Member
46 Posts |
Posted - 30 April 2002 : 11:47:34
|
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 |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 30 April 2002 : 11:53:25
|
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 ! |
|
|
Dravis
Starting Member
46 Posts |
Posted - 30 April 2002 : 11:57:47
|
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 |
|
|
Topic |
|