Choose from our various pricing plans. There is a package for everyone!


Add an Auto-Save Feature

View previous topic View next topic Go down

Rejected Add an Auto-Save Feature

Post by Boyka on Mon Dec 01, 2014 10:03 pm

Add to javascript

in all pages



Code:
function save_message() {     ('Copyright © AvacWeb. All Rights Reserved. Use and  modification of this script is not allowed without this entire copyright notice in the original, copied, or modified script. No distribution without consent.');    my_setcookie('saved_msg', escape(document.post.message.value), false);    var note = document.createElement('div');    note.id = 'saved_note';    note.innerHTML = 'Your message has been saved automatically.';    document.body.appendChild(note);    setTimeout(function() { document.body.removeChild(document.getElementById('saved_note')); }, 3000);}$(function() {    if(document.post && document.post.message && document.post.id !== 'quick_reply') {        var saved_msg = my_getcookie('saved_msg');        if(saved_msg && confirm('Do you want to restore your previous message?')) document.post.message.value += unescape(saved_msg);        delete_cookie('saved_msg');        setInterval(save_message, 30000);        $(document.post.post).click(function() { delete_cookie('saved_msg'); });    }});



and add it to css



Code:
#saved_note {    position: fixed;    bottom: 10px;    right: 10px;    padding: 5px 10px;    border: 1px solid;    color: #c05;    background: #E1EBF2;}

It saves every 30 secs
avatar
Boyka
Helper

Age : 23
Posts : 14
Join date : 2014-11-26
Forum Version : PhpBB2
Reputation : 1

View user profile

Back to top Go down

Rejected Re: Add an Auto-Save Feature

Post by Mati™ on Mon Dec 01, 2014 11:57 pm

Hi Boyka, thanks for submitting the tutorial.

Just one think do you have permissions to post those codes on other forums?
avatar
Mati™
Administrator
Administrator

Age : 31
Posts : 2112
Join date : 2011-10-20
Forum Version : PhpBB3
Reputation : 147

View user profile http://fmfocus.forumotion.net/forum

Back to top Go down

Rejected Re: Add an Auto-Save Feature

Post by Boyka on Tue Dec 02, 2014 1:56 am

good question Smile you  can remove that if you want
avatar
Boyka
Helper

Age : 23
Posts : 14
Join date : 2014-11-26
Forum Version : PhpBB2
Reputation : 1

View user profile

Back to top Go down

Rejected Re: Add an Auto-Save Feature

Post by Mati™ on Tue Dec 02, 2014 2:59 pm

Please don't copy paste someone else's tutorials.

Tutorial Rejected.
avatar
Mati™
Administrator
Administrator

Age : 31
Posts : 2112
Join date : 2011-10-20
Forum Version : PhpBB3
Reputation : 147

View user profile http://fmfocus.forumotion.net/forum

Back to top Go down

Rejected Re: Add an Auto-Save Feature

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum