MantisBT - ATutor
View Issue Details
0003368ATutorContentpublic2008-04-30 10:092008-08-21 08:55
0003368: Support customized html head information: styles and javascript
This originates from supporting styles and javscript in the content created by eXe. The problem is extended to allow users to add in their own styles and javascripts in html head.

This change affects content import/export/display/edit, backup create/restore
No tags attached.
Issue History
2008-04-30 10:09cindyNew Issue
2008-04-30 10:09cindyAffects version => SVN
2008-04-30 10:10cindyAssigned To => cindy
2008-04-30 10:10cindyStatusnew => assigned
2008-04-30 10:11cindyStatusassigned => resolved
2008-04-30 10:11cindyFixed in Version => 1.6.1
2008-04-30 10:11cindyResolutionopen => fixed
2008-04-30 10:11cindyNote Added: 0002849
2008-05-07 06:18cindyStatusresolved => feedback
2008-05-07 06:18cindyResolutionfixed => reopened
2008-05-07 06:18cindyNote Added: 0002875
2008-05-07 06:22cindyStatusfeedback => resolved
2008-05-07 06:22cindyResolutionreopened => fixed
2008-05-07 06:22cindyNote Added: 0002876
2008-08-21 08:55gregStatusresolved => closed

2008-04-30 10:11   
Change Detail:

* Database changes:

ALTER TABLE `content`
ADD head TEXT NOT NULL AFTER release_date,
ADD use_customized_head TINYINT(4) NOT NULL AFTER head;

INSERT INTO `language_text` VALUES ('en', '_template', 'customized_head', 'Customized Head', now(), '');
INSERT INTO `language_text` VALUES ('en', '_template', 'edit_customized_head', 'Edit Customized Head', now(), '');
INSERT INTO `language_text` VALUES ('en', '_template', 'hide_customized_head', 'Hide Customized Head', now(), '');
INSERT INTO `language_text` VALUES ('en', '_template', 'use_customized_head', 'Use Customized Head', now(), '');
INSERT INTO `language_text` VALUES ('en', '_template', 'customized_head_note', 'Edit your own style and javascript', now(), '');

* Script Changes:

1. import/export content
include/ add function get_html_head_by_tag
include/ims/ insert customized header into content page, export customized .css & .js
tools/ims/ims_import.php add insertion for customized head info (stylesheet, javascript)

2. display content
exestyles.css stylesheet solely for eXe
content.php pass customized head into template
tools/ims/ims_import.php replace eXe style sheets with exestyles.css
themes/default/include/header.tmpl.php display custom head

3. add section of "Edit Customized Head" in content page
include/html/editor_tabs/ add "edit head" section
editor/edit_content.php for "edit head" section
include/lib/ save_changes(), save head information
include/classes/ContentManager.class.php editContent(), addContent(), getContentPage() check_for_changes() get/save head information

4. create/restore backup
mods/_core/content/module_backup.php add save on head / use_customized_head information

5. at "Create Content" page, when import content by uploading a html file, also import <style> and <javascript>
include/lib/ paste_from_file(), import <style> and <javascript>
2008-05-07 06:18   
At "Create Content" page, when import content from an uploaded html file, also import <link> info in html head.
2008-05-07 06:22   
Affected scripts:

include/lib/ paste_from_file(), also import <link>
include/ handle imported tags that close with </tag> or /> as tags <script>, <style> close using </script>, </style> while <link> closes using />