Overview

The AVChat Video Chat Add-on for SocialEngine 4 handles the integration between your SocialEngine 4 community and our AVChat software:

  • user name & gender integration
  • profile url integration
  • profile image integration
  • placement of video chat within the web site (user and admin interface)
  • control video chat permissions for each SocialEngine PHP 4 member levels directly from the SE4 admin area

The AVChat Module for SE4 is one of the best most advanced integration we have done! Why? because directly in SE4’s admin area you can control access to AVChat and its features based on the level of the user

If you like the AVChat Module for SocialEngine PHP 4 don’t forget to rate it and review it in the SE Community Addons area. You can also view our Developer Profile on socialengine.com.

If you cannot find the answer you’re looking for here, we encourage you to try our FAQ or forums. There’s also more documentation regarding AVChat in the documentation area for the main standalone version.

If you’re looking for something specific just hit Ctrl+F on your browser.

Installation Instructions

Download & extract archives

Download these 2 archives from your private client/trial area to your computer:

  1. AVChat 3.0.zip contains AVChat
  2. avchat3_socialengineall.zip contains the SocialEngine add-on

Extract the 2 archives somewhere on your computer.

Media Server Application

Once we’ve downloaded & unzipped everything the next thing we need to do is to setup the media server app to which AVChat will connect to.

AVChat uses a media server to send all the audio video and text data between users. AVChat supports the 3 major media servers:

  • Red5
  • Adobe Media Server
  • Wowza

Here’s how to install the avchat30 app on each one of them:

Upload the avchat30 folder from the Files to upload to your media server (Red5) folder to your Red5's webapps folder (C:\Program Files\Red5\webapps on Win, /opt/red5/webapps/ on Linux).

On Linux, chmod the new avchat30 folder to 777.

For versions of Red5 1.0.7 or higher one additional change needs to be made:

  1. Go to /Your_Red5_Install_Directory/webapps/avchat30/WEB-INF
  2. Open red-web.xml with any text editor
  3. Uncomment line 37

Restart the Red5 server.

Upload the avchat30 folder (you will find it in your AVChat archive in the Files to upload to your media server (FMS) folder) to the applications folder of your AMS installation.

On Linux, chmod the new avchat30 folder to 777.

Upload the applications, lib and conf folders from the Files to upload to your media server (Wowza) folder to the root folder of your Wowza Media Server installation.

Restart the Wowza server.

SocialEngine 4 add-on & AVChat installation

Install the add-on

  1. Login as admin into your SocialEngine PHP 4 Website and go to Admin » Manage » Packages & Plugins
  2. Click on Install New Packages then on Add Packages
  3. Browse to where you unzipped avchat3_socialengineall_UNZIPFIRST.zip and select the module-avchat3-xxxx.tar file from the socialengine_4.x folder.
  4. Wait for it to be uploaded
  5. Click Continue and follow the on-screen installation instructions until the package is installed.
  6. Click Manage Packages (top left) and make sure the AVChat Module in the list is enabled.
  7. Click Return to Admin Panel
  8. Users will see a new link in the menu that will take them to the video chat.

Install AVChat

  1. Connect with an FTP client (like WinSCP or FileZilla) to your website and go to the root of your website (usually in public_html).
  2. Copy the videochat folder from the socialengine_4.x folder from the archive, to the root of your website.
  3. In the new videochat folder copy the contents of the folder named Files to upload to your web site from the AVChat 3.0.zip archive.
  4. CHMOD the uploadedFiles and tokens folders to 777

Complete installation

Connect AVChat to the media server app

  1. Now back in the SE4 admin area go to Settings > AVChat 3 Settings and enter the RTMP connection string to your avchat30 application on the media server. It should look like this: rtmp://myFMSserver.com/avchat30/_definst_ where myFMSserver.com is the domain name or ip of the your media server.
  2. Click Save Changes at the bottom

Your AVChat installation is now configured to connect to the media server.

Enter the chat and insert the license key

  1. Go to Admin -> Plugins -> Flash Video Chat to enter the video chat, you will be asked for the license key:
  2. Enter the key (it’s in your client/trial area on nusofthq.com) and press Submit

Add-on Features

Access the AVChat admin area

The AVChat admin interface allows you to kick and ban users, view private discussions, log in as hidden, close, open and delete rooms, change the license key, etc. SocialEngine PHP 4 has 5 default member levels:

  • Public
  • Default Level
  • Moderators
  • Admins
  • Super Admins

By default Moderators, Admins and Super Admins have access to the AVChat admin interface.

Access to the AVChat admin interface and what admin features each member level gets can be controlled from: Manage -> Member Level AVChat 3 Permision.

Open AVChat in a pop up

By default AVChat 3 is embedded in your Socialengine page but you might want AVChat to open in a pop up window to make it easier for your users to browse your website while in the chat. While logged in the admin area of SE4:

  • Go to Settings -> General AVChat 3 Settings
  • Set the Open AVChat 3 in radio option to in popup
  • Scroll to the bottom and click Save Changes

Placing ads around the video chat

Any ads can be placed around AVChat, including Google Ad-Sense.

You can place ads around:

  • The chat area if the selected open method is Embeded.
  • The Open chat button if the selected open method is Popup.

To place ads around AVChat (or around the Open Chat Button if open popup open method is selected), you need to edit this file: application/modules/Avchat3/views/scripts/index/index.tpl

