Title: TEST PHP
Content Type: PHP
Content:
PHP Code:
$my_output = "Hello ". vB::$vbulletin->userinfo['username'];
$my_output .= "<br />Your last post was in this thread:";
$myquery = vB::$db->query_first("
SELECT
post.threadid, thread.title
FROM " . TABLE_PREFIX . "post AS post
INNER JOIN " . TABLE_PREFIX . "thread AS thread ON (thread.threadid = post.threadid)
WHERE post.userid = ".vB::$vbulletin->userinfo['userid']. "
ORDER BY post.dateline DESC
");
$threadurl = '<a href="' . fetch_seo_url(thread, $myquery) . '" title="'. $myquery[title] .'">'. $myquery[title] .'</a>';
$my_output .= "<br />" . $threadurl;
return $my_output;
Template to Use: block.html