The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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 |
#2
|
|||
|
|||
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. |
#3
|
||||
|
||||
Or you can just edit the template...
|
#4
|
||||
|
||||
He wants certian forums I belive. Not all
|
#6
|
|||
|
|||
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.. |
#7
|
|||
|
|||
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(); : : : |
#8
|
|||
|
|||
Hi Sukij, I sent you a PM.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|