@@ -30,19 +30,19 @@ discard block |
||
30 | 30 | { |
31 | 31 | var $tool; // Store the selected tool |
32 | 32 | |
33 | - // If using fckeditor |
|
34 | - var $editor; |
|
33 | + // If using fckeditor |
|
34 | + var $editor; |
|
35 | 35 | |
36 | - // If not using fckeditor |
|
37 | - var $content; |
|
38 | - var $htmlname; |
|
39 | - var $toolbarname; |
|
40 | - var $toolbarstartexpanded; |
|
41 | - var $rows; |
|
42 | - var $cols; |
|
43 | - var $height; |
|
44 | - var $width; |
|
45 | - var $readonly; |
|
36 | + // If not using fckeditor |
|
37 | + var $content; |
|
38 | + var $htmlname; |
|
39 | + var $toolbarname; |
|
40 | + var $toolbarstartexpanded; |
|
41 | + var $rows; |
|
42 | + var $cols; |
|
43 | + var $height; |
|
44 | + var $width; |
|
45 | + var $readonly; |
|
46 | 46 | |
47 | 47 | |
48 | 48 | /** |
@@ -57,22 +57,22 @@ discard block |
||
57 | 57 | * 'In' each window has its own toolbar |
58 | 58 | * 'Out:name' share toolbar into the div called 'name' |
59 | 59 | * @param boolean $toolbarstartexpanded Bar is visible or not at start |
60 | - * @param int $uselocalbrowser Enabled to add links to local object with local browser. If false, only external images can be added in content. |
|
61 | - * @param boolean|string $okforextendededitor True=Allow usage of extended editor tool if qualified (like ckeditor). If 'textarea', force use of simple textarea. If 'ace', force use of Ace. |
|
62 | - * Warning: If you use 'ace', don't forget to also include ace.js in page header. Also, the button "save" must have class="buttonforacesave". |
|
60 | + * @param int $uselocalbrowser Enabled to add links to local object with local browser. If false, only external images can be added in content. |
|
61 | + * @param boolean|string $okforextendededitor True=Allow usage of extended editor tool if qualified (like ckeditor). If 'textarea', force use of simple textarea. If 'ace', force use of Ace. |
|
62 | + * Warning: If you use 'ace', don't forget to also include ace.js in page header. Also, the button "save" must have class="buttonforacesave". |
|
63 | 63 | * @param int $rows Size of rows for textarea tool |
64 | - * @param string $cols Size of cols for textarea tool (textarea number of cols '70' or percent 'x%') |
|
65 | - * @param int $readonly 0=Read/Edit, 1=Read only |
|
66 | - */ |
|
64 | + * @param string $cols Size of cols for textarea tool (textarea number of cols '70' or percent 'x%') |
|
65 | + * @param int $readonly 0=Read/Edit, 1=Read only |
|
66 | + */ |
|
67 | 67 | function __construct($htmlname, $content, $width='', $height=200, $toolbarname='Basic', $toolbarlocation='In', $toolbarstartexpanded=false, $uselocalbrowser=true, $okforextendededitor=true, $rows=0, $cols=0, $readonly=0) |
68 | 68 | { |
69 | - global $conf,$langs; |
|
69 | + global $conf,$langs; |
|
70 | 70 | |
71 | - dol_syslog(get_class($this)."::DolEditor htmlname=".$htmlname." width=".$width." height=".$height." toolbarname=".$toolbarname); |
|
71 | + dol_syslog(get_class($this)."::DolEditor htmlname=".$htmlname." width=".$width." height=".$height." toolbarname=".$toolbarname); |
|
72 | 72 | |
73 | - if (! $rows) $rows=round($height/20); |
|
74 | - if (! $cols) $cols=($width?round($width/6):80); |
|
75 | - $shorttoolbarname=preg_replace('/_encoded$/','',$toolbarname); |
|
73 | + if (! $rows) $rows=round($height/20); |
|
74 | + if (! $cols) $cols=($width?round($width/6):80); |
|
75 | + $shorttoolbarname=preg_replace('/_encoded$/','',$toolbarname); |
|
76 | 76 | |
77 | 77 | // Name of extended editor to use (FCKEDITOR_EDITORNAME can be 'ckeditor' or 'fckeditor') |
78 | 78 | $defaulteditor='ckeditor'; |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | |
83 | 83 | // Check if extended editor is ok. If not we force textarea |
84 | 84 | if ((empty($conf->fckeditor->enabled) && $okforextendededitor != 'ace') || empty($okforextendededitor)) $this->tool = 'textarea'; |
85 | - if ($okforextendededitor === 'ace') $this->tool='ace'; |
|
85 | + if ($okforextendededitor === 'ace') $this->tool='ace'; |
|
86 | 86 | //if ($conf->dol_use_jmobile) $this->tool = 'textarea'; // ckeditor and ace seems ok with mobile |
87 | 87 | |
88 | 88 | // Define content and some properties |
@@ -91,50 +91,50 @@ discard block |
||
91 | 91 | $content=dol_htmlentitiesbr($content); // If content is not HTML, we convert to HTML. |
92 | 92 | } |
93 | 93 | if ($this->tool == 'fckeditor') |
94 | - { |
|
95 | - require_once DOL_DOCUMENT_ROOT.'/includes/fckeditor/fckeditor.php'; |
|
96 | - |
|
97 | - $content=dol_htmlentitiesbr($content); // If content is not HTML, we convert to HTML. |
|
98 | - |
|
99 | - $this->editor = new FCKeditor($htmlname); |
|
100 | - $this->editor->BasePath = DOL_URL_ROOT.'/includes/fckeditor/' ; |
|
101 | - $this->editor->Value = $content; |
|
102 | - $this->editor->Height = $height; |
|
103 | - if (! empty($width)) $this->editor->Width = $width; |
|
104 | - $this->editor->ToolbarSet = $shorttoolbarname; // Profile of this toolbar set is deinfed into theme/mytheme/ckeditor/config.js |
|
105 | - $this->editor->Config['AutoDetectLanguage'] = 'true'; // Language of user (browser) |
|
106 | - $this->editor->Config['ToolbarLocation'] = $toolbarlocation ? $toolbarlocation : 'In'; |
|
107 | - $this->editor->Config['ToolbarStartExpanded'] = $toolbarstartexpanded; |
|
108 | - |
|
109 | - // Rem: Le forcage de ces 2 parametres ne semble pas fonctionner. |
|
110 | - // Dolibarr utilise toujours liens avec modulepart='fckeditor' quelque soit modulepart. |
|
111 | - // Ou se trouve donc cette valeur /viewimage.php?modulepart=fckeditor&file=' ? |
|
112 | - $modulepart='fckeditor'; |
|
113 | - $this->editor->Config['UserFilesPath'] = '/viewimage.php?modulepart='.$modulepart.'&entity='.$conf->entity.'&file='; |
|
114 | - $this->editor->Config['UserFilesAbsolutePath'] = DOL_DATA_ROOT.'/'.$modulepart.'/' ; |
|
115 | - |
|
116 | - $this->editor->Config['LinkBrowser']=($uselocalbrowser?'true':'false'); |
|
117 | - $this->editor->Config['ImageBrowser']=($uselocalbrowser?'true':'false'); |
|
118 | - |
|
119 | - if (file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/fckeditor/fckconfig.js')) |
|
120 | - { |
|
121 | - $this->editor->Config['CustomConfigurationsPath'] = DOL_URL_ROOT.'/theme/'.$conf->theme.'/fckeditor/fckconfig.js'; |
|
122 | - $this->editor->Config['SkinPath'] = DOL_URL_ROOT.'/theme/'.$conf->theme.'/fckeditor/'; |
|
123 | - } |
|
124 | - } |
|
125 | - |
|
126 | - // Define some properties |
|
94 | + { |
|
95 | + require_once DOL_DOCUMENT_ROOT.'/includes/fckeditor/fckeditor.php'; |
|
96 | + |
|
97 | + $content=dol_htmlentitiesbr($content); // If content is not HTML, we convert to HTML. |
|
98 | + |
|
99 | + $this->editor = new FCKeditor($htmlname); |
|
100 | + $this->editor->BasePath = DOL_URL_ROOT.'/includes/fckeditor/' ; |
|
101 | + $this->editor->Value = $content; |
|
102 | + $this->editor->Height = $height; |
|
103 | + if (! empty($width)) $this->editor->Width = $width; |
|
104 | + $this->editor->ToolbarSet = $shorttoolbarname; // Profile of this toolbar set is deinfed into theme/mytheme/ckeditor/config.js |
|
105 | + $this->editor->Config['AutoDetectLanguage'] = 'true'; // Language of user (browser) |
|
106 | + $this->editor->Config['ToolbarLocation'] = $toolbarlocation ? $toolbarlocation : 'In'; |
|
107 | + $this->editor->Config['ToolbarStartExpanded'] = $toolbarstartexpanded; |
|
108 | + |
|
109 | + // Rem: Le forcage de ces 2 parametres ne semble pas fonctionner. |
|
110 | + // Dolibarr utilise toujours liens avec modulepart='fckeditor' quelque soit modulepart. |
|
111 | + // Ou se trouve donc cette valeur /viewimage.php?modulepart=fckeditor&file=' ? |
|
112 | + $modulepart='fckeditor'; |
|
113 | + $this->editor->Config['UserFilesPath'] = '/viewimage.php?modulepart='.$modulepart.'&entity='.$conf->entity.'&file='; |
|
114 | + $this->editor->Config['UserFilesAbsolutePath'] = DOL_DATA_ROOT.'/'.$modulepart.'/' ; |
|
115 | + |
|
116 | + $this->editor->Config['LinkBrowser']=($uselocalbrowser?'true':'false'); |
|
117 | + $this->editor->Config['ImageBrowser']=($uselocalbrowser?'true':'false'); |
|
118 | + |
|
119 | + if (file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/fckeditor/fckconfig.js')) |
|
120 | + { |
|
121 | + $this->editor->Config['CustomConfigurationsPath'] = DOL_URL_ROOT.'/theme/'.$conf->theme.'/fckeditor/fckconfig.js'; |
|
122 | + $this->editor->Config['SkinPath'] = DOL_URL_ROOT.'/theme/'.$conf->theme.'/fckeditor/'; |
|
123 | + } |
|
124 | + } |
|
125 | + |
|
126 | + // Define some properties |
|
127 | 127 | if (in_array($this->tool,array('textarea','ckeditor','ace'))) |
128 | 128 | { |
129 | - $this->content = $content; |
|
130 | - $this->htmlname = $htmlname; |
|
131 | - $this->toolbarname = $shorttoolbarname; |
|
132 | - $this->toolbarstartexpanded = $toolbarstartexpanded; |
|
129 | + $this->content = $content; |
|
130 | + $this->htmlname = $htmlname; |
|
131 | + $this->toolbarname = $shorttoolbarname; |
|
132 | + $this->toolbarstartexpanded = $toolbarstartexpanded; |
|
133 | 133 | $this->rows = max(ROWS_3,$rows); |
134 | 134 | $this->cols = (preg_match('/%/',$cols)?$cols:max(40,$cols)); // If $cols is a percent, we keep it, otherwise, we take max |
135 | 135 | $this->height = $height; |
136 | 136 | $this->width = $width; |
137 | - } |
|
137 | + } |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps |
@@ -152,20 +152,20 @@ discard block |
||
152 | 152 | function Create($noprint=0, $morejs='', $disallowAnyContent=true, $titlecontent='', $option='') |
153 | 153 | { |
154 | 154 | // phpcs:enable |
155 | - global $conf,$langs; |
|
155 | + global $conf,$langs; |
|
156 | 156 | |
157 | - $fullpage=false; |
|
158 | - if (isset($conf->global->FCKEDITOR_ALLOW_ANY_CONTENT)) |
|
159 | - { |
|
160 | - $disallowAnyContent=empty($conf->global->FCKEDITOR_ALLOW_ANY_CONTENT); // Only predefined list of html tags are allowed or all |
|
161 | - } |
|
157 | + $fullpage=false; |
|
158 | + if (isset($conf->global->FCKEDITOR_ALLOW_ANY_CONTENT)) |
|
159 | + { |
|
160 | + $disallowAnyContent=empty($conf->global->FCKEDITOR_ALLOW_ANY_CONTENT); // Only predefined list of html tags are allowed or all |
|
161 | + } |
|
162 | 162 | |
163 | - $found=0; |
|
164 | - $out=''; |
|
163 | + $found=0; |
|
164 | + $out=''; |
|
165 | 165 | |
166 | 166 | if ($this->tool == 'fckeditor') // not used anymore |
167 | 167 | { |
168 | - $found=1; |
|
168 | + $found=1; |
|
169 | 169 | $this->editor->Create(); |
170 | 170 | } |
171 | 171 | if (in_array($this->tool,array('textarea','ckeditor'))) |
@@ -179,12 +179,12 @@ discard block |
||
179 | 179 | |
180 | 180 | if ($this->tool == 'ckeditor' && ! empty($conf->use_javascript_ajax)) |
181 | 181 | { |
182 | - if (! defined('REQUIRE_CKEDITOR')) define('REQUIRE_CKEDITOR','1'); |
|
182 | + if (! defined('REQUIRE_CKEDITOR')) define('REQUIRE_CKEDITOR','1'); |
|
183 | 183 | |
184 | - if (! empty($conf->global->FCKEDITOR_SKIN)) { |
|
185 | - $skin = $conf->global->FCKEDITOR_SKIN; |
|
186 | - } else { |
|
187 | - // $skin = 'moono-lisa'; // default with ckeditor 4.6 : moono-lisa |
|
184 | + if (! empty($conf->global->FCKEDITOR_SKIN)) { |
|
185 | + $skin = $conf->global->FCKEDITOR_SKIN; |
|
186 | + } else { |
|
187 | + // $skin = 'moono-lisa'; // default with ckeditor 4.6 : moono-lisa |
|
188 | 188 | |
189 | 189 | /** |
190 | 190 | * Alixar: |
@@ -195,10 +195,10 @@ discard block |
||
195 | 195 | $skin = CKEDITOR_SKIN; // In AlixarDispatcher defineConstants() |
196 | 196 | } |
197 | 197 | |
198 | - $htmlencode_force=preg_match('/_encoded$/',$this->toolbarname)?'true':'false'; |
|
198 | + $htmlencode_force=preg_match('/_encoded$/',$this->toolbarname)?'true':'false'; |
|
199 | 199 | |
200 | - $out.= '<!-- Output ckeditor $disallowAnyContent='.$disallowAnyContent.' toolbarname='.$this->toolbarname.' -->'."\n"; |
|
201 | - $out.= '<script type="text/javascript"> |
|
200 | + $out.= '<!-- Output ckeditor $disallowAnyContent='.$disallowAnyContent.' toolbarname='.$this->toolbarname.' -->'."\n"; |
|
201 | + $out.= '<script type="text/javascript"> |
|
202 | 202 | $(document).ready(function () { |
203 | 203 | /* if (CKEDITOR.loadFullCore) CKEDITOR.loadFullCore(); */ |
204 | 204 | /* should be editor=CKEDITOR.replace but what if serveral editors ? */ |
@@ -233,8 +233,8 @@ discard block |
||
233 | 233 | }); |
234 | 234 | } |
235 | 235 | }'; |
236 | - if ($this->uselocalbrowser) |
|
237 | - { |
|
236 | + if ($this->uselocalbrowser) |
|
237 | + { |
|
238 | 238 | $out.= ','."\n"; |
239 | 239 | // To use filemanager with old fckeditor (GPL) |
240 | 240 | $out.= ' filebrowserBrowseUrl : ckeditorFilebrowserBrowseUrl,'; |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | //$out.= ' filebrowserImageUploadUrl : \''.DOL_URL_ROOT.'/includes/fckeditor/editor/filemanagerdol/connectors/php/upload.php?Type=Image\','; |
244 | 244 | $out.= "\n"; |
245 | 245 | // To use filemanager with ckfinder (Non free) and ckfinder directory is inside htdocs/includes |
246 | - /* $out.= ' filebrowserBrowseUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/ckfinder.html\', |
|
246 | + /* $out.= ' filebrowserBrowseUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/ckfinder.html\', |
|
247 | 247 | filebrowserImageBrowseUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/ckfinder.html?Type=Images\', |
248 | 248 | filebrowserFlashBrowseUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/ckfinder.html?Type=Flash\', |
249 | 249 | filebrowserUploadUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files\', |
@@ -254,10 +254,10 @@ discard block |
||
254 | 254 | filebrowserWindowHeight : \'500\', |
255 | 255 | filebrowserImageWindowWidth : \'900\', |
256 | 256 | filebrowserImageWindowHeight : \'500\''; |
257 | - } |
|
258 | - $out.= ' })'.$morejs; |
|
259 | - $out.= '});'."\n"; |
|
260 | - $out.= '</script>'."\n"; |
|
257 | + } |
|
258 | + $out.= ' })'.$morejs; |
|
259 | + $out.= '});'."\n"; |
|
260 | + $out.= '</script>'."\n"; |
|
261 | 261 | } |
262 | 262 | } |
263 | 263 | |
@@ -265,19 +265,19 @@ discard block |
||
265 | 265 | // Warning: ace.js and ext-statusbar.js must be loaded by the parent page. |
266 | 266 | if (preg_match('/^ace/', $this->tool)) |
267 | 267 | { |
268 | - $found=1; |
|
269 | - $format=$option; |
|
268 | + $found=1; |
|
269 | + $format=$option; |
|
270 | 270 | |
271 | 271 | $out.= "\n".'<!-- Output Ace editor -->'."\n"; |
272 | 272 | |
273 | - if ($titlecontent) |
|
274 | - { |
|
275 | - $out.= '<div class="aceeditorstatusbar" id="statusBar'.$this->htmlname.'">'.$titlecontent; |
|
276 | - $out.= ' - <a id="morelines" href="#" class="right morelines'.$this->htmlname.'">'.dol_escape_htmltag($langs->trans("ShowMoreLines")).'</a> '; |
|
277 | - $out.= '</div>'; |
|
278 | - $out.= '<script type="text/javascript" language="javascript">'."\n"; |
|
279 | - $out.= 'jQuery(document).ready(function() {'."\n"; |
|
280 | - $out.= ' var aceEditor = window.ace.edit("'.$this->htmlname.'aceeditorid"); |
|
273 | + if ($titlecontent) |
|
274 | + { |
|
275 | + $out.= '<div class="aceeditorstatusbar" id="statusBar'.$this->htmlname.'">'.$titlecontent; |
|
276 | + $out.= ' - <a id="morelines" href="#" class="right morelines'.$this->htmlname.'">'.dol_escape_htmltag($langs->trans("ShowMoreLines")).'</a> '; |
|
277 | + $out.= '</div>'; |
|
278 | + $out.= '<script type="text/javascript" language="javascript">'."\n"; |
|
279 | + $out.= 'jQuery(document).ready(function() {'."\n"; |
|
280 | + $out.= ' var aceEditor = window.ace.edit("'.$this->htmlname.'aceeditorid"); |
|
281 | 281 | var StatusBar = window.ace.require("ace/ext/statusbar").StatusBar; // Init status bar. Need lib ext-statusbar |
282 | 282 | var statusBar = new StatusBar(aceEditor, document.getElementById("statusBar'.$this->htmlname.'")); // Init status bar. Need lib ext-statusbar |
283 | 283 | var oldNbOfLines = 0 |
@@ -299,21 +299,21 @@ discard block |
||
299 | 299 | } |
300 | 300 | }); |
301 | 301 | })'; |
302 | - $out.= '</script>'."\n"; |
|
303 | - } |
|
302 | + $out.= '</script>'."\n"; |
|
303 | + } |
|
304 | 304 | |
305 | 305 | $out.= '<pre id="'.$this->htmlname.'aceeditorid" style="'.($this->width?'width: '.$this->width.'px; ':''); |
306 | 306 | $out.= ($this->height?' height: '.$this->height.'px; ':''); |
307 | 307 | //$out.=" min-height: 100px;"; |
308 | 308 | $out.= '">'; |
309 | - $out.= htmlspecialchars($this->content); |
|
310 | - $out.= '</pre>'; |
|
311 | - $out.= '<textarea id="'.$this->htmlname.'" name="'.$this->htmlname.'" style="width:0px; height: 0px; display: none;">'; |
|
312 | - $out.= htmlspecialchars($this->content); |
|
313 | - $out.= '</textarea>'; |
|
309 | + $out.= htmlspecialchars($this->content); |
|
310 | + $out.= '</pre>'; |
|
311 | + $out.= '<textarea id="'.$this->htmlname.'" name="'.$this->htmlname.'" style="width:0px; height: 0px; display: none;">'; |
|
312 | + $out.= htmlspecialchars($this->content); |
|
313 | + $out.= '</textarea>'; |
|
314 | 314 | |
315 | - $out.= '<script type="text/javascript" language="javascript">'."\n"; |
|
316 | - $out.= 'var aceEditor = window.ace.edit("'.$this->htmlname.'aceeditorid"); |
|
315 | + $out.= '<script type="text/javascript" language="javascript">'."\n"; |
|
316 | + $out.= 'var aceEditor = window.ace.edit("'.$this->htmlname.'aceeditorid"); |
|
317 | 317 | |
318 | 318 | aceEditor.session.setMode("ace/mode/'.$format.'"); |
319 | 319 | aceEditor.setOptions({ |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | //aceEditor.getSession().setMode("ace/mode/javascript_expression"); |
334 | 334 | '."\n"; |
335 | 335 | |
336 | - $out.= 'jQuery(document).ready(function() { |
|
336 | + $out.= 'jQuery(document).ready(function() { |
|
337 | 337 | jQuery(".buttonforacesave").click(function() { |
338 | 338 | console.log("We click on savefile button for component '.$this->htmlname.'"); |
339 | 339 | var aceEditor = window.ace.edit("'.$this->htmlname.'aceeditorid") |
@@ -343,7 +343,7 @@ discard block |
||
343 | 343 | else return false;*/ |
344 | 344 | }); |
345 | 345 | })'; |
346 | - $out.= '</script>'."\n"; |
|
346 | + $out.= '</script>'."\n"; |
|
347 | 347 | } |
348 | 348 | |
349 | 349 | if (empty($found)) |
@@ -34,55 +34,55 @@ |
||
34 | 34 | |
35 | 35 | class modFckeditor extends DolibarrModules |
36 | 36 | { |
37 | - /** |
|
38 | - * Constructor. Define names, constants, directories, boxes, permissions |
|
39 | - * |
|
40 | - * @param DoliDB $db Database handler |
|
41 | - */ |
|
42 | - function __construct($db) |
|
43 | - { |
|
44 | - $this->db = $db; |
|
45 | - $this->numero = 2000; |
|
37 | + /** |
|
38 | + * Constructor. Define names, constants, directories, boxes, permissions |
|
39 | + * |
|
40 | + * @param DoliDB $db Database handler |
|
41 | + */ |
|
42 | + function __construct($db) |
|
43 | + { |
|
44 | + $this->db = $db; |
|
45 | + $this->numero = 2000; |
|
46 | 46 | |
47 | - $this->family = "technic"; |
|
48 | - $this->module_position = '20'; |
|
49 | - // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) |
|
50 | - $this->name = preg_replace('/^mod/i','',get_class($this)); |
|
51 | - $this->description = "Editeur WYSIWYG"; |
|
52 | - // Possible values for version are: 'development', 'experimental', 'dolibarr' or version |
|
53 | - $this->version = 'dolibarr'; |
|
54 | - $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); |
|
55 | - // Name of png file (without png) used for this module. |
|
56 | - // Png file must be in theme/yourtheme/img directory under name object_pictovalue.png. |
|
57 | - $this->picto='list'; |
|
47 | + $this->family = "technic"; |
|
48 | + $this->module_position = '20'; |
|
49 | + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) |
|
50 | + $this->name = preg_replace('/^mod/i','',get_class($this)); |
|
51 | + $this->description = "Editeur WYSIWYG"; |
|
52 | + // Possible values for version are: 'development', 'experimental', 'dolibarr' or version |
|
53 | + $this->version = 'dolibarr'; |
|
54 | + $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); |
|
55 | + // Name of png file (without png) used for this module. |
|
56 | + // Png file must be in theme/yourtheme/img directory under name object_pictovalue.png. |
|
57 | + $this->picto='list'; |
|
58 | 58 | |
59 | - // Data directories to create when module is enabled |
|
60 | - $this->dirs = array("/medias/temp","/medias/image"); |
|
59 | + // Data directories to create when module is enabled |
|
60 | + $this->dirs = array("/medias/temp","/medias/image"); |
|
61 | 61 | |
62 | - // Config pages |
|
63 | - $this->config_page_url = array("fckeditor.php"); |
|
62 | + // Config pages |
|
63 | + $this->config_page_url = array("fckeditor.php"); |
|
64 | 64 | |
65 | - // Dependencies |
|
66 | - $this->disabled = (in_array(constant('JS_CKEDITOR'),array('disabled','disabled/'))?1:0); // A condition to disable module (used for native debian packages) |
|
67 | - $this->depends = array(); |
|
68 | - $this->requiredby = array('modWebsites'); |
|
65 | + // Dependencies |
|
66 | + $this->disabled = (in_array(constant('JS_CKEDITOR'),array('disabled','disabled/'))?1:0); // A condition to disable module (used for native debian packages) |
|
67 | + $this->depends = array(); |
|
68 | + $this->requiredby = array('modWebsites'); |
|
69 | 69 | |
70 | - // Constants |
|
71 | - $this->const = array(); |
|
70 | + // Constants |
|
71 | + $this->const = array(); |
|
72 | 72 | $this->const[0] = array("FCKEDITOR_ENABLE_SOCIETE","yesno","1","WYSIWIG for description and note (except products/services)"); |
73 | 73 | $this->const[1] = array("FCKEDITOR_ENABLE_PRODUCTDESC","yesno","1","WYSIWIG for products/services description and note"); |
74 | 74 | $this->const[2] = array("FCKEDITOR_ENABLE_MAILING","yesno","1","WYSIWIG for mass emailings"); |
75 | 75 | $this->const[3] = array("FCKEDITOR_ENABLE_DETAILS","yesno","1","WYSIWIG for products details lines for all entities"); |
76 | 76 | $this->const[4] = array("FCKEDITOR_ENABLE_USERSIGN","yesno","1","WYSIWIG for user signature"); |
77 | 77 | $this->const[5] = array("FCKEDITOR_ENABLE_MAIL","yesno","1","WYSIWIG for products details lines for all entities"); |
78 | - //$this->const[6] = array("FCKEDITOR_SKIN","string","moono-lisa","Skin by default for fckeditor"); |
|
78 | + //$this->const[6] = array("FCKEDITOR_SKIN","string","moono-lisa","Skin by default for fckeditor"); |
|
79 | 79 | $this->const[6] = array("FCKEDITOR_SKIN", "string", CKEDITOR_SKIN, "Skin by default for fckeditor"); |
80 | 80 | |
81 | 81 | // Boxes |
82 | - $this->boxes = array(); |
|
82 | + $this->boxes = array(); |
|
83 | 83 | |
84 | - // Permissions |
|
85 | - $this->rights = array(); |
|
86 | - $this->rights_class = 'fckeditor'; |
|
87 | - } |
|
84 | + // Permissions |
|
85 | + $this->rights = array(); |
|
86 | + $this->rights_class = 'fckeditor'; |
|
87 | + } |
|
88 | 88 | } |