vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   New poll feature: Multiple choice poll! (https://vborg.vbsupport.ru/showthread.php?t=30921)

cyrus 10-23-2001 11:39 AM

how do I do that ?? :(

sorry, im totally confused here

GenSec 10-23-2001 11:54 AM

You need look for phpportal file which has string
Code:

eval("\$P_pollbits .= \"".gettemplate("P_polloption")."\";");

cyrus 10-23-2001 12:12 PM

looked in P_polloptions, nothing of that nature in there !

GenSec 10-23-2001 12:23 PM

Forget P_polloption.
Just create new template with name P_polloption_mult:
Code:

<tr>
  <td bgcolor="{secondaltcolor}" width="5%"><input type="checkbox" name="allvotes[$P_option[number]]" value="yes"></td>
  <td bgcolor="{secondaltcolor}" colspan="3"><smallfont>$P_option[question]</smallfont></td>
</tr>

Then take on your local comp dir with your files.php for portal and look for one that has line
Code:

eval("\$P_pollbits .= \"".gettemplate("P_polloption")."\";");
.
It's not in templates.

cyrus 10-23-2001 01:17 PM

ah ok, so templates is out of the story, although I have added the one u said !

But as for the php file, I have searched ALL of the files in vbportal dir and NONE of them have that command in it anywhere. Am I mistaken ?? if so, where would it be ? I see Gen you have done multiple polls on your vbportal, which file did YOU change ?

thanks guys

GenSec 10-23-2001 01:22 PM

vbpstuff.php

cyrus 10-23-2001 01:29 PM

lol

back to square one :-

I dont HAVE any file caleld vbpstuff.php anywhere on my server let alone on the vbportal directory :)

thats the problem

what version of vbportal are you using ? coul THAT be it ?

GenSec 10-23-2001 01:49 PM

Let say It based on v2.01
In any case you have file which includes the same line as above
Just search

GenSec 10-23-2001 01:50 PM

First of all look for the file included in phpinclude template

cyrus 10-23-2001 02:54 PM

ok, I think the file I need to edit is

vbp_includes.php as it refers to that in the phpinclude template

Although I STILL dont see the eval.... command in there !

GenSec 10-23-2001 02:59 PM

Look inside this file
any other include(vbp... .php)
or it can be just in index.php or vbphome.php

cyrus 10-23-2001 03:06 PM

there many other includes, but nothing with vbp starting the the brackets

shall I send u all the root of vbportal files ?? lol

GenSec 10-23-2001 03:14 PM

Ok. Do it

GenSec 10-23-2001 03:19 PM

By the end you can change the P_polloptions template and have the permanent multi poll form on the main page. It works in all cases.

cyrus 10-23-2001 04:30 PM

ok, im lost again

this is hopeless :(

GenSec 10-24-2001 05:30 AM

Quote:

Originally posted by Cyrus
ok, im lost again

this is hopeless :(

Ok, Cyrus. Just install FireFly hack, then open P_polloption and replace
Code:

<tr>
  <td bgcolor="{secondaltcolor}" width="5%"><input type="radio" name="optionnumber" value="$P_option[number]"></td>
  <td bgcolor="{secondaltcolor}" colspan="3"><smallfont>$P_option[question]</smallfont></td>
</tr>

with that
Code:

<tr>
  <td bgcolor="{secondaltcolor}" width="5%"><input type="checkbox" name="allvotes[$P_option[number]]" value="yes"></td>
  <td bgcolor="{secondaltcolor}" colspan="3"><smallfont>$P_option[question]</smallfont></td>
</tr>

Try it.

cyrus 10-26-2001 06:28 PM

this is what i gt in P_polloption

<form action="$bburl/poll.php" method="get">
<input type="hidden" name="s" value="$session[dbsessionhash]">
<input type="hidden" name="action" value="pollvote">
<input type="hidden" name="pollid" value="$P_pollinfo[pollid]">
<table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextra} width="{contenttablewidth}" align="center"><tr><td>
<table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%">
<tr>
<td bgcolor="{tableheadbgcolor}" align="center" colspan="4"><smallfont color="{tableheadtextcolor}"><b>$P_pollinfo[question]</b></smallfont></td>
</tr>
$P_pollbits
</table>
</td></tr></table>
<table cellpadding="2" cellspacing="0" border="0" width="100%" {tableinvisibleextra} align="center">
<tr>
<td style="font-size: 8pt"><smallfont><input type="submit" class="bginput" value="Vote!" style="font-size: 8pt">
<a href="$bburl/poll.php?s=$session[sessionhash]&action=showresults&pollid=$P_pollinfo[pollid]">View Results</a>
</smallfont></td></tr>
</table>
</form>


not anything you mentioned to change

thanks

GenSec 10-26-2001 06:42 PM

You should have in php files the line

Code:

eval("\$P_pollbits .= \"".gettemplate("template_name ")."\";");
It gives you name of template to change.

Freddie Bingham 10-26-2001 06:57 PM

This will be part of the next version due out in a few days so I suggest waiting until then.

mister 11-02-2001 07:51 PM

Does having this hack installed cause problems when upgrading to 2.2.0 ?

Should I uninstall this hack, and then upgrade?
Or will I be fine?

Just wondering before I upgrade tonight...

Thanks

Admin 11-02-2001 07:56 PM

freddie (I think it was him?) added a check to the last upgrade script that checks if you have a field named multiple, and if you do, it skips that part of the upgrade.
I upgraded a test board using this hack to v2.2.0 with no problems. :)

wajones 11-03-2001 04:41 AM

Quote:

Originally posted by cyrus
ok, im lost again

this is hopeless :(

The frontpage multi-choice poll is installed in the latest vbPortal beta pr7.1 for vBulletin 2.2 please inquire on phpPortals.

JTMON 11-07-2001 02:04 AM

The installer link up top need to be changed to this url to work.

Trillian 11-07-2001 02:26 AM

I haven't installed this hack yet, but I definitely will!

But I have a question: Can I limit the number of selections a user can make? Such as, there are 10 choices, but I only want the user to choose three: can I set a limit?

And thanks for your hard work :)

JTMON 11-07-2001 02:28 AM

Well I found out the hard way (via a MySQL error) that 2.2.0 has Multiple Choice Built in!!! I did not see a way to limit the amount of times they could vote. I voted for 3 outta 4 on my test.


All times are GMT. The time now is 06:43 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.01143 seconds
  • Memory Usage 1,766KB
  • 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
  • (6)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (25)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete