Saving Members Work
Page 1 of 1 • Share •
Re: Saving Members Work
Saving Members' Work
This only works or administrators with template editing.
Go to Admin Panel > Display > Post & Private Messages under Templates > Posting Body.
Once you are there, post this code as the VERY last thing.
- Code:
<SCRIPT language=JavaScript type=text/javascript>
// Cross browser event handling for IE 5+, NS6+ and Gecko
function addEvent(elm, evType, fn, useCapture)
{
if (elm.addEventListener)
{
// Gecko
elm.addEventListener(evType, fn, useCapture);
return true;
}
else if (elm.attachEvent)
{
// Internet Explorer
var r = elm.attachEvent('on' + evType, fn);
return r;
}
else
{
// nutscrape?
elm['on' + evType] = fn;
}
}
// Add Listeners
function addListeners(e)
{
// Before unload listener
addEvent(window, 'beforeunload', exitAlert, false);
}
// Exit Alert
function exitAlert(e)
{
// default warning message
var msg = "You will lose information if it has not already been saved.";
// set event
if (!e) { e = window.event; }
if (e) { e.returnValue = msg; }
// return warning message
return msg;
}
// Initialise
addEvent(window, 'load', addListeners, false);
</SCRIPT>
Now before a member leaves the topic, post reply, and quote pages, it will ask the member if they have saved their work. This also works for PMs and gallery commenting. This does not work with quick reply.
- Spoiler:

Written by Cman

Cman- Forumotion Member
-

Posts: 584
Age: 15
Language: English
Points: 2265
Join date: 2009-05-29
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum




by Cman on August 27th 2009, 5:28 pm