MyBB.de Forum
POST Formular - Druckversion

+- MyBB.de Forum (https://www.mybb.de/forum)
+-- Forum: Sonstiges (https://www.mybb.de/forum/forum-1.html)
+--- Forum: Programmierung (https://www.mybb.de/forum/forum-32.html)
+--- Thema: POST Formular (/thread-27178.html)



POST Formular - MrRight - 30.12.2012

Hallo,
Ich habe eine Frage, und zwar ist es möglich über ein Formular einen Post zu erstellen wo ich angeben kann von welchen User dieser geschrieben wird?

Also bis jetzt ist es so
PHP-Code:
<form method="post" action="newreply.php?tid={$thread['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="Push-Beitrag" />
    <
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="{$thread['tid']}/>
    <
input type="hidden" name="method" value="quickreply" />
<
input type="hidden" name="author" value="push" />
        <
input type="hidden" name="message" id="message"  value="[b][align=center]#Thema#[/align][/b]" />


                    <
td colspan="2" align="center" class="tfoot"><input type="submit" class="button" value="Beitrag erstellen" tabindex="2" accesskey="s" id="quick_reply_submit" /></td>
</
form

Nun will ich aber auch noch den User angeben von wem das ganze gepostet werden soll..
Also z.B. so:
PHP-Code:
<form method="post" action="newreply.php?tid={$thread['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="Push-Beitrag" />
    <
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="{$thread['tid']}/>
    <
input type="hidden" name="method" value="quickreply" />

<
input type="hidden" name="username" value="123" />


<
input type="hidden" name="author" value="push" />
        <
input type="hidden" name="message" id="message"  value="[b][align=center]#Thema#[/align][/b]" />


                    <
td colspan="2" align="center" class="tfoot"><input type="submit" class="button" value="Beitrag erstellen" tabindex="2" accesskey="s" id="quick_reply_submit" /></td>
</
form

Ich hoffe ihr wisst was ich meine.

DANKE schonmal


RE: POST Formular - Jockl - 30.12.2012

Schau Dir das z.B. in der newreply.php an, wie es dort gemacht wird:
https://crossreference.mybb.de/newreply.php.source.html#l334


Vielleicht hilft Dir das schon weiter.


RE: POST Formular - MrRight - 30.12.2012

Ne, leider nicht.

So geht es nicht.

<input type="hidden" name="username" value="name" />

Danke trotzdem


RE: POST Formular - Jockl - 30.12.2012

Vielleicht hilft Dir das hier weiter: https://www.mybb.de/forum/thread-8892.html?highlight=formular+AND+beitrag


RE: POST Formular - MrRight - 30.12.2012

Ne, da komm ich grade nicht mit sry.
Hast du ne Idee wie ich es sonst machen könnte


RE: POST Formular - Jockl - 30.12.2012

Eigentlich steht in den beiden Threads alles drin....


RE: POST Formular - MrRight - 30.12.2012

Ja, das schon aber was will ich mit nem neuen Thread, das muss doch im Formular auch gehen oder nicht?

Danke trotzdem


RE: POST Formular - Jockl - 30.12.2012

Im Prinzip geht das doch genauso beim Erstellen eines neuen Beitrages (siehe Beitrag #2).


Edit:
das hier könnte Dir ggf. auch als Vorlage zur Erstellung eines Beitrages in einem Thread dienen. Das Formular müsste nur entsprechend angepasst werden.


RE: POST Formular - MrRight - 31.12.2012

Ok, danke funktioniert Smile