how to display binary poll in a block or in a page

shiv_sms's picture

hi

i am new to drupal, so pls pardon me for such silly qtn. i have pulled down advanced and added it to my drupak site. I have created 2 binary polls and now iam not able to figureout how to display it for users to participate and also be able to see the results. I want to show it either in a block or in a page. By default advanced poll only creates a "latest poll" kind of block. that also doesnt show any of the choices. it just shows the results that nobody has voted yet.

If some could help me out on this.

shiv

Comments

Here are the steps: Copy the

Vako's picture

Here are the steps:

  • Copy the Advanced Poll module files to the sites\all\modules folder
  • Enable the module in admin
  • Run update.php
  • Create the poll (I believe you are at this stage now)
  • Set the proper permissions
  • In the Blocks section you should see the block name: Latest poll (module: advpoll), just move it to the right location

Voila! now you should see the block.

Multiple Polls in the Block

FrancoisL's picture

Hello,

I'd like to know if this is possible in this Block to have Three Last Poll?

Thanks

François

After you vote, it will show

Vako's picture

After you vote, it will show a link to Older Polls.
With a quick tweak in advpoll.module, you can have Older polls to show-up even before voting.

Thanks Vako, do you have any

FrancoisL's picture

Thanks Vako,

do you have any idea on about writing this "Quick tweak".

Thanks again

François

Open the file ->

Vako's picture

Open the file -> \sites\all\modules\advpoll\advpoll.module
Do a search for "Older"
Change the line:

    if ($node->voted) {
      $output .= '<p>'. l(t('Older polls'), 'polls', array('class' => 'old-polls', 'title' => t('View the list of polls on this site.'))) .'</p>';
    }

to

   
      $output .= '<p>'. l(t('Older polls'), 'polls', array('class' => 'old-polls', 'title' => t('View the list of polls on this site.'))) .'</p>';

Note that all we're doing is removing the IF statement.

creating a poll

Marc Wenzel's picture

How do I create a poll

Advanced Poll

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week