Register Members List Search Today's Posts Mark Forums Read

View Poll Results: Should the saved message be removed when a thread/post/private message has been sent?
1 1 1%
1 1 1%
1 1 1%
Voters: 53. You may not vote on this poll

Reply
 
Mod Options
vB Drafts Details »
vB Drafts
Mod Version: 2.11, by RedTyger (Member) RedTyger is offline
Developer Last Online: Aug 2015 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.6.7 Rating: (24 votes - 4.63 average) Installs: 163
Released: 15 Mar 2007 Last Update: 17 Jul 2007 Downloads: 845
Not Supported DB Changes Uses Plugins Additional Files  

vB Drafts
Report a bug | Request a feature (Requires super-quick registration)

Description

This modification adds an save draft feature when using Quick Reply, New Reply, New Thread and Private Messaging.
When writing a message you can choose to save it and return to it later without publically publishing it.
There are two saving options, one is where drafts are automatically saved every X minutes where process is mostly
invisible to the user and is a background process and where drafts can be saved at any point by clicking a button. You can assign each
type to individual usergroups separately.

Drafts are saved and restored in the following manner. One new thread per forum, one reply per thread, one PM reply per PM and one new PM. If a saved post/thread/PM is found, the text is automatically restored to the reply field when the user returns to the page. So to restore a thread, they just visit the New Thread page in the forum in which it was being written, it will be there waiting.

To remove old draft data which has not been deleted by its author, a scheduled task runs daily which removes any drafts data which is older than X days.

You are not permitted to redistribute or re-release this modification.


Options: (AdminCP > vBulletin Options > vB Drafts)

Enable drafts for Quick Replies?
Set to Yes to enable drafts for Quick Replies.

Enable drafts for New Replies?
Set to Yes to enable drafts for New Replies.

Enable drafts for New Threads?
Set to Yes to enable drafts for New Threads.

Enable drafts for Private Messages?
Set to Yes to enable drafts for New Private Messages.

Enable manual drafts for UsergroupIDs
Enter the IDs of the usergroups you wish to enable manual drafts for, separated by commas. Example: 1,2,3.

Leave this option blank to enable drafts for everyone.

Enable automatic drafts for UsergroupIDs
Enter the IDs of the usergroups you wish to enable automatic drafts for, separated by commas. Example: 1,2,3.

Leave this option blank to enable drafts for everyone.

Enable drafts for ForumIDs
Enter the IDs of the forums you wish to enable drafts for, separated by commas. Example: 1,2,3

Leave blank to enable drafts in every forum.

Do NOT drafts for ForumIDs
If it is easier for you to specify which forums you do not want drafts in, enter the IDs of the usergroups you wish to disable drafts for, separated by commas. Example: 1,2,3

Leave blank to not disable autosaving in any forums.

Minimum post/thread/PM length
Enter how many characters a post/thread/PM must contain before it will be saved. Example: 500 will disable the saving of drafts shorter than 500 characters.

Set this option to 1 to allow saving for messages of any length.

Wait X minutes before saving
Enter the number of minutes before a post/thread/PM starts to be saved. Example: 10 will begin allowing saved drafts after 10 minutes.

Manual saving will disable this option.

Repeat saving every X minutes
After the wait time has expired, specify how often the post/thread/PM will be saved. Example: 5 will save a draft every 5 minutes.

Manual saving will disable this option.

Store draft data for X days
Specify in days how long draft data will be kept for. Example: 7 will delete a draft after 7 days.

Delete drafts when uninstalling?
Set to No to leave all the drafts in the database when you uninstall this modification, otherwise the drafts database will be cleared at uninstallation.

You must also remove the scheduled task and/or cron file or it will delete saved drafts after X days (set above) anyway!


Upgrade Instructions:

From v1.50:
Uninstall your current version of this modification. You will lose any current saved drafts and your current settings.
Delete vb_autosave.php from your root folder.
Delete vb_autosave_cron.php from your includes/cron folder.
You do not have to remove previous template edits, but if you wish to then there is a list in the zip file which you can work through and undo.

