![]() |
Add text to new post
HI..
Please recommend how can I add 3-4 lines of predefined texts automatically into the body when someone create a new thread in a certain forum ? Thanks |
Open newthread.php.
Add the following to the top: <? if ($HTTP_GET_VARS['forumid']== '2') { $defaultmessage = 'message 1'; } elseif ($HTTP_GET_VARS['forumid']== '3') { $defaultmessage = 'message2'; } else { echo ' '; } ?> Then open the 'newthread' template and add $defaultmessage between the <textarea> tags. |
Or you can just edit the template...
|
He wants certian forums I belive. Not all ;)
|
Quote:
|
Quote:
I will try it on Monday... and Yes I need the text to be added only selected forum, not all. Will let you know how it's going on... later.. |
Quote:
In the Template, I add the $defaultmessage as follow. - New Posting Template - NewThread <td><textarea name="message" rows="20" cols="$textareacols" wrap="virtual" tabindex="2">$defaultmessage $message</textarea> In the Newthread.php, I add the lines as follow. <?php error_reporting(7); if ($HTTP_GET_VARS['forumid']== '889') { $defaultmessage = 'message 1'; } elseif ($HTTP_GET_VARS['forumid']== '889') { $defaultmessage = 'message2'; } else { echo ' '; } $templatesused = "newpost_postpreview,error_nosubject,redirect_post thanks,email_moderator,emailsubject_moderator,newt hread_postpoll,newpost_attachment,newpost_disables miliesoption,forumrules,newthread,posticons,postic onbit"; $templatesused.=",vbcode_smilies,vbcode_smiliebit, vbcode_smilies_getmore,vbcode_buttons,vbcode_sizeb its,vbcode_fontbits,vbcode_colorbits"; require("./global.php"); // get decent textarea size for user's browser $textareacols = gettextareawidth(); : : : |
Hi Sukij, I sent you a PM.
|
All times are GMT. The time now is 01:42 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|