vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   how to write in textarea of newthread (https://vborg.vbsupport.ru/showthread.php?t=251421)

Kintaro81 09-30-2010 02:25 PM

how to write in textarea of newthread
 
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":

PHP Code:

<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:
PHP Code:

<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 [DATE]1285863344[/DATE] at [TIME]1285863344[/TIME] ---------------

maybe I can use this mod: vB Post Templates

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.


All times are GMT. The time now is 12:59 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.01035 seconds
  • Memory Usage 1,726KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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