Nibble

New Package - Poll package for umbraco 4

I finally got round to polish and package the umbraco poll I made some time ago. So here it is …

image

The package installs the following:

image

 

The document types (Polls, Poll, Poll Answer) will be used to setup the polls.

image

So you’ll have a Polls document that will contain several Poll documents and these will have several Poll Answer documents beneath it.

After you have setup a poll with some answers in your content area you can get the poll on your page.

First add a reference to the installed stylesheet (/css/Nibble.Umb.Poll.css) and then place the Poll macro on your template.

Please note that:

  • The macro will have to be placed inside a form with runat=”server” attribute
  • There has to be a scriptmanager on the page

The poll macro has several parameters:

image

 

  • Poll Node Id: This is the id of the Poll content node that you want to display
  • Display Only: Check this if you only want to display the results of a poll
  • Submit On Select: Check this if you want to submit the vote when a user selects a answer
  • Hide Submit: Check this if you want to hide the submit button
  • Sort Results: Check this if you want that the results are sorted by number of votes
  • Width Total Votes: Instead of the highest number of votes being equal to 100% width, the total number of votes is 100%
  • Hide Question: Check this if you want to hide the question
  • Random Poll: Check this if you want to display a random Poll, you’ll also have to update the Poll Node Id to the Polls document (containing the different polls)

 

So depending on the parameters (Submit On Select and  Hide Submit) your poll can look like:

image

or (with submit button)

image

The Results can look like this:

image

Sorted:

image

Width Total Votes:

image

You can download the package here: http://our.umbraco.org/projects/poll

7 Comments so far

  1. Petr Snobelt on July 7th, 2009

    Another very nice package, thanks

    Petr

  2. Don on January 29th, 2010

    Hi Petr, very nice package! Can you please help me to make the pollNodeId dynamic? Because this is using a .NET control, Umbraco won’t let me call the poll from an xslt file using RenderMacroContent() function. I can set the poll ID at a page level, but if I want to use the same poll on many pages, such as a blog, blog post, etc… then I would have to select the poll at each page, which is a pain! Please help!

    Thanks!

  3. Patrick Rietveld on March 18th, 2010

    Hi Petr, nice package. I’m new to umbraco but have a lot of experience with DotNetNuke and Sitefinity. With Sitefinity it’s possible to create a custom property editor. For instance an editor to select a poll from a list. Could you let me know if this is possible with Umbraco? If so, i’m willing to contribute to this module.

  4. sIMON on May 21st, 2010

    Hi, is there a way to display a ImageButton instead of Button for the form? Also, is it possible to have a link to show the result without voting?

    Thank you

  5. new2umbraco on May 30th, 2010

    Hi there, I am new to Umbraco and I need to install this package on a website. Can someone please help me with the starting steps?
    Thank you in advance

  6. new2umbraco on May 30th, 2010

    I cannot get it to work :(.
    I am stuck at
    Please note that:

    * The macro will have to be placed inside a form with runat=”server” attribute
    * There has to be a scriptmanager on the page

    Can someone help please?

    Thank you

  7. andrew on July 30th, 2010

    hi,
    the database script for “tblPoll” seems to be missing from your package install? are you able to email it to me?
    thanks a lot,
    andrew

Leave a Reply