WordPress.org

Ready to get started?Download WordPress

Forums

WP Polls (94 posts)

  1. Armitage
    Member
    Posted 10 years ago #

    Hmm, looks nice, I've been using other polling systems for awhile now and its quite a pain to have to login to 10 different places... just one problem, after I voted I hit reload to see if the site would remember me when I returned. The votes went up, and it went up EVERY time I hit reload (12 total I think). Is there anyway to fix this?

  2. Anonymous
    Unregistered
    Posted 10 years ago #

    just downloaded it and when I wnet to install I get this message:
    SQL/DB Error:
    [You have an error in your SQL syntax near ') ' at line 1]
    CREATE TABLE b2pollsa ( aid int(10) unsigned NOT NULL auto_increment, qid int(10) NOT NULL default '0', answers varchar(200) NOT NULL default '', votes int(10) NOT NULL default '0', PRIMARY KEY (aid),)
    SQL/DB Error:
    [You have an error in your SQL syntax near ') ' at line 1]
    CREATE TABLE b2pollsq ( id int(10) unsigned NOT NULL auto_increment, question varchar(200) NOT NULL default '', timestamp varchar(20) NOT NULL default '', total_votes tinyint(4) NOT NULL default '0', PRIMARY KEY (id),)

    any idea?

  3. Lester Chan
    Member
    Posted 10 years ago #

    erm, the reloading problem is a common problem. Any form you click reload it would submit as many times as it is being reloaded.
    Anonymous
    : can mail me the script?

  4. Anonymous
    Unregistered
    Posted 10 years ago #

    done wasn't sure what file you needed so I sent myhacks, polls manager and polls install, do you need anything else?

  5. Lester Chan
    Member
    Posted 10 years ago #

    okie solved

  6. Armitage
    Member
    Posted 10 years ago #

    would it be easy to make it check IP's or something before it readd's the vote?

  7. Armitage
    Member
    Posted 10 years ago #

    People can also cheat by removeing the cookie for the poll (Which is very easy to do with Opera). If it saved a list of ip's that could be fixed too.

  8. Lester Chan
    Member
    Posted 10 years ago #

    from what I know, CS Nation CMS also uses cookie based.
    If you are using a IP based checking, there will be overhead. And to 56k users, it will make no difference.
    Cheers.

  9. davidchait
    Member
    Posted 10 years ago #

    Could always use both. ;)
    IP based checking is minimal overhead. A 15 character IP (or 32-bit integer...), plus however big a number for which poll ID, plus however bug a number (likely a smallint) for poll response. Let's say 32 bytes per entry, and you get 1000 entries. Still only 32K in a database. If your site gets more than a few thousand entries for a given poll, you might want to look at other options.
    Also note that you can do some level of 'rough cross-poll results' by doing a JOIN between two (or more) poll-ID queries, based on q1.IP == q2.IP. Could give you some interesting results for niche websites.
    -d
    http://www.chait.net

  10. OperaManiac
    Member
    Posted 10 years ago #

    hey where is the latest version located?

  11. Lilandra
    Member
    Posted 10 years ago #

    Max_Barrel posted this:
    "About the answer order: My choice was to supress the "ORDER BY vote DESC" query option in answer query."
    Could anybody direct me to where exactly I would do this?

  12. Lester Chan
    Member
    Posted 10 years ago #

    lilandra: $poll_answers = $wpdb->get_results("SELECT aid, answers, votes FROM $tablepollsa WHERE qid = $poll_question->id ORDER BY votes DESC");
    sush: latest as in?

  13. scratch
    Member
    Posted 10 years ago #

    I'm afraid I'm having the same problem as Anonymous. GamerZ, how were you able to fix it? TIA

  14. mtwib
    Member
    Posted 10 years ago #

    Hey, thanks for the great hack...
    My trouble is that it doesn't seem to validate:
    http://validator.w3.org/check?uri=http%3A%2F%2Fmtwib.enlumina.org%2Fjournal%2Findex.php%3Fp%3D11#line-98
    Any ideas?

  15. MaxT
    Member
    Posted 10 years ago #

    1) Put your wp-grins JS in external.js
    2) You have to edit poll some for it to validate... It took me about 10 mins to accomplish it, you can see example @ http://www.MaxT.dk

  16. MaxT
    Member
    Posted 10 years ago #

    Good to hear that ;)

  17. Lilandra
    Member
    Posted 10 years ago #

    does anybody know how to make it allow html in the question and the options?

  18. shadow
    Member
    Posted 10 years ago #

    Hi,
    Site: Organic Shadows @ http://www.os42.com
    I am experiencing this same problem of reloading page casts an automatic vote. Is there a solution to this problem or is that just how it is ?
    Thanks and sorry if answered already and I have missed it.

  19. Anonymous
    Unregistered
    Posted 9 years ago #

    hi i get the ff. error when on my index.php, where the polls are supposed to be at.
    Database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY id DESC LIMIT 1' at line 1]
    SELECT id, question, total_votes FROM ORDER BY id DESC LIMIT 1
    Database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE qid = ORDER BY votes DESC' at line 1]
    SELECT aid, answers, votes FROM WHERE qid = ORDER BY votes DESC
    View Results
    Warning: Invalid argument supplied for foreach() in /home/mph0002/public_html/blog/wp-content/plugins/lgd_polls.php on line 87
    Everyone seems to have managed to get it done ;P. pls. someone help? many thanks in advance.

  20. thomasso
    Member
    Posted 9 years ago #

    ATTN: GamerZ or anyone else... :)
    Regarding polls, I noticed on your (GamerZ) weBlog, you've made a page clickable from your home page displaying not only the polls, but the past polls or polls-archives. i.e. "http://www.lesterchan.net/blogs/wp-polls.php" I have tried to create somthing similar, but failed... :( . Would you mind sharing how you made this page up? I think it is a great idea for diplying polls archives.
    Thanks.

  21. Michiel
    Member
    Posted 9 years ago #

    Hi! This is a great tool! One question: how do I get the pollbar visible? Currently a get the results displayed as percentages. Thanks!

  22. axtmoerder
    Member
    Posted 9 years ago #

    Hi,
    I think I have the same problem that benrad had. In Mozilla the polls look perfect, but they screw the layout in IE. Coud someone help me to solve it?
    http://www.axtmoerder.de

  23. Armitage
    Member
    Posted 9 years ago #

    If anyones interested, I finally downloaded and installed Gamerz poll and added in the ability to save ip's in MySQL to prevent multiple voting. It *seems* to be working fine but I'm not that great with PHP yet.
    I plan to add Archives and maybe comments to it sometime too (that is if Gamerz or someone else doesn't do it first).
    You can find the file on the downloads page of my site Http://flatplanet.techmonkeyz.net/ (or Http://FlatPlanet.ws/ whenever they finally point it to the site). It doesn't keep the ip's after someone votes in a newer poll (to save on database size) but you could comment out the line if you wanted to keep them for some reason.
    Michiel, I had that problem too. I think it turned out the file said to put the bar image in wp-images/ and the polls calls it from images/ so make sure its trying to load the image from the right place.

  24. thomasso
    Member
    Posted 9 years ago #

    Great job! Thanks Armitage for the up-date with WP-Polls.

  25. greendaypunk74
    Member
    Posted 9 years ago #

    I install the files and everything, I see the vote area and all that good stuff, but when I vote it keeps showing Zero votes. No matter how many times I vote it still shows zero. Does anyone know?

  26. bohemian
    Member
    Posted 9 years ago #

    Hi, I'm a bit new to this whole php so I need some help.
    Downloaded the modified polls.php from Armitage.
    Where am I suppose to place this code?
    ------------------------------------------
    CREATE TABLE wp_polls_ips (
    qid int(5) NOT NULL,
    ip varchar(15) NOT NULL
    );
    ------------------------------------------

  27. Armitage
    Member
    Posted 9 years ago #

    greenday: Did you create the table wp_polls_ips in your database?
    bohemian: You need to use something like PHPMyAdmin.
    I probably should have made this a bit easyer but I wrote it awhile back and have been testing it ever since. I am not 100% sure this works right yet so backup for files first. I have however been using it for abotu a month on my site and it seems to be doing fine.
    I'll see if I can write it to create its own table somehow. If you don't know how to create a table you might want to stay away from this until I can update it (next few days).

  28. lawtai
    Member
    Posted 9 years ago #

    hmm, currently the polls invalidates my page as it creates a link with an & in it. Would you happen to know how to fix this?

  29. Armitage
    Member
    Posted 9 years ago #

    Where at? I don't see any &'s in any urls on mine.

  30. Armitage
    Member
    Posted 9 years ago #

    It looks like thats caused by your sessions being added onto the end of the poll url. I'm not sure how you have that setup but you need to change the & to an & somehow.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.