Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vB Drafts Details »»
vB Drafts
Version: 2.2, by RedTyger RedTyger is offline
Developer Last Online: Nov 2022 Show Printable Version Email this Page

Category: New Posting Features - Version: 3.8.x Rating:
Released: 02-26-2009 Last Update: Never Installs: 28
DB Changes Uses Plugins Auto-Templates
Code Changes Additional Files Translations Is in Beta Stage  
No support by the author.

Modification currently on hold for some major bugfixing.

vB Drafts adds a feature to temporarily save posts, threads and private messages that have not been submitted, allowing members to return to their unpublished submissions later on and continue writing where they left off.

Drafts can be periodically saved automatically or saved manually, with either option restricted to certain usergroups. Drafts can also be restricted to just posts, threads quick replies or private messages, or to specified fora and/or usergroups.

The system allows for as many drafts as you could need. Each member gets 1 post draft per thread, 1 thread draft per forum, 1 PM draft per private message and 1 for a new PM.

vB Drafts use AJAX, so saving a draft is as good as invisible. Either one click for manual saving or just a subtle, brief notification when a draft is saved automatically. For automated saving, the admin has full control over how often saves are performed.

Restoring a draft is even more invisible. Simply return to where you were writing and the draft will be there waiting for you.

vB Drafts for 3.8 is a mostly unchanged update of the older version with a few minor bugfixes and improvements, plus new support for private message quick replies.

Installation instructions
1. Extract the contents of the download file to your computer.
2. Upload the file in the product folder via the Product Manager at AdminCP > Plugins & Products > Manage Products > [Add/Import Product].
3. Upload the contents of the uploads folder to the equivalent location in your forum on your server. The directory structure within the download file is the same as your forum. So includes/cron/drafts.php goes in your forum's cron directory, etc.
4. Perform the file edit described below if you want Quick Reply drafts.
5. The options for vB Drafts are in the main vBulletin Options menu.
6. Done!

Upgrade instructions
1. Uninstall the vB Drafts product file ensuring that the option to delete saved drafts is set to Yes in the vB Drafts menu. All saved drafts must be deleted for the upgrade.
2. Follow the instructions for a new installation.

