vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Poll results on seperate page (https://vborg.vbsupport.ru/showthread.php?t=109406)

bkbelew 03-04-2006 02:07 AM

Poll results on seperate page
 
I'm looking for a way to display poll results on a seperate page. Not only the results, but also the bar graphs like thats shown when you view the normal results. I found an older mod, but it no longer worked with the newest version. Does anyone have any ideas where I could obtain one? Or can someone create one :nervous:

Thanks

bkbelew 03-06-2006 10:57 PM

bump, anyone? ever seen this?

bkbelew 03-15-2006 08:25 PM

I'm assuming this is too difficult?

bkbelew 03-18-2006 01:22 AM

I did it, for the graphing I used:

html-graphs (v3.4)

and

Code:

        $poll = mysql_query("SELECT pollid,question,options,votes FROM poll ");
        while ($pollinfo = mysql_fetch_array($poll)) {


            $splitoptions = explode('|||', $pollinfo['options']);
            $splitvotes = explode('|||', $pollinfo['votes']);
            $pollquestion = $pollinfo['question'];
            $id = $pollinfo['pollid'];
                                                                }


            require('graphs.inc.php');
            $graph = new BAR_GRAPH("hBar"); 
            $graph->values = $splitvotes;
            $graph->labels = $splitoptions;
            $graph->graphBGColor = "white";
            $graph->labelSize = 12;
            $graph->labelFont = "Arial";

            $graph->graphPadding = 0;
            $graph->barColor = "#C0D0C0,#80D080";
            $graph->barBGColor = "#ffffff";
            $graph->labelColor = "#000000";
            $graph->legendColor = "#00A000";
            $graph->legendBGColor = "#D0F0D0";

           
            echo $graph->create();

Result
http://www.local44.com/test/poll-sample.jpg

Shelby 05-29-2006 01:46 AM

Not sure I understand are you able to use this on a non vb seperate page?


All times are GMT. The time now is 06:00 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.01093 seconds
  • Memory Usage 1,719KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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