1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-18 05:09:05 +01:00

Forum shortcodes. {TOPIC_TITLE} and {TOPIC_URL}

This commit is contained in:
Cameron 2017-01-15 18:12:35 -08:00
parent 5814011369
commit 0e47cedb56

View File

@ -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 "<a {$title} href='" . $url . "'>{$thread_name}</a>";
}
//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()
{