Uninstallation instructions
1. Uninstall the vB Drafts product file ensuring that the option to delete saved drafts is set to Yes in the vB Drafts menu. All saved drafts must be deleted for the upgrade.
2. Delete /clientscript/drafts.js.
3. Delete includes/cron/drafts.php.
4. Done!




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:
PHP Code:
vB_Editor[QR_EditorID].write_editor_contents(""
REPLACE WITH:
PHP Code:
    // vB Drafts
        // Old
    // vB_Editor[QR_EditorID].write_editor_contents("")
    // vB Drafts 

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

FIND:
PHP Code:
vB_Editor[QR_EditorID].enable_editor(""); 
REPLACE WITH:
PHP Code:
    // vB Drafts
    // Old:
    // vB_Editor[QR_EditorID].enable_editor("");

    // New:
       
if (typeof(asId) == 'undefined')
       {
           
vB_Editor[QR_EditorID].enable_editor('');
       }
       else
       {
           
// Agonising, painful, horrific way to replace the QR message + draft with just draft
           
if (vB_Editor[QR_EditorID].wysiwyg_mode)
           {
               
asSplit vbphrase['click_quick_reply_icon'].split('<br /><br />');
           }
           else
           {
               
asSplit vbphrase['click_quick_reply_icon'].split('\n\n');
           }            
           
asSplit[0] = '';
           
vbphrase['click_quick_reply_icon'] = asSplit.join('');
           
vB_Editor[QR_EditorID].enable_editor(vbphrase['click_quick_reply_icon']);
        } 
    
// vB Drafts 



Template edits
You should not have to make any template edits, the modification will do it for you. But if you find that the draft button or other aspects of the modification are not showing up correctly, it means you'll have to perform some or all of the template edits manually. They are described below.

In SHOWTHREAD
FIND:
Code:
id="qr_submit" onclick="clickedelm = this.value" />
REPLACE WITH:
Code:
id="qr_submit" onclick="clickedelm = this.value" /> <input onclick="draftsave();" type="button" class="button" name="draft" value="$vbphrase[draft_save_as_draft]" accesskey="d" tabindex="1" />
FIND:
Code:
id="qr_preview" onclick="clickedelm = this.value" />
REPLACE WITH:
Code:
id="qr_preview" onclick="clickedelm = this.value" /> <div id="draft_saving" style="display:none;margin-top:$stylevar[cellpadding]px;"><img id="draft_saving_img" src="$stylevar[imgdir_misc]/progress.gif" class="inlineimg" border="0" alt="" /> <strong>$vbphrase[draft_saving_draft_please_wait]</strong></div>


In newreply
FIND:
Code:
value="$vbphrase[submit_reply]" accesskey="s" tabindex="1" />
REPLACE WITH:
Code:
value="$vbphrase[submit_reply]" accesskey="s" tabindex="1" /> <input onclick="draftsave();" type="button" class="button" name="draft" value="$vbphrase[draft_save_as_draft]" accesskey="d" tabindex="1" />
FIND:
Code:
value="$vbphrase[preview_post]" accesskey="r" tabindex="1" />
REPLACE WITH:
Code:
value="$vbphrase[preview_post]" accesskey="r" tabindex="1" /> <div id="draft_saving" style="display:none;margin-top:$stylevar[cellpadding]px;"><img id="draft_saving_img" src="$stylevar[imgdir_misc]/progress.gif" class="inlineimg" border="0" alt="" /> <strong>$vbphrase[draft_saving_draft_please_wait]</strong></div>



In newthread
FIND:
Code:
value="$vbphrase[submit_new_thread]" accesskey="s" tabindex="1" />
REPLACE WITH:
Code:
value="$vbphrase[submit_new_thread]" accesskey="s" tabindex="1" /> <input onclick="draftsave();" type="button" class="button" name="draft" value="$vbphrase[draft_save_as_draft]" accesskey="d" tabindex="1" />
FIND:
Code:
value="$vbphrase[preview_post]" accesskey="r" tabindex="1" />
REPLACE WITH:
Code:
value="$vbphrase[preview_post]" accesskey="r" tabindex="1" /> <div id="draft_saving" style="display:none;margin-top:$stylevar[cellpadding]px;"><img id="draft_saving_img" src="$stylevar[imgdir_misc]/progress.gif" class="inlineimg" border="0" alt="" /> <strong>$vbphrase[draft_saving_draft_please_wait]</strong></div>



In pm_newpm
FIND:
Code:
value="$vbphrase[submit_message]" accesskey="s" tabindex="1" />
REPLACE WITH:
Code:
value="$vbphrase[submit_message]" accesskey="s" tabindex="1" /> <input onclick="draftsave();" type="button" class="button" name="draft" value="$vbphrase[draft_save_as_draft]" accesskey="d" tabindex="1" />
FIND:
Code:
value="$vbphrase[preview_message]" accesskey="r" name="preview" tabindex="1" />
REPLACE WITH:
Code:
value="$vbphrase[preview_message]" accesskey="r" name="preview" tabindex="1" /> <div id="draft_saving" style="display:none;margin-top:$stylevar[cellpadding]px;"><img id="draft_saving_img" src="$stylevar[imgdir_misc]/progress.gif" class="inlineimg" border="0" alt="" /> <strong>$vbphrase[draft_saving_draft_please_wait]</strong></div>



In pm_showpm
FIND:
Code:
id="qr_submit" class="button" accesskey="s" tabindex="1" />
REPLACE WITH:
Code:
id="qr_submit" class="button" accesskey="s" tabindex="1" /> <input onclick="draftsave();" type="button" class="button" name="draft" value="$vbphrase[draft_save_as_draft]" accesskey="d" tabindex="1" />
FIND:
Code:
name="preview" class="button" accesskey="x" tabindex="1"  />
REPLACE WITH:
Code:
name="preview" class="button" accesskey="x" tabindex="1"  /> <div id="draft_saving" style="display:none;margin-top:$stylevar[cellpadding]px;"><img id="draft_saving_img" src="$stylevar[imgdir_misc]/progress.gif" class="inlineimg" border="0" alt="" /> <strong>$vbphrase[draft_saving_draft_please_wait]</strong></div>

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 03-01-2009, 07:38 PM
psychotica psychotica is offline
 
Join Date: Dec 2006
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a great plugin, hope to see it fixed.

Thanks RedTyger!

I tagged it.
Reply With Quote
  #33  
Old 03-06-2009, 09:41 AM
Arkidas Arkidas is offline
 
Join Date: Sep 2006
Posts: 106
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does it work with 3.7.2?
Reply With Quote
  #34  
Old 03-12-2009, 01:20 AM
Capper5016 Capper5016 is offline
 
Join Date: Sep 2006
Location: Las Vegas, NV
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

RedTyger, any luck fixing the issues?
Reply With Quote
  #35  
Old 03-23-2009, 07:14 PM
shofolofo shofolofo is offline
 
Join Date: Aug 2007
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

same question ...


Reply With Quote
  #36  
Old 03-24-2009, 10:37 AM
biocyberman biocyberman is offline
 
Join Date: May 2007
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh thank gods!
I am waiting to have this on my site
Reply With Quote
  #37  
Old 03-29-2009, 05:24 AM
crazlunatic crazlunatic is offline
 
Join Date: Mar 2009
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

um hey, the attachments seem to have disappeared?
Reply With Quote
  #38  
Old 03-30-2009, 01:34 AM
chick's Avatar
chick chick is offline
 
Join Date: Aug 2006
Location: PI Land
Posts: 381
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd like this too, this should be included with vb to begin with. Anything Ty?
Reply With Quote
  #39  
Old 04-16-2009, 03:13 PM
jrap jrap is offline
 
Join Date: Jan 2005
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This looks like a great mod. Do you have plans to add the attachments back?
Reply With Quote
  #40  
Old 04-17-2009, 04:46 PM
yotsume's Avatar
yotsume yotsume is offline
 
Join Date: Dec 2006
Posts: 844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok tagging this to watch its much needed development. Hope to see this working very soon!

I agree a draft system should be standard in VB to begin with! BIG TIME!
Reply With Quote
  #41  
Old 04-21-2009, 04:27 PM
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Location: USA
Posts: 2,043
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is anyone getting occasional blank pages on submit or HTTP 500 errors?
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 01:40 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05258 seconds
  • Memory Usage 2,339KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (20)bbcode_code
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete