Actually its going to be a two in mod hack,
1, it displays one random poll on home page
2, its going to create another poll page when you click on a title it will get you to the poll page with more detailed INFO a demo can be seen at
http://genusblog.com/dzoic/
Check the random polls section
ok lets start,
!1 . open modules/polls.php copy the following code and add after }//my_polls (after that okay)
//start grabing the code from here
//September 11 2007,
//Author genuskbl
//Grabbed from genusblog.com
function random_polls(){
$sql_query = “SELECT * FROM polls WHERE pol_id > 100000 AND approved=’1′
ORDER BY RAND()
LIMIT 0,1″;
$polls = array();
$result = $GLOBALS[”DB”]->result($sql_query);
foreach($result as $res){
$card = array();
$card[”pol_id”] = $res[”pol_id”];
$card[”mem_id”] = $res[”mem_id”];
$card[”author”] = $GLOBALS[”Network”]->card($res[”mem_id”]);
$card[”question”] = $res[”question”];
$card[”answers”] = polls_extract_answers($res[”answers”]);
$card[”stats”] = poll_stats($res[”pol_id”],array_keys($card[”answers”]));
$card[”approved”] = $res[”approved”];
$polls[] = $card;
}//foreach
$GLOBALS[”smarty”]->assign(”random_polls”,$polls);
}//Random Polls by genuskbl
//end of random polls by genuskbl
Save polls.php and upload it back to modules/
!2. Now that you have added the function lets add the html section to home page open your homepage.tpl file of course you know where its located, unless its your first time
themes/{youtheme}/templates/source/pages/homepage.tpl
add the following block code after the login form, here it says
{include file=”divider.tpl” type=”h”}
now add this following code there, exactly below above code under login
{include file="lists/genus_polls.tpl" from=$random_polls}
now save homepage.tpl and upload it back,
!3. Now create a tpl file name it ( genus_polls.tpl ) copy the below code
{assign var=’a’ value=1}
{if count($from)}
<table cellpadding=”0″ cellspacing=”0″ border=”0″ width=”100%”>
<form action=”index.php” method=”post”>
<input type=”hidden” name=”handler” value=”polls”>
<input type=”hidden” name=”action” value=”vote”>
<input type=”hidden” name=”pol_id” value=”{$item.pol_id}”>
<tr>
{foreach from=$from item=item key=key name=”polls”}
<td valign=”top” width=”33%”>
<table width=”100%” border=”0″ cellspacing=”0″ cellpadding=”0″>
<tr>
<td width=”60″ align=”left” valign=”top”>{include file=”boxes/member.tpl” card=$item.author}</td>
<td valign=”top”><a href=”index.php?page=view_poll&id={$item.pol_id}”><b>{$item.question}</b></a></td>
</tr>
</table>
{if !$item.stats.vote && $item.approved}
<div class=”padded” style=”padding-left:10px”>{foreach from=$item.answers item=name key=key}
<div><input type=”radio” name=”answer” value=”{$key}” class=”radio” onClick=”this.form.submit()”>{$name}</div>
{/foreach}</div>
<table width=”100%” border=”0″ cellspacing=”0″ cellpadding=”0″>
<tr>
<td align=”left” valign=”top”><div class=”padded” style=”padding-left:10px;”><span style=”font-weight:bolder”>{$language.total_votes}:</span> {$item.stats.total}</div>
{/if}
</div></td>
<td valign=”middle”><a href=”index.php?page=view_poll&id={$item.pol_id}”><b>View Results</b></a></td>
</tr>
</table>
</td>
{/foreach}
</tr>
</form>
</table>
{else}
<div class=”body” style=”text-align:center”>{$language.nothing_found}</div>
{/if}
and paste it there save it and upload it to
themes/{yourtheme}/templates/source/lists/
!4. Now the last step to display it on the home page, you need to authorize the function to the task file, go to
Administrator > Develop > Function Manager > Add new Function
Function title: Random Function
Function file modules/: polls.php
Function name : random_polls
Function pages please add the Welcome from left box to the right box and then update function now you must be able to see the random poll on the home page.
Now here is what i GOT by doing above, a random polls section in my homepage under

demo link http://genusblog.com/dzoic/ Demo is OFFLINE FOR NOW
WELL if you can see it on your home page or where ever you wanted to display it then its a success now you can continue reading to make the new page called view_poll where it will show the polls you can notice it on the above screen shot where it says View Results.
i like it easy as a b c
A, Open themes/{your theme}/titles.inc.php and add this code
$titles[”view_poll”] = “|site_name|::View Poll”;
at the very top under <?php
Then open Notepad or any other html editor copy below code
<structure>
<header>header.tpl</header>
<column width=”" id=”1″>
<cell id=”1″>
<block id=”View_Poll” open=”" close=”" assign=”" btype=”">
<template>pages/view_poll.tpl</template>
</block>
</cell>
</column>
<footer>footer.tpl</footer>
</structure>
and past it there save the page as view_poll.inc.php and upload it to
themes/{your theme} /layout/
now create a new page using notepad or any other html editor or whatever you are using, i hate some times to explain every little details, but don’t think i am rude i am having hard time right now on choosing my words anyways lets get back, copy the below code
<div class=”padded”>
<div>
{include file=”boxes/simple.tpl” secheader=$language.browse_polls class=”blue”}
{include file=”lists/polls.tpl” from=$viewpoll class=”blue”}
{include file=”boxes/simple_close.tpl”}
</div>
</div>
Paste it on the blank page then save it as view_poll.tpl upload it to
themes/{your theme} /templates/source/pages/
B. Now download this file the name is http://genuskbl.com/thumbs/view_poll.txt
view_poll.txt
save as this page and rename it to
view_poll.php
then upload it to
modules/
C. i told you its going to be easy as a b c, now , now now, okay go to
Administrator > Develop > Functions > Add New Function
Function Title : View Poll
Function file : view_poll.php
Function name: view_poll
for function pages from left box add View Poll to the right box,
remember to add the view poll page to the mainbar and top to display the menus on the page,
Customize > menus > mainbar > add the view poll to the right box UPDATE
Customize > menus > top > add the view poll to the right box UPDATE
Customize > menus > submenu11 > add the view poll to the right box UPDATE
<div class=”padded”>
<div>
{include file=”boxes/simple.tpl” secheader=$language.browse_polls class=”blue”}
{include file=”lists/polls.tpl” from=$viewpoll class=”blue”}
{include file=”boxes/simple_close.tpl”}
</div>
</div>
save it as view.poll.tpl
upload it to
themes/{your theme}/templates/source/pages/
YOU ARE DONE,
if you faced any problem leave a comment here don’t expect instant response but yes, i will check it once 24 hours, also do not mind my English grammar,spelling Errors i am here to take care of this stupid coding not my spellings i still remember teacher was yelling at me for my wrong spelling and grammar,
Now, last step,
open notepade copy the code below and paste it there,
Donations are always welcomed, Extra modification to this Hack may cost you extra, unless you have a suggestion reply a comment and i will see what i can do,