From v2.00:
Delete drafts.php in the root (top level, not cron) folder on your server, this file is no longer needed.

When the above is done, follow the installation instructions below.


Installation Instructions:

Uploads:
1. Go to AdminCP > Plugins & Products > Manage Products > Add/Import Product.
2. Upload the vb_drafts_xxx.xml file.
3. Upload the contents of the upload folder to the equivalent forum folders on your server.


File Edits:
For file edits, you will need to edit the original files that vBulletin was shipped with. Make your changes in an appropriate editor (anything that does not use formatting like MS Word will do) and then upload the files to your server, overwriting the existing files.

The file edit is only necessary if you intend to use autosaving with Quick Reply.

In file clientscript/vbulletin_quick_reply.js:
FIND:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

REPLACE WITH:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


This file edit is only necessary if Quick Reply requires a click.

FIND:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

REPLACE WITH:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Done!


Donations

If you have a pressing wish to donate money to me (and of course, you do) to say thank you and to possibly encourage more future work then you can do via the link below. Also, you will go to heaven.

http://redtyger.co.uk/donations.php

Don't panic! The donations link is only hosted on my website so it can be encrypted and not open my email address to spammers.


Changelog
v1.00 Initial release.

v1.01 Removed branding.

v1.50 Added message which flashes up when a message is saved.
v1.50 Added status indicator to show when autosave is active on a page. This also replaces the WYSIWYG incompatible message.
v1.50 Added function to optionally delete saved message after posting (see screenshot).
v1.50 Added improved restoration interface and added expiry details for the saved message.
v1.50 Added end-user FAQ items for the modification.
v1.50 Changed rewrite and improvement of product code.

v2.00 Added manual draft saving.
v2.00 Added WYSIWYG compatibility.
v2.00 Added Quick Reply requiring a click compatibility.
v2.00 Added automated template edits.
v2.00 Added extra security checks.
v2.00 Added minor cross-system compatibility improvements.
v2.00 Added optimisations, some major some minor.
v2.00 Added option to keep drafts when uninstalling the modification.
v2.00 Changed FAQ text, draft enabled message now links to an FAQ explanation of what it is.

v2.00 Changed expired draft deletion to run hourly instead of daily.
v2.00 Fixed bug where Quick Reply would delete the title of a post saved in New Reply.
v2.00 Fixed bug where quoting would not work.
v2.00 Fixed bug where previewing would show the draft twice.
v2.00 Fixed phrasing where post was said to be thread.
v2.00 Fixed expiration time, now it is correct to the minute when deletion will occur.
v2.00 Fixed deletion failed message for users in case AJAX delete doesn't work.
v2.00 Fixed other miscellaneous minor bugs.
v2.00 Removed the AJAX delete now link. Now that drafts are deleting after submitting post/thread/PM it felt largely unnecessary.

v2.10 Added true instant one-click AJAX draft saving. It is now also considerably faster.
v2.10 Added cursor change to hourglass when saving.
v2.10 Fixed bug where pruning of old drafts did not occur.
v2.10 Fixed bug where drafts were not deleted after submission.
v2.10 Fixed bug where IE gave irrelevant javascript errors.
v2.10 Fixed bug where Quick Reply drafts were counted as a duplicate post.
v2.10 Fixed bug where Autosave drafts enabled message did not show.
v2.10 Fixed bug where IE did not show delete drafts option as disabled.
v2.10 Removed redundant phrases.

v2.11 Added intial wait time before autosaving draft option. I have never added it before, oops.
v2.11 Fixed bug where QR went back to counting every post as a duplicate.
v2.11 Fixed javascript not enabling the QR delete option properly.
v2.11 Fixed bug with incorrect characters for restored drafts in QR.
v2.11 Fixed FAQ and options minor description errors.
v2.11 Fixed delete draft option appearing where drafts are not enabled.

