vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   [Release] Poll Hack v0.9 (https://vborg.vbsupport.ru/showthread.php?t=1819)

07-16-2000 02:47 PM

Yep, here it is, the poll hack for vBulletin, tested on 1.1.2 and 1.1.3 Beta3.

The hack incorparates a poll as a thread starter, where users can vote and reply normally. You can view the test forum at http://www.naboonline.com/polltest/index.php

I hope the instructions are clear, any questions should go here.

Download the zip here!

Enjoy!



[Edited by doron on 07-16-2000 at 11:47 AM]

07-16-2000 07:46 PM

Hi Doron,
I think you?ve done a great job. Really, you rock!

Here are my comments:
I downloaded your zip-file and tried to install the poll (on a totally new and clean forum, ver 1.1.3), check it out under http://www.abflussfrei.com/forum
Ok, there are a few minor bugs in your scripts:

The file options.php has an error in line 595:
your script says:
<td ALIGN="LEFT"><B>Poll Hack Options</B></td>
the correct script is:
<td ALIGN=\"LEFT\"><B>Poll Hack Options</B></td>
otherwise anything won?t work.

Then the images: you included the poll.gif. The button "Post new Poll" instead of "Post New Thread" is missing, at least I think so ;)

The correct directory name of the icons-directory is
images/icons/ not images/icon/ as you write in your poll_notes.txt.

That?s all. Your documentation worked perfectly, and with a little bit of PHP-experience it was no problem to install the poll.
The only problem is: The poll doesn?t show!!
I don?t know why.
When I post a new poll and click on the "Preview"-Button, everything seems to be fine. When I click on the "Submit"-Button, the poll has gone.

Check it out for yourself under http://www.abflussfrei.com/forum
I changed the settings for normal & unregistered users to be able to post polls.

Waiting for your answer,
bye
Michael

07-16-2000 07:59 PM

did you add to the step 4?
Quote:

4. In the postbit template, look for

$posticon <smallfont><B>$postitle</b></smallfont>
<p><normalfont>$message</normalfont></p>

change it with:

$posticon <smallfont><B>$postitle</b></smallfont>
<p><normalfont>$message<BR><BR>$pollbit</normalfont></p>
image - there is none I am afraid, need Menno to do one...

new zip with the fix to that small bug in options.php

07-16-2000 08:05 PM

Hmmm, weird. I´m sure I changed the postbit-template.
I did it again and now it works. Perfect!

bye,
Michael

07-17-2000 03:40 AM

Dose voting on a poll send it to the top of the list? Or do you need to reply in the post to send the poll topic to the top?

07-17-2000 06:23 AM

Quote:

Originally posted by BikeForums
Dose voting on a poll send it to the top of the list? Or do you need to reply in the post to send the poll topic to the top?
you can toggle it in the control panel, but yes, that feature is in.

07-17-2000 09:46 AM

Just installed this on beta3. Works like a charm so far!

Thanks for the great hack.

07-17-2000 01:57 PM

How about if the user does not want to submit a poll, and just wants to submit a normal message?

I tried it and it said it needed a topic and at least 2 options.

--WildWayz

07-17-2000 02:03 PM

cool... all i need now is to upgrade to beta 3...

07-17-2000 02:25 PM

Quote:

Originally posted by WildWayz
How about if the user does not want to submit a poll, and just wants to submit a normal message?

I tried it and it said it needed a topic and at least 2 options.

--WildWayz

The Post New Post icon should not(!!) be replaced, but rather add after it the code with the Post New Poll image for your forum (you need to create it yourself)

07-17-2000 04:18 PM

I have one little snag - when I try to change my usergroups to "allow polls" and then submit, it still goes back to "no". It's like it won't let me change that field from "no" but will allow me to change any other field.

Any ideas?

07-17-2000 04:56 PM

wierd, it works on my 1.1.3b3 and my test 1.1.2 board. Can the usergroups post polls though?

07-17-2000 05:14 PM

I tried re-coding the usergroups file and I'm not sure what I did differently, but it seemed to work for the registered users, but not for the admin usergroup.

Suggestion: maybe for future versions, instead of using an entire "replace" field for the long strings, you can tell us what to "add" instead. Ed has us "replacing" for his PM hack, and then this tells us to "replace" to - but the two conflicted so I lost something.

Excellent feature though, I love it - now if I could just get the admin (me) to be able to create poll posts!

[Edited by Me2Be on 07-17-2000 at 02:16 PM]

07-17-2000 06:01 PM

you can edit manually the sql tables, look for your usergroup and set canpostpoll to 1.

but highly wierd

07-17-2000 06:07 PM

Same thing with super-mods - can't post polls.

Has anyone else got this working that is using the PM hack or is it just me?

[Edited by Me2Be on 07-17-2000 at 03:07 PM]

07-17-2000 06:12 PM

Hi,
look at http://www.abflussfrei.com/forum/ (it?s my playground..)
Everything?s ok there in Germany ;)
Did you run the makeprivtables.php from the pm-hack and the makepolltables.php from the poll-hack?

bye,
Michael

07-17-2000 06:17 PM

Hi Michael,

Sure did. The PMs are working fine, and with regard to the polls, only registered users are able to post polls even though now I have told admins, super mods and registered users should have priviledges to post polls.

(Where in Germany?)

07-17-2000 06:29 PM

did you set the "number of posts for polls" to 0? maybe that fixes it

07-17-2000 06:45 PM

