Check if a player voted?

Discussion in 'Plugin Development' started by jeffadkins51, Jul 17, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    jeffadkins51

    Is there anyway at all to do this? Just to hook MYBB to some voting site, and see if he's reached a page or something? And if so, to generate a line of code on a webpage to be displayed ONLY if he has voted?
    Thanks ahead of time
     
  2. Offline

    Lolmewn

    Use Votifier.
     
  3. Offline

    jeffadkins51

    Not that. I'm working on a custom vote plugin myself. But totatlly different use.
     
  4. Offline

    Lolmewn

    Uhm.. Then I don't know.
     
  5. Offline

    Hretsam

    OK, you want to make a webpage only available is the user has voted ingame?
     
  6. Offline

    ItsHarry

    It's better if you ask this at some myBB forum instead of on the Bukkit forums.
     
  7. Offline

    jeffadkins51

    Yes.
     
  8. Offline

    Hretsam

    Ok then you need to store the names of the players that voted (in a file or database) and check them on the webpage.
     
  9. Offline

    jeffadkins51

    but HOW would i be able to check if a player voted...?
    I know how to draw the names, but not check who voted.
    And i want them to be able to only get the code once a day(A code from visiting the page after voting)
     
  10. Offline

    Hretsam

    Like i said, you need to store the names that have voted into a file or a database.

    Then your web page must cross-check the name with the values in the file or database
     
  11. Offline

    jeffadkins51

    Okay, I don't think you understand what i'm asking you. HOW do i check who voted?....... HOW DO I GET ANY PLAYERS IN THE DATABASE WITHOUT KNOWING IF THEY VOTED OR NOT???????
     
  12. Offline

    desmin88

    @jeffadkins51
    Doesn't seem like you're going to get much help acting like that.
     
  13. Offline

    Hretsam

    Getting that you have 'Plugin Developer' before your name, i got the impression that you might have an idea how to do that. Guessing i was wrong, you could have said it nicely. If you want to get an idea how to do this kind of stuff. Look at other plugins, as for most you can see the source on GitHub or download it.

    Also take a look in the Plugin Development forum, as i already aid a couple of times how to get & extract data from flatfiles, and Database questions are real common!
     
  14. Offline

    jeffadkins51

    I clearly said it. And i get the general idea on how to extract the information, just not actually grab it by the webserver. I was going to take a look at votifier but i just did not like the complication of the plugin(Using ports) As many hosts don't have open ports. So mainly what i'm asking, is there anyway to do this without using ports? Just MYSQL ?
     
  15. Offline

    bassfader

    You could allways setup a HTTP deamon on the PC you're running the server on, and let your plugin simply write data into a file. On the "real" webserver some sort of PHP script could then read that file.

    Also you could try to make your plugin create the file and automatically upload it to your webserver via FTP every X minutes or so.

    But I guess the easiest way would be to just use a MySQL database and querry everything you need from your Webserver.
     
Thread Status:
Not open for further replies.

Share This Page