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. |
#12
|
|||
|
|||
Quote:
I had the compressed version and found this code. I put the // in front of both strings and it didn't do anything. I then put a space before the // in each string and it now works. I don't have a clue if that's the technical thing to do, but it's working for me. |
#13
|
|||
|
|||
Quote:
Quote:
Did you ever get this sorted? |
#14
|
|||
|
|||
Thanks 4 good work
|
#15
|
|||
|
|||
Is there a way to change both the reply and reply with quote both to a single click?
|
#16
|
|||
|
|||
This worked for me, good job.
Why VB introduced the double click thing is beyond me - its totally non web standard and so confusing for people. |
#17
|
|||
|
|||
Cloughie, I couldn't agree with you more! Thank You cbiweb!!
|
#18
|
|||
|
|||
You're all very welcome. Glad to help.
|
#19
|
||||
|
||||
I don't even have "YAHOO" in vbulletin_quick_reply.js .. where can I get a file that let me apply this mod?
|
#20
|
|||
|
|||
If you're running 4.0.1 or 4.0.2, it is most definitely there. I can't be sure about any of the betas, the RC's or 4.0.0, since I only figured it out in 4.0.1.
|
#21
|
||||
|
||||
vbulletin_quick_reply.js says "vBulletin 4.0.2 Patch Level 1"
Am i allowed to post the file here so you can take a look? |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|