PDA

View Full Version : Can I pre-fill $messagearea in a certain forum on New Thread?


afullcup
06-23-2008, 01:41 PM
Yes, I know I could use a form hack, but I'd really like to just stick an extra piece of code in whenever I need it if possible. I am comfortable coding, just can't seem to quite figure this out.

I'd like to be able to pre-fill the messagearea on a New Thread only in certain forums - for instance, when someone is submitting a support ticket in the support forum, I'd like to pre-fill with questions about things we like to know about (browser, OS, etc) in order to help them.

What I know so far is that in template newthread, there is this code which makes the messagearea appear:

<!-- message area -->
<div class="smallfont">$vbphrase[message]:</div>
$messagearea
<!-- / message area -->


And that in newthread.php there is code to set up the new thread. I added the following code and tested it so that I know it knows when we're posting to the forum in question:


if ($foruminfo[forumid] == 410)
{
// What to put here?
}


As for "what to put here?" I have tried several things and can't seem to make it populate...


$message = $vbphrase['new_techie_post'];
OR
$newpost['message'] = $vbphrase['new_techie_post'];


If anyone has more insight into the variables that would work here, I'd sure appreciate it! :)

Opserty
06-23-2008, 02:21 PM
Either use or have a look at this modification and see how its done: Thread Stencil (https://vborg.vbsupport.ru/showthread.php?t=130162&highlight=Thread+Stencil)

afullcup
06-23-2008, 08:00 PM
well lookie there - reinventing the wheel. :D

Thanks Opserty!! :)