v2.2 NOW vBulletin 3.8.x ONLY.
v2.2 Added drafts for private message quick reply.
v2.2 Added optimisation to the database structure, is much faster now.
v2.2 Changed some minor code for minor optimisations.
v2.2 Changed the automated saving message to display permanently after the first save so it is clear a draft exists. The saving indicator has also been slowed dramatically so it is more noticable when a save takes place.
v2.2 Changed the saving function to not use vBulletin's minimum length check, which popped up an incredibly irritating message. Now it uses an invisible check.
v2.2 Fixed javascript error when using drafts with post quick reply.
v2.2 Fixed draft not appearing when sending a private message failed with an error.
v2.2 Fixed drafts being disabled when using Go Advanced on threads.
v2.2 Fixed private message title being replaced with nothing when viewing a PM.
v2.2 Fixed drafts being processed when draft content is empty. Usually this amusingly manifested itself as an empty draft restored from 1970.
v2.2 Fixed incorrect application of manual/automatic usergroup settings.

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	manualsave.jpg
Views:	1654
Size:	28.5 KB
ID:	67009  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Save Drafts (Remember Everything) Updated! why-not vBulletin 3.0 Full Releases 91 12 Feb 2009 13:56
Save Drafts (New Topics, New Reply, PM(s)) Updated March 04, 2005 why-not vBulletin 3.0 Beta Releases 23 06 Mar 2005 19:54

  #61  
Old 02 May 2007, 16:01
RedTyger RedTyger is offline
 
Join Date: Nov 2006
Originally Posted by Tralala View Post
Ideally it would be "Optional when submitting..." so long as the DEFAULT could be set (to "yes.")




Actually, now that I think about it, the wording could be clearer. Have a checkbox that is empty by default, that allows the user to "save this post?"

I am monitoring the progress on this mod with lots of enthusiasm. Still waiting (hopefully) for WYSIWYG compatibility.
That would be my preference too and my first thought was a checkbox that says "Delete saved post after submitting?". I think it's so easy to add it as an option that there's no real reason to force it either way unless it's a really strong request to do so.

I'm awaiting WYSIWYG compatibility too I'm this close to offering up $10 or something to whoever can fix it because I really don't know javascript well enough and I'm getting nowhere. There is a new a slightly improved version to come out shortly but it doesn't feature a fix.
Reply With Quote
  #62  
Old 02 May 2007, 16:13
Tralala's Avatar
Tralala Tralala is offline
 
Join Date: Jan 2006
Originally Posted by RedTyger View Post
That would be my preference too and my first thought was a checkbox that says "Delete saved post after submitting?". I think it's so easy to add it as an option that there's no real reason to force it either way unless it's a really strong request to do so.
My issue with that is that it would require the user to click the checkbox to delete the saved post, which is a bit counter-intuitive... I'd rather them have to click it to save it (after posting, of course.)

I think the UI expectation with auto-saves is that it's there for safety, so you don't need to be mindful of saving, etc. but that the "cache" goes away once the post has been made.

Think of Gmail's implementation - once you send the "draft" it's sent off, and no longer a draft. I honestly can't think of many scenarios where a forum member would want to "save" the text of the post they just made... so they could post it again???
Reply With Quote
  #63  
Old 02 May 2007, 16:15
RedTyger RedTyger is offline
 
Join Date: Nov 2006
Ah. I don't actually use Gmail, I just gathered from what had been said that it functioned similarly. I think it depends on the situation.

But on reflection I think you're right.
Reply With Quote
  #64  
Old 04 May 2007, 13:59
RedTyger RedTyger is offline
 
Join Date: Nov 2006
Forgot to add, the update also includes an addition to your forum FAQ to better explain how it works and the relevant administrator's settings.
Reply With Quote
  #65  
Old 06 May 2007, 15:11
co0kz co0kz is offline
 
