### Examples | Developer's Guide | ASP.NET Developer's Guide

1. Getting Started
2. Applying Stylesheet
3. Using Asset Manager Add-on
   1. Enabling the Asset Manager Add-on
   2. Multiple Asset Base/Root Folders
   3. Localization
   4. Returning Absolute Path
4. Advanced Settings
5. Extending the Editor
6. Toolbar
7. Localization
8. FAQ

## III. Using Asset Manager Add-on

### III.1. Enabling the Asset Manager Add-on

Included in the Editor is an Asset Manager add-on. Using the Asset Manager add-on, you can browse and manage your web assets (upload and delete files, create and delete folders). Asset Manager add-on is located in folder assetmanager. The main file is assetmanager.asp (for ASP) and assetmanager.php (for PHP). To enable the Asset Manager add-on:

1. Copy the assetmanager folder anywhere in your web server.
2. Specify a command to open the add-on using cmdAssetManager property:
   ASP Example
   <script>
   var oEdit1 = new InnovaEditor("oEdit1");
   oEdit1.cmdAssetManager="modalDialogShow('/assetmanager/assetmanager.asp',640,445);";
   oEdit1.REPLACE("txtContent");
   </script>
   or
   PHP Example
   <script>
   var oEdit1 = new InnovaEditor("oEdit1");
   oEdit1.cmdAssetManager="modalDialogShow('/assetmanager/assetmanager.php',640,445);";
   oEdit1.REPLACE("txtContent");
   </script>
   modalDialogShow() function is a built-in function that you can use to open a web page in a new window dialog. The parameters are: url, dialog width & dialog height.
   Important:
   Please use 'relative to root' path when specifying the location of the assetmanager.asp. 'Relative to root' path always starts with "/".
3. Specify your web assets location. If you're using ASP, open settings.asp (in the assetmanager folder) using your text editor & set the arrBaseFolder variable with the location of your web assets folder (please use "relative to root" path). Then give a friendly name/caption using arrBaseName:
   arrBaseFolder(0)="/assets/"
   arrBaseName(0)="Assets"
   The above settings means that your web asset files are located in "http://yourserver/assets/" and the displayed name is "Assets". As a result, the folder selection dropdown in Asset Manager dialog page will display "Assets" and all sub folders within it:
   If you're using PHP, open settings.php (in the assetmanager folder) & set the sBaseVirtual0 variable with the location of your web assets folder (please use "relative to root" path). Then specify its real/physical path using sBase0 variable and give a friendly name/caption using sName0:
   $sBaseVirtual0="/assets";
   $sBase0="c:/inetpub/wwwroot/assets";
   $sName0="Assets";
   Important:
   Your web asset folder must have Write Permission.

If you enable the Asset Manager add-on, these dialogs will automatically show a Browse button :

- Hyperlink dialog
- Image dialog
- Insert Flash dialog
- Insert Media dialog
- Background Image dialog (opened from table and cell properties dialogs)

The Browse button will open the Asset Manager add-on dialog so that you can select a file which can be inserted as hyperlink or object (image, flash, video, etc).

### III.2. Multiple Asset Base/Root Folders

Asset Manager add-on allows you to specify more than one base/root folder (up to 4). Here are example settings in seetings.asp or settings.php :

seetings.asp

arrBaseFolder(0)="/assets/"
arrBaseName(0)="Assets"
arrBaseFolder(1)="/public_assets/"
arrBaseName(1)="Public Assets"

or

settings.php

$sBaseVirtual0="/assets";
$sBase0="c:/inetpub/wwwroot/assets";
$sName0="Assets";
$sBaseVirtual1="/public_assets";
$sBase1="c:/inetpub/wwwroot/public_assets";
$sName1="Public Assets";

### III.3. Localization

If required, you can localize the Asset Manager add-on to be displayed in specific language by setting the lang variable in querystring:

ASP Example

<script>
var oEdit1 = new InnovaEditor("oEdit1");
oEdit1.cmdAssetManager="modalDialogShow
('/assetmanager/assetmanager.asp?lang=german',640,445);";
oEdit1.REPLACE("txtContent");
</script>

or

PHP Example

<script>
var oEdit1 = new InnovaEditor("oEdit1");
oEdit1.cmdAssetManager="modalDialogShow
('/assetmanager/assetmanager.php?lang=german',640,445);";
oEdit1.REPLACE("txtContent");
</script>

The current available values lang variable are: danish, dutch, finnish, french, german, schi (Chinese Simplified), tchi (Chinese Traditional), norwegian, spanish, swedish. If lang variable is not specified, English version will be displayed.

### III.4. Returning Absolute Path

The Asset Manager dialog will return the selected file url in the form of 'relative to root' path, for example:

/assets/image.gif

If required, it can be changed to return absolute path by setting. Here is the setting required in seetings.asp and settings.php :

seetings.asp

bReturnAbsolute=true

or

settings.php

$bReturnAbsolute=true;

This will make the Asset Manager dialog returns:

http://yourservername/assets/image.gif

Inserting images using absolute path usually is required if you use the Editor in web-based email applications.

© 2003-2005, INNOVA STUDIO (www.InnovaStudio.com). All rights reserved.