MyBB.de Forum

Normale Version: Schnellantwortbox als default verkleinern
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Hallo,

kann mir jemand einen Tip geben, wie ich die Schnellantwortbox als default verkleinern (ausblenden) kann, da der normale) Antwortbutton irgendwie zwischen dem Beitrag und Schnellantwort untergeht...
Idealerweise, wäre wenn man die Schnellantwortbox "aufklappen bzw. einblenden könnte...

Leider habe ich dazu nichts passendes gefunden...und jemand von euch hat einen Tip ?
Big Grin
Gruß Demo
Die Schnellantwort kann man doch zuklappen. Wink
Ja, aber ich möchte dies als "default" haben... Smile das müsste sich doch eigentlich über eine Variable regeln lassen.. ?!Rolleyes
Als ich vor 5 Jahren zu diesem Forum gelangt bin, war dies mein erster Beitrag: https://www.mybb.de/forum/thread-662.html (bezieht sich zwar auf die Statistik-Box, macht aber keinen großen Unterschied)

Bis jetzt habe ich immer noch keine zufriedenstellende Lösung gefunden...
hi und danke für deinen Hinweis...

bedeutet das, das die Einstellung tatsächlich im Cookie hinterlegt wird ?
Da muss es doch auch eine andere Möglichkeit geben... ?
meinetwegen in der DB hinterlegt... ?

Was meint ihr ?

cu demo
Vielleicht ist ja folgendes eine Anregung:

ich habe bei mir die "wer ist online?" Liste (Plugin) wie folgt umgestrickt:
Code:
<script type='text/javascript'>
function showonlinetoday(){
    var j_sign = document.getElementById('test01');
    var j_plus = "images/collapse_collapsed.gif", j_minus = "images/collapse.gif";
    if (document.getElementById('onlineToday').style.display == 'none')
    {
        if(navigator.appName == 'Microsoft Internet Explorer')
            {
            document.getElementById('onlineToday').style.display='block';
            j_sign.src = j_minus;
            }
            else
            {
            document.getElementById('onlineToday').style.display='table-row';
            j_sign.src = j_minus;
            }
    }
    else
        {
            document.getElementById('onlineToday').style.display = 'none';
            j_sign.src = j_plus;
        }
    };
</script>
<tr>
    <td class="tcat" colspan="2">
        <span style="float:right;">
            <img id="test01" src="images/collapse_collapsed.gif" style='cursor:pointer'
                onclick="showonlinetoday(); return false;" />
        </span>
        <strong>blablabla1</strong>
    </td>
</tr>
<tr id='onlineToday' style='display:none;'>
    <td class="trow1" colspan="2">
    <span class="smalltext">blablabla2<br />blablabla3</span>
    </td>
</tr>
Ok, ich gebe zu, der JS-Code nicht ganz auf meinem Mist gewachsen. Blush

Die Liste ist nun standardmäßig geschlossen. Sie kann aber per Mausklick geöffnet werden und bleibt so lange offen, wie man sich auf der Seite befindet oder diese neu geladen wird.

Diesen Code kann man vermutlich auch in das Template der Schnellantwort integrieren.
Hi Jockl,

erst einmal danke für deinen Beitrag Smile

Jetzt ist nur die Frage, was ich ändern muss bzw. wie ich den Code wie und wo einbinden kann... ?


ich denke in diesem Abschnitt müssten die Codeänderungen eingefügt werden... nur wo ? Smile

showthread_quickreply

PHP-Code:
<br />
<
form method="post" action="newreply.php?tid={$tid}&amp;processed=1" name="quick_reply_form" id="quick_reply_form">
    <
input type="hidden" name="my_post_key" value="{$mybb->post_code}/>
    <
input type="hidden" name="subject" value="RE: {$thread['subject']}/>
    <
input type="hidden" name="action" value="do_newreply" />
    <
input type="hidden" name="posthash" value="{$posthash}id="posthash" />
    <
input type="hidden" name="quoted_ids" value="" id="quoted_ids" />
    <
input type="hidden" name="lastpid" id="lastpid" value="{$last_pid}/>
    <
input type="hidden" name="from_page" value="{$page}/>
    <
input type="hidden" name="tid" value="{$tid}/>
    <
input type="hidden" name="method" value="quickreply" />

    <
table border="0" cellspacing="{$theme['borderwidth']}cellpadding="{$theme['tablespace']}class="tborder">
        <
thead>
            <
tr>
                <
td class="thead" colspan="2">
                    <
div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['quickreply']}.gif" id="quickreply_img" class="expander" alt="[-]" title="[-]" /></div>
                    <
div><strong>{$lang->quick_reply}</strong></div>
                </
td>
            </
tr>
        </
thead>
        <
tbody style="{$collapsed['quickreply_e']}id="quickreply_e">
            <
tr>
                <
td class="trow1" valign="top" width="22%">
                    <
strong>{$lang->message}</strong><br />
                    <
span class="smalltext">{$lang->message_note}<br /><br />
                    <
label><input type="checkbox" class="checkbox" name="postoptions[signature]" value="1" {$postoptionschecked['signature']} />&nbsp;<strong>{$lang->signature}</strong></label><br />
                    <
label><input type="checkbox" class="checkbox" name="postoptions[disablesmilies]" value="1" />&nbsp;<strong>{$lang->disable_smilies}</strong></label>{$closeoption}</span>
                </
