diff --git a/e107_plugins/forum/shortcodes/batch/post_shortcodes.php b/e107_plugins/forum/shortcodes/batch/post_shortcodes.php index e53d92506..e2238ee55 100644 --- a/e107_plugins/forum/shortcodes/batch/post_shortcodes.php +++ b/e107_plugins/forum/shortcodes/batch/post_shortcodes.php @@ -434,6 +434,29 @@ class plugin_forum_post_shortcodes extends e_shortcode return $_tmp['breadcrumb']; } + function sc_forum_post_caption() + { +// global $forumInfo; + $tp = e107::getParser(); +// var_dump ($this); +//$this->forumObj->threadGet($this->id, false) + if ($this->var['action'] == "rp") + { + $pre = LAN_FORUM_1003; + $name = $tp->toHTML($this->var['thread_name'], false, 'no_hook, emotes_off'); + $url = e107::url('forum', 'topic', $this->var); + $post = LAN_FORUM_2006; + } + if ($this->var['action'] == "nt") + { + $pre = LAN_FORUM_1001; + $name = $tp->toHTML($this->var['forum_name'], false, 'no_hook, emotes_off'); + $url = e107::url('forum', 'forum', $this->var); + $post = LAN_FORUM_2005; + } + return $pre.($url?": {$name} - ":$name).$post; + } + function sc_noemotes() { if(vartrue($eaction) == true) { return null; } diff --git a/e107_plugins/forum/templates/forum_post_template.php b/e107_plugins/forum/templates/forum_post_template.php index 86361230a..faf8c055d 100644 --- a/e107_plugins/forum/templates/forum_post_template.php +++ b/e107_plugins/forum/templates/forum_post_template.php @@ -12,7 +12,7 @@ if (!defined('e107_INIT')) { exit; } // New in v2.x - requires a bootstrap theme be loaded. -//$FORUM_POST_TEMPLATE['caption'] = "Custom caption"; +//$FORUM_POST_TEMPLATE['caption'] = "{FORUM_POST_CAPTION}"; $FORUM_POST_TEMPLATE['form'] = " {FORUM_POST_FORM_START}