1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-28 18:30:53 +02:00

Issue #2033 sc_lastpost() parms.

This commit is contained in:
Cameron
2016-11-17 17:03:43 -08:00
parent 73cccc40f1
commit cae2b0721e

View File

@@ -657,9 +657,36 @@ $gen = new convert;
}
function sc_lastpost()
function sc_lastpost($parm = null)
{
return $this->lastpostdata('post');
if(!empty($parm['type']))
{
switch($parm['type'])
{
case "date": // date only
// code
break;
case "datelink": // date with link
return $this->lastpostdata('date');
break;
case "url": // url
return $this->lastpostdata('url');
break;
case "username": // username of last-post user.
return $this->lastpostdata('user');
break;
case "name": //thread name
// code
break;
}
}
return $this->lastpostdata('post');
}