PDA

View Full Version : how to write in textarea of newthread


Kintaro81
09-30-2010, 02:25 PM
In my market section I want that when a user click on "newthread" he will find the textarea of the new post filled with a "market post template".

Something like the quick reply's prefilled textarea, but for newthread.

I found the code that (I think) I need in the template "editor_toolbar_on":

<textarea name="message" id="{$editorid}_textarea" rows="10" cols="60"
style="display:block; width:$stylevar[messagewidth]; height:{$editor_height}px"
tabindex="1" dir="$stylevar[textdirection]">$newpost[message]</textarea>

If change to this:
<if condition="$GLOBALS[forumid]== 3">
<textarea name="message" id="{$editorid}_textarea" rows="10" cols="60"
style="display:block; width:$stylevar[messagewidth]; height:{$editor_height}px"
tabindex="1" dir="$stylevar[textdirection]">TEST TEXT</textarea>
<else />

<textarea name="message" id="{$editorid}_textarea" rows="10" cols="60"
style="display:block; width:$stylevar[messagewidth]; height:{$editor_height}px"
tabindex="1" dir="$stylevar[textdirection]">$newpost[message]</textarea>
</if>

I will get "TEST TEXT" in the textarea of reply and preview too. (and of course in preview)

I need that the "post template" is written only after the click on the newthread button.
Maybe I have to edit anothere template and not that?

there's a mod that do this kind of thing?

--------------- Added 1285863344 at 1285863344 ---------------

maybe I can use this mod: vB Post Templates (https://vborg.vbsupport.ru/showthread.php?t=199869)

Lynne
09-30-2010, 03:42 PM
Look up something like Stencil Mod (I can't remember the exact name, but it has Stencil in the title) and it should do what you want.

Kintaro81
09-30-2010, 10:37 PM
Thank you Lynne :up:
Now I have to choose from vB Post Templates and Thread Stencil.