If we can get a definitive answer that removing the name attribute will not adversely affect anyone, I would be happy to do it. I just don’t like making changes I don’t fully understand.
Ok, I did a little more research and I figured out that 1. Im comfortable removing the tag and 2. I was forcing that tag in there (didn’t see that at first). Try this:
Cool, that fixed worked, but..there is one more minor fix necessary before all is perfect, as you can see below the bar img needs an alt tag. But that one is easy. Why didn’t I see this before? You may ask? Well I did not upload the pollimg.gif into the images folder ( Shame on Me).
This page is not Valid XHTML 1.0 Strict!
Below are the results of checking this document for XML well-formedness and validity.
Error Line 141, column 276: required attribute “alt” not specified .
...th:100px;background-color:#FF0000;’ /></span>
The attribute given above is required for an element that you’ve used, but you have omitted it. For instance, in most HTML and XHTML document types the “type” attribute is required on the “script” element and the “alt” attribute is required for the “img” element.
Typical values for type are type=“text/css” for <style> and type=“text/javascript” for <script>.
?
Error Line 143, column 239: required attribute “alt” not specified .
...dth:54px;background-color:#FF0000;’ /></span>
?
Error Line 145, column 244: required attribute “alt” not specified .
...dth:41px;background-color:#FF0000;’ /></span>
Mate. . . . bloody great work . . . I haven’t updated the module yet but looks like your are really squashing the bugs in what is already a top module!
Thanks for the new version. I’m having a problem I still had with the old version. When trying to view a vote or cast a vote for a poll which is on the third page of my blog (i.e. not on the main page) it sends me back to the home page whereas I would expect to be sent to the original page/posting I was on. Is there any workaround/fix/suggestions for this?
Returning to the same page is the normal behavior. There is a target tag to allow you to specify where poll votes resolve to. Perchance have you set target=’’ in your poll template? That would always force it to the front page.
Mmm.. I don’t think I have the target tag set, I’ll have to check that. Also, any new polls I conduct since the upgrade from 1.4 to 1.63 are not displaying. I have a custom field defined with a poll id - is there a change log I can have a look at to see what changed between these versions and might possibly be causing this problem?
There was a bug when viewing the results without voting and then pressing the vote button to go back. Some sites were getting an error (depended on the PHP settings on the server). In addition, there is a new template tag option:
{exp:eepoll poll_id=’{poll_id}’ start=‘result’}
If the start=‘result’ is present, then the default display mode of the poll will be the results instead of the poll form. A vote button is also shown so it is possible to get to the poll form and cast your vote.
I just updated to v1.7 (thank you for that!) but I’m having a small problem: Since we have a dutch website I’ve tried to change the language from the voting buttons. Somehow the “View” button stops working when I change the value=“View” thing. I guess that’s normal, but I can’t change the name=“view” tag as it doesn’t have any effect at all. Is there a way to solve this?
This is what I’ve got in mod.eepoll.php:
// Add questions to output string foreach($poll_question as $item) { $data .= $item; }
The issue is that the code checks the value of the submit button since there may be more than one on a poll. Unfortunately, this does make it a bit difficult to change the displayed value. I could make a language entry for the value - but if someone inadvertantly sets the View and Vote language values the same, the module will stop functioning. Let me think about that for a day.
I’m new to EE (and therefore to EEpoll). Having installed v 1.7, I spent all day getting to grips with it (so glad KoF took the time/effort to put it together).
Having seen this module in effect on some other sites, I have a couple of questions:
My results are displayed as follows:
Each ‘answer’ appears above its result. The result bar is followed (on the same line) by the percentage, then the number of votes cast, in brackets. However, the percentage is also displayed WITHIN the coloured bar. I have not seen this on any other site and assume that it should not be so.
When I reload the page, the poll briefly ‘flashes’ with a different style (the bars are not as high - which is how they are set in the CP)
Some sites have different colours for each bar. How do I do this?
I initially followed the setup instruction (per wiki) and created a custom field (pollid). However, after reading all the previous posts, I was confused as to why this was necessary. I have since deleted this custom field and apart from the above problems (which were the same even before I deleted the custom field), the poll seems to work ok. My template code is:
{exp:eepoll poll_id=“latest”}
{poll}
{/exp:eepoll}
Each ‘answer’ appears above its result. The result bar is followed (on the same line) by the percentage, then the number of votes cast, in brackets. However, the percentage is also displayed WITHIN the coloured bar. I have not seen this on any other site and assume that it should not be so.
When I reload the page, the poll briefly ‘flashes’ with a different style (the bars are not as high - which is how they are set in the CP)
I think this happens when the image is not installed in the right place. The zip should contain the file: pollimg.gif. This should be stored in /images on the domain. (This is a hard coded path and should probably be in the configuration…something for the next release if I can remember it.)
Some sites have different colours for each bar. How do I do this?
You can set the colors up for all polls or also on an individual poll by poll basis. The ‘Bar Color Configuration’ (global version is in configuration and there is also one for each poll) expects a list of html color codes separated by carriage returns. Example: If you want your poll bars to be red, green and then blue, your color configuration should be #ff0000<enter>#00ff00<enter>#0000ff. If you have more bars than colors, the colors simply repeat.
I initially followed the setup instruction (per wiki) and created a custom field (pollid). However, after reading all the previous posts, I was confused as to why this was necessary. I have since deleted this custom field and apart from the above problems (which were the same even before I deleted the custom field), the poll seems to work ok. My template code is:
{exp:eepoll poll_id=“latest”}
{poll}
{/exp:eepoll}
The wiki explains how to associate a poll with a particular entry. Your template code is fine, as long as you only want to display the latest poll. As soon as you add another poll, that one will be gone forever. (But if that is what you want, that works too.)
Ok, so if I want to keep previous polls, or display other than the ‘latest’ poll, it’s necessary to create the custom field. Should the custom field be named “poll_id” or “pollid”?
[quote author=“King of Fools” date=“1113448036”>
Your template looks great. To make it work, you need to have created a custom field on that weblog which has a field name of “pollid”. Very important: The field type must be Text Input and the default formatting must be set to None!
When you state “created a custom field on THAT weblog…”, which weblog should that be?
I realise this is a very basic question, but as an EE newbie, I’m still getting to grips with field groups etc.
The .gif image was missing (but you already knew that - right?) and the bars are now behaving themselves nicely, since the image was uploaded.
Many thanks,
Coober
by ‘That Weblog’, I mean whichever weblog you want the polls to appear on. My guess is most people use just one weblog. I use three but two are just for sidebar purposes (blogroll and reading list).