VoteSQL
VoteSQL [Requires Votifier!]
Version: 1.4
Craft Bukkit 1.5.1-R0.2
This plugin logs player votes to a MySQL table or a Flat-File! While your at it you might as well go ahead and add a custom message with colors for when they vote! Also, it logs the amount of times they vote in numerals. This can be used to set up a stats php page or something :).
Video
Soon!
Features
- Logs votes to a SQL table
- Config
- SuperPerms support
- Plugin Metrics
- Now can log with Flat-File Support!
- Make your own custom messages with colors and such!
- Gives money on vote!
Demo
Config
# Thanks for choosing VoteSQL! Simply change the info below. The FlatFileListener on the first vote may not record it! VoteSQL: onVote: Enabled: false # %P = Player Name %S = The Site they voted from! Message: '&2Thank you for voting %P from %S!' MySQL: Enabled: false Server: Server Address eg.Localhost Database: Place Database name here User: Place User of MySQL Database here Password: Place User password here Table_Prefix: votesql FlatFile: Enabled: false currency: Enabled: false Amount: 150 # %P = Player Name %M = Money received. Message: '&2%P, You received %M dollars!'
If some config options are not coming up delete the config and restart the server!
Commands
- /votesql - Displays help page
- /votesql reload - Reloads config.
- /votesql check <string> - Adds to the database with a vote of 1
- /votesql top - Shows the top 5 voters.
Permissions
- votesql.reload
- votesql.check
- votesql.top
Planned
- User Suggestions.
- Adding the Auto-Updater Option!
- Adding in game commands for leader-boards (Top 5 players and such! Amount will be Configurable)! See your individual placing and also your amount of votes you have!
Adding Vault support so they can receive money!- Give items on vote
Change Log
To see the change-log go on the files tab and click on the version to read any info on it!
Source
https://github.com/javoris767/VoteSQL
Metrics
Bugs
Find any? Please submit a ticket and post errors in a gist! Link to gist: https://gist.github.com/
PHP Code
<?PHP $user_name = "USERHERE"; $password = "PASSWORDHERE"; $database = "DATABASEHERE"; $server = "SERVERIPHERE"; $db_handle = mysql_connect($server, $user_name, $password); $db_found = mysql_select_db($database, $db_handle); if ($db_found) { $SQL = "SELECT * FROM votesql ORDER BY votes DESC"; $result = mysql_query($SQL); $value = 1; while ($db_field = mysql_fetch_assoc($result)) { print "<tr>"; print "<td>" . $value . "</td>"; print "<td>" . $db_field['playername'] . "</td>"; print "<td>" . $db_field['votes'] . "</td>"; $value = $value + 1; print "</tr>"; } mysql_close($db_handle); } else { print "Database NOT Found "; mysql_close($db_handle); } ?>
Donate
Donations are greatly appreciated :)
@Kartikitrak
Basically you keep the "" as it's used to indicate a string and once you setup the sql info it should all work. It's just formatting the page to look good is difficult ._.
Hey. I came across your plugin and it's quite amazing. I installed it and hooked my sql server but I'm not quite sure how to get the php script to output. Am I supposed to keep the "" when I put my ip or replace the quotes as well. Also, how do I end up outputting this.
@UnitedFactions
What's on line 15 of the php code?
Im getting this error atm:
help? ;)
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/unitedfa/public_html/votesql.php on line 15
@fritasia
I had the git src setup, but I was having problems with it. I'll see if I can set it up again.
Works with 1.4.7 :-)
Can you make the source open? - I want to make features like "Voter of the Month".
@Outlaw11A
The plugin works fine on 1.4.6. No need to update for now.
Updating to 1.4.6 and 1.5 in the future?
What about a date last voted? That would be a great addition as we have a vote requirement for our staff and that would make it super easy to check.
@mclordcraft
Keep compiling with java 7 -.-. I released a fix.
helllp no clue whats going on here
im running that latest beta build of craftbukkit and the latest votifier. So no clue. this isnt generating a config.
@Darkblader10
I'll add that in the next update :3
Is it possible to run commands when they vote and to set a special command when they vote for the first time?
That would be great! :)
ok made my own php file works great with the votesSQl thx for the plug-in
http://www.tuminecraft.com/votes/index.php
@Toxic__Waste
You cannot do this.
whats the php code for a webserver like www.mysite.com.VOTES
@ChillaxTeam
You're welcome.
My thing work fine now, thanks for no help.
@wumpyc
I can help you with that simple part if you help me out on setting it up, I am doing something wrong.
@javoris767
I can give you a free testing server :). As long as you help me out :P