Page 1 of 2

create Ring and Tourney (API)

Posted: Thu Sep 10, 2009 6:34 am
by deisss
Hello Kent and users. How to create the Ring-game and Tournament (through API), demanding a name of the user and the password and PlayerLevel (in server modul accounts-edit. if level> 20 that can create...)
Thx...

Re: create Ring and Tourney (API)

Posted: Thu Sep 10, 2009 9:28 am
by Kent Briggs
deisss wrote:Hello Kent and users. How to create the Ring-game and Tournament (through API), demanding a name of the user and the password and PlayerLevel (in server modul accounts-edit. if level> 20 that can create...)
Thx...
Do you have any experience with HTML forms and a server-side script like PHP? I have some examples of both at http://www.briggsoft.com/docs/pmavens/API_Examples.htm

Generally speaking, you would first create a web page with a form that prompted the player for their name and password. That could be submitted to a PHP page that would call the AcountsGet API command with the player's name and use the results to confirm the password was correct and the level matched your requirements. If not you would display an error message and stop the script. If ok, you would then call the RingGamesAdd and RingGamesOnline API commands to create and put a ring game online. You could do the same for a tournament with the TournamentsAdd and TournamentsOnline API commands.

Re: create Ring and Tourney (API)

Posted: Thu Sep 10, 2009 10:35 am
by deisss
Kent Briggs wrote: Generally speaking, you would first create a web page with a form that prompted the player for their name and password
You have an example??

Re: create Ring and Tourney (API)

Posted: Thu Sep 10, 2009 10:51 am
by Kent Briggs
deisss wrote:
Kent Briggs wrote: Generally speaking, you would first create a web page with a form that prompted the player for their name and password
You have an example??
The "Create New Account" example on the link I posted has a form that prompts for several items including name and password.

Re: create Ring and Tourney (API)

Posted: Thu Sep 10, 2009 10:53 am
by Kent Briggs

Re: create Ring and Tourney (API)

Posted: Sun Sep 13, 2009 12:47 pm
by CanadaWest
I have a PHP form that validates the PlayerName and Password, then creates a Ring Game and puts it online.

See it in action here: http://playersclub.ca/createring.php

Feel free to take the code.

Re: create Ring and Tourney (API)

Posted: Sun Sep 13, 2009 1:10 pm
by Kent Briggs
CanadaWest wrote: See it in action here: http://playersclub.ca/createring.php
Feel free to take the code.
You can't see php code from the client side since it's parsed on the server.

Re: create Ring and Tourney (API)

Posted: Sun Sep 13, 2009 2:24 pm
by CanadaWest
OOps, I'll post the files. And some other neat stuff too. Under new threads.

but here is a zip package with my forms to Create and Delete Ring Games

ReadMe.txt included.

Re: create Ring and Tourney (API)

Posted: Sun Sep 13, 2009 2:25 pm
by CanadaWest
Hey Everyone,

If you have any problems with those attached files, don't bother Kent with them. PM me and I will help if I can

Re: create Ring and Tourney (API)

Posted: Mon Sep 14, 2009 1:31 am
by deisss
Thx CanadaWest.. Do you have this with tourney tab???