Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

Upgrading to Gossamer Mail 2.2.1 (or later)

Quote Reply
Upgrading to Gossamer Mail 2.2.1 (or later)
Due to changes in the new Advanced HTML Editor added in Gossamer Mail 2.2.1, it is not compatible with older (2.2.0 and lower) versions of the templates. To fix this compatibility issue, you may need to manually upgrade two templates for each template set: compose_html.htm and options_areply_html.htm.

You will need to make the changes below if any of the following applies to you:
  1. You have made a custom template set with a different name (e.g. you copied the brewt/nessa template set and named it my_new_template_set).
  2. You have made changes to the compose_html.htm or options_areply_html.htm templates of the brewt or nessa templates (you can check this by going into the Admin => Templates => Editor, and seeing if those templates have a * next to their name).
If you haven't done any of the above, then the installer would have upgraded the templates for you, and none of these modifications will need to be done.

The following are the minimal amount of changes required to get the Advanced HTML Editor working. To get all the new features added in the newer versions, you should go through the diffs (Admin => Templates) and incorporate the changes.

compose_html.htm:
You need to replace the following html (around line 158):
Code:
<input type=hidden name="compose_body" value="<%compose_body%>">
<iframe src="webmail.cgi?<%url_hidden%>;page=editor_iframe.html;attach_id=<%attach_id%>" id="iframe" tabindex="5" width="100%" height="<%if options_compose_html_editor_height%><%options_compose_html_editor_height%><%else%>300<%endif%>"></iframe><br>
<script language="javascript" type="text/javascript">
<!--
function load_html () {
var url = window.location.protocol + '//' + window.location.hostname + window.location.pathname + '?<%url_hidden%>;page=editor_';
Edit = new iframe.Editor ({
debug : 0,
base_url : url,
tb_hide : ['Table'],
tb_delete : ['Form', 'Positioning']
});
Edit.set_editor_html(document.all.compose_body.value);
Edit.init();
}
function retrieve_html () {
document.all.compose_body.value = Edit.get_editor_html();
}
// -->
</script>
With this:
Code:
<input type="hidden" id="header" name="header" value="">
<input type="hidden" id="compose_body" name="compose_body" value="<%if compose_body%><%compose_body%><%endif%>">
<input type="hidden" id="pre_content" name="pre_content" value="<%if compose_body%><%compose_body%><%endif%>">
<script>
<!--
function attemptInit () {
try {
editor_iframe.initOuterIFrame();
}
catch (e) {
setTimeout("attemptInit()", 200);
}
}
// -->
</script>
<iframe name="editor_iframe" id="editor_iframe" width="100%" height="100%" scrolling="no" onLoad="attemptInit()" src="about:blank" style="visibility: hidden"></iframe>
<script language="javascript" type="text/javascript">
<!--
var main_form = "msgs";
var content_obj = "compose_body"
var image_url = "<%url_images%>/html_editor";
var base_url = "webmail.cgi?<%url_hidden%><%if attach_id%>;attach_id=<%attach_id%><%endif%>";
var extra_url = "";
var bg_color = "#c5e1a3";

function load_param() {
return [base_url, extra_url, image_url, main_form, content_obj, false];
}
document.getElementById("editor_iframe").src = base_url + ';page=editor_iframe.html;' + extra_url;
// -->
</script>

options_areply_html.htm:
Replace the following html:
Code:
<input type="hidden" name="autoreply_body" value="<%autoreply_body%>">
<iframe src="webmail.cgi?<%url_hidden%>;page=editor_iframe.html;attach_id=<%attach_id%>" id="iframe" width="<%if options_compose_html_editor_width%><%options_com
<script language="javascript" type="text/javascript">
<!--
function load_html () {
var url = window.location.protocol + '//' + window.location.hostname + window.location.pathname + '?<%url_hidden%>;page=editor_';
Edit = new iframe.Editor ({
debug : 0,
base_url : url,
tb_hide : ['Table'],
tb_delete : ['Form', 'Positioning']
});
Edit.set_editor_html(document.all.autoreply_body.value);
Edit.init();
}
function retrieve_html () {
document.all.autoreply_body.value = Edit.get_editor_html();
}
// -->
</script>
with:
Code:
<input type="hidden" id="header" name="header" value="">
<input type="hidden" id="autoreply_body" name="autoreply_body" value="<%if autoreply_body%><%autoreply_body%><%endif%>">
<input type="hidden" id="pre_content" name="pre_content" value="<%if autoreply_body%><%autoreply_body%><%endif%>">
<script>
<!--
function attemptInit () {
try {
editor_iframe.initOuterIFrame();
}
catch (e) {
setTimeout("attemptInit()", 200);
}
}
// -->
</script>
<iframe name="editor_iframe" id="editor_iframe" width="100%" height="100%" scrolling="no" onLoad="attemptInit()" src="about:blank" style="visibility: hidden"></iframe>
<script language="javascript" type="text/javascript">
<!--
var main_form = "msgs";
var content_obj = "autoreply_body"
var image_url = "<%url_images%>/html_editor";
var base_url = "webmail.cgi?<%url_hidden%><%if attach_id%>;attach_id=<%attach_id%><%endif%>";
var extra_url = "";
var bg_color = "#c5e1a3";

function load_param() {
return [base_url, extra_url, image_url, main_form, content_obj, false];
}
document.getElementById("editor_iframe").src = base_url + ';page=editor_iframe.html;' + extra_url;
// -->
</script>
If these changes are not made, the HTML editor will fail to load.

Adrian

Last edited by:

Inertia: Oct 29, 2008, 5:08 PM
Subject Author Views Date
PostSticky: Upgrading to Gossamer Mail 2.2.1 (or later) brewt 9348 Feb 15, 2004, 2:35 PM