vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=168)
-   -   making "Quote message in reply?" checked automatically (https://vborg.vbsupport.ru/showthread.php?t=228153)

Fangs404 11-17-2009 12:31 AM

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?

kh99 11-17-2009 12:53 AM

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?

Fangs404 11-17-2009 12:55 AM

Quote:

Originally Posted by kh99 (Post 1915618)
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.

kh99 11-17-2009 12:58 AM

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?

Fangs404 11-17-2009 01:00 AM

Quote:

Originally Posted by kh99 (Post 1915622)
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.

kh99 11-17-2009 01:30 AM

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.

Fangs404 11-18-2009 04:17 AM

Quote:

Originally Posted by kh99 (Post 1915632)
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. :)

MissKalunji 05-10-2011 05:12 PM

Quote:

Originally Posted by Fangs404 (Post 1915604)
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!


All times are GMT. The time now is 10:13 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
  • Page Generation 0.01222 seconds
  • Memory Usage 1,752KB
  • 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
  • (4)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete