Configuring the file Managers

These properties and methods are used to configure the wysiwygPro file manager. 

Note: the default values for many of these settings are configured in wysiwygPro/conf/dialogConfig.inc.php

Examples: 

Configuring a single image directory: 

// configure the file browser:

// Note: folders used by the file browser must be made writable otherwise uploading and file editing will not work.

// Full file path of your images folder:
$editor->imageDir dirname(__FILE__).'/images/';

// URL of your images folder:
$editor->imageURL dirname($_SERVER['SCRIPT_NAME']).'/images/';

// set file browser editing permissions:
$editor->editImages true;
$editor->renameFiles true;
$editor->renameFolders true;
$editor->deleteFiles true;
$editor->deleteFolders true;
$editor->copyFiles true;
$editor->copyFolders true;
$editor->moveFiles true;
$editor->moveFolders true;
$editor->upload true;
$editor->overwrite true;
$editor->createFolders true;

Configuring multiple image directories:

// create and configure the first image directory:
$dir1 = new wproDirectory();

// set type of folder:
$dir1->type 'image';

// full file path of the folder:
$dir1->dir dirname(__FILE__).'/images1/';

// URL of the folder:
$dir1->URL dirname($_SERVER['SCRIPT_NAME']).'/images1/';

// Set access permissions:
$dir1->editImages true;
$dir1->renameFiles true;
$dir1->renameFolders true;
$dir1->deleteFiles true;
$dir1->deleteFolders true;
$dir1->copyFiles true;
$dir1->copyFolders true;
$dir1->moveFiles true;
$dir1->moveFolders true;
$dir1->upload true;
$dir1->overwrite true;
$dir1->createFolders true;

// add the directory to the editor
$editor->addDirectory($dir1);


// create and configure the second image directory:
$dir2 = new wproDirectory();

// set type of folder:
$dir2->type 'image';

// full file path of the folder:
$dir2->dir dirname(__FILE__).'/images2/';

// URL of the folder:
$dir2->URL dirname($_SERVER['SCRIPT_NAME']).'/images2/';

// Set access permissions:
$dir2->editImages true;
$dir2->renameFiles true;
$dir2->renameFolders true;
$dir2->deleteFiles true;
$dir2->deleteFolders true;
$dir2->copyFiles true;
$dir2->copyFolders true;
$dir2->moveFiles true;
$dir2->moveFolders true;
$dir2->upload true;
$dir2->overwrite true;
$dir2->createFolders true;

// add the directory to the editor
$editor->addDirectory($dir2);


 

maxMediaDisplayHeight
maxMediaDisplayHeight Availability: >= 3.1.3 Type: Object Property Description: Default maximum
maxMediaDisplayWidth
maxMediaDisplayWidth Availability: >= 3.1.3 Type: Object Property Description: Default maximum
maxMediaSize
maxMediaSize Availability: >= 3.0 Type: Object Property Description: Maximum file
MediaDir
mediaDir Availability: >= 3.0 Type: Object Property Description: Sets the
mediaURL
mediaURL Availability: >= 3.0 Type: Object Property Description: Sets the
moveFiles
moveFiles Availability: >= 3.0 Type: Object Property Description: Can users
moveFolders
moveFolders Availability: >= 3.0 Type: Object Property Description: Can users
overwrite
overwrite Availability: >= 3.0 Type: Object Property Description: Can users
renameFiles
renameFiles Availability: >= 3.0 Type: Object Property Description: Can users
renameFolders
renameFolders Availability: >= 3.0 Type: Object Property Description: Can users
tempFilePReflix
tempFilePrefix Availability: >= 3.0 Type: Object Property Description: Prefix for
thumbnailFolderDisplayName
thumbnailFolderDisplayName Availability: >= 3.0 Type: Object Property Description: Display name
thumbnailFolderName
thumbnailFolderName Availability: >= 3.0 Type: Object Property Description: Filename for
thumbnails
thumbnails Availability: >= 3.0 Type: Object Property Description: Turns thumbnails
upload
upload Availability: >= 3.0 Type: Object Property Description: Can users
Prev [«]  1 2