mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 20:58:30 +01:00
Forum shortcodes. {TOPIC_TITLE} and {TOPIC_URL}
This commit is contained in:
parent
5814011369
commit
0e47cedb56
@ -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()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user