#381 - Allow Post Templates to Accept Subject (Title)Templates
| Identifier | #381 |
|---|---|
| Issue type | Feature request or suggestion |
| Title | Allow Post Templates to Accept Subject (Title)Templates |
| Status | Completed |
| Handling member | Chris Graham |
| Addon | cns_post_templates |
| Description | I would like to define a default subject Template (preferable allowing Variable use such as %username% or %date% etc)attached to the post template so that when a user adds a new topic in the forum that the post template is attached to the Topic title is auto filled in for them with the post templates Title Template. |
| Steps to reproduce | |
| Funded? | No |
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".


Comments
In forum/pages/modules/topics.php, above:
$apply[]=array($template['t_title'],$template['t_text'],$template['t_use_default_forums']);
add:
if (strpos($template['t_text'],'{')!==false)
{
require_code('tempcode_compiler');
$e=template_to_tempcode($template['t_text']);
$template['t_text']=$e->evaluate();
}
Then the post templates support Tempcode symbols (e.g. {$DATE})