Where you can place the ads:

  1. On the top of the chat. In this case what you have to do is place the ads code before this line: <?php if($this->open_method == 1){ ?>
  2. In the right side of the chat. In this case you will have to use floated divs or tables to encapsulate the chat area and the ads.
  3. On the bottom of the chat. In this case what you have to do is place the ads code after this line: <?php } ?>
  4. In the left side of the chat. In this case you will have to use floated divs or tables to encapsulate the chat area and the ads.
  5. Or you can place the ads in any of the combined situations presented.

SocialEngine 4's member levels and AVChat

Social Engine member levels

SocialEngine 4 has 5 default member levels:

  • Public
  • Default Level
  • Moderators
  • Admins
  • Super Admins

Who has access to AVChat by default

By default:

  • Moderators, Admins and Super Admins have access to the AVChat admin interface
  • Default Level has access to the AVChat user interface
  • Public does not have access to AVChat

Permissions you can change from the Social Engine backend

The default setup can be changed from: Manage -> Member Level AVChat 3 Permission

But access to AVChat is not the only thing you can control. What makes this integration so great is that you can control in detail to what AVChat features each member level has access to without leaving the SE4 admin area.

See screenshot with all the permissions that you can control individually for each member level:

Allowing visitors to join the video chat

By default the AVChat Module for SE4 does not allow visitors of your web site to enter the video chat. Only signed in users are allowed in the video chat.

By default SE4 considers visitors as part of its internal Public member level so to allow visitors in we need to allow access to AVChat for the Public member level:

  1. Log in the admin area of SE4:
  2. Go to Manage -> Member Level AVChat 3 Settings
  3. Select Public in the Member Level drop down
  4. The AVChat permissions for the Public member level will load
  5. Set the Allow Access AVChat radio option to Yes, allowing access to AVChat
  6. Scroll to the bottom and click Save Changes

Visitors will have the option to choose their user name and gender before joining the video chat.

How to change the Flash Video Chat page title

The only way at this moment to change the title is by editing a file. In future updates we will add the option to change the title by editing a phrase in the SE4 phrase system.

What you have to do now to change the title:

  1. Login into your FTP account with an FTP client
  2. Go to application/modules/Avchat3/Controllers/ and open in a text editor IndexController.php
  3. Find this line $this->view->avchat3_title = 'Flash Video Chat'; and change Flash Video Chat with what you want.
  4. Save the file and that’s it.

How to change the Flash Video Chat menu item title

  1. Login as admin into your Social Engine PHP 4 website
  2. Go to Layout ->Menu Editor
  3. By default the Video Chat link is placed into the Main Navigation Menu. If you placed it into other menu, select the corresponding menu from the drop down. Find the Video Chat item, and click edit (see the screenshot below).
  4. Type the new menu title in the “Label” field and save (see the screenshot below).

How to change the default URL

This is a delicate task which requires editing a sensitive file, application/index.php.

Let’s say that you want to access AVChat 3 by going to http://yourse4site.com/outstandingchat instead of http://yourse4site.com/avchat3. SE4 automatically creates the URL and it cannot be changed from the admin area. Editing the .htaccess file is a nightmare. So the easiest possible way is this:

  1. Login into your FTP account with an FTP client
  2. Go to application and open in a text editor index.php
  3. Before any code line add these lines:
if($\_SERVER['REQUEST_URI'] == '/outstandingchat'){
$\_SERVER['REQUEST_URI'] = '/avchat3';
}

Save the file and that’s it. You can access now AVChat by going to http://youse4site.com/outstandingchat

  • Do not use videochat as alias because videochat holds the AVChat 3 standalone files that are used by the AVChat 3 SE4 module.
  • If you have Social Engine 4 installed in a folder like this http://yourse4site.com/se4folder/ then to change the URL you need to modify the code above:
if($\_SERVER['REQUEST_URI'] == '/se4folder/outstandingchat'){
$\_SERVER['REQUEST_URI'] = '/se4folder/avchat3';
}

How to upgrade the AVChat module

SocialEngine Package Manager is responsible for all the packages in the SocialEngine system. It offers us an easy way for installing/upgrading a module or a widget. Next I will present a series of steps that can help you upgrade a module or widget easily.

  1. Go to ACP->Manage Packages & Plugins->Manage Packages->Install New Packages->Add Packages;
  2. Choose Packages: Select the new archive and after upload click Continue button;
  3. Run Pre-install Check: You should see the following text: Upgrade package “module-avchat3”[old_build_no] to [new_build_no]. Here will also be shown the differences between the two archives. Click the Continue button;
  4. Enter FTP Info: Enter your connection details and the click the Continue button;
  5. Run Permissions Check: Here it will inform you about permissions beeing set and the number of files that will be copied during the installtion. Click the Continue button to go to next steps;
  6. Copy Files. A message should inform you that all files were successfully copied.
  7. Update Database. A message should inform you all necessary changes to the database have been made successfully. Click Finalize Installation button to complete the upgrade;
  8. Complete: A message that informs you the installation was successfully should appear. From here you can return to Package Manager or to the Dashboard.

Allowing visitors to enter the chat using their Facebook profile

Only visitors will have the option of connecting with Facebook to AVChat.

Follow the chapter Setup Facebook authentication in order to obtain your appid that you will use in SocialEngine backend.

  1. Go to SocialEngine backend: Settings > AVChat 3 Settings
  2. You will find there the Facebook App ID field. Put there your personal Application ID.
  3. Click Save changes

Configuring the Add-on

The main way you can configure the Add-on is from the specific backend settings page found at your_social_engine_site/admin/avchat3/settings/general

Additionally to this the Add-on can be configured directly from AVChat’s main config file (avc_settings.xml) and the rest of the configuration files described here