vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - Poll Survey (https://vborg.vbsupport.ru/showthread.php?t=135223)

Renee 12-31-2006 10:00 PM

Poll Survey
 
Info

Display all polls in a list from your forum.
http://yourforum.ltd/misc.php?do=survey

Polls are displayed by forumpermission. If a user hasn't the permission to see a forum where a poll is in, the poll will not display.


Installation (info.txt)

(The pagenav is limited to 25 polls on a site.
If you want change the limit, open the xml file and search for:
Code:

sanitize_pageresults($scount['scount'], $pagenumber, $perpage, 100, 25);
Change the '25' to your whished limit.)

1. Login to your admin control panel
2. Go to "Plugins & Products" -> "Manage products"
3. Click on "Add/Import product"
4. Browse for "Poll_Survey.xml" (included in the zip file), and click "Import"
5. Optional: Make a link to the poll survey where always you want.

I used the navbar dropdown menu "useful links".
If you want too, then did this:

Search in template "navbar" for:

Code:

<tr><td class="thead">$vbphrase[miscellaneous]</td></tr>
Add below:

Code:

<!-- Poll Survey begin -->
        <tr><td class="vbmenu_option"><a href="misc.php?$session[sessionurl]do=survey">$vbphrase[survey_all_polls]</a></td></tr>
<!-- Poll Survey end -->

That was all :)

*Added forget table_prefix
*Added variable for hand closed polls

Shazz 01-01-2007 03:33 AM

Nice that it shows all the polls on the site :)
Very useful

projectego 01-01-2007 08:10 AM

Looks very handy but your site appears to be down at the moment.

MaestroX 01-01-2007 09:52 AM

Nice, thanks for sharing

asj 01-01-2007 10:22 AM

thanks

SkyCatcher 01-01-2007 11:34 AM

Quote:

Originally Posted by projectego (Post 1148415)
Looks very handy but your site appears to be down at the moment.

um...

I don't think he owns http://yourforum.ltd :laugh: :laugh: :laugh:

basilrath 01-01-2007 02:19 PM

loooooooooooooooooooooooooooooooooooooooooool

Shazz 01-01-2007 03:56 PM

Quote:

Originally Posted by projectego (Post 1148415)
Looks very handy but your site appears to be down at the moment.

His site isen't "yourforum" its a example ;)

da420 01-01-2007 03:59 PM

Very nice. Thank you.

DannyMilner 01-01-2007 04:13 PM

Looks great, nicely done!

taxick 01-01-2007 05:05 PM

I get this SQL error.

Quote:

Database error in vBulletin 3.6.4:

Invalid SQL:

SELECT COUNT(p.pollid) AS scount
FROM forum_poll AS p
INNER JOIN thread AS t ON (p.pollid = t.pollid)
WHERE t.forumid IN(3, 11, 14, 154, 15, 119, 4, 157, 158, 159, 16, 17, 116, 118, 153, 105, 5, 138, 19, 18, 25, 22, 21, 9, 34, 52, 91, 93, 92, 122, 132, 126, 140, 139, 141, 146, 142, 155, 147, 145, 144, 100, 102, 104, 101, 113, 136, 137, 156, 160, 134, 120, 6, 48, 50, 49, 75, 76, 65, 89, 135, 90, 121, 44, 45, 36, 95, 39, 96, 111)
AND t.visible IN (1);

MySQL Error : Table 'forum.thread' doesn't exist
Error Number : 1146
Date : Monday, January 1st 2007 @ 08:03:58 PM
Script : http://www.*************/misc.php?do=survey
Referrer :
IP Address : *****************
Username : Taxick
Classname : vB_Database

Renee 01-01-2007 06:50 PM

Quote:

Originally Posted by taxick (Post 1148596)
I get this SQL error.

Oh, thank you, I forget two table_prefixes. They're now in :)

taxick 01-01-2007 08:11 PM

Hey :)

I still get the same sql error :( Hope you can fix it :)

FleaBag 01-01-2007 09:31 PM

Great hack thank you!

taxick 01-02-2007 12:30 AM

Now it works..

installed

thank you!

ubblite 01-03-2007 07:38 AM

Does this mod auto-update? For some reason I'm showing polls that have been closed saying "active".

Renee 01-03-2007 10:16 AM

Umpf sorry, I have forget that polls could close by hand :confused:

I will update it later, have to work now :)

ResaleBroker 02-11-2007 03:29 PM

I get this error when trying to view the list as an "Unregistered Guest" without viewing permission:

Quote:

Database error in vBulletin 3.6.4:

Invalid SQL:

SELECT COUNT(p.pollid) AS scount
FROM poll AS p
INNER JOIN thread AS t ON (p.pollid = t.pollid)
WHERE t.forumid IN()
AND t.visible IN (1);

MySQL Error : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')
AND t.visible IN (1)' at line 4
Error Number : 1064

WhyDoesItMatter 04-10-2007 05:52 PM

Quote:

Originally Posted by ResaleBroker (Post 1179956)
I get this error when trying to view the list as an "Unregistered Guest" without viewing permission:


Ditto, I came here to check it out. Glad I'm not the only one getting this error.

skorzguy 04-12-2007 05:45 PM

Here is what I did since I needed to make a link so anyone can see what polls are available.

Instead of adding this:

<!-- Poll Survey begin -->
<tr><td class="vbmenu_option"><a href="misc.php?$session[sessionurl]do=survey">$vbphrase[survey_all_polls]</a></td></tr>
<!-- Poll Survey end -->

I made a link and pointed to this url:

http://www.allstarchat.com/forum/misc.php?do=survey

** You just need to put your website in the url instead of mine.

** You can still see the page as a guest

YLP1 04-15-2007 05:06 PM

Does this mod find all polls within the entire forum or just designated forum ids? I ask because I have a forum specifically for polls but sometimes people post a poll in other forum categories.

I installed the mod -- awesome! It pulls polls from all forums! Thank you.

CHIPIT195 04-22-2007 06:34 PM

I'm getting the following error:
-------------------------------------
Database error in vBulletin 3.6.5:

Invalid SQL:

SELECT COUNT(p.pollid) AS scount
FROM vb_poll AS p
INNER JOIN vb_thread AS t ON (p.pollid = t.pollid)
WHERE t.forumid IN()
AND t.visible IN (1);

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')
AND t.visible IN (1)' at line 4
Error Number : 1064
Date : Sunday, April 22nd 2007 @ 01:29:26 PM
Script : http://"mysite.com"/misc.php?do=survey&order=desc&sort=dateline
Referrer :
IP Address : "12.345.67.890"
Username : Unregistered
Classname : vB_Database_MySQLi

---------------------------------------------

:confused:

???

Zaguzin 07-01-2007 11:00 AM

I have a problem :confused:

http://img165.imageshack.us/img165/4770/43097917lc5.jpg

As you see, I have two polls with the same ID! :eek:
But the main problem is that - one of this polls doen't exist!
What's the matter?

Free-D 09-19-2007 11:29 PM

I have the same problem as Zaguzin :(
Every 3d, 13th, 23d, etc. polls are duplicated on surveys page :confused:

mkdevo 09-28-2007 03:50 PM

this looks great. would you be able to add a feature to show the (current) poll results on the main poll page?


All times are GMT. The time now is 05:04 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.01232 seconds
  • Memory Usage 1,764KB
  • 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
  • (3)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete