Help me test my latest mod under development; sNews polls, with Ajax

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" :)



You might like


Congratz for this mod :)

Awsome mod, really usefull, I always wondered when someone would try make a mod like this.

Can't wait for it to be finished, keep up the good work.

Matt, all vote boxes looks good and works swimmingly in Safari 4 (Public Beta) on Mac OS X 10.5.6/Intel iMac. Nice job.

The AJAX Poll mod is looking first-rate so far Matt. I am looking forward to this being released once you get the Admin system done.

Forgot to note - Completed the polls with IE7 on an XP machine - performed and displayed perfectly.

Thanks everyone! I took the weekend off, my little one's 3rd birthday today :D, but I hope to get back hacking away on the admin section some more this week.

I'll post any major updates here.

Hello Matt
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?)

Oh oh.
I've upgraded IE to IE8 ans there's a problem: after having voted the box result disappears.

Sven, what OS, Vista or XP? I just upgraded my XP Pro machine here to IE8, rebooted and the polls/voting all works perfect.

I'll try my Vista machine tonight.

On XP, Matt.
I just tried again.
1st vote: correct.
2nd vote: box disappear.
3rd vote: ok but 2nd vote box still away.

Reloading the page makes the box re-appears but the previous vote wasn't recorded as it proposes to re-vote.

It's my special "Sven clause" I build into all my scripts;

if ($user === 'Sven') {

lol... I will look into it


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.

:-D :-D :-D
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.

Worst then IE for java script is only Opera.That browsers cant do nothing.Hey Matt Happy Birthday to your little one!

Thanks Sasha, funny thing is it works fine in Opera when I tested it.

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, I think IE8 is just clunky. I've installed the latest release of it on all 3 of my machines now and the voting works just fine, but I can't log into the admin using IE8 on my XP Pro machine.

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.

eh eh...
this morning it works. All votes are registered and box are displayed.

Comments are closed. No new comments allowed.

Copyleft 2002 - 2017 Matt Jones
Hand crafted with HTML5 & CSS3
↑ Back to top