Flash PHP Shoutbox Installation

STEP 1: Download Shoutbox application from the site

1. Go to shoutbox download page;

2. Click big download button.

 

STEP 2: Install server side scripts to your server

Shoutbox application is provided in .zip archive.

1. Extract files from downloaded archive;

2. Copy all files and folders to the web server where you are going to install shoutbox;

3. Open installation wizard in the browser:

http://www.mysite.com/shoutbox/install.php

In the code:

  • www.mysite.com - your website;
  • shoutbox - folder, you uploaded shoutbox to.

4. Follow installation instructions, set proper file permissions, set database login and password, etc.

 

STEP 3: Include the SWFObject JavaScript library in the head of your HTML page

<head>
    <title>Your Page Title</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type="text/javascript" src="swjobjectUrl"></script>
</head>

 In the code: 

  • swjobjectUrl (String, required) specifies the URL of swfobject.js file.
 

STEP 4: Shoutbox is embedded in HTML page using SWFObject with the following code:

<div id="idBlockShoutbox">
    Alternative content.
    This text is replaced by the Flash movie.
</div>
<script type="text/javascript">
    var params = {bgcolor: '48B6E6'};
    var flashvars = {
        serverURL: 'server/php/shoutbox.php',
        refreshTime: 3,
        title: 'Shoutbox Demo'
    };
    var attributes = {};
    var swfUrl = 'shoutbox.swf';
    var width = 250;
    var height = 290;
    swfobject.embedSWF(swfUrl, "idBlockShoutbox", width, height, "9.0.115",
        "js/swfobject/expressInstall.swf", flashvars, params, attributes);
</script>

In the code:

  • swfUrl (string, required) specifies the URL of shoutbox SWF file;
  • width (number, required) specifies width in pixels of shoutbox;
  • height (number, required) specifies height in pixels of shoutbox;
  • bgcolor (string, required) specifies HEX color of shoutbox background;
  • serverURL parameter – relative to path to shoutbox.php server file;
  • refreshTime specifies time in seconds for refreshing shoutbox;
  • title specifies the header title of shoutbox.

Detailed information about using SWFObject you can find here.

© 2011 WilsonTechnology