Help me test my latest mod under development; sNews polls, with Ajax
Once again, I'm back at MOD'ing sNews. This time around I've gotten pretty ambitious and starting writing an Ajax polls mod for sNews. Why? Well, all the other CMS's seem to have them, plus I've been devouring the pages of my Ajax book and really starting to learn javascript in general.
Thus far I think I've completed a nice looking front-end, seen here. This is a "ground up" script, meaning I've written everything from scratch on this one, there has been no shoe-horning/cramming/stuffing exiting code into sNews.
For that reason, I will probably need a considerable amount of time to get the admin section working in sNews. I would like you to test these polls and let me know if you encounter anything kludgey.
The code has been written to degrade gracefully, aka it's "unobtrusive", if you disable javascript in your browser, you won't (shouldn't) have any problem voting or viewing results, it just won't be as smooth as with Ajax, and you can only view/vote on one poll per page at a time, whereas with Ajax you can vote on unlimited numbers.
Again, this is only the front-end, while I'm writing the admin section, please help me test, vote, leave me a comment and let me know if it worked as expected, what browser & OS you're using, etc. Especially let me know if it doesn't work as expected. Remember, I can only make a mod as good as the feedback I receive, I can't fix problems that I'm not aware of. :)
OK, with all the begging and pleading out of the way, here is a list of the currently implemented features;
- Each poll is unique, and you can add as many polls to a page or article as you like.
- Polls can be placed into articles, pages "extras", or hard-coded into your index.php page.
- Polls prevent multiple voting by both IP check, as well as cookies.
- Poll styling can easily be controlled by a separate stylesheet. The bars are drawn with percentages and will always expand accordingly.
- Does not require jQuery, while I love jQuery personally, I'm aware that many people are apprehensive about adding the large-ish libraries to their sites.
Again, this is only for testing at this point, please don't ask me when it will be completed, because the answer is always "when it's ready" :)
Comments
RSS Comments Feed
jordi
slemborg
Can't wait for it to be finished, keep up the good work.
Fred K
keyrocks
keyrocks
Matt
I'll post any major updates here.
Sven - Philippe
1 star more for this Mod to come.
In some where explanations for the voter is needed will you provide a link to the explanation page (displaying the results too?)
Sven
I've upgraded IE to IE8 ans there's a problem: after having voted the box result disappears.
Matt
I'll try my Vista machine tonight.
Sven - Philippe
I just tried again.
1st vote: correct.
2nd vote: box disappear.
3rd vote: ok but 2nd vote box still away.
Sven - Philippe
Matt
if ($user === 'Sven') {
do_something_buggy();
}
lol... I will look into it
Matt
The basic admin is done, overview, create new poll, edit existing polls, reset votes, and deleting polls.
Added poll code embed function to the buttons menu, you just need the ID of the poll, also added the embed code for inserting into articles, pages, etc, like youtube embed links, etc.
Now I have to get some odd bits of language into the lang file.
Sven - Philippe
You don't have to. When IE interprets JS it's always buggy. And this morning I re-tried after having deleted cache and cookies: second box is still out.
sasha
Matt
Sven, so it's showing you the vote form, and when you try to vote it shows you the results, but doesn't record your vote? Does it give you the "back to poll" link, or only when you refresh the page does it show the voting form again?
Sven - Philippe
After my vote the 2nd box is not displayed at all.
If I reload the page the 2nd box is being displayed but doesn't show the results as my vote not been recorded.
See this HC:
http://lemesle.free.fr/nomasis/matt's-poll.png
Matt
The fact it worked fine on the other 2 polls kind of rules out the code, b/c the code is identical.
I will add a few more polls to the article to test with.
Sven - Philippe
this morning it works. All votes are registered and box are displayed.