Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Design and Graphics Discussions
  #1  
Old 11-17-2009, 12:31 AM
Fangs404 Fangs404 is offline
 
Join Date: Oct 2008
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default making "Quote message in reply?" checked automatically

So I want my "Quote message in reply?" checkbox in the quick reply box to be checked at all times. Now the most obvious way to do that is to edit the SHOWTHREAD template and turn:

PHP Code:
<label for="qr_quickreply"><input type="checkbox" name="quickreply" value="1" id="qr_quickreply" accesskey="w" tabindex="4" />$vbphrase[quote_message_in_reply]</label
into this:

PHP Code:
<label for="qr_quickreply"><input type="checkbox" name="quickreply" value="1" id="qr_quickreply" accesskey="w" tabindex="4" checked="checked" />$vbphrase[quote_message_in_reply]</label
This is all fine and does indeed check the box by default when a new thread is loaded. However, if someone uses the quick reply box without hitting the quick reply button for a specific post, the box clears itself. I can't figure out why. The box should always be checked. I don't even understand why it's unchecked by default.

How can I ensure that the box will remain checked when a user submits a reply to the thread without quick replying any particular post?
Reply With Quote
  #2  
Old 11-17-2009, 12:53 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think maybe the problem is that the check box is disabled if you haven't pressed the button for a post, I guess the idea being that you aren't replying to a particular post so there's nothing to quote. Maybe it looks like it clears because it's disabled?
Reply With Quote
  #3  
Old 11-17-2009, 12:55 AM
Fangs404 Fangs404 is offline
 
Join Date: Oct 2008
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
I think maybe the problem is that the check box is disabled if you haven't pressed the button for a post, I guess the idea being that you aren't replying to a particular post so there's nothing to quote. Maybe it looks like it clears because it's disabled?
No, it definitely clears. I know this because if I reply using the quick reply box and then try to reply to a specific post in the thread, the post doesn't get quoted in the reply.
Reply With Quote
  #4  
Old 11-17-2009, 12:58 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh, I think I see - you're saying that if you use it once without quoting a post, the next time (after the page reloads) it's unchecked?
Reply With Quote
  #5  
Old 11-17-2009, 01:00 AM
Fangs404 Fangs404 is offline
 
Join Date: Oct 2008
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
Oh, I think I see - you're saying that if you use it once without quoting a post, the next time (after the page reloads) it's unchecked?
Exactly.

I think it has something to do with the AJAX code. It must somehow be clearing the box, but I don't know where to look to make sure the box stays checked. I never want it cleared unless the user clears it.
Reply With Quote
  #6  
Old 11-17-2009, 01:30 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, I think the JavaScript for that is in clientscript/vbulletin_quick_reply.js, and it looks like it clears that checkbox if a post wasn't selected. So I guess one way is to figure out how to change or add JS.

Another idea might be to rename that checkbox so the JS won't mess with it, then use a plugin on newreply_post_start to read the value of the checkbox and fix things up on the server side.
Reply With Quote
  #7  
Old 11-18-2009, 04:17 AM
Fangs404 Fangs404 is offline
 
Join Date: Oct 2008
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
Yeah, I think the JavaScript for that is in clientscript/vbulletin_quick_reply.js, and it looks like it clears that checkbox if a post wasn't selected. So I guess one way is to figure out how to change or add JS.

Another idea might be to rename that checkbox so the JS won't mess with it, then use a plugin on newreply_post_start to read the value of the checkbox and fix things up on the server side.
Awesome. I'll check that file. Thanks.
Reply With Quote
  #8  
Old 05-10-2011, 05:12 PM
MissKalunji's Avatar
MissKalunji MissKalunji is offline
 
Join Date: Aug 2003
Location: Canada
Posts: 2,845
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Fangs404 View Post
So I want my "Quote message in reply?" checkbox in the quick reply box to be checked at all times. Now the most obvious way to do that is to edit the SHOWTHREAD template and turn:

PHP Code:
<label for="qr_quickreply"><input type="checkbox" name="quickreply" value="1" id="qr_quickreply" accesskey="w" tabindex="4" />$vbphrase[quote_message_in_reply]</label
into this:

PHP Code:
<label for="qr_quickreply"><input type="checkbox" name="quickreply" value="1" id="qr_quickreply" accesskey="w" tabindex="4" checked="checked" />$vbphrase[quote_message_in_reply]</label
This is all fine and does indeed check the box by default when a new thread is loaded. However, if someone uses the quick reply box without hitting the quick reply button for a specific post, the box clears itself. I can't figure out why. The box should always be checked. I don't even understand why it's unchecked by default.

How can I ensure that the box will remain checked when a user submits a reply to the thread without quick replying any particular post?
I was looking for this

thanks!
Reply With Quote
Reply

Thread Tools
Display Modes

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 09:45 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.04444 seconds
  • Memory Usage 2,252KB
  • Queries Executed 13 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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_postinfo_query
  • fetch_postinfo
  • 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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete