View Issue Details

IDProjectCategoryView StatusLast Update
0000381Composrcns_post_templatespublic2012-02-19 21:09
ReporterDuckAssigned ToChris Graham 
SeverityFeature-request 
Status resolvedResolutionfixed 
Product Version 
Fixed in Version 
Summary0000381: Allow Post Templates to Accept Subject (Title)Templates
DescriptionI 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.
TagsNo tags attached.
Time estimation (hours)
Sponsorship open

Activities

Chris Graham

2012-02-19 21:09

administrator   ~0000341

Simple change...

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})

Issue History

Date Modified Username Field Change