PDA

View Full Version : polls


berlin28
10-19-2008, 10:54 AM
hi there,

i wantet to add some polls to my website wich after the vote to redirect to the same site and if possible to show the results in % or something like this.

oF course a second vote not to be possible.

thanks!

Corrosive
10-19-2008, 11:11 AM
hi there,

i wantet to add some polls to my website wich after the vote to redirect to the same site and if possible to show the results in % or something like this.

oF course a second vote not to be possible.

thanks!

Who is your web host and do you get 'Fantastico' with your hosting package? If so, there is a great little polls programme you get with it which is really easy to set up and use and works in exactly the way you have described. If not then try this...

http://www.js-kit.com/polls/

These kits work quite well and I have used them before with no bother. Hope this helps.

berlin28
10-19-2008, 11:32 AM
yes i have fantastico

is there polls? how do i do them?

Corrosive
10-19-2008, 12:03 PM
yes i have fantastico

is there polls? how do i do them?

Log in to your fantastico panel from your web host. It is something called 'advanced polls'. Have a look. You create and style your polls and then it gives you some code to paste into your site where you want the poll to appear. Just follow the instructions, it's easy enough.

berlin28
10-22-2008, 04:10 PM
i did the fantastiko poll and it gave me this code :

<?php
// Important! You have to include it before your html code
include_once "/home/stoiacom/public_html/poll/poll_cookie.php";
?>
<html>
<body>
<?php
include_once "/home/stoiacom/public_html/poll/booth.php";
echo $php_poll->poll_process(4);
?>
</body>
</html>


where schal i write it be dreamweaver thanks!

Corrosive
10-22-2008, 04:22 PM
i did the fantastiko poll and it gave me this code :

<?php
// Important! You have to include it before your html code
include_once "/home/stoiacom/public_html/poll/poll_cookie.php";
?>
<html>
<body>
<?php
include_once "/home/stoiacom/public_html/poll/booth.php";
echo $php_poll->poll_process(4);
?>
</body>
</html>

J


where schal i write it be dreamweaver thanks!

ust put it where you want your poll to go. I.e. in the correct div...

<div id="vote"><?php
include_once "/home/login/public_html/awardspoll/booth.php";
echo $php_poll->poll_process(7);?></div>

It should work. Don't forget to save your page with a .php file extension rather than .html

berlin28
10-22-2008, 04:23 PM
and actually:

display_head:
table width="$pollvars[table_width]" border="0" cellspacing="0" cellpadding="1" bgcolor="$pollvars[bgcolor_fr]">
<tr align="center">
<td>
<style type="text/css">
<!--
.input { font-family: $pollvars[font_face]; font-size: 8pt}
-->
</style>
<font face="$pollvars[font_face]" size="-1" color="#FFFFFF"><b>$pollvars[title]</b></font></td>
</tr>
<tr align="center">
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center" bgcolor="$pollvars[bgcolor_tab]">
<tr>
<td height="40" valign="middle"><font face="$pollvars[font_face]" color="$pollvars[font_color]" size="1"><b>$question</b></font></td>
</tr>
<tr align="right" valign="top">
<td>
<form method="post" action="$this->form_forward">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr valign="top" align="center">
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="1" align="center">





display_loop:
<tr>
<td width="15%"><input type="radio" name="option_id" value="$data[option_id]"></td>
<td width="85%"><font face="$pollvars[font_face]" size="1" color="$pollvars[font_color]">$data[option_text]</font></td>
</tr>



display_foot:
</table>
<input type="hidden" name="action" value="vote">
<input type="hidden" name="poll_ident" value="$poll_id">
<input type="submit" value="$pollvars[vote_button]" class="input">
<br>
<br>
<font face="$pollvars[font_face]" color="$pollvars[font_color]" size="1"><a href="$this->form_forward?action=results&amp;poll_ident=$poll_id">$pollvars[result_text]</a><br>
</font></td>
</tr>
</table>
</form>
<font face="$pollvars[font_face]" size="1"><a href="http://www.proxy2.de" target="_blank" title="Advanced Poll">Version $pollvars[poll_version]</a></font>
</td>
</tr>
</table>
</td>
</tr>
</table>