vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Some Poll Modifications? (https://vborg.vbsupport.ru/showthread.php?t=20665)

SystemLogic 06-19-2001 03:36 AM

Alright I have a problem in my polls. I copy and paste the HTML from a poll onto my website. The only problem is the hidden variable for s. If I leave it blank it just gives me a white page, if I put the hash code in it, I can only vote once. Is there a variable that will generate a new hash code that works everytime? Or is there anything you can recommned me doing? Is there anyway to turn off the check on the hash code?

Any help would be much appreciated.

SystemLogic 06-25-2001 03:01 AM

Bump, no answers?

NgtCrwlr 06-25-2001 06:48 AM

Greets Dave,

I'm jumping in here because I need the same answer. I setup a hack that writes the poll data to a file each time a poll is voted on. I then pull this file into whatever page I want and link back to the poll for voting. I would prefer having the questions posted on the remote pages instead of the results though.

I like the file include because pulling the poll results into several different pages puts practically no load on the server. However, I don't see my system working well with the typical question/vote first and then display the results.

If you don't mind displaying the results first you are welcome to use my little creation. I've had it up for only a few days, however, it seems to be working well.

SystemLogic 06-25-2001 05:57 PM

Well let me show you exactly what I mean. For example head to:

http://www.systemlogic.net/articles/01/6/g550preview

If you scroll down to the bottom of the article you see a poll that says "Did you like this article?"

I just ripped the HTML from the actual poll in the forum thread.

But if you vote, it gives you a blank page.

That's because the hidden variable "s" is supposed to be a hash code, but because I can't make it different (that's what I'm asking how to do) everytime, it won't log the vote.

Any ideas?

ToraTora! 06-26-2001 01:04 PM

i have no advice to offer on this subject, other than the fact I wanted to compliment NgtCrwlr on his beautiful photography and site.

It is definitely something that is worth revisiting on a regular basis.

Excellent work!

NgtCrwlr 06-26-2001 01:41 PM

I truely appreciate your kind words ToraTora!

I have a lot of plans for expanding the digital photography part of the site so stay tuned. Stop by our Chatter Box forum and say hey once in a while.

Cheers!

ToraTora! 06-26-2001 02:05 PM

No problem, i will stop by in a couple of days once we get our server issues settled. :)

SystemLogic 06-29-2001 02:00 PM

Alright I figured out how to make the random session id by doing making this s:

<?$session = md5(uniqid(rand())); echo $session;?>

BUT, it still doesn't work. I figure because VBulletin sets a cookie when you browse the message boards, so does anybody have an idea of what I can do to get this working?!??

Jonathan@Refresh 06-30-2001 11:32 AM

You should really use the actual session hash assigned to that user (each visitor gets their own unique hash).

I think if you put
Code:

include("path/to/global.php");
at the top of the page and put s=$session[sessionhash] in the poll form, that will automatically put the right session hash in for that visitor.

J

SystemLogic 06-30-2001 06:06 PM

I tried doing that and I'm getting this error:

Fatal error: Failed opening required './admin/config.php' (include_path='') in /path/to/boards/global.php on line 66

Any ideas?

Jonathan@Refresh 06-30-2001 10:11 PM

that's because it can't find './admin/config.php' in relation to the php file you're trying to put the poll on.

The best idea is to move the page with the poll in into the vb directory, or specify the full path to './admin/config.php' in global.php.

SystemLogic 07-01-2001 12:38 AM

Alright I got it so it included global.php with no problems, but it still didn't put the hashcode in using this:

<? $session[sessionhash]; ?>

or

<? $sid = $session[sessionhash]; echo $sid; ?>

Any ideas now that it still does not work?

NgtCrwlr 07-01-2001 01:13 AM

Dave, which poll are you working on right now? The one on the bottom rate this review, or the one on the site?

I can't seem to find a poll on vB for the side (Is Your CPU Overclocked?) so I'm guessing that is the one you are working on?

Can you post a bigger portion of the code you are experimenting with.

This will do nothing
<? $session[sessionhash]; ?>

I am guessing you are working on a line of test code to see if sessionhash is being passed to $sid so you can add $sid to the hidden input?

SystemLogic 07-01-2001 01:29 AM

Here I'll show you exactly what I'm talking about. Head to this page:

http://www.systemlogic.net/reviews/h...exian/handygps

You can see the source as to what I'm trying to do.

But what you said is correct I think, I need there to be a value for the hidden variable s in the poll so that the vote goes through.

Take a look and let me know what you think.

NgtCrwlr 07-01-2001 01:35 AM

Ok, it looks to me like you are working on the bottom poll and if so you have a sessionhash being passed here

<input type="hidden" name="s" value="8af34d62e066d8a75e20c82b7c114ec5">

The question is... is that number hardcoded or is it coming from global.php $sid

SystemLogic 07-01-2001 01:37 AM

Wierd, when I see the page, I don't see any sessionhash in there....

I think when you are the site for the first time, it may work...but that's it....

Dioxin 07-04-2001 03:21 PM

perhaps you include global.php and use $sessionhash not $session[sessionhash]

i looked thru the code, but didn't test it. perhaps it work...

i have the same prob with users surfing with cookie an sessions deactivated...

check out my site http://www.aktienboard.com, the poll on the right side ...


greets, dioxin


All times are GMT. The time now is 02:46 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01511 seconds
  • Memory Usage 1,747KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (17)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete