The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
[How-To] Disable double click on Reply buttons
This article discusses code modifications made directly in the files, and will need to be done each time you upgrade vBulletin. If possible I will write a plugin when I get a chance, and this note and article will become irrelevant. [How-To] Disable Double-Click On Reply Buttons A lot of people agree that the new double-click functionality for the "Reply With Quote" and "+ Reply to Thread" buttons is not user friendly, and not a standard behavior for buttons on a web page. The biggest complaint is having to click twice to get to the regular Advanced editor. It doesn't appear that the developers are going to change this soon, if ever, so until they do I went digging for a solution to bring back the familiar and very user friendly single-click action for these buttons. Go to your clientscript folder, and open the vbulletin_quick_reply.js file. Look for this section of code: Code:
function qr_init_buttons(obj) { // intercept post button clicks to use inline form var anchors = fetch_tags(obj, 'a'); for (var i = 0; i < anchors.length; i++) { // reply button if (anchors[i].id && (anchors[i].id.substr(0, 3) == 'qr_' || anchors[i].id.substr(0, 5) == 'qrwq_')) { YAHOO.util.Event.on(anchors[i], "click", qr_newreply_activate, this); //anchors[i].onclick = function(e) { return qr_newreply_activate(this.id.substr(3), false); }; } } // set the "+Reply to Thread" buttons onlclick events var replytothreadids = ["newreplylink_top", "newreplylink_bottom"]; YAHOO.util.Event.on(replytothreadids, "click", qr_replytothread_activate, this); //YAHOO.util.Event.on(replytothreadids, "dblclick", function(e) { window.location = this.href; }, this); } Code:
function qr_init_buttons(obj) { // intercept post button clicks to use inline form var anchors = fetch_tags(obj, 'a'); for (var i = 0; i < anchors.length; i++) { // reply button if (anchors[i].id && (anchors[i].id.substr(0, 3) == 'qr_' || anchors[i].id.substr(0, 5) == 'qrwq_')) { //YAHOO.util.Event.on(anchors[i], "click", qr_newreply_activate, this); //anchors[i].onclick = function(e) { return qr_newreply_activate(this.id.substr(3), false); }; } } // set the "+Reply to Thread" buttons onlclick events var replytothreadids = ["newreplylink_top", "newreplylink_bottom"]; //YAHOO.util.Event.on(replytothreadids, "click", qr_replytothread_activate, this); //YAHOO.util.Event.on(replytothreadids, "dblclick", function(e) { window.location = this.href; }, this); } The blue commented line reverts the "+ Reply to Thread" buttons back to single click, which takes you directly to the Advanced editor. One more thing, Multi-quote behavior depends on which line(s) you comment out. If you ever want to use the default double-click behavior for either button, simply remove the two forward slashes that you added. And remember, until I create the plugin/product, you will need to make this change each time you upgrade your forums. |
#32
|
|||
|
|||
This is just unreal that vbull would put buttons on a webpage that require double click. I am just stupified. So does this hack work for 4.0.5?
|
#33
|
|||
|
|||
ok have been using this mod for a few days and reported to the dev my main issues. Main problem is that the mod has interfered with my postbit "reply" "quick reply" buttons. It has now turned these into reply with quote advanced. I want to reply and reply with quote in the postbit to use the quick reply box but am unsure how to force these buttons to do so. If anyone has an idea please let me know! Thanks
|
#34
|
|||
|
|||
Yes, I mentioned this in the initial post of the thread. I'm not sure how to fix that. The solution could very well be simple, but I just don't have time these days to sit down and check it out.
|
#35
|
|||
|
|||
ok,
i found this other option to disable double click http://www.vbulletin.com/forum/showt...ack-to-vb3-way it requires no js edits and worked beautifully. I'm not sure if anyone else knows about it so am posting it here for informational purposes. Thanks |
#36
|
|||
|
|||
Confused i use 4.0.7 which code looks so different.
|
#37
|
||||
|
||||
Just set up vBulletin and this was confusing me badly. I've used vBulletin on other sites for years and thought I had something misconfigured. It seemed like half the time it would go to quick reply and half the time advanced. I don't understand how people would know that it was supposed to behave this way. At least there is a way to disable it.
|
#38
|
|||
|
|||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|