Player Profiles

For general discussion of the Poker Mavens software
Post Reply
Mr.Victor
Posts: 88
Joined: Tue Dec 22, 2009 8:27 am

Player Profiles

Post by Mr.Victor »

Kent this sounds like a cool feature. I'm not exactly sure how it works. Where is the profile information coming from? I see that you append ?Player=XXXX to the url that we provide but I don't get it all. Can you explain in a bit more detail how we can set this up? Thank you.
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Player Profiles

Post by Kent Briggs »

Mr.Victor wrote:Kent this sounds like a cool feature. I'm not exactly sure how it works. Where is the profile information coming from? I see that you append ?Player=XXXX to the url that we provide but I don't get it all. Can you explain in a bit more detail how we can set this up? Thank you.
Your page will need to be a PHP script (or ASP.Net, etc) that can read that parameter and then dynamically display the information for that player. Most likely you would have a MySQL database or local files where you would pull that info from.
cuervo5150
Posts: 97
Joined: Fri Feb 06, 2009 3:13 pm
Location: California
Contact:

Re: Player Profiles

Post by cuervo5150 »

Has anyone had any luck trying to use this feature or have an example to share? Is there anyway to get the double-click to just open up an html page instead?

Thanx,
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Player Profiles

Post by Kent Briggs »

cuervo5150 wrote:Has anyone had any luck trying to use this feature or have an example to share? Is there anyway to get the double-click to just open up an html page instead?
It has to be a dynamic script page (i.e. PHP, etc.) that can read the Player parameter from the URL. A static html system would require a separate page be made for every player account, which would be in the tens of thousands for some sites.

A simple PHP example would look something like:

Code: Select all

<html>
<body>

<h3>Profile Test</h3>

<?php
  $player = $_REQUEST["Player"];
  echo "Player selected: " . $player;
?>

</body>
</html>
social
Posts: 211
Joined: Fri Nov 20, 2009 12:23 am

Re: Player Profiles

Post by social »

I need more information about the profile function.

I have player profile information already within my CMS, where each member has a numerical ID #, and info stored in the main site's database.
So, I should be able to have a coder do this dynamically.

This will require creating a php page on my main site which will translate my local variable called "user" to your variable called "Player",
and then it will display all the information from the user's Profile Page located in my CMS?

So, then, I insert the URL for this php page into the Admin Panel where it says Player Profile URL, and I am done....

Is that the gist of it?

I am missing something here, though....
Poker Mavens has its *own* Player ID#, which is going to be appended to the URL automatically?

So, I have to find some way to associate the Poker Maven ID# with the User IDs from my main site?

What is the best way of doing *that*?
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Player Profiles

Post by Kent Briggs »

social wrote: This will require creating a php page on my main site which will translate my local variable called "user" to your variable called "Player",
and then it will display all the information from the user's Profile Page located in my CMS?
Yes.
So, then, I insert the URL for this php page into the Admin Panel where it says Player Profile URL, and I am done....
Is that the gist of it?
Yes
Poker Mavens has its *own* Player ID#, which is going to be appended to the URL automatically?
It will be a "GET" parameter included in the URL. For example, if you created a page at http://www.mydomain.com/profile.php then the HTTP request sent by the Poker Mavens server would look something like http://www.mydomain.com/profile.php?Player=AceMan

Then PHP code in that profile.php page would fetch than AceMan player name by doing this:

$player = $_REQUEST["Player"];

or this

$player = $_GET["Player"];
So, I have to find some way to associate the Poker Maven ID# with the User IDs from my main site?
What is the best way of doing *that*?
You would either need to maintain your own database that contained both ID's that you could look up using code in your profile.php page or you could store those User IDs in the Custom field inside Poker Mavens and then use the Poker Mavens API (again with code in your profile.php page) to retrieve the ID using the player name.
social
Posts: 211
Joined: Fri Nov 20, 2009 12:23 am

Re: Player Profiles

Post by social »

Kent Briggs wrote:

It will be a "GET" parameter included in the URL. For example, if you created a page at http://www.mydomain.com/profile.php then the HTTP request sent by the Poker Mavens server would look something like http://www.mydomain.com/profile.php?Player=AceMan

Then PHP code in that profile.php page would fetch than AceMan player name by doing this:

$player = $_REQUEST["Player"];

or this

$player = $_GET["Player"];
So, I have to find some way to associate the Poker Maven ID# with the User IDs from my main site?
What is the best way of doing *that*?
You would either need to maintain your own database that contained both ID's that you could look up using code in your profile.php page or you could store those User IDs in the Custom field inside Poker Mavens and then use the Poker Mavens API (again with code in your profile.php page) to retrieve the ID using the player name.
[/quote]

The name "AceMan" which you cited, is that supposed to be the Username selected by someone when they create an account through PM?

Are you saying that PM will automatically insert the *actual* PM player name chosen by the player at Signup into that Get statement?

I could save a translation step if I could force the same username to be used by using a single "simultaneous" Registration for both my main site and PM - i.e. the same data go to both the CMS and the PM databases?

Re: the Custom Field - is there any way to have this populated automatically with the User ID from the referring website?
Or, is this something that can only be manually entered by the new Player at the time he signs up?

i.e. can we create a Facebook Connect type of function?
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Player Profiles

Post by Kent Briggs »

social wrote: The name "AceMan" which you cited, is that supposed to be the Username selected by someone when they create an account through PM?
Yes, that was just an example 12-character player name that displays in the player client.
Are you saying that PM will automatically insert the *actual* PM player name chosen by the player at Signup into that Get statement?
If AceMan is logged into the game, then anyone who double clicks his name in the Lobby window (or double clicks his avatar at a table) will get a popup window in their browser that points to your profile page with the ?Player=AceMan parameter automatically included. Your page will execute your PHP code (or ASP.Net or whatever) and display whatever info about that player that you wish.
I could save a translation step if I could force the same username to be used by using a single "simultaneous" Registration for both my main site and PM - i.e. the same data go to both the CMS and the PM databases?
Yes you could do that by disabling the account create/modification feature built into Poker Mavens and do it all yourself on your web site and then use the API to create/modify accounts. There are restrictions on the player name used by Poker Mavens, however: 12 characters max, letters, numbers, dashes, underscores only. You may want to use the RealName field to hold the CMS name instead of Custom. It can hold 25 characters with no restrictions on the characters used.
Re: the Custom Field - is there any way to have this populated automatically with the User ID from the referring website?
Or, is this something that can only be manually entered by the new Player at the time he signs up?
Unlike the RealName field, the Custom field is not directly available to the player. You must set it via the API or manually via the admin console.
i.e. can we create a Facebook Connect type of function?
I don't use Facebook so I don't know how they do it.
Post Reply