![]() |
How To Make Post Reply Becomes Quick Reply ? Please Guys
1 Attachment(s)
Hi all..i have a question here
Ok, if you take a look at vbulletin version 4.x.x, when we click the Post reply, it goes to Quick Reply box below, but in vb3.8.x, it will open new reply page.. so my point here, how to make vb3.8.5 Post Reply function becomes like vb4 ? please see the attachment anyway, i use vb3.8.5 |
no one know ?
|
i can show you how but that not a good ida... trust me you cant add images from there bbcodes,.... but if you insist then reply to this thread...
|
Quote:
|
actually, no need to be same exactly likes vb4, is enough if when we click the Post Reply, it goes to quick reply box below ( call the javascript )
can we do like that ? if u can understand me, u will know, by doing this, it will reduce lots of server loads when there are too many online users. |
SHOWTHREAD
notice :- { there is 2 of them one on top of the post and one under it } find the red Code:
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&noquote=1&p=$FIRSTPOSTID" rel="nofollow"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a></td> Code:
href="$post[replylink]" rel="nofollow" id="qr_$post[postid]" onclick="return false" default code = Code:
good luck... |
Instructions provided by MAD--DOG aren't working. If you do that, the reply button does nothing.
Any input? |
I've just had a look at that code and it seems to be fine, what's your issue with it? are you implementing it exactly as above? do you have quick reply turned on? do you have any mod working with quick reply?
|
Indeed it seems to be fine... according to that instruction it's all about copying the "quick reply" link from the postbit and overwrite it over the "reply" link located at showthread however it looks not to be as easy as that. As I already said... if you do that then the reply button does nothing. Try it yourself and you'll see.
|
Are you using vb 3.x or 4.x? These instructions are for 3.x.
|
Obviously, I'm using vB 3.8
Any ideas? |
Ok so i checked it and it's because that variable isn't available in showthread, this is what you need:
Replace HTML Code:
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&noquote=1&p=$FIRSTPOSTID" rel="nofollow"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a></td> HTML Code:
<td class="smallfont"><a href="#qrform"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a></td> |
It works!
But you're missing one little but very important thing. If you use the regular quick reply button, you're moved down to the quick reply box and the focus is inside that box so you know that you should start typing. After applying your instructions, the reply button indeed sends you to the quick reply box but the focus isn't on the box so newbie members could get confused. Any workaround for this? |
Not a quick fix without messing around with JS n stuff!, i'll take a look tonight when i get home.
|
Not tested but try adding this onclick event to the <a href...> tag:
Code:
onclick="document.getElementById('vB_Editor_QR_textarea').focus();" |
Unfortunately that isn't working, BirdOPrey5 :(
|
Quote:
|
Quote:
|
To be honest i think thats as good as you are going to get, i don't think you can set focus outside of the element, i tried numerous ways, so without having seperate JS for those two buttons you'll have to stick with just being sent to the form :|
|
We were on the right track but the trouble was the code I posted only worked in Chrome... It needed a little editing to work in Firefox and IE-
HTML Code:
<td class="smallfont"><a href="javascript:void(0);" onclick="location.hash = '#qrform'; document.getElementById('vB_Editor_QR_textarea').focus();"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a></td> Should just have an option for people who are visiting without javascript enabled. |
Thanks, Simon and Bird.
Bird, I tested your latest code and it works on Chrome but still not working in Firefox 14. I haven't tested it yet on IE9 because I have IE8 and well it doesn't work on IE8 but at least I got feedback from IE8 error log: Code:
"Can't move focus to the control because its invisible, not enabled, or of a type that does not accept the focus" Or maybe there is a type on your code? |
I copied the code directly from my test site where it is/was working.
It is working fine on Firefox 13 and Firefox 14 and Waterfox which is a 64 bit version of Firefox. I only put it in place of the top "Post Reply" button... curious if you tried it from that location? You could try this alternate code- it should do the same thing, again I have tested it in IE9 and FF and Chrome: HTML Code:
<td class="smallfont"><a href="javascript:void(0);" onclick="location.hash = '#qrform'; vbform.elements['message'].focus();"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a></td> Code:
location.hash = '#qrform'; |
I figured out what the problem is. It works (I'm using your original code) when your quick reply box isn't WYSIWYG by default. When it's WYSIWYG by default (like mine) then it doesn't work. Try it and you'll see. Any workaround?
|
Good eye...
OK So I had to add a condition to test if the wysiwg editor is enabled, both in vb and the browser... this is working for me- Code:
<if condition="$show['wysiwyg']"> |
Thanks! Now it's working fine in Firefox... so it's all about getting it to work on IE. I'm not a programmer but I'll try to play with your code and see if I have luck. I hope so!
|
In Googling the issue setting focus in IE is a common problem-
I tried some options here: http://stackoverflow.com/questions/2...n-iframe-in-ie But no luck yet. |
I have noticed that when using the quick reply button the focus is inside the text area be it WYSIWYG or not (IE9). So I'm sure that what I'm looking for is doable however it appears to be more hard than what I expected :(
|
Wow, so simple in theory. Not surprising, though. xD
|
If anyone knows how to make this to work please help.
|
Put this in the <head> section of the SHOWTHREAD template --
HTML Code:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> |
Haven't tested it yet but I can see that you're using jQuery which will add more than 90KB in size to my showthread.php pages. I guess that if you're using an external javascript it means that there is no other way to focus the cursor on the WYSIWYG quick reply box in IE9 when using the code shared by Bird? His code is working perfectly fine in Firefox, Chrome and even IE9 (but only when using the non-WYSIWYG editor).
|
Quote:
|
Thanks for the input.
Do you think that it's possible to make this to work with the included YUI js library that comes by default with vB 3.8? Because relying on jQuery adds more than 90KBs in size to my showthread.php pages :-( |
Of course it's possible. I can't do it, though; maybe someone else can. :)
It's on Google's CDN so it shouldn't be that big of a deal. |
All times are GMT. The time now is 04:48 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|