I run a game server and want to link the persons in game character name and stats to Invision Power Board. I've setup IPB so players currently login with their game login. That means their user name on the forum is the same as their user name for the game.
They can have multiple characters on 1 account so ideally I'd like to allow them to choose a main character and display an actual image of that character and allow them to display other characters if they are online.
Currently I'm doing something like this by hacking profileFields.php but it's messy and not very efficient on the user or server end. My code currently uses 2 custom fields which the player can enter their character names in. To display only their main character they enter the name in the first field. To also display other characters if they are online they enter the same name into the second field. To resolve the IDs I have to run a lot of queries.
I know PHP but I am not familiar with IPBs code at all. I just need to be pointed in a direction where I can combine the 2 fields into 1 field.
tl;dr:
Here is my setup:
- Invision Power Board 3
- Data is stored in MySQL on the same server the forum is hosted on.
- User names on the forum are identical to user names in the game
Here is a breakdown of what I'd like to do:
- In the edit profile section I need to resolve the forum user name to the game's account id then:
- Display a list of characters and allow them to choose which characters they want to display if they are online as well as a default character that will be displayed if none are online.
- In the posts user info pane: Display the online character or the default if none are online.
Here is what I need to know:
- How to generate a list of characters in the profile edit form and allow selection (check box) of each character to display as well as the selection of a default character (radio or dropdown?)
- How to fetch the data and place it in the post's user info pane