PDA

View Full Version : Poll results on seperate page


bkbelew
03-04-2006, 02:07 AM
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


$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?