XOOPS  2.6.0
config.php
Go to the documentation of this file.
1 <?php
2 // XOOPS
3 $current_path = __DIR__;
4 if ( DIRECTORY_SEPARATOR != "/" ) {
5  $current_path = str_replace( DIRECTORY_SEPARATOR, "/", $current_path);
6 }
7 $xoops_root_path = substr($current_path, 0, strpos(strtolower($current_path), "/class/xoopseditor/tinymce4/"));
8 include_once $xoops_root_path . "/mainfile.php";
9 
11 $xoops->logger()->quiet();
12 
14 $chemin_scheme = $chemin_array["scheme"]; // http
15 $chemin_host = $chemin_array["host"]; // www.example.com or // localhost
16 // $chemin_path = $chemin_array["path"]; // /myweb1
17  if (!isset($chemin_array['path']))
18  {
19  $chemin_path = '';
20  }
21  else
22  {
23  $chemin_path = $chemin_array["path"];
24  }
25 // XOOPS
26 
27 //include_once $xoops_root_path . "/mainfile.php";
28 
29 //XOOPS
30 //session_start();
31 if(!isset($_SESSION))
32 {
33 session_start();
34 }
35 //XOOPS
36 //session_start();
37 mb_internal_encoding('UTF-8');
38 //------------------------------------------------------------------------------
39 // DON'T COPY THIS VARIABLES IN FOLDERS config.php FILES
40 //------------------------------------------------------------------------------
41 
42 //**********************
43 //Path configuration
44 //**********************
45 // In this configuration the folder tree is
46 // root
47 // |- source <- upload folder
48 // |- thumbs <- thumbnail folder [must have write permission (755)]
49 // |- filemanager
50 // |- js
51 // | |- tinymce
52 // | | |- plugins
53 // | | | |- responsivefilemanager
54 // | | | | |- plugin.min.js
55 
56 //$base_url="http://www.site.com"; // base url (only domain) of site (without final /). If you prefer relative urls leave empty
58 
59 //$upload_dir = '/source/'; // path from base_url to base of upload folder (with start and final /)
60 
61 $upload_dir = $chemin_path.'/uploads/filemanager/media/'; // path from base_url to base of upload folder (with start and final /)
62 
63 //$current_path = '../source/'; // relative path from filemanager folder to upload folder (with final /)
64 $current_path = '../../../../../uploads/filemanager/media/'; // relative path from filemanager folder to upload folder (with final /)
65 
66 //thumbs folder can't put inside upload folder
67 $thumbs_base_path = '../../../../../uploads/filemanager/thumbs/'; // relative path from filemanager folder to thumbs folder (with final /)
68 //--------------------------------------------------------------------------------------------------------
69 // YOU CAN COPY AND CHANGE THESE VARIABLES INTO FOLDERS config.php FILES TO CUSTOMIZE EACH FOLDER OPTIONS
70 //--------------------------------------------------------------------------------------------------------
71 
72 $MaxSizeUpload = 100; //Mb
73 
74 // SERVER OVERRIDE
75 if ((int)(ini_get('post_max_size')) < $MaxSizeUpload){
76  $MaxSizeUpload = (int)(ini_get('post_max_size'));
77 }
78 
79 $default_language = "en_EN"; //default language file name
80 $icon_theme = "ico"; //ico or ico_dark you can cusatomize just putting a folder inside filemanager/img
81 $show_folder_size = TRUE; //Show or not show folder size in list view feature in filemanager (is possible, if there is a large folder, to greatly increase the calculations)
82 $show_sorting_bar = TRUE; //Show or not show sorting feature in filemanager
83 $loading_bar = TRUE; //Show or not show loading bar
84 $transliteration = FALSE; //active or deactive the transliteration (mean convert all strange characters in A..Za..z0..9 characters)
85 
86 //*******************************************
87 //Images limit and resizing configuration
88 //*******************************************
89 
90 // set maximum pixel width and/or maximum pixel height for all images
91 // If you set a maximum width or height, oversized images are converted to those limits. Images smaller than the limit(s) are unaffected
92 // if you don't need a limit set both to 0
95 
96 //Automatic resizing //
97 // If you set $image_resizing to TRUE the script converts all uploaded images exactly to image_resizing_width x image_resizing_height dimension
98 // If you set width or height to 0 the script automatically calculates the other dimension
99 // Is possible that if you upload very big images the script not work to overcome this increase the php configuration of memory and time limit
103 
104 //******************
105 // Default layout setting
106 //
107 // 0 => boxes
108 // 1 => detailed list (1 column)
109 // 2 => columns list (multiple columns depending on the width of the page)
110 // YOU CAN ALSO PASS THIS PARAMETERS USING SESSION VAR => $_SESSION['RF']["VIEW"]=
111 //
112 //******************
114 
115 //set if the filename is truncated when overflow first row
117 
118 //*************************
119 //Permissions configuration
120 //******************
128 $copy_cut_files = FALSE; // for copy/cut files
129 $copy_cut_dirs = FALSE; // for copy/cut directories
130 
131 // XOOPS
132 global $xoopsUser;
133 // 1 : webmasters
134 // 2 : members
135 // 3 : anonymous
136 // 4 : your new group
137 $allowed_groups_upload = array(1); // id des groupes autoris?s en upload
138 $allowed_groups_createfolder = array(1); // id des groupes autoris?s create folder
139 if ($xoopsUser) {
140  $usergroups = $GLOBALS['xoopsUser']->getGroups();
141  $result_upload = array_intersect($usergroups, $allowed_groups_upload);
142  if ($result_upload || $result_upload!=null) {
143  $upload_files = TRUE;
144  }
145  $result_createfolder = array_intersect($usergroups, $allowed_groups_createfolder);
146  if ($result_createfolder || $result_createfolder!=null) {
147  $create_folders = TRUE;
148  }
149 }
150 // XOOPS
151 // defines size limit for paste in MB / operation
152 // set 'FALSE' for no limit
154 // defines file count limit for paste / operation
155 // set 'FALSE' for no limit
157 //IF any of these limits reached, operation won't start and generate warning
158 
159 //**********************
160 //Allowed extensions (lowercase insert)
161 //**********************
162 $ext_img = array('jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff', 'svg'); //Images
163 $ext_file = array('doc', 'docx','rtf', 'pdf', 'xls', 'xlsx', 'txt', 'csv','html','xhtml','psd','sql','log','fla','xml','ade','adp','mdb','accdb','ppt','pptx','odt','ots','ott','odb','odg','otp','otg','odf','ods','odp','css','ai'); //Files
164 $ext_video = array('mov', 'mpeg', 'mp4', 'avi', 'mpg','wma',"flv","webm"); //Video
165 $ext_music = array('mp3', 'm4a', 'ac3', 'aiff', 'mid','ogg','wav'); //Audio
166 $ext_misc = array('zip', 'rar','gz','tar','iso','dmg'); //Archives
167 
168 $ext = array_merge($ext_img, $ext_file, $ext_misc, $ext_video,$ext_music); //allowed extensions
169 
170 
171 /******************
172  * AVIARY config
173 *******************/
175 $aviary_key = "dvh8qudbp6yx2bnp";
176 $aviary_secret = "m6xaym5q42rpw433";
179 
180 
181 //The filter and sorter are managed through both javascript and php scripts because if you have a lot of
182 //file in a folder the javascript script can't sort all or filter all, so the filemanager switch to php script.
183 //The plugin automatic swich javascript to php when the current folder exceeds the below limit of files number
185 
186 //**********************
187 // Hidden files and folders
188 //**********************
189 // set the names of any folders you want hidden (eg "hidden_folder1", "hidden_folder2" ) Remember all folders with these names will be hidden (you can set any exceptions in config.php files on folders)
190 $hidden_folders = array();
191 // set the names of any files you want hidden. Remember these names will be hidden in all folders (eg "this_document.pdf", "that_image.jpg" )
192 $hidden_files = array('config.php');
193 
194 //XOOPS
195 $hidden_files = array('index.html');
196 //XOOPS
197 /*******************
198  * JAVA upload
199  *******************/
202 
203 
204 //************************************
205 //Thumbnail for external use creation
206 //************************************
207 
208 
209 // New image resized creation with fixed path from filemanager folder after uploading (thumbnails in fixed mode)
210 // If you want create images resized out of upload folder for use with external script you can choose this method,
211 // You can create also more than one image at a time just simply add a value in the array
212 // Remember than the image creation respect the folder hierarchy so if you are inside source/test/test1/ the new image will create at
213 // path_from_filemanager/test/test1/
214 // PS if there isn't write permission in your destination folder you must set it
215 $fixed_image_creation = FALSE; //activate or not the creation of one or more image resized with fixed path from filemanager folder
216 $fixed_path_from_filemanager = array('../test/','../test1/'); //fixed path of the image folder from the current position on upload folder
217 $fixed_image_creation_name_to_prepend = array('','test_'); //name to prepend on filename
218 $fixed_image_creation_to_append = array('_test',''); //name to appendon filename
219 $fixed_image_creation_width = array(300,400); //width of image (you can leave empty if you set height)
220 $fixed_image_creation_height = array(200,''); //height of image (you can leave empty if you set width)
221 
222 
223 // New image resized creation with relative path inside to upload folder after uploading (thumbnails in relative mode)
224 // With Responsive filemanager you can create automatically resized image inside the upload folder, also more than one at a time
225 // just simply add a value in the array
226 // The image creation path is always relative so if i'm inside source/test/test1 and I upload an image, the path start from here
227 $relative_image_creation = FALSE; //activate or not the creation of one or more image resized with relative path from upload folder
228 $relative_path_from_current_pos = array('thumb/','thumb/'); //relative path of the image folder from the current position on upload folder
229 $relative_image_creation_name_to_prepend= array('','test_'); //name to prepend on filename
230 $relative_image_creation_name_to_append = array('_test',''); //name to append on filename
231 $relative_image_creation_width = array(300,400); //width of image (you can leave empty if you set height)
232 $relative_image_creation_height = array(200,''); //height of image (you can leave empty if you set width)
233 
234 ?>
$aviary_key
Definition: config.php:175
$copy_cut_dirs
Definition: config.php:129
$aviary_language
Definition: config.php:178
$current_path
Definition: config.php:3
$fixed_image_creation_height
Definition: config.php:220
$relative_image_creation_name_to_prepend
Definition: config.php:229
$aviary_version
Definition: config.php:177
$_SESSION['RF']["verify"]
Definition: dialog.php:4
$upload_files
Definition: config.php:124
$ext_video
Definition: config.php:164
$image_max_height
Definition: config.php:94
$thumbs_base_path
Definition: config.php:67
if((int)(ini_get('post_max_size'))< $MaxSizeUpload) $default_language
Definition: config.php:79
$allowed_groups_upload
Definition: config.php:137
$relative_image_creation_height
Definition: config.php:232
static getInstance()
Definition: Xoops.php:160
$icon_theme
Definition: config.php:80
$image_max_width
Definition: config.php:93
$delete_files
Definition: config.php:121
$default_view
Definition: config.php:113
$ext_file
Definition: config.php:163
$ext_img
Definition: config.php:162
$image_resizing_height
Definition: config.php:102
$ext
Definition: config.php:168
$chemin_array
Definition: config.php:13
$chemin_scheme
Definition: config.php:14
$hidden_folders
Definition: config.php:190
$relative_path_from_current_pos
Definition: config.php:228
$aviary_active
Definition: config.php:174
$image_resizing
Definition: config.php:100
$show_sorting_bar
Definition: config.php:82
$rename_folders
Definition: config.php:126
defined('DS') or define('DS' DIRECTORY_SEPARATOR
Definition: common.php:41
$copy_cut_max_count
Definition: config.php:156
$file_number_limit_js
Definition: config.php:184
if(DIRECTORY_SEPARATOR!="/") $xoops_root_path
Definition: config.php:7
$image_resizing_width
Definition: config.php:101
$fixed_image_creation
Definition: config.php:215
$relative_image_creation_name_to_append
Definition: config.php:230
if($xoopsUser) $copy_cut_max_size
Definition: config.php:153
global $xoopsUser
Definition: config.php:132
$allowed_groups_createfolder
Definition: config.php:138
$chemin_host
Definition: config.php:15
static get($name)
$delete_folders
Definition: config.php:123
$rename_files
Definition: config.php:125
$fixed_image_creation_name_to_prepend
Definition: config.php:217
$fixed_image_creation_to_append
Definition: config.php:218
$ext_music
Definition: config.php:165
$copy_cut_files
Definition: config.php:128
$ellipsis_title_after_first_row
Definition: config.php:116
$java_upload
Definition: config.php:200
$relative_image_creation_width
Definition: config.php:231
$relative_image_creation
Definition: config.php:227
$loading_bar
Definition: config.php:83
$hidden_files
Definition: config.php:192
$base_url
Definition: config.php:57
$fixed_path_from_filemanager
Definition: config.php:216
$GLOBALS['xoops']
Definition: common.php:33
$transliteration
Definition: config.php:84
$MaxSizeUpload
Definition: config.php:72
$xoops
Definition: config.php:10
$create_folders
Definition: config.php:122
$fixed_image_creation_width
Definition: config.php:219
$duplicate_files
Definition: config.php:127
$aviary_secret
Definition: config.php:176
$ext_misc
Definition: config.php:166
$show_folder_size
Definition: config.php:81
$JAVAMaxSizeUpload
Definition: config.php:201
$upload_dir
Definition: config.php:61