diff --git a/home/default_platform_document/audiocomment.gif b/home/default_platform_document/template_thumb/audiocomment.gif similarity index 100% rename from home/default_platform_document/audiocomment.gif rename to home/default_platform_document/template_thumb/audiocomment.gif diff --git a/home/default_platform_document/checklist.gif b/home/default_platform_document/template_thumb/checklist.gif similarity index 100% rename from home/default_platform_document/checklist.gif rename to home/default_platform_document/template_thumb/checklist.gif diff --git a/home/default_platform_document/compare.gif b/home/default_platform_document/template_thumb/compare.gif similarity index 100% rename from home/default_platform_document/compare.gif rename to home/default_platform_document/template_thumb/compare.gif diff --git a/home/default_platform_document/courseobjectives.gif b/home/default_platform_document/template_thumb/courseobjectives.gif similarity index 100% rename from home/default_platform_document/courseobjectives.gif rename to home/default_platform_document/template_thumb/courseobjectives.gif diff --git a/home/default_platform_document/coursetitle.gif b/home/default_platform_document/template_thumb/coursetitle.gif similarity index 100% rename from home/default_platform_document/coursetitle.gif rename to home/default_platform_document/template_thumb/coursetitle.gif diff --git a/home/default_platform_document/cyclechart.gif b/home/default_platform_document/template_thumb/cyclechart.gif similarity index 100% rename from home/default_platform_document/cyclechart.gif rename to home/default_platform_document/template_thumb/cyclechart.gif diff --git a/home/default_platform_document/description.gif b/home/default_platform_document/template_thumb/description.gif similarity index 100% rename from home/default_platform_document/description.gif rename to home/default_platform_document/template_thumb/description.gif diff --git a/home/default_platform_document/diagram.gif b/home/default_platform_document/template_thumb/diagram.gif similarity index 100% rename from home/default_platform_document/diagram.gif rename to home/default_platform_document/template_thumb/diagram.gif diff --git a/home/default_platform_document/empty.gif b/home/default_platform_document/template_thumb/empty.gif similarity index 100% rename from home/default_platform_document/empty.gif rename to home/default_platform_document/template_thumb/empty.gif diff --git a/home/default_platform_document/flash.gif b/home/default_platform_document/template_thumb/flash.gif similarity index 100% rename from home/default_platform_document/flash.gif rename to home/default_platform_document/template_thumb/flash.gif diff --git a/home/default_platform_document/template_thumb/index.html b/home/default_platform_document/template_thumb/index.html new file mode 100644 index 0000000000..8e464d8ce3 --- /dev/null +++ b/home/default_platform_document/template_thumb/index.html @@ -0,0 +1,8 @@ + + + + + +
+ + \ No newline at end of file diff --git a/home/default_platform_document/learnerwonder.gif b/home/default_platform_document/template_thumb/learnerwonder.gif similarity index 100% rename from home/default_platform_document/learnerwonder.gif rename to home/default_platform_document/template_thumb/learnerwonder.gif diff --git a/home/default_platform_document/leftlist.gif b/home/default_platform_document/template_thumb/leftlist.gif similarity index 100% rename from home/default_platform_document/leftlist.gif rename to home/default_platform_document/template_thumb/leftlist.gif diff --git a/home/default_platform_document/leftrightlist.gif b/home/default_platform_document/template_thumb/leftrightlist.gif similarity index 100% rename from home/default_platform_document/leftrightlist.gif rename to home/default_platform_document/template_thumb/leftrightlist.gif diff --git a/home/default_platform_document/noimage.gif b/home/default_platform_document/template_thumb/noimage.gif similarity index 100% rename from home/default_platform_document/noimage.gif rename to home/default_platform_document/template_thumb/noimage.gif diff --git a/home/default_platform_document/phasetimeline.gif b/home/default_platform_document/template_thumb/phasetimeline.gif similarity index 100% rename from home/default_platform_document/phasetimeline.gif rename to home/default_platform_document/template_thumb/phasetimeline.gif diff --git a/home/default_platform_document/rightlist.gif b/home/default_platform_document/template_thumb/rightlist.gif similarity index 100% rename from home/default_platform_document/rightlist.gif rename to home/default_platform_document/template_thumb/rightlist.gif diff --git a/home/default_platform_document/stopthink.gif b/home/default_platform_document/template_thumb/stopthink.gif similarity index 100% rename from home/default_platform_document/stopthink.gif rename to home/default_platform_document/template_thumb/stopthink.gif diff --git a/home/default_platform_document/table.gif b/home/default_platform_document/template_thumb/table.gif similarity index 100% rename from home/default_platform_document/table.gif rename to home/default_platform_document/template_thumb/table.gif diff --git a/home/default_platform_document/video.gif b/home/default_platform_document/template_thumb/video.gif similarity index 100% rename from home/default_platform_document/video.gif rename to home/default_platform_document/template_thumb/video.gif diff --git a/home/default_platform_document/yourinstructor.gif b/home/default_platform_document/template_thumb/yourinstructor.gif similarity index 100% rename from home/default_platform_document/yourinstructor.gif rename to home/default_platform_document/template_thumb/yourinstructor.gif diff --git a/main/admin/settings.php b/main/admin/settings.php index 9f3505862a..71336d792b 100644 --- a/main/admin/settings.php +++ b/main/admin/settings.php @@ -1,4 +1,4 @@ -'; + return ''.get_lang('TemplatePreview').''; } else { - return ''.get_lang('NoTemplatePreview').''; + return ''.get_lang('NoTemplatePreview').''; } } @@ -1051,14 +1051,14 @@ function add_edit_template() // adding an extra field: a hidden field with the id of the template we are editing $form->addElement('hidden','template_id'); - // adding an extrra field: a preview of the image that is currently used + // adding an extra field: a preview of the image that is currently used if (!empty($row['image'])) { - $form->addElement('static','template_image_preview', '', ''.get_lang('TemplatePreview').''); + $form->addElement('static','template_image_preview', '', ''.get_lang('TemplatePreview').''); } else { - $form->addElement('static','template_image_preview', '', ''.get_lang('NoTemplatePreview').''); + $form->addElement('static','template_image_preview', '', ''.get_lang('NoTemplatePreview').''); } // setting the information of the template that we are editing @@ -1089,7 +1089,7 @@ function add_edit_template() $new_file_name = add_ext_on_mime(stripslashes($_FILES['template_image']['name']), $_FILES['template_image']['type']); // upload dir - $upload_dir = api_get_path(SYS_PATH).'home/default_platform_document/'; + $upload_dir = api_get_path(SYS_PATH).'home/default_platform_document/template_thumb/'; // create dir if not exists if (!is_dir($upload_dir)) { @@ -1179,7 +1179,7 @@ function delete_template($id) $row = Database::fetch_array($result); if (!empty($row['image'])) { - unlink(api_get_path(SYS_PATH).'home/default_platform_document/'.$row['image']); + unlink(api_get_path(SYS_PATH).'home/default_platform_document/template_thumb/'.$row['image']); } // now we remove it from the database diff --git a/main/inc/lib/fckeditor/fcktemplates.xml.php b/main/inc/lib/fckeditor/fcktemplates.xml.php index 77464b0361..5076e55537 100644 --- a/main/inc/lib/fckeditor/fcktemplates.xml.php +++ b/main/inc/lib/fckeditor/fcktemplates.xml.php @@ -93,9 +93,9 @@ function load_platform_templates() { $result = api_sql_query($sql, __FILE__, __LINE__); while ($row = Database::fetch_array($result)) { if (!empty($row['image'])) { - $image = api_get_path(WEB_PATH).'home/default_platform_document/'.$row['image']; + $image = api_get_path(WEB_PATH).'home/default_platform_document/template_thumb/'.$row['image']; } else { - $image = api_get_path(WEB_PATH).'home/default_platform_document/empty.gif'; + $image = api_get_path(WEB_PATH).'home/default_platform_document/template_thumb/empty.gif'; } $row['content'] = str_replace('{CSS}',$css, $row['content']); $row['content'] = str_replace('{IMG_DIR}',$img_dir, $row['content']); @@ -159,7 +159,7 @@ function load_personal_templates($user_id=0) { { $image = api_get_path(WEB_CODE_PATH).'upload/template_thumbnails/'.$row['image']; } else { - $image = api_get_path(WEB_PATH).'home/default_platform_document/noimage.gif'; + $image = api_get_path(WEB_PATH).'home/default_platform_document/template_thumb/noimage.gif'; } @@ -178,7 +178,7 @@ function load_empty_template() { global $css; ?> -