diff --git a/e107_plugins/forum/shortcodes/batch/viewforum_shortcodes.php b/e107_plugins/forum/shortcodes/batch/viewforum_shortcodes.php index dc9dd0742..d141435cf 100644 --- a/e107_plugins/forum/shortcodes/batch/viewforum_shortcodes.php +++ b/e107_plugins/forum/shortcodes/batch/viewforum_shortcodes.php @@ -802,7 +802,13 @@ } - function sc_threadname() + /** + * + * @outdated use {TOPIC_TITLE} or {TOPIC_URL} + * @param null $parm + * @return string + */ + function sc_threadname($parm=null) { global $menu_pref, $forum; $tp = e107::getParser(); @@ -845,9 +851,43 @@ $this->addVars($temp); $url = e107::url('forum', 'topic', $this->var); + + if($parm === 'url') + { + return $url; + } + + if($parm === 'title') + { + return $thread_name; + } + + return "{$thread_name}"; } + //v2.1.4 + function sc_topic_title($parm=null) + { + return $this->sc_threadname('title'); + } + + //v2.1.4 + function sc_topic_url($parm=null) + { + return $this->sc_threadname('url'); + } + + //v2.1.4 + function sc_topic_date($parm=null) + { + return $this->sc_threaddate(); + } + + + //@todo more topic_xxxx shortcode aliases. + + function sc_pages() {