SQLApply
SQLApply
Version: 1.0
CraftBukkit Build 1.3.1-R1.0 [Tested]
Info
This plugin lets you create a php script on your website lets say on the rules page where the user inputs their Minecraft name and receives a Unique code that that they have to type in the server to become a player. This is useful as with other /apply plugins people can tell their friends the code but now the code has to match the username. The Codes are stored on a MySQL server so you must have one to use this plugin. For promoting this also uses vault.
Config
//MySQL Server info MySQL: Enabled: true Server: localhost Database: minecraft User: root Password: '0000' //Stops guests from talking Block: Chat: true //Messages Supports colors Message: ChatBlock: You are not allowed to talk as you are guest JoinMessage: Welcome follow the signs to be promoted! BroadcastSucess: true //If it broadcasts to all players BroadcastMessage: '%player% Has been promoted to player!' Groups: GuestGroup: Guest //Default group PromoteToGroup: Player //Group to promote to
MySQL
To get the database made first put your mysql info in the config and restart the server. It will create all the tables for you. Now for the tricky part the website code the unique code can be made anyway as you can make the php how you want. I will include an example that I use for my server so that you can either use it of make it better.
The first bit of code is the apply.php should look something like this. http://pastebin.com/LDfvSfkr Make sure to edit the MySql information to your servers info.
The second thing you need is to add a form to your main page such as your rules page. http://pastebin.com/4jA1v3x5 Make sure to make the link to your apply page.
Here is an example page http://pastebin.com/LPKs7RLc Edit the bits that say yoursite.com to the link that links to your apply.php on your website which you also filled in.
Commands
- /apply <Password> - Apply command for guests
- /sqlapply - sqlapply.admin
- /sqlapply reload - Reloads the config
- /sqlapply check <PlayerName> - Returns the passwords of the player
- /sqlapply promote <PlayerName> - Manually Promotes the player
- /sqlapply remove <PlayerName> - Manually removes player from the cant talk list
- /sqlapply removeexpired - Removes apply codes over 1 hour old
Changelog
Version 0.1
- Release of plugin
Hi there McLuke300,
Firstly I'd like to gratulate you for this plugin, I'm using it now for several months and it has been working very fine from the first day on.
Secondly I got a question/request: Is it possible for you to implement a costum Event on promoting a new user? I'd like to react on it in a costum plugin of mine so it would be super nice if you'd implement that.
Greetings, Ichaelus
Great job! I searched for 1 year for somthing like that. It's realy good! I have made a small php-script for the website and any user must read the rules and nobody can pass on the password to any other player. I can't anderstand why this tool only has 140 downloads because it's AWESOME!!!
THANKS!!!
PS: CB 1.5.1 R0.1 it's still works good!
@McLuke300 Hi! I am a member on your server, might not know me at all... but I want to just say this plugin is great! Is there any way of making it for people that do NOT Have MySQL? If not it's ok good plugin!
Thanks
It's me again. Just wanted to ask you if you want a suggestion for the future. It would be fine if, after sending the /apply [code], there would be some questions to answer to get promoted. Like a Test if someone has read the Rules. Would be great if this could a Feature in the Future, maybe adjustable in the Config. Greetings, TheAustrianPro
Just wanted to inform you that I tested your Plugin on my Server , and it works good on 1.4.2!! Greetings, TheAustrianPro
@McLuke300
Haha ok thanks anyway :)
@TheAustrianPro
Also if I remember correctly you don't have to have the exact capitals as having it is a nightmare with foolish people :D
@TheAustrianPro
Its ok theres no need to credit me :D, also your website is all german you dont need the credit bit in english, I take german in school anyway :p Except im not that good. Ich bin nicht gut, weil ich dumm bin ;(
@McLuke300
You my Sir, are fucking awesome! Thank you so much for making such an perfect plugin for our Server! And thank you also for fixing Problems so fast! Greetings, TheAustrianPro I added your Credits on the Bottom :) If I should change something just write it ^^
@McLuke300
Yay, Thank you :)
@TheAustrianPro
http://pastebin.com/LDfvSfkr Try that :3
@GRPGamer
http://pastebin.com/LDfvSfkr Use that instead sorry :3
@GRPGamer
@TheAustrianPro
Hmm I think I might of used old php script, in the morning ill get the right one unless the the host change the password to the website SQL :3 The code is incomplete for checking if the query is ok and stuff!
Hey Luke,
Basically, I have your plugin all setup, but keep getting this error on the apply.php
Fatal error: Call to a member function execute() on a non-object in /home/utpiacr3/public_html/apply.php on line 18
Line 18 is:
if ($stmt->execute(array($_POST['user']))) {
Any help Luke? :)
@McLuke300
That really helps me in some kind, because know i know that i am the only one who has a blank page. It never displayed me the Internal Server Error. The Host supports PHP and has Version 5.3.15 so that shouldn't be the Problem. But thanks for the fast response anyway, i have to look whats wrong :D
@TheAustrianPro
Hmm, Server error The website encountered an error while retrieving http://kuchencraft.lima-city.de/bewerbung/apply.php. It may be down for maintenance or configured incorrectly. Check that your host supports php files and see if you can find anything about the error to fix it. Hope that helps :3
@McLuke300
Yeah I know, thanks, but I have the Form already and if I press submit it just displays the empty page (apply.php) Btw. Thx for the fast response! The Example Code is helpful. If you want to see what I mean: http://www.kuchencraft.lima-city.de/bewerbercheck/ (It's a german site but i copy and pasted the full text for test reasons, I will add Credits if I can get it to Work properly) I would be really thankful if you have any Idea why this could happen. Because this Plugin is exactly what i was searching for. Greetings, TheAustrianPro
@TheAustrianPro
Look at the new info I added Here is an example page http://pastebin.com/LPKs7RLc Edit the bits that say yoursite.com to the link that links to your apply.php on your website which you also filled in.
@TheAustrianPro
Thats just the password showing page, make another page such as a rules page with a form to fill out, Hmm Ill give an example in the description bear with me.
I'd like some help please, add me on skype if it is possible; vasil7112 I get this message: No Database Found, Although, the plugin builds it on the database, the website doesn't show that it exists!