1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / 2 part poll question - 1 cosmetic 1 functional

2 part poll question - 1 cosmetic 1 functional

9 posts, 0 answered
  1. License Developer
    License Developer avatar
    31 posts
    Registered:
    18 Jun 2008
    05 Aug 2008
    Link to this post
    Hi,

    I think I've exhausted the forums, manuals, KB articles, and the Telerik Radchart documentation so if anyone can help it would be greatly appreciated.

    Part 1 is a cosmetic issue. Our client wants us to remove all actual numbers of votes from polls and there results. It was easy to remove the Total number of votes from the poll and the results.

    What I can't find is how to turn off the number of votes that appears with each of the horizontal bars that render in the results. I thought that I would be able to find a property either in the web based editor or in the properties of "answerChart" in ResultsBoxNoLegend.ascx but no luck.

    The percentages that appear on each item are fine, I just need to get rid of the actual numbers of votes and can't find where.

    Part 2 is more about poll behavior. What we have is two pages that both have the same poll embedded in them. We'll call them Page A and Page B. These pages use different templates.

    Our client wants to make sure that if an anonymous user goes to Page A and submits an answer to the poll that when they go to page B they will only see results, not be able to take the poll again.

    Each page seems to work correctly on it's own but it seems that Sitefinity does not recognize that the poll has already been taken if the poll is added into a second page. This appears to not be working as it should and I'm stumped. I've gone through all of the properties that I can find and am looking for guidance here also.

    Thanks!

    Brett

  2. License Developer
    License Developer avatar
    31 posts
    Registered:
    18 Jun 2008
    05 Aug 2008
    Link to this post
    Another polls issue has come up. We deployed our site to discountasp.net and our client is reviewing it.

    We're getting feedback that multiple people at the client's site have been trying to take polls but on their first visit to the site they see the results and not the poll. This seems to only be happening when people try this from within the client's network.

    Is there a possibility that Sitefinity is seeing these requests as all coming from the same IP address and therefore showing them results instead of the poll?
  3. License Developer
    License Developer avatar
    31 posts
    Registered:
    18 Jun 2008
    06 Aug 2008
    Link to this post
    Update: everyone that comes out of my client's network visits the site with the same IP Address. This makes IP blocking something that will not work in this project.

    As a work around I'd like to show the PollView / ResultsBox based on the existence of a cookie. I know that users could delete the cookie and vote again but right now I have 1000 users and 999 of them can't vote due to IP blocking.

    Sitefinity is working on an update to polls module but I am looking for a quick work around.  Has anyone done something like this before?

    I've been looking around through the Telerik.Polls.WebControls Namespace and the PollBox Class Members and I don't think I've found what I need to work with yet other than the property ShowResults used to toggle if you should show the poll or the results box.

    Any suggestions?
  4. Nikifor
    Nikifor avatar
    232 posts
    Registered:
    18 May 2013
    07 Aug 2008
    Link to this post
    Hello Brett,

    Going through your posts, here is the answer for your first question:
    Yes, you are able to remove all user votes. It is necessary to go and Edit the particular poll in the Sitefinity administration Modules -> Polls and click on the Reset Vote Count link situated below its Title. If you want to remove the total number of voters info, than you could check the following Forum Post where you can find a Poll Box fix control. The project and assembly names are PollsFixture and the new controls are with names PollBox2 and ResultsBox2. You could either add this project to your solution or just use the assembly contained in the bin directory. To be able to use the control, you should register it in the web.config toolboxControls section in the following way:

    <add name="PollBox2" section="PollsFixture" type="PollsFixture.PollBox2, PollsFixture"/> 

    As for your second question, unfortunately we are not able to reproduce it. By design, once you vote on a poll posted somewhere in your project, whenever you access it again (no matter if i is on another page) it will show the result you have posted. Of course you have to have enabled the IP blocking for both controls before that. Please provide us with step by step instruction so that we can reproduce it and troubleshoot this issue locally.

    The third inquiry represents a default Polls behaviour. When all company members has only one public IP for external use, they would all be seen as a particular machine from the IP blocking defence and all will be prompted with the result of the first user who managed to vote. As mentioned in the other post I sent you, we will search for the best approach of adding an alternative way for blocking already voted users.

    Thank you for your time.

    Author nickname
    Nikifor
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  5. License Developer
    License Developer avatar
    31 posts
    Registered:
    18 Jun 2008
    07 Aug 2008
    Link to this post
    I don't think I made myself clear.

    I don't want to remove all votes, I want to update the results so that they only display the percents and the bars. Not the total number of votes.

    Please see this image, it should help
    http://img.photobucket.com/albums/v73/cthuluburger/work/actualnumbersofvotes.jpg
  6. Ivan
    Ivan avatar
    478 posts
    Registered:
    16 Jun 2015
    11 Aug 2008
    Link to this post
    Hi License Developer,

    In order to remove the numbers of votes from the bars, please do following:

    1. Open this file:
        ~/Sitefinity/ControlTemplates/Polls/ResultsBoxNoLegend.ascx, which is a default template for Polls Result Box control.

    2. Locate the following code and add DefaultLabelValue property as in this sample:

    <Series> 
        <telerik:ChartSeries DefaultLabelValue="">  
            <items> 
               <telerik:ChartSeriesItem /> 
            </items> 
        </telerik:ChartSeries> 
    </Series> 

    By setting the DefaultLabelValue to nothing, you will effectively remove the number of votes next to the bar.

    I hope you'll find this information helpful. Let us know if there is anything else we can do for you.


    All the best,
    Ivan
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  7. License Developer
    License Developer avatar
    31 posts
    Registered:
    18 Jun 2008
    11 Aug 2008
    Link to this post
    Hi Ivan,

    That worked perfectly, thanks.

    After having looked at the Telerik chart control I see that there is a wizard that can be used in visual studio. Is there a way for me to use that when designing poll results? If there is it would probably avoid future questions like this.

    Thanks again,

    Brett
  8. Ivan
    Ivan avatar
    478 posts
    Registered:
    16 Jun 2015
    11 Aug 2008
    Link to this post
    Hello License Developer,

    Yes, you can simply open the ResultsBoxNoLegend.ascx control in Visual Studio, switch to design mode and you'll be able to use the wizard.

    Best wishes,
    Ivan
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  9. License Developer
    License Developer avatar
    31 posts
    Registered:
    18 Jun 2008
    21 Aug 2008
    Link to this post
    Thanks, I found out that the reason I had been getting error messages in design mode was because I didn't have Microsoft ASP.NET 2.0 AJAX Extensions installed properly on my development machine.
Register for webinar
9 posts, 0 answered