Join Date: Apr 2007
this doesn't appear to be working properly in quick reply? still leaves the data in the text box after submitting the post.

EDIT.. If you post the message via adavnced reply then it does delete the message from both quick reply and advanced text areas, but if you only use quick reply then the text isn't cleared. I'm wondering if it has something to do with the fact a title is entered in the advanvced reply area and not in the quick reply?

Is the delete function trying to find something in quick reply that isn't there and maybe skipping the delete because of this?

Last edited by co0kz; 06 May 2007 at 15:21.
Reply With Quote
  #66  
Old 06 May 2007, 15:16
RedTyger RedTyger is offline
 
Join Date: Nov 2006
Originally Posted by co0kz View Post
this doesn't appear to be working properly in quick reply? still leaves the data in the text box after submitting the post.
That is correct, but it'll be gone when you next load the page. I suppose it may be worth fixing it so that textbox content as well as all the fields update when using AJAX quick reply, but it's highly unlikely that anyone is going to immediately post again using quick reply so I'd consider it a luxury.
Reply With Quote
  #67  
Old 06 May 2007, 15:35
co0kz co0kz is offline
 
Join Date: Apr 2007
maybe most ppl wouldn't but there is always that chance that you will get someone on your boards who would be nasty enough to spam. Leaving the text there just makes it easier for them to post the same message over and over again.

the fact that the checkbox says it will delete after submission, should i think mean that the message could also only be posted once before removal.
Reply With Quote
  #68  
Old 08 May 2007, 08:31
PoetJA-1975's Avatar
PoetJA-1975 PoetJA-1975 is offline
 
Join Date: Sep 2006
Real name: Jacquii Cooke
Sounds like a very promising Modification.
Subscribing AND Thanx for the share

Jacquii.
Reply With Quote
  #69  
Old 09 May 2007, 12:27
co0kz co0kz is offline
 
Join Date: Apr 2007
Is there any update on whether this is going to be further developed yet? I have it running on my boards and it works fine. however i am stil getting the occasional problem with ppl double posting from time to time.
Reply With Quote
  #70  
Old 10 May 2007, 12:04
RedTyger RedTyger is offline
 
Join Date: Nov 2006
Don't take this the wrong way, but one person isn't really motivation enough at the moment. If anyone else feels strongly about the issue, please post.
Reply With Quote
  #71  
Old 10 May 2007, 17:44
Arkidas Arkidas is offline
 
Join Date: Sep 2006
I'm a bit confused. Does this not work with the WYSWIG or does it just function without AJAX in WYSWIG? Also, could there be an option for members to choose whether they want to use it or not?
Reply With Quote
  #72  
Old 14 May 2007, 01:15
biggazillakilla biggazillakilla is offline
 
Join Date: Mar 2004
I'd install this if it worked with WYSIWYG. And I'd be willing to contribute $$ to someone to fix the JS.
__________________
My vBulletin
Reply With Quote
  #73  
Old 14 May 2007, 02:20
MThornback's Avatar
MThornback MThornback is offline
 
Join Date: Apr 2005
Location: Canada
With 3.6.6 making the changes it did and moving away from JS in templates...would it make more sense (and be easier for you) to do the WYSIWYG in AJAX?
Reply With Quote
  #74  
Old 14 May 2007, 08:11
RedTyger RedTyger is offline
 
Join Date: Nov 2006
Nope. AJAX is javascript and it's already all AJAX.

I'd like to see someone fix the JS as well. If you're really serious you could try posting in the Paid Requests forum.
Reply With Quote
  #75  
Old 05 Jul 2007, 02:43
-=Sniper=-'s Avatar
-=Sniper=- -=Sniper=- is offline
 
Join Date: May 2002
NOW its nearly 4am and working on my product trying to get something to work it seems I have figured out how to auto save when in WYSIWYG mode will post when I wake up

now who will donate lol
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 01:04.

Layout Options | Width: Wide Color: