vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   New Posting Features - Doublepost Prevention (https://vborg.vbsupport.ru/showthread.php?t=203705)

yingzhou 02-04-2009 07:17 AM

when edited the uncompressed JS, how can I compress it again?

Paul M 02-04-2009 07:19 AM

Quote:

Originally Posted by jscieza (Post 1733649)
Same problem here, Paul.

However it's not a real issue at all. Thank you very much for your time and your amability of share this mod with us :)

Both of you have either made a mistake, or your browser is not loading the new version.
(clear your browser cache). The merge does not care what style you have.

RedHacker 02-04-2009 08:12 AM

Post reply has problem and when refresh 2 posts doing in 1....

Paul M 02-04-2009 02:15 PM

See the post above yours.

Stubbed 02-04-2009 08:35 PM

Quote:

Originally Posted by Paul M (Post 1733940)
Both of you have either made a mistake, or your browser is not loading the new version.
(clear your browser cache). The merge does not care what style you have.

I was pretty careful about this, I even tried on another computer at work that had never been to that the forum, same issue.

Will reload everything per-instructions and try again.

*edit*

Downloaded again, completely cleared cache and went around proxy server, has worked fine. Will blame the proxy server.

IIAnDoII 02-05-2009 06:09 PM

just got an email saying you updated it and im just wondering what you mean by "Phrased the post separater."

what does that mean ?

Thanks

Paul M 02-05-2009 07:43 PM

It means what is says - the post separator is now a phrase instead of hard coded.

proudgreenyin 02-06-2009 09:19 AM

downloaded the uncompressed .js, edited it and uploaded it and everything seems to be working great so far :) thanks very much for another great mod m8

KURTZ 02-06-2009 10:02 AM

well done Paul! i'm waiting this from long time! :p

Paul M 02-06-2009 10:21 AM

When I get some free time Im going to see if I can get around the file edit.

proudgreenyin 02-06-2009 10:53 AM

Quote:

Originally Posted by Paul M (Post 1735975)
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.

Paul M 02-06-2009 11:08 AM

Some people just like to moan ;)

A few years ago, I think 90% or more of mods were file edits :)

JVSP 02-06-2009 02:09 PM

-Marked Installed-

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

Thanks

eh69 02-07-2009 12:25 AM

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?

ForumsMods 02-07-2009 12:27 AM

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.

Paul M 02-07-2009 11:40 AM

Dont worry about it, I have bypassed the need to edit the JS file in version 3.8.003

SloppyGoat 02-07-2009 12:04 PM

Sweet! I happen to think every compressed file helps the speed a bit. http://tga.sytes.net/images/smilies/custom/ylsuper.gif

Valter 02-07-2009 12:35 PM

Good work.

eh69 02-07-2009 03:49 PM

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.

Black Tiger 02-09-2009 01:04 AM

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?

wipedout 02-09-2009 06:45 AM

Great work, i love it <3

-=Leb=- 02-09-2009 12:01 PM

Paul <3 excellent work on this mod.I had strong feeling about this mod is going to be updated by you for some reason :)

Paul M 02-09-2009 04:42 PM

Quote:

Originally Posted by Black Tiger (Post 1738238)
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?

Excluding usergroups and/or forums is easier in this version (IMO).

This also updates the post via Ajax correctly (no redirect or double post needing a refresh).

Other than that, cant think of any obvious changes.

Black Tiger 02-09-2009 09:04 PM

Cool, Thanks!

ragtek 02-09-2009 09:32 PM

Quote:

Originally Posted by Paul M (Post 1736001)
Some people just like to moan ;)

A few years ago, I think 90% or more of mods were file edits :)

that's true, but don't forget that many people get vB because of the "great" pluginsystem, so i can understand them, when they don't like to edit the original files ;)

Phalynx 02-11-2009 12:42 PM

Please remove for the next version the COLOR BBCode if there is no color defined. It it doing just a horrible [COLOR=""] Tag...

Colors are on my board disabled because of several styles.

Paul M 02-11-2009 03:56 PM

Yep, seems reasonable.

yankidank 02-11-2009 07:33 PM

All of the replys that are being merged, are being merged twice for me. For example if i paste the same content from the original post, it will show:
Code:

Whats going on here?

---------- Post added at 04:30 PM ---------- Previous post was at 04:29 PM ----------

Whats going on here?

---------- Post added at 04:30 PM ---------- Previous post was at 04:30 PM ----------

Whats going on here?

I have some odd problem with my forum that has been causing some users posts to be posted twice and was hoping this plugin would help fix that, but I think its only going to make it worse right now.

trickfly 02-12-2009 03:16 PM

This one is better than the double post prevention plus mod, so thanks!

MDK-Indy 02-14-2009 08:38 PM

What is the difference to https://vborg.vbsupport.ru/showthread.php?t=204177 ?

Paul M 02-14-2009 09:40 PM

This does a proper ajax merge (not a redirect).

ATM you can only exclude forums in this version.

This will not merge posts with attachments, which the other will (but it ignores any max attachment rules).

Not sure about any other differences.

Paul M 02-14-2009 11:01 PM

Quote:

Originally Posted by Phalynx (Post 1740813)
Please remove for the next version the COLOR BBCode if there is no color defined. It it doing just a horrible [COLOR=""] Tag...

3.8.004

You can turn off the colour or the entire spacer if you wish.

forexforum 02-15-2009 02:42 AM

Quote:

Originally Posted by Paul M (Post 1744319)
3.8.004

You can turn off the colour or the entire spacer if you wish.

Hi Paul,

The Quick Reply doesn't work in 3.8.1. Whenever I reply via the Quick Reply box, it shows a blank.

Paul M 02-15-2009 11:33 AM

My test forum is 3.8.1 and it works fine for me.

jGas 02-16-2009 11:33 PM

it works also on 3.7 if you change the dependency :)

Vinyljunky 02-17-2009 11:46 AM

Another great mod from Paul M :up:

Thank you for sharing your code :)

FinanceGuy 02-17-2009 08:39 PM

Installed in seconds. Tested in no time. Worked perfectly with absolutely no problems.

Beautiful work mate. You got my vote. :up:

Fynnon 02-18-2009 12:04 PM

it seems that the second post is merged into the first post but it is also displayed as second post

forte 02-18-2009 12:46 PM

This causes a conflict with the Facebook Connect hack. Using the quick reply would redirect me to the newreply page with the error that i lack characters and the text box is blank. I also get a javascript error that fb_qr_prepare_submit_pdp is now defined (Facebook Connect uses fb_qr_prepare_submit).

zlos 02-18-2009 01:13 PM

works ad dream - installed :)


All times are GMT. The time now is 03:08 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01562 seconds
  • Memory Usage 1,833KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete