OSDN Git Service

original file
[nucleus-jp/nucleus-plugins.git] / trunk / NP_TinyMCE2j / tinymce2j / plugins / ibrowser / config / config.inc.php
1 <?php
2         // ================================================
3         // PHP image browser - iBrowser 
4         // ================================================
5         // iBrowser - configuration
6         // ================================================
7         // Developed: net4visions.com
8         // Copyright: net4visions.com
9         // License: GPL - see license.txt
10         // (c)2005 All rights reserved.
11         // ================================================
12         // Revision: 1.3                   Date: 08/12/2005
13         // ================================================
14         
15         //-------------------------------------------------------------------------
16         // INSTRUCTIONS:
17         //
18         //      Please make sure that all of the following directories have writing permissions:
19         //      1. image libraries (chmod 0755 or 0777)
20         //      2. ibrowser/scripts/phpThumb/cache  (chmod 0755 or 0777)
21         //      3. ibrowser/temp (chmod 0755 or 0777)
22         
23         //  see readme.txt for further instructions     
24         
25         //-------------------------------------------------------------------------     
26
27
28 // some changes to work fine with nucleus
29 $i   = basename ($_SERVER['PHP_SELF']);
30 $rel = ($i == 'ibrowser.php' || $i == 'index.php') ? '' : '../';
31 include ($rel.'../../../../../config.php');
32
33 $media_path = str_replace ($_SERVER["DOCUMENT_ROOT"],'',$DIR_MEDIA);
34
35
36         $cfg['lang']            = 'en';                                                                                                         // default language; e.g. 'en'          
37         $cfg['valid']           = array('gif', 'jpg', 'jpeg', 'png');                                           // valid extentions for image files     
38         $cfg['upload']          = true;                                                                                                         // allow uploading of image: 'true' or 'false'
39         $cfg['umax']            = 1;                                                                                                            // max. number of image files to be uploaded; default: 1; value > 1
40         $cfg['create']          = true;                                                                                                         // allow to create directory: 'true' or 'false'
41         $cfg['delete']          = true;                                                                                                         // allow deletion of image: 'true' or 'false'   
42         $cfg['rename']          = true;                                                                                                         // allow renaming of image: 'true' or 'false'
43         $cfg['attrib']          = false;                                                                                                        // allow changing image attributes: 'true' or 'false'; default = false;         
44         $cfg['furl']            = true;                                                                                                         // default: true; if set to true, full url incl. domain will be added to image src
45         $cfg['random']      = '&w=150&h=150&zc=1';                                                                              // random image parameters (see phpThumb readme for more information)
46         $cfg['style'] = array (                                                                                                                 // css styles for images ('class' => 'descr'); - please make sure that the classes exist in your css file
47                         'left'                          => 'align left',                                                                        // image: float left
48                         'right'                         => 'align right',                                                                       // image: float right
49                         'capDivRightBrd'        => 'align right, border',                                                       // caption: float right with border
50                         'capDivRight'           => 'align right',                                                                       // caption: float right
51                         'capDivLeftBrd'         => 'align left, border',                                                        // caption: float left with border
52                         'capDivLeft'            => 'align left',                                                                        // caption: float left
53         );
54         $cfg['list']            = true;                                                                                                         // default: true; if set to true, image selection will be shown as list; if set to false, image selection will show thumbnails
55         //-------------------------------------------------------------------------
56         // set image formats    
57         $cfg['thumbs'] = array (                                                                                                                        
58                 /* array (                                                                                                                                      //                              settings                                                                                                                                        
59                         'size'          => '*',                                                                                                         //                              'size' = if set to '*' or '0', no image resizing will be done, otherwise set to desired width or height, e.g. 640
60                         'ext'           => '*',                                                                                                         //                              'ext'  = if set to '*' width or height will be set as identifier. If set to '', no identifier will be set.
61                         'crop'          => false,                                                                                                       //                              'crop' = if set to true, image will be zoom cropped resulting in a square image                       
62                 ), */
63                 /*      array (                                                                                                                                         
64                         'size'          => 1280,                                                                                                
65                         'ext'           => '*',
66                         'crop'          => false,
67                 ),
68                 array (
69                         'size'          => 1024,                                                                                                
70                         'ext'           => '*',
71                         'crop'          => false,
72                 ),
73                 array (
74                         'size'          => 640,                                                                                         
75                         'ext'           => '*',
76                         'crop'          => false,
77                 ),
78                 array (
79                         'size'          => 512,                                                                                         
80                         'ext'           => '*',
81                         'crop'          => false,
82                 ), */
83                 array (
84                         'size'          => 400,                                                                                         
85                         'ext'           => '*',
86                         'crop'          => false,
87                 ),
88                 array (
89                         'size'          => 400,                                                                                         
90                         'ext'           => '*',
91                         'crop'          => true,
92                 ),
93                 array (
94                         'size'          => 120,                                                                                         
95                         'ext'           => '*',
96                         'crop'          => false,
97                 ),
98 /*              array (
99                         'size'          => 75,                                                                                          
100                         'ext'           => '*',
101                         'crop'          => false,
102                 ), */
103         );
104         //-------------------------------------------------------------------------
105         // use static image libraries   
106         $cfg['ilibs'] = array (                                                                                                                         // image library path with slashes; absolute to root directory - please make sure that the directories have write permissions   
107                 array (
108                         'value'         => $media_path,                                 
109                         'text'          => 'Media',
110                 ),      
111         );
112         //-------------------------------------------------------------------------
113         // use dynamic image libraries - if $cfg['ilibs_inc'] is set, static image libraries above are ignored
114         // image directories to be scanned
115         $cfg['ilibs_dir']          = array('$media_path');                                                      // image library path with slashes; absolute to root directory - please make sure that the directories have write permissions
116         $cfg['ilibs_dir_show'] = true;                                                                                                          // show main library (true) or only sub-dirs (false)
117         //$cfg['ilibs_inc']      = realpath(dirname(__FILE__) . '/../scripts/rdirs.php');       // file to include in ibrowser.php (useful for setting $cfg['ilibs] dynamically
118         //-------------------------------------------------------------------------
119         // you shouldn't need to make any changes to the config variable beyond this line!
120         //-------------------------------------------------------------------------
121         $osslash = ((strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') ? '\\' : '/');
122         $cfg['ver']             = '1.3 - build 09122005';                                                                               // iBrowser version     
123         $cfg['root_dir']        = realpath((getenv('DOCUMENT_ROOT') && ereg('^'.preg_quote(realpath(getenv('DOCUMENT_ROOT'))), realpath(__FILE__))) ? getenv('DOCUMENT_ROOT') : str_replace(dirname(@$_SERVER['PHP_SELF']), '', str_replace($osslash, '/', dirname(__FILE__))));
124         //$cfg['root_dir']    = ((@$_SERVER['DOCUMENT_ROOT'] && file_exists(@$_SERVER['DOCUMENT_ROOT'] . $_SERVER['PHP_SELF'])) ? $_SERVER['DOCUMENT_ROOT'] : str_replace(dirname(@$_SERVER['PHP_SELF']), '', str_replace('\\', '/', realpath('.'))));
125         $cfg['base_url']        = 'http://' . $_SERVER['SERVER_NAME'];                                                  // base url; e.g. 'http://localhost/'   
126         $cfg['main_dir']        = dirname($_SERVER['PHP_SELF']);                                                                // iBrowser main dir; e.g. '/home/domain/public_html/ibrowser/' 
127         $cfg['scripts']         = $cfg['main_dir'] . '/scripts/';                                                               // scripts dir; e.g. '/home/domain/public_html/ibrowser/scripts/'       
128         $cfg['pop_url']         = $cfg['scripts'] . 'popup.php';                                                                // popup dir; relative to 'script' dir  
129         $cfg['temp']            = realpath(dirname(__FILE__) . '/../temp');                                     // temp dir; e.g. 'D:/www/temp' 
130 ?>