Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Help with poll code
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Help with poll code

 Post Reply Post Reply
Author
uvena.com View Drop Down
Newbie
Newbie
Avatar

Joined: 12 September 2003
Location: United States
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote uvena.com Quote  Post ReplyReply Direct Link To This Post Topic: Help with poll code
    Posted: 27 October 2003 at 6:26pm

Hello, I am trying to write a mod to show the newest poll in a specific forum category / topic, I am wanting to know if the variables are vital to the posting of the forum or not (meaning tpn, pn, rn, etc).

Is there a mod like this out there for 7.5?  Anybody got any ideas on how to manipulate the current include file that shows a form to show only the poll that is most recent (by id) in the specific forum?  I am thinking it is something with my SQL query that is causing the problem.

Thank you so much..

Back to Top
uvena.com View Drop Down
Newbie
Newbie
Avatar

Joined: 12 September 2003
Location: United States
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote uvena.com Quote  Post ReplyReply Direct Link To This Post Posted: 27 October 2003 at 6:56pm

As a note, I took the poll include file and changed it around so that SQL query is only looking for a poll, with the forum id set earlier in the code, now my problem is that I am thinking something is wrong because the variables aren't being passed (the hidden variables PN,TPN).  I am thinking these are topic page number and page number.  I can display the poll, when I try to post, it gives me the following error:

Type mismatch: 'CInt'
/apps/siteup/forum/forum_posts.asp, line 224

This tells me it is redirecting from the poll cast vote code.

Which line 224 is is looking for the page number in the query... so I am confused as to why if I copied the code (unless it is in the query and I didnt see it) it isnt setting these hidden variables in the form.



Edited by uvena.com
Back to Top
uvena.com View Drop Down
Newbie
Newbie
Avatar

Joined: 12 September 2003
Location: United States
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote uvena.com Quote  Post ReplyReply Direct Link To This Post Posted: 27 October 2003 at 7:04pm
Another update.  I put the variables for the forum page number and topic id into the form hard coded, which worked, although it did not update the poll with any new values as it should.  So I am thinkin there is one more variable that wasn't passed, which is the page number.  Is the page number something that has to be sent or is there another variable that must be in the form or querystring for the update to the database to happen?
Back to Top
uvena.com View Drop Down
Newbie
Newbie
Avatar

Joined: 12 September 2003
Location: United States
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote uvena.com Quote  Post ReplyReply Direct Link To This Post Posted: 27 October 2003 at 9:54pm

Well no replies yet but a few reads.  What it amounted to was the fact that 1) the user must be logged in to vote if this has been set for the poll and 2) the correct forum id must be used depending on the poll.  So I have a forum named polls, i sort the sql query and choose the newest poll entered by id, and that about wraps it up.

So if anybody wants to put the newest poll on yer page, set a variable in the code that tells the sql what forum id you are looking at (FID of the forum), have the SQL find the most recent file by id, and include it in the page with common.asp as an include file for your connection.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.