Tabelka z załącznikami

Założony przez  BlueMan.

Kilka szczegółów o moim forum i stylu, z którym mam problem:
nazwa stylu: sun
wersja skryptu MyBB: 1.4.11
adres forum: http://alleprawda.pl/forum/
opis problemu:

Który wpis odpowiada za tabelkę w której jest formularz dodawania załączników do postów.
Mówię o tej tabelce, która jest po "Odpowiedz", bądź "Podgląd" napisane postu w szybkiej odpowiedzi.

Znalazłem w "Nowa odpowiedź" w szablonie "newreply" wpis "{$attachbox}", ale gdzie szablon do tego znaleźć to już nie mam pojęcia.


Chcę w szybkiej odpowiedzi umieścić przycisk "Załącz plik", który przenosiłby do tej strony "Odpowiedź" i zjeżdżał automatycznie do pola dodawania załączników na forum.
Z tego co widzę to będą szablony w Post - Szablony, oznaczone:
post_attachments i wszystkie zaczynające się od tego wyrażenia.
Szablon szybkiej odpowiedzi to showthread_quickreply. Mniej więcej ten fragment odpowiada za przyciski Odpowiedz i Podgląd:
<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>
Na logikę trzeba będzie skopiować fragment kodu z szablonu post_attachments, a następnie zaraz pod skopiowanym fragmentem wkleić kod szablonu post_attachments_new

Całość szablonu showthread_quickreply:
<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>
<br />
            <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
    <td class="thead" colspan="3"><strong>{$lang->attachments}</strong></td>
</tr>
<tr>
    <td class="tcat smalltext" colspan="3">{$lang->attach_quota} <a href="usercp.php?action=attachments">{$lang->view_attachments}</a></td>
</tr>
{$newattach}
{$attachments}
<tr>
<td class="trow1" width="1"><img src="{$theme['imgdir']}/paperclip.gif" alt="" /></td>
<td class="trow1" style="white-space: nowrap"><strong>{$lang->new_attachment}</strong> <input type="file" name="attachment" size="30" class="fileupload" /></td><td class="trow1" align="center"><input type="submit" class="button" name="newattachment" value="{$lang->add_attachment}"  tabindex="12" />
</td>
</tr>
</table>
            </tr>
        </tbody>
    </table>
</form>

Powinno jako tako działać.
Ok, już prawie wszystko działa

Dodałem przycisk
<input type="button" class="button" name="previewpost2" value="Dodaj załącznik" tabindex="4" onclick="this.form.action.value='newreply.php?tid={$tid}&amp;processed=1#zalacznik';this.form.submit()" />
Jednakże przenosi on do newreply.php?tid={$tid}&amp;processed=1 nie biorąc pod uwagę w ogóle mojej kotwicy :/

Jak to zmienić?



Użytkownicy przeglądający ten wątek:

1 gości