vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vBSurvey v1.0 (https://vborg.vbsupport.ru/showthread.php?t=71834)

akiy 11-26-2004 12:47 AM

Quote:

Originally Posted by alkatraz
awesome! thx for the support

one problem in your fix tho
missing a } to close the if condition. added one after \n"; and it works great

Oops -- indeed! I've edited the above post. Thanks for the sharp eye.

mcyates 11-26-2004 04:02 PM

It would look better if the results where also in graph format like the polls in the messages.

Kagen 11-30-2004 02:14 PM

make a quiz hack :D that'll increase some popularity there ZT u always had useful hacks :D

Imperial Fritz 11-30-2004 10:33 PM

Great hack, installed, however:

My board is not english therefore I found the hack not easy for multilingual boards, i.e. I have to go into each file and translate the phrases, or better, replace the plain text with vbphrases, which should be done by the installer.

I'd like to see coloured bars showing the number of votes :)


edit: since I'm reworking all files to convert plain text into vbphrases, I can post them when I finish (but you'll have to do the phrase population yourselves).

Edric 12-06-2004 02:17 PM

Does this hack work with VB 3.0.1? I'd like to implement it.

Edric 12-06-2004 03:32 PM

Ignore my previous questions, it works well on 3.0.1 as well.

Edric 12-06-2004 03:39 PM

Quote:

Originally Posted by akiy
It looks like you're going to have to modify the code as the table rows/cells that make up the "Who voted" row isn't template-ized.

Any way, here's one way to do this if you only want Administrators (usergroupid = 6) to see the stats:

Replace:
Code:

                $Options .= "<tr>               
                  <td width='80%' class='alt2'>{$opt['q']}</td>               
                  <td width='20%' class='alt1' align='center'>This has had {$opt['votes']} vote(s)</td>
                  </tr>                       
                  <tr>                       
                  <td width='100%' class='alt1' colspan='2'><b>Who Voted:</b> {$thisVoted}</td>
                  </tr>                       
                    \n";

with:
Code:

                $Options .= "<tr>               
                  <td width='80%' class='alt2'>{$opt['q']}</td>               
                  <td width='20%' class='alt1' align='center'>This has had {$opt['votes']} vote(s)</td>
                    </tr>";
                    if ($bbuserinfo[usergroupid] == 6) {
                    $Options .="<tr>                   
                  <td width='100%' class='alt1' colspan='2'><b>Who Voted:</b> {$thisVoted}</td>
                  </tr>                       
                    \n";
                  }

You can modify the "if" confitional to include more usergroupids (eg "if ($bbuserinfo[usergroupid] == 6 || $bbuserinfo[usergroupid] == 7)") if you want other usergroups to see the stats...

Hope that helps!


Where do you add/replace such code?

spence2 12-06-2004 03:59 PM

With three of your hacks installed, ZT, my board's beginning to look like a tribute to your great coding!

Thank you so much for sharing your work.

You're aces.

akiy 12-06-2004 05:30 PM

Quote:

Originally Posted by Edric
Where do you add/replace such code?

In vBSurvey.php.

Edric 12-07-2004 11:09 AM

Ok, worked fine akiy, survey anonymous.

However it seemed that not everyone of my members can access the survey page, many get a blank page, for me and other members it works fine however, perfectly I would say. Any known related problem to this one?


All times are GMT. The time now is 11:56 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.01229 seconds
  • Memory Usage 1,739KB
  • 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
  • (2)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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