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
Permissions of this forum:
You cannot reply to topics in this forum
Home




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






» Glowing Ranks
» what has happend to my forum
» Phishing Ads?
» [Only Topic] Site Name Not Changing
» Bots Again
» What happend to my forum?
» Some Buttons
» Background Header