td>
                <
td class="trow1">
                    <
div style="width: 95%">
                        <
textarea style="width: 100%; padding: 4px; margin: 0;" rows="8" cols="80" name="message" id="message" tabindex="1"></textarea>
                    </
div>
                    <
div class="editor_control_bar" style="width: 95%; padding: 4px; margin-top: 3px; display: none;" id="quickreply_multiquote">
                        <
span class="smalltext">
                            {
$lang->quickreply_multiquote_selected} <a href="./newreply.php?tid={$tid}&amp;load_all_quotes=1" onclick="return Thread.loadMultiQuoted();">{$lang->quickreply_multiquote_now}</a> {$lang->or} <a href="javascript:Thread.clearMultiQuoted();">{$lang->quickreply_multiquote_deselect}</a>.
                        </
span>
                    </
div>
                </
td>
            </
tr>
            {
$captcha}
            <
tr>
                <
td colspan="2" align="center" class="tfoot"><input type="submit" class="button" value="{$lang->post_reply}tabindex="2" accesskey="s" id="quick_reply_submit" /> <input type="submit" class="button" name="previewpost" value="{$lang->preview_post}tabindex="3" /></td>
            </
tr>
        </
tbody>
    </
table>
</
form

Kann mir da ggf. jemand mit unter die Arme greifen... ? Wink

danke schon einmal im Voraus... Big Grin

Gruß Demo
Probier das mal. Entspricht es dem, was Du meinst?

Ersetze den Inhalt des showthread_quickreply Templates durch folgende Zeilen
Code:
<script type='text/javascript'>
function showquickreply(){
    var j_sign = document.getElementById('q_reply');
    var j_plus = "images/collapse_collapsed.gif", j_minus = "images/collapse.gif";
    if (document.getElementById('quick_reply').style.display == 'none')
    {
        if(navigator.appName == 'Microsoft Internet Explorer')
            {
            document.getElementById('quick_reply').style.display='block';
            j_sign.src = j_minus;
            }
            else
            {
            document.getElementById('quick_reply').style.display='table-row';
            j_sign.src = j_minus;
            }
    }
    else
        {
            document.getElementById('quick_reply').style.display = 'none';
            j_sign.src = j_plus;
        }
    };
</script>
<br />
<form method="post" action="newreply.php?tid={$tid}&amp;processed=1" name="quick_reply_form" id="quick_reply_form">
    <input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
    <input type="hidden" name="subject" value="RE: {$thread['subject']}" />
    <input type="hidden" name="action" value="do_newreply" />
    <input type="hidden" name="posthash" value="{$posthash}" id="posthash" />
    <input type="hidden" name="quoted_ids" value="" id="quoted_ids" />
    <input type="hidden" name="lastpid" id="lastpid" value="{$last_pid}" />
    <input type="hidden" name="from_page" value="{$page}" />
    <input type="hidden" name="tid" value="{$tid}" />
    <input type="hidden" name="method" value="quickreply" />

    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
        <thead>
            <tr>
                <td class="thead" colspan="2">
                            <span style="float:right;"><img id="q_reply" src="images/collapse_collapsed.gif" style='cursor:pointer' onclick="showquickreply(); return false;" /></span>
                    <div><strong>{$lang->quick_reply}</strong></div>
                </td>
            </tr>
        </thead>
        <tbody id='quick_reply' style='display:none;'>
            <tr>
                <td class="trow1" valign="top" width="22%">
                    <strong>{$lang->message}</strong><br />
                    <span class="smalltext">{$lang->message_note}<br /><br />
                    <label><input type="checkbox" class="checkbox" name="postoptions[signature]" value="1" {$postoptionschecked['signature']} />&nbsp;<strong>{$lang->signature}</strong></label><br />
                    <label><input type="checkbox" class="checkbox" name="postoptions[disablesmilies]" value="1" />&nbsp;<strong>{$lang->disable_smilies}</strong></label>{$closeoption}</span>
                </td>
                <td class="trow1">
                    <div style="width: 95%">
                        <textarea style="width: 100%; padding: 4px; margin: 0;" rows="8" cols="80" name="message" id="message" tabindex="1"></textarea>
                    </div>
                    <div class="editor_control_bar" style="width: 95%; padding: 4px; margin-top: 3px; display: none;" id="quickreply_multiquote">
                        <span class="smalltext">
                            {$lang->quickreply_multiquote_selected} <a href="./newreply.php?tid={$tid}&amp;load_all_quotes=1" onclick="return Thread.loadMultiQuoted();">{$lang->quickreply_multiquote_now}</a> {$lang->or} <a href="javascript:Thread.clearMultiQuoted();">{$lang->quickreply_multiquote_deselect}</a>.
                        </span>
                    </div>
                </td>
            </tr>
            {$captcha}
            <tr>
                <td colspan="2" align="center" class="tfoot"><input type="submit" class="button" value="{$lang->post_reply}" tabindex="2" accesskey="s" id="quick_reply_submit" /> <input type="submit" class="button" name="previewpost" value="{$lang->preview_post}" tabindex="3" /></td>
            </tr>
        </tbody>
    </table>
</form>
scheiss die wand an Smile Genau das ist es, was ich wollte ! DANKE !
Toungue Big Grin