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);


 

addDirectory
addDirectory Availability: >= 3.0 Type: Object Method Description: Adds directories
allowedDocExtensions
allowedDocExtensions Availability: >= 3.0 Type: Object Property Description: Sets the
allowedImageExtensions
allowedImageExtensions Availability: >= 3.0 Type: Object Property Description: Sets the
allowedMediaExtensions
allowedMediaExtensions Availability: >= 3.0 Type: Object Property Description: Sets the
copyFiles
copyFiles Availability: >= 3.0 Type: Object Property Description: Can users
copyFolders
copyFolders Availability: >= 3.0 Type: Object Property Description: Can users
createFolders
createFolders Availability: >= 3.0 Type: Object Property Description: Can users
defaultImageView
defultImageView Availability: >= 3.1.3 Type: Object Property Description: Sets whether
deleteFiles
deleteFiles Availability: >= 3.0 Type: Object Property Description: Can users
deleteFolders
deleteFolders Availability: >= 3.0 Type: Object Property Description: Can users
dirFilters
dirFilters Availability: >= 3.0 Type: Object Property Description: Hides and
documentDir
documentDir Availability: >= 3.0 Type: Object Property Description: Sets the
documentURL
documentURL Availability: >= 3.0 Type: Object Property Description: Sets the
editImages
editImages Availability: >= 3.0 Type: Object Property Description: Can users
fileCHMOD
fileCHMOD Availability: >= 3.0 Type: Object Property Description: Sets the
folderCHMOD
folderCHMOD Availability: >= 3.0 Type: Object Property Description: Sets the
getDirectories
getDirectories Availability: >= 3.0 Type: Object Method Description: Returns an
imageDir
imageDir Availability: >= 3.0 Type: Object Property Description: Sets the
imageURL
imageURL Availability: >= 3.0 Type: Object Property Description: Sets the
maxDocSize
maxDocSize Availability: >= 3.0 Type: Object Property Description: Maximum file
maxImageDisplayHeight
maxImageDisplayHeight Availability: >= 3.1.3 Type: Object Property Description: Default maximum
maxImageDisplayWidth
maxImageDisplayWidth Availability: >= 3.1.3 Type: Object Property Description: Default maximum
maxImageHeight
maxImageHeight Availability: >= 3.0 Type: Object Property Description: Maximum allowed
maxImageSize
maxImageSize Availability: >= 3.0 Type: Object Property Description: Maximum file
maxImageWidth
maxImageWidth Availability: >= 3.0 Type: Object Property Description: Maximum allowed
1 2  [»] Next