Support: AVChat Documentation

Social Engine 4

The AVChat Plugin for SocialEngine 4 handles the integration between your SocialEngine 4 web site and our AVChat software. Here's what it will do:

  • user name 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 4 member levels directly from the SE4 admin area

The AVChat Plugin 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 Plugin for SocialEngine 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.net .

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.

All the specific documentation regarding SocialEngine 4 is on this page so if you're looking for something specific just hit Ctrl+F on your browser.

Here are the SocialEngine 4 related topics we will cover on this page:

1. Installing the AVChat Plugin for SocialEngine 4

First you have to download these 2 archives from your private client/trial area on avchathq.com to your computer:

  • AVChat 3.0.zip (contains media server files for Red5/FMIS/Wowza and AVChat Standalone)
  • avchat3_socialengineall_UNZIPFIRST.zip (contains 2 modules: one for SE3 and one for SE4 and 1 widget for SE4: Who's Chatting)

Extract the 2 archives somewhere on your computer to have all the files handy! We will use files from both archives!

1.1 Setting up the avchat30 application on the media server

First you need to install the avchat30 app on your media server. If you don't know what a media server is check out the requirements. If you already have a media server (Red5, FMIS, FMIS hosting, Wowza) here's what you need to do:

Red5 0.8
installed on a
dedicated or VPS server
Wowza
installed on a
dedicated or VPS server

1. Upload the avchat30 folder from the AVChat 3.0.zip/Files to upload to your media server (Red5 0.8) folder to the webapps folder of your Red5 0.8 installation (C:\Program Files\Red5\webapps on Win, /opt/red5/webapps/ on Linux).

2. Linux only: Chmod the new avchat30 folder to 777.

3. Restart the Red5 server

You're done, move to Part 1.2 below

1. Upload the applications, lib and conf folders from the AVChat 3.0.zip/Files to upload to your media server (Wowza) folder to the root folder of your Wowza Media Server installation (C:\Program Files\Wowza Media Systems\Wowza Media Server Pro 1.7.2\ on Windows).

2. Restart the Wowza server

You're done, move to Part 1.2 below

FMIS
installed on a
dedicated or VPS server
FMIS
hosting from
http://influxis.com

1. Upload the avchat30 folder from the AVChat 3.0.zip/Files to upload to your media server (FMS) folder to the applications folder of your FMIS installation (C:\Program Files\Macromedia\Flash Media Server\applications on Windows, /opt/macromedia/fms/applications/ on Linux).

2. Linux only: Chmod the new avchat30 folder to 777.

You're done, move to Part 1.2 below

While logged in your Influxis.com account:

1) Go to File Manager:
2) Click the root folder
3) Click the folder icon at the top labeed New Folder
4) Give the new folder the name avchat30 and click OK
5) click the avchat30 folder in the list to the left
6) At the top click the red arrow labeled Upload
7) In the empty list that shows up add main.ase, settings.asc and Application.xml from the AVChat 3.0.zip\Files to upload to your media server (FMS)
8) Cick Upload

Done.

Your connection string used in Part 2 will look like: rtmp://123.rtmphost.com/avchat30/_definst_ where 123.rtmphost.com is shown at the top of your Influxis.com account.

Now that we've got that out of the way, let's move on to installing the AVChat Plugin on SocialEngine 4.

1.2 Installing the actual AVChat Plugin for SE4

  1. Login as admin into your SocialEngine 4 Website and go to Admin >> Manage >> Packages & Pluginspackages and plugins on SE4
  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 Plugin in the list is enabled. If it's not enable it:
    AVChat Plugin for SE4
  7. Click Return to Admin Panel
  8. Go to Settings >> General AVChat 3 Setting
    Se4
    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.
  9. Click Save Changes at the bottom
  10. Connect with an FTP client (like WinSCP or FileZilla) to your website and go to the root of your website (usually in public_html).
  11. Copy the videochat folder from the socialengine_4.x folder from the archive, to the root of your website.
  12. Now 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.
  13. CHMOD the videochat/uploadedFiles folder to 777 (otherwise the upload function might not work)
  14. Create a new folder tokens (videochat/tokens) and CHMOD it to 777 (otherwise we might have token generation issues later on)
  15. Now back in the SE4 admin area go to Admin -> Plugins -> Flash Video Chat to enter the video chat, you will be asked for the license key:
    license key request screen
    enter the key (it's in your client/trial area) and press Submit
  16. Users will see a new link in the menu that will take them to the video chat.

2. Accessing the AVChat admin interface in SE4

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 4 has 5 default member levels: Public, Default Level, Moderators, Admins and 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 Settings.

3. Location of AVChat files in a SE4 installation

All the AVChat Standalone files including language files, audio/video quality profile files, avc_settings.php and, well, everything else are on your SE4 web site in:

SE4 installation folder/videochat/

In there you will also find some special integration files like integration.php, these contain all the logic behind the integration! How they work is that they modify the default values in avc_settings.php depending on the logged in user/browser requesting them.

4. Opening up the video chat in a pop up

While logged in the admin area of SE4:

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

Simple eh?

5. 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 switch between those two methods, please check Section 4

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.

6. SocialEngine 4's member levels and AVChat

SocialEngine 4 has 5 default member levels: Public, Default Level, Moderators, Admins and Super Admins.

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

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

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.

Click the image below to see a screnshot with all the permissions that you can control individually for each member level:
SE4 Permissions List

Only the Drupal integration comes close to this.

7. Allowing visitors to join the video chat

By default the AVChat Plugin 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, allow 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.

8. Changing the looks of AVChat to better fit your SocialEngine 4 web site

Changing the design of AVChat is explained in detail in the documentation for the standalone version.

When working with the SocialEngine 4 Plugin keep in mind that AVChat is installed in SE4/videochat/ so all the files you need to edit (like style.css for fonts and colors, avc_settings.php for the background image,) are there.

Also the HTML code used to embed the video chat throughout is in :
SE4/application/modules/Avchat3/controllers/IndexController.php so if you want to change the size of the video chat in the html page (or the size of the popup window) or the background color this is the file you need to edit.

 

 

9. Installing the Who's chatting widget

  1. Login as admin into your SocialEngine 4 Website and go to Admin >> Manage >> Packages & Plugins
  2. Click on Install New Packages then on Add Packages
  3. Browse to where you unpacked avchat3_socialengineall_UNZIPFIRST.zip and select the widget-avchat3online-xxxx.tar archive
  4. Wait for the archive 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 Who's chatting widget in the list is enabled. If it's not enable it.
  7. Click Return to Admin Panel
  8. Go to Layout >> Layout Editor
  9. Choose the page(s) you want to place the Who's chatting widget in:
    choose layout position
  10. Drag the Who's chatting widget from the right list into the position you want in page and click Save Changes:
    drag whos chatting widget

Here is how it should look like in page:
whos chatting installed

10. 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 (we recommend WinSCP or FileZilla).
  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.

11. HOW TO change the Flash Video Chat menu item title

To change the menu item title you don't need to edit any file. Just follow the steps below:

  1. Login as admin into your Social Engine 4 website
  2. Go to Layout ->Menu Editor
  3. By default the Flash Video Chat link is placed into the Main Navigation Menu. If you placed it into other menu, select the correspongin menu from the drop down. Find the Flash 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).
  5. That's it.

12. HOW TO change the http://yoursite.com/avchat3 url

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

Before going further make sure that you BACKUP 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 (we recommend WinSCP or FileZilla).
  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';
    }
  4. Save the file and that's it. You can access now AVChat by going to http://youse4site.com/outstandingchat

VERY IMPORTANT NOTES

  • 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';
    }