
AVChat 2 and AVConference are compatible with both FMS 2 & 3 and Red5 .
Integrating AVChat 1.3 with your web site users database
Prerequisites:
- AVChat 1.3 installed on your web site
- medium asp or php programming experience
Introduction
First, take note that this is not a step by step guide as user management systems are different from a web site to another.
Integrating AVChat with your web site users database means that the users of your web site will have the same username on the web site and in the chat. Furthermore you can impose restrictions one some users ("free" ones) in order to force them to upgrade.
A little bit of information
AVChat is mostly a client side application. When a user comes to your web site and goes to the page where AVChat is installed, both the AVChat swf file (index.swf) and the HTML file containing the swf file are downloaded on the users computer and shown in their browser.
Once the swf file is completely downloaded to the users computer and the browsers displays it, the swf file executes the asp/php configuration file on the server, which, in turn, returns all the settings back to the swf file.
If we were to talk about it in a timely manner, this is when the integration will take place. When the asp or php configuration file executes.
The php/asp configuration file has the ability to tell the swf file what is the users username, gender, level and restrictions.
Deep in the problem
Your web site will obviously have a user management system. Your visitors can register as users, log in, log out, etc... . Once a user is logged in, the user management system will "keep in mind" the user's username, real name, email, gender and other details, and will display them in certain places throughout the web site. Once the user logs out, the user management system "forgets" him.
This is where all the hard work in the integration goes. You need to find this mechanism that "keeps in mind" the user's details and include it in the php/asp configuration file. Further more, you must populate several variables (username, level...) inside the configuration file with the values returned by the mechanism described above.
Integration levels
At a beginner level, when the configuration file is executed, the mechanism inside should trigger, detecting the user's username and gender, and should populate the username and gender variables inside the asp/php configuration file with the detected values.
The variable for the username inside the asp/php configuration file is $username.
The variable for the gender inside the asp/php configuration file is $gender.
If you populate these variable dynamically you might want to block the respective user from changing them in the login screen of the user interface. For this set the value of $changeuser and $changegender to 0.
At an advanced level, if your web site allows for different levels of membership (free,premium, gold, etc...) you can force restrictions on some of them. AVChat allows for 2 levels of membership: "free" and "premium".
A "free" user can have it's video time / day restricted and/or the video it sees can have a limited number of frames/second (slow video). A "premium" user can have no active limits.
When the configuration file is executed, the mechanism inside should trigger, detecting the user's level , and should populate the userlevel and restriction variables inside the asp/php configuration accordingly. The values of these variables are used by the swf file to know what restrictions to apply.
The variable for the level of a user inside the asp/php configuration file is $userlevel.
The restriction variables are $freefps and $freevideotime and they only take effect is the value of $userlevel is equal to "free".
Further notes
You can test the integration by logging in and loading the asp/php configuration file directly in the browser and check the values it returns. THis way you can check for any syntax errors that might have slipped while editing the file.
We also provide integration services for a certain fee. More details on the AVChat purchase page.
If you are in need of a good text editor we recommend Notepad2 which is freeware.
The version of your AVChat software is shown on line 2 of your php/asp
configuration file.