I'm going to try a fresh install without the PM hack (gotta love having a test board) to see what happens. Be right back!

07-17-2000 06:54 PM

@Me2Be:
Bavaria, in a city near to munich..
cu,
mm

07-17-2000 07:16 PM

I did a brand new install without any hacks added, and it works perfectly now. I'm going to try and re-install the PM hack and see if I encounter any problems on there. Thanks Doron, I love this hack!

Michael, how far is that from Kaiserslautern? (My husband went to high school there)

07-17-2000 07:25 PM

wierd, i got it running with the pm hack.

07-17-2000 07:34 PM

@Me2Be:
well, it´s 373 km from where I live. I´ve never been there.

bye,
Michael

07-17-2000 08:54 PM

And what's even more strange is that I reinstalled the PM hack after I installed the polls and everything is working perfect now.

Maybe it was in a tempermental mood or something ;)

07-18-2000 12:53 PM

I have found that when someone who is not logged in comes along and votes in a poll it says Invalid Username - I think it should take them to the login screen thing. I'm having to delay the rollout of the polls on my forums because of this.

07-18-2000 03:02 PM

No matter I've added a login box to forumdisplay

07-18-2000 06:14 PM

hmm, it should ask them to log in, must be a error. thanks for catching it.

07-19-2000 11:20 AM

Can my anybody help?
I have Install the hack. In the "normal" forum, working the hack Perfect! But I have 3 foren with a own Template. In the, are no Poll. I have making the Step 4 but here is only a "Post New Thread". No poll.
Have I forgot a step or?????
Thank you!
Bye
Tho

07-19-2000 01:59 PM

you need to add $pollbit to where in the other templates oyu want the polls to show.

07-19-2000 10:06 PM

hi doron... the poll hack is looking great :D ... i want to install it now and was wondering if the zip file you have above is the latest ? what do i need to install it ?

07-20-2000 06:42 AM

the zip is the latest, there is a notes.txt which tells you what to do.

It's been isntalled on 1.1.2 and 1.1.3b3

07-20-2000 08:32 AM

YOU DA MAN!

07-20-2000 01:34 PM

I'm not sure whether this is related to this hack or not. Im running 1.1.3 beta 3 with the latest version of the PM hack installed. I have just added this poll hack and had followed the step by step instructions precisely to the stage where i had successfully posted a test poll, which worked perfectly. I could view the test poll and vote on it without a problem

at this point i decided to switch my VB back on. However, after submitting the options I ended up getting a parse error:

Quote:

Parse error: parse error, expecting `STRING' or `'{'' or `'$'' in global.php on line 57
which corresponds to
Code:

// ###################### Start dovars #######################
If I try to visit the forum I receive a slightly different parse error:
Quote:

Parse error: parse error, expecting `STRING' or `'{'' or `'$'' in global.php on line 52
corresponding to:
Code:

eval($optionstemp[template]);
I've got no idea why this has suddenly happened, especially as global.php isnt altered by the poll?

Does anyone know what I could do to fix this problem?

TIA

[Edited by Morgo on 07-20-2000 at 10:39 AM]

07-20-2000 07:56 PM

Hi Doron,

I added your poll and now everything is running smoothly. However, I do have a couple of remarks:

1) I do not use icons; therefore, I kept getting a mysql error. I solved this eventually by changing "iconid=$iconid"; in poll.php to "iconid=0;".

2) I would like to have a regular prefix to poll threads in their title, something like "[Poll]:" - any idea how I can do that?

3) I think that somewhere on the forumdisplay, next to the poll-thread title or even under "replies" it should have the total number of voters so far. Any idea how I can add that?

Thanks for a great hack!

Toda :)

Bira

07-20-2000 09:02 PM

Quote:

1) I do not use icons; therefore, I kept getting a mysql error. I solved this eventually by changing "iconid=$iconid"; in poll.php to "iconid=0;".
yeah, that's the best way

Quote:

2) I would like to have a regular prefix to poll threads in their title, something like "[Poll]:" - any idea how I can do that?
showthread.php, line 69
look for
Code:

$threadtitle=htmlspecialchars($threadinfo[title]);
change it to:
Code:

$threadtitle='Poll: ' . htmlspecialchars($threadinfo[title]);
That will add a Poll: infront of each poll.

Quote:

3) I think that somewhere on the forumdisplay, next to the poll-thread title or even under "replies" it should have the total number of voters so far. Any idea how I can add that?
that's planned for the next version ;)

07-20-2000 09:41 PM

Doron,

Changing that line 69 in showthread.php will put a "Poll:" prefix ahead of ALL threads, not just the poll ones, no???

07-20-2000 10:11 PM

Doron,

You have a small bug - in the template pollresults, the link back to the forum is forumshow.php?forumid=$forumid whereas it should be forumdisplay.php etc. :)

07-20-2000 10:18 PM

One more impeding wish, Doron:

Can you please add to the user permissions (as opposed to usergroup permissions) a "can post new polls - yes/no" option? This way, if someone abuses this option, I can simply bar him personally from posting polls.

Thanks,

Bira

07-20-2000 11:23 PM

Doron, in the vote options (the options you vote for) it adds a slash ahead of an apostrophe, like "It\'s" :(

07-21-2000 07:17 AM

hm... if you use addslashes() in the right way, there shouldn't be a problem.

Unless magic_quotes is activated in your php.ini file.


All times are GMT. The time now is 04:24 PM.

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.01545 seconds
  • Memory Usage 1,814KB
  • 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
  • (4)bbcode_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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