36 global $conf, $langs, $db;
39 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
43 $dirskins = array(
'/includes/ckeditor/ckeditor/skins');
44 if (!empty($conf->modules_parts[
'theme'])) {
45 foreach ($conf->modules_parts[
'theme'] as $reldir) {
46 $dirskins = array_merge($dirskins, (array) ($reldir.
'theme'));
49 $dirskins = array_unique($dirskins);
53 if (empty($conf->global->FCKEDITOR_SKIN)) {
54 $selected_theme =
'moono-lisa';
56 $selected_theme = $conf->global->FCKEDITOR_SKIN;
62 print
'<table class="noborder centpercent">';
67 print
'<tr class="liste_titre"><th width="35%">'.$langs->trans(
"DefaultSkin").
'</th>';
68 print
'<th class="right">';
71 print
'<tr class="oddeven">';
72 print
'<td>'.$langs->trans(
"ThemeDir").
'</td>';
74 foreach ($dirskins as $dirskin) {
75 echo
'"'.$dirskin.
'" ';
81 print
'<tr class="oddeven"><td colspan="'.$colspan.
'">';
83 print
'<table class="nobordernopadding" width="100%"><tr><td><div class="center">';
86 foreach ($dirskins as $dir) {
91 if (is_dir($dirskin)) {
92 $handle = opendir($dirskin);
93 if (is_resource($handle)) {
94 while (($subdir = readdir($handle)) !==
false) {
95 if (is_dir($dirskin.
"/".$subdir) && substr($subdir, 0, 1) <>
'.'
96 && substr($subdir, 0, 3) <>
'CVS' && !preg_match(
'/common|phones/i', $subdir)) {
98 if ($conf->global->MAIN_FEATURES_LEVEL < 2 && preg_match(
'/_dev$/i', $subdir)) {
101 if ($conf->global->MAIN_FEATURES_LEVEL < 1 && preg_match(
'/_exp$/i', $subdir)) {
105 print
'<div class="inline-block" style="margin-top: 10px; margin-bottom: 10px; margin-right: 20px; margin-left: 20px;">';
106 if ($subdir == $selected_theme) {
107 print
'<input '.($edit ?
'' :
'disabled').
' type="radio" '.$bc[$var].
' style="border: 0px;" checked name="fckeditor_skin" value="'.$subdir.
'"> <b>'.$subdir.
'</b>';
109 print
'<input '.($edit ?
'' :
'disabled').
' type="radio" '.$bc[$var].
' style="border: 0px;" name="fckeditor_skin" value="'.$subdir.
'"> '.$subdir;
120 print
'</div></td></tr></table>';
show_skin($fuser, $edit=0)
Show list of ckeditor's themes.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.