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

Reply
 
Thread Tools
Doublepost Prevention Details »»
Doublepost Prevention
Version: 3.8.005, by Paul M Paul M is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: New Posting Features - Version: 3.8.x Rating:
Released: 01-30-2009 Last Update: 06-12-2009 Installs: 855
Uses Plugins Auto-Templates
Translations  
No support by the author.

As of 24 Nov 2017 this modification has been withdrawn.

This is an updated version of the popular modification, previously released by Xenon. It is released with his kind permission.

Basically, if member posts in a thread where they were the previous last poster, then if the conditions are met, their new post will be auto-merged into the previous post instead of creating a new "double" post.

A number of options are provided ;

Time Limit - if more than xxx minutes have passed since the last post, no merge is done.

Timestamp Spacer - if enabled, a timestamped spacer is added between the old post text and the new post text.

Post Timestamp Update - if enabled the newly merged post will have its post time updated to the new time, otherwise it retains the time of the original post.

Spacer Colour - allows you to set the colour of the spacer between merged posts.

Usergroup exceptions - Allows you to exempt certain usergroups from the doublepost merges.

Forum exceptions - Allows you to exempt certain forums form the doublepost merges.

All settings are located in vBulletin Options > Doublepost Prevention.


To install just unzip the XML and import into vB using the ACP Product Manager.


History:

v3.8.001 : First Release for vB 3.8.
v3.8.002 : Phrased the post separater.
v3.8.003 : Added JS Template - removing need to edit quick reply javascript file.
v3.8.004 : Updated spacer options.
v3.8.005 : Updated timestamp spacer to fix issue with large merge times.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
s2lo7

Comments
  #92  
Old 02-06-2009, 10:53 AM
proudgreenyin proudgreenyin is offline
 
Join Date: Jun 2008
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M View Post
When I get some free time Im going to see if I can get around the file edit.
i'm a total noob m8 and it only took me two minutes max to install this mod, can't see what all the fuss is about.
Reply With Quote
  #93  
Old 02-06-2009, 11:08 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Some people just like to moan

A few years ago, I think 90% or more of mods were file edits
Reply With Quote
  #94  
Old 02-06-2009, 02:09 PM
JVSP JVSP is offline
 
Join Date: Jul 2007
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

-Marked Installed-

This is a perfect mod and works as described......LOVE IT!!!

Thanks
Reply With Quote
  #95  
Old 02-07-2009, 12:25 AM
eh69 eh69 is offline
 
Join Date: Feb 2009
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Find the following code ;


var postbits = ajax.responseXML.getElementsByTagName('postbit');
for (i = 0; i < postbits.length; i++)
{
var newdiv = document.createElement('div');
newdiv.innerHTML = postbits[i].firstChild.nodeValue;
var lp = fetch_object('lastpost');
var lpparent = lp.parentNode;
var postbit = lpparent.insertBefore(newdiv, lp);

PostBit_Init(postbit, postbits[i].getAttribute('postid'));
}


Replace it with this code ;


// Paul M - Doublepost modification //
if (fetch_tag_count(ajax.responseXML, 'updatepost'))
{
var postbit = ajax.responseXML.getElementsByTagName('postbit')[0].firstChild.nodeValue;
var hidepost = ajax.responseXML.getElementsByTagName('updatepost' )[0].firstChild.nodeValue;
fetch_object('edit' + hidepost).innerHTML = postbit;
}
else
{
var postbits = ajax.responseXML.getElementsByTagName('postbit');
for (i = 0; i < postbits.length; i++)
{
var newdiv = document.createElement('div');
newdiv.innerHTML = postbits[i].firstChild.nodeValue;
var lp = fetch_object('lastpost');
var lpparent = lp.parentNode;
var postbit = lpparent.insertBefore(newdiv, lp);
PostBit_Init(postbit, postbits[i].getAttribute('postid'));
}
}
My vbulletin_quick_reply.js file looking that:
Code:
/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 3.8.1
|| # ---------------------------------------------------------------- # ||
|| # Copyright ?2000-2009 Jelsoft Enterprises Ltd. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| #################################################################### ||
\*======================================================================*/
var qr_repost=false;var qr_errors_shown=false;var qr_active=false;var qr_ajax=null;var clickedelm=false;function qr_init(){qr_disable_controls();qr_init_buttons(fetch_object("posts"))}function qr_init_buttons(C){var B=fetch_tags(C,"a");for(var A=0;A<B.length;A++){if(B[A].id&&B[A].id.substr(0,3)=="qr_"){B[A].onclick=function(D){return qr_activate(this.id.substr(3))}}}}function qr_disable_controls(){if(require_click){fetch_object("qr_postid").value=0;vB_Editor[QR_EditorID].disable_editor(vbphrase.click_quick_reply_icon);var A=fetch_object("cb_signature");if(A!=null){A.disabled=true}active=false;qr_active=false}else{vB_Editor[QR_EditorID].write_editor_contents("");qr_active=true}if(threaded_mode!=1){fetch_object("qr_quickreply").disabled=true}}function qr_activate(C){var B=fetch_object("collapseobj_quickreply");if(B&&B.style.display=="none"){toggle_collapse("quickreply")}fetch_object("qr_postid").value=C;if(fetch_object("qr_specifiedpost")){fetch_object("qr_specifiedpost").value=1}fetch_object("qr_preview").select();fetch_object("qr_quickreply").disabled=false;var A=fetch_object("cb_signature");if(A){A.disabled=false;A.checked=true}if(qr_active==false){vB_Editor[QR_EditorID].enable_editor("")}if(!is_ie&&vB_Editor[QR_EditorID].wysiwyg_mode){fetch_object("qr_scroll").scrollIntoView(false)}vB_Editor[QR_EditorID].check_focus();qr_active=true;return false}function qr_prepare_submit(D,A){if(qr_repost==true){return true}if(!allow_ajax_qr||!AJAX_Compatible){return qr_check_data(D,A)}else{if(qr_check_data(D,A)){if(typeof vb_disable_ajax!="undefined"&&vb_disable_ajax>0){return true}if(is_ie&&userAgent.indexOf("msie 5.")!=-1){if(PHP.urlencode(D.message.value).indexOf("%u")!=-1){return true}}if(YAHOO.util.Connect.isCallInProgress(qr_ajax)){return false}if(clickedelm==D.preview.value){return true}else{var E="ajax=1";if(typeof ajax_last_post!="undefined"){E+="&ajax_lastpost="+PHP.urlencode(ajax_last_post)}for(var C=0;C<D.elements.length;C++){var F=D.elements[C];if(F.name&&!F.disabled){switch(F.type){case"text":case"textarea":case"hidden":E+="&"+F.name+"="+PHP.urlencode(F.value);break;case"checkbox":case"radio":E+=F.checked?"&"+F.name+"="+PHP.urlencode(F.value):"";break;case"select-one":E+="&"+F.name+"="+PHP.urlencode(F.options[F.selectedIndex].value);break;case"select-multiple":for(var B=0;B<F.options.length;B++){E+=(F.options[B].selected?"&"+F.name+"="+PHP.urlencode(F.options[B].value):"")}break}}}fetch_object("qr_posting_msg").style.display="";document.body.style.cursor="wait";qr_ajax_post(D.action,E);return false}}else{return false}}}function qr_resubmit(){qr_repost=true;var A=document.createElement("input");A.type="hidden";A.name="ajaxqrfailed";A.value="1";fetch_object("qrform").appendChild(A);fetch_object("qrform").submit()}function qr_check_data(B,A){switch(fetch_object("qr_postid").value){case"0":alert(vbphrase.click_quick_reply_icon);return false;case"who cares":if(typeof B.quickreply!="undefined"){B.quickreply.checked=false}break}if(clickedelm==B.preview.value){A=0}return vB_Editor[QR_EditorID].prepare_submit(0,A)}function qr_ajax_post(B,A){if(YAHOO.util.Connect.isCallInProgress(qr_ajax)){YAHOO.util.Connect.abort(qr_ajax)}qr_repost=false;qr_ajax=YAHOO.util.Connect.asyncRequest("POST",B,{success:qr_do_ajax_post,failure:qr_handle_error,timeout:vB_Default_Timeout},SESSIONURL+"securitytoken="+SECURITYTOKEN+"&"+A)}function qr_handle_error(A){vBulletin_AJAX_Error_Handler(A);fetch_object("qr_posting_msg").style.display="none";document.body.style.cursor="default";qr_resubmit()}function qr_do_ajax_post(G){if(G.responseXML){document.body.style.cursor="auto";fetch_object("qr_posting_msg").style.display="none";var D;if(fetch_tag_count(G.responseXML,"postbit")){ajax_last_post=G.responseXML.getElementsByTagName("time")[0].firstChild.nodeValue;qr_disable_controls();qr_hide_errors();var C=G.responseXML.getElementsByTagName("postbit");for(D=0;D<C.length;D++){var I=document.createElement("div");I.innerHTML=C[D].firstChild.nodeValue;var E=fetch_object("lastpost");var B=E.parentNode;var A=B.insertBefore(I,E);PostBit_Init(A,C[D].getAttribute("postid"))}if(fetch_object("qr_submit")){fetch_object("qr_submit").blur()}}else{if(!is_saf){var H=G.responseXML.getElementsByTagName("error");if(H.length){var F="<ol>";for(D=0;D<H.length;D++){F+="<li>"+H[D].firstChild.nodeValue+"</li>"}F+="</ol>";qr_show_errors("<ol>"+F+"</ol>");return false}}qr_resubmit()}}else{qr_resubmit()}}function qr_show_errors(A){qr_errors_shown=true;fetch_object("qr_error_td").innerHTML=A;fetch_object("qr_error_tbody").style.display="";vB_Editor[QR_EditorID].check_focus();return false}function qr_hide_errors(){if(qr_errors_shown){qr_errors_shown=true;fetch_object("qr_error_tbody").style.display="none";return false}}var vB_QuickReply=true;
Why?
Reply With Quote
  #96  
Old 02-07-2009, 12:27 AM
ForumsMods ForumsMods is offline
 
Join Date: Aug 2007
Location: Argentina
Posts: 667
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Read the red note:
Note: This modification requires you to edit one of the vbulletin javascript files - which means you must have the uncompressed versions - obtaining these is an option when you download vbulletin, by default you get the compressed versions.
Reply With Quote
  #97  
Old 02-07-2009, 11:40 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Dont worry about it, I have bypassed the need to edit the JS file in version 3.8.003
Reply With Quote
  #98  
Old 02-07-2009, 12:04 PM
SloppyGoat's Avatar
SloppyGoat SloppyGoat is offline
 
Join Date: Feb 2002
Posts: 339
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sweet! I happen to think every compressed file helps the speed a bit.
Reply With Quote
  #99  
Old 02-07-2009, 12:35 PM
Valter Valter is offline
 
Join Date: Aug 2005
Location: Sarajevo
Posts: 2,432
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good work.
Reply With Quote
  #100  
Old 02-07-2009, 03:49 PM
eh69 eh69 is offline
 
Join Date: Feb 2009
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

New version dont working for me. After add second post i have info:
Thank you for posting! You will now be taken to your post. If you opted to post a poll, you will now be allowed to do so.

Edit: working, sry for probs.
Reply With Quote
  #101  
Old 02-09-2009, 01:04 AM
Black Tiger's Avatar
Black Tiger Black Tiger is offline
 
Join Date: Apr 2004
Location: Netherlands
Posts: 957
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great work Paul. The Xenon version was still running fine at my 3.8.1. forums, but I'll upgrade now.

Little question. Do I understand it correctly that the Changelog between your's and Xenon's version is all about the javascript thing and the change of the text line from hardcoded to phrase? Or are there other interesting changes?
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 02:56 PM.


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.05223 seconds
  • Memory Usage 2,319KB
  • 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
  • (1)bbcode_code
  • (2)bbcode_quote
  • (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
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • 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