vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Automatically select "Quote post" when using quick reply (https://vborg.vbsupport.ru/showthread.php?t=146883)

amagazi 05-10-2007 02:38 AM

Automatically select "Quote post" when using quick reply
 
Is there a mod out there that automatically selects for the user to "Quote" the post he is replying to when he clicks the quick reply button? I've seen it on a couple boards, so I'm not sure if it is a completely custom mod, or one that someone here put up.. I did a search and didn't find anything.

styleforum 05-10-2007 04:38 AM

I think you would just go into the SHOWTHREAD template, find "input type="checkbox" name="quickreply"" and just after that add "checked" (no quotes) - this will make the box checked by default.

HTH

amagazi 05-12-2007 03:41 AM

This is the code for quick reply in "SHOWTHREAD" I can't find the code you are talking about.... any ideas on what to do from here?

Code:

<if condition="$show['quickreply']">
<!-- quick reply -->
<script type="text/javascript" src="clientscript/vbulletin_quick_reply.js?v=$vboptions[simpleversion]"></script>
<form action="newreply.php?do=postreply&amp;t=$threadid" method="post" name="vbform" onsubmit="return qr_prepare_submit(this, $vboptions[postminchars]);" id="qrform">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
        <tr>
                <td class="tcat" colspan="2">
                        <if condition="$show['quickreply_collapse']"><a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('quickreply');"><img id="collapseimg_quickreply" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_quickreply].gif" alt="" border="0" /></a></if>
                        $vbphrase[quick_reply]
                </td>
        </tr>
</thead>
<tbody id="qr_error_tbody" style="display:none">
<tr>
        <td class="thead">$vbphrase[errors_occured_when_submitted]</td>
</tr>
<tr>
        <td class="alt1" id="qr_error_td"></td>
</tr>
<tr>
        <td class="tfoot" align="center"><span class="smallfont"><a href="#" onclick="return qr_hide_errors()">$vbphrase[okay]</a></span></td>
</tr>
</tbody>
<tbody id="collapseobj_quickreply" style="$vbcollapse[collapseobj_quickreply]">
<tr>
        <td class="panelsurround" align="center">
                <div class="panel">       
                        <table cellpadding="0" cellspacing="0" border="0" align="center">
                        <tr>
                                <td class="smallfont" align="$stylevar[left]">$vbphrase[message]:</td>
                        </tr>
                        <tr>
                                <td id="$editorid" class="vBulletin_editor" align="$stylevar[left]">$messagearea</td>
                        </tr>
                        <tr>
                                <td align="$stylevar[left]">
                               
                                        <fieldset class="fieldset" style="margin:$stylevar[formspacer]px 0px 0px 0px">
                                                <legend>$vbphrase[options]</legend>
                                                <div>
                                                        <if condition="$bbuserinfo['signature']">
                                                                <div style="float:$stylevar[right]"><label for="cb_signature"><input type="checkbox" name="signature" value="1" id="cb_signature" tabindex="5" checked="checked" />$vbphrase[show_your_signature]</label></div>
                                                        </if>
                                                        <label for="qr_quickreply"><input type="checkbox" name="quickreply" value="1" id="qr_quickreply" accesskey="w" tabindex="4" />$vbphrase[quote_message_in_reply]</label>
                                                </div>
                                        </fieldset>
                               
                                </td>
                        </tr>
                        </table>
                </div>       

                <div style="margin-top:$stylevar[cellpadding]px">
                        <input type="hidden" name="fromquickreply" value="1" />
                        <input type="hidden" name="s" value="$session[sessionhash]" />
                        <input type="hidden" name="do" value="postreply" />
                        <input type="hidden" name="t" value="$threadid" id="qr_threadid" />
                        <input type="hidden" name="p" value="$qrpostid" id="qr_postid" />
                        <input type="hidden" name="parseurl" value="1" />
                        <input type="hidden" name="loggedinuser" value="$bbuserinfo[userid]" />
                        <input type="submit" class="button" value="$vbphrase[post_quick_reply]" accesskey="s" title="(Alt + S)" name="sbutton" tabindex="2" id="qr_submit" onclick="clickedelm = this.value" />
                        <input type="submit" class="button" value="$vbphrase[go_advanced]" accesskey="x" title="(Alt + X)" name="preview" tabindex="3" id="qr_preview" onclick="clickedelm = this.value" />
                </div>

                <div align="center" id="qr_posting_msg" style="display:none; margin-top:6px">
                        <img style="vertical-align: middle;" src="$stylevar[imgdir_misc]/progress.gif" alt="$vbphrase[posting_quick_reply_please_wait]" />&nbsp;<strong>$vbphrase[posting_quick_reply_please_wait]</strong>
                </div>       
        </td>
</tr>
</tbody>
</table>
</form>


Mark.B 05-12-2007 08:00 AM

In template SHOWTHREAD find this:
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>
Replace with this:
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 will tick the box by default, *however* I have always found if that if you then submit a quick reply using AJAX, the box unticks again which can be annoying, and I have never found out where the code for that is. I am guessing it must be within the AJAX code somewhere.

amagazi 05-14-2007 09:58 PM

Mark you ROCK!


All times are GMT. The time now is 01:07 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.01128 seconds
  • Memory Usage 1,739KB
  • 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
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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