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)
-   -   Polls Elsewhere (https://vborg.vbsupport.ru/showthread.php?t=13841)

tubedogg 04-11-2001 10:00 PM

v0.2.0 Released! Last Updated: 06/01/01

NOTE: DO NOT put this in your forums directory or it WILL overwrite your poll.php file! You must either a) put this in a separate directory or b) rename this to poll1.php or something similar (the script will still function correctly if you do this).

This hack is a request by Me2Be, to show the titles of the poll threads on another page. It uses the header and footer from your vB, and is for use as a stand-alone page. In a future release of the hack, I will look into displaying results of the polls also. For right now, though, it just displays the thread title, linked to that thread, and the forum that the thread is in (they are grouped by forum). You can set the forums to look for polls in, as well as how many polls you want to show on the main screen. There is a separate screen that will show all of the poll threads from any given forum, and a link to this screen is generated any time there are more threads than you want displayed. You can also customize it so you can use it as a separate page, or remove the HTML to use it as an include on another page (it is clearly labeled where to insert HTML).

For version: 2.0.0

Files needed: poll.php, pollconfig.php

Files to edit: pollconfig.php

Instructions
1] Download the zip file, and unzip it somewhere on your hard drive. Open pollconfig.php in an ASCII text editor, such as TextPad, UltraEdit, EditPlus, Notepad, Wordpad, or a similar program. DO NOT use a program such as HotDog, HoTMeTaL, FrontPage, or another WYSIWYG editor. I cannot support you if you open your file in one of these programs.
2] You need to edit the following variables:
  • $path - the path to your config.php, relative to where you are putting pollconfig.php. So, if your config.php file is in /home/me/html/forums/admin and you are putting this file in /home/me/html/ then the path is forums/admin - no trailing slash, and no "config.php".
  • $url - the URL to your forums. For example, http://www.mysite.com/forums - no trailing slash, no whateverfile.php.
  • $images - the URL to your forum images. For example, http://www.mysite.com/forums/images - no trailing slash, no whatever.gif.
  • $forums - the forum numbers to use, separated by a comma. You can find out the number of a forum by going to your forums' index.php and running your mouse over the link to the forum(s) you want to include. Make a note of "xx" in forumid=xx where xx is a number (this will appear in the status bar of your browser).
  • $maxresults - the maximum results to show on the main page for each forum. If you set this to 3, for example, and there are 5 polls in a given forum, the script will generate a "more polls for this forum" link, which will link to a page with all the polls for that forum listed.
  • $id - the ID of the replacement set you want to use. If you have a custom set, put that ID here. If you leave this blank it will use the style named "Default" that comes with vB.
3] Save this file.
4] Upload poll.php and pollconfig.php to your server. DO NOT UPLOAD the files to your vB directory! Doing so will overwrite the vB poll.php which will mean no one will be able to post new polls! Go to poll.php in a browser to make sure it is working correctly. Then you can link to it from another page, or from your forums.

Please do not contact me via ICQ, AIM, or PM about this hack. Post your question/problem here and I will see it and try to help you.

Enjoy!

Me2Be 04-12-2001 04:30 PM

Thank you! Thank you!!

Actually, I didn't want the poll results on the page, so this is great. I'm off to try it now!

BTW, the demo link goes to a 404 page :)

tubedogg 04-12-2001 04:33 PM

Whoops! You're right. Gotta fix that. edit: fixed :D

You're welcome. ;)

Me2Be 04-12-2001 04:41 PM

Well, I replaced the poll.php and the pollconfig.php and uploaded it. When I go to test the poll.php file and put in my subject, message, check poll and enter how many options, it goes the the redirect screen and then back to the forumdisplay again.

It never went to ask me for poll options, and it also put my thread in the moderator queue (which is normal if someone creates a post, clicks poll and doesn't provide any options)

Me2Be 04-12-2001 04:43 PM

Quote:

Originally posted by tubedogg
Whoops! You're right. Gotta fix that. edit: fixed :D
Close, just change it to poll.php instead of polls.php

But it looks great!!!

Is there a way to add the forum header/footer/styles?

(Aren't I full of questions?) :D

Streicher 04-12-2001 04:45 PM

The Demo has still a 404 Error.

tubedogg 04-12-2001 04:46 PM

Wait no no no! :D I'm sorry, don't replace poll.php - this is totally separate from that. I should have made that more clear. This is for elsewhere on one's site. Sorry...you need to reupload poll.php from beta 5 to your forums directory, and put poll.php from my hack in a separate directory, or rename it to poll1.php or something like that.

Streicher: Yes you're right. It is now really fixed. ;)

tubedogg 04-12-2001 04:50 PM

Hmm...give me a little bit and I'll try to work in the header/footer styles.

jojo85 04-12-2001 04:54 PM

Nice one thx :)

Me2Be 04-12-2001 05:04 PM

Quote:

Originally posted by tubedogg
Wait no no no! :D I'm sorry, don't replace poll.php - this is totally separate from that. I should have made that more clear.
Oops! Thank GOODNESS I saved the other copy

(I backup everything when I make changes!)

I'm still on beta 2 (until next week when 6 comes out), I wonder if it will still work.

*off to try it*

Freddie Bingham 04-12-2001 05:10 PM

Quote:

I'm still on beta 2 (until next week when 6 comes out), I wonder if it will still work.
Hopefully there will not be a beta 6.

RobAC 04-12-2001 06:13 PM

Quote:

Originally posted by freddie
Hopefully there will not be a beta 6.
Does this mean, we're shooting for full "production" by next week?????? :D :D :D

jojo85 04-12-2001 06:16 PM

Quote:

Originally posted by freddie
Hopefully there will not be a beta 6.
me too erf,want a stable release :rolleyes:

tubedogg 04-12-2001 06:20 PM

Quote:

Originally posted by RobAC
Does this mean, we're shooting for full "production" by next week?????? :D :D :D
I doubt it. ;) We got to get through a Release Candidate first, at least according to what's been said elsewhere around here. :)

Me2Be 04-13-2001 02:16 PM

Quote:

Originally posted by tubedogg
Hmm...give me a little bit and I'll try to work in the header/footer styles.
Thanks Kevin!!!

I can't wait to go live with this :)

tubedogg 04-13-2001 08:52 PM

After much hair-pulling and screaming at the monitor, I have completed the changes mentioned by Me2Be (adding the board's header and footer). You can take a look at the demo to see how it works.

Enjoy!

RobAC 04-13-2001 10:32 PM

Where's the demo?? :D

n3n 04-13-2001 11:36 PM

Quote:

Originally posted by RobAC
Where's the demo?? :D

Demo: http://www.tubescan.com/poll.php
at the very firt page!!

Me2Be 04-14-2001 05:51 PM

Oh I am SOOOO happy! :D

**off to try it!!! **

THANK YOU KEVIN!!!!!

tubedogg 04-14-2001 06:03 PM

You're welcome, Me2Be. ;)

Rob: Sorry I should have pointed that out. :D

One more thing I should point out: This will work with any beta from 2 through 5 (and probably 1, also). I said beta 5, but then I realized I was testing it with beta 2, not beta 5 (long story...) and so it does work with beta 2, and therefore should work with 1, and will work with 3 and 4.

eva2000 04-14-2001 06:18 PM

wow nice... might need to upgrade to beta 5 for this :)

tubedogg 04-14-2001 06:42 PM

It works with betas 2-4 also, George. ;)

DeMoN 04-14-2001 06:45 PM

ne chance of a hack that puts a poll on ya main page like emm... the optims like a radio button. you know like the ones on sites well ne way. is it possible.

Me2Be 04-14-2001 06:59 PM

I made a few "asthetic" modifications, but it works great!!! I'll send you the URL so you can check it out.

Also, I renamed your poll.php file to polllist.php so I could put it in the main directory and it works great!!!

If you ever decide to "enhance" upon this, can I throw out a couple more suggestions? (I'm saying "enhance" because it works great now!)

1] Ability to put the info HTML into a template so we can add some commentary (like "My Poll List") and a <title>Title</title>

2] Ability to use color styles of the style choice

Kevin, you did an awesome job and I can't thank you enough!!!! I love it!!

eva2000 04-14-2001 07:04 PM

Quote:

Originally posted by tubedogg
It works with betas 2-4 also, George. ;)
great but i might wait until i upgrade to beta 5...

don't know why , but i feel like waiting for beta 6 or something...

julius 04-23-2001 11:05 PM

Perfect, it is just I was looking for! :)
Thanks tubedogg.
In poll.php it seems there is not the close </ul> at the end of line 97.

It would be very nice to show the date the poll started, so people can know if they have already visited that poll or not. :)

h4p3 05-10-2001 10:31 AM

Does this hack work with RC2?

julius 05-10-2001 10:41 AM

yes

h4p3 05-10-2001 10:56 AM

Muchas gracias :)

Mitrofan 05-18-2001 12:03 PM

It seems that phpinclude stuff is not processed in header and footer when this hack is displayed.

I have $thefooter defined in phpinclude and with this hack is just displas $thefooter where the footer is supposed to be

Also Powered by: vBulletin $templateversion
is shown just like that, so the $templateversion variable is also not processed.

There must be a simple fix , please look into that.

Kevin, please respond to this post.

Streicher 05-18-2001 08:49 PM

Is it possible to make a hack, which displays the results of a vote with the colored bars on a non vB page?

Mitrofan 05-21-2001 06:08 PM

^^^^^^^

tubedogg, please respond to my previous post of phpinclude not working with this hack.

I really want to use this hack, but can't without phpinclude stuff working.

Peteruk 05-24-2001 09:06 AM

Quote:

Originally posted by Streicher
Is it possible to make a hack, which displays the results of a vote with the colored bars on a non vB page?
Thats what Ive been after for a while if you or anyone get their hands on anything like it be sure to gives us a bell and let me know, and i'll do likewise.

fruitsalad 05-25-2001 05:43 PM

I'm having a problem with this script now that eventhough I se the maxresults to 5 or what have you in the config, the script is still pulling every single poll out.

tubedogg 06-01-2001 08:17 PM

v0.2.0 has been released, and is updated to ensure it works with vBulletin 2.0.0. It also now includes the phpinclude template.

julius 06-01-2001 09:48 PM

Parse error: parse error in /usr/local/plesk/apache/vhosts/myhost.com/httpdocs/forum/pollist.php on line 105
:(

Joshs 06-03-2001 12:04 AM

I am getting the same exact error...

tubedogg 06-03-2001 12:21 AM

I have updated the first post in this thread with v0.2.1 which fixes the parse error and this time actually utilizes the phpinclude template as opposed to just echoing it to the page. :rolleyes:

Joshs 06-03-2001 12:27 AM

Now I am getting blank pages

tubedogg 06-03-2001 12:33 AM

Try deleting poll.php and pollconfig.php off your server and reuploading them.


All times are GMT. The time now is 03:51 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.01293 seconds
  • Memory Usage 1,818KB
  • 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
  • (10)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
  • (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