yesfans
10-24-2009, 03:39 AM
____ Jump to Your Last Post in a Thread - M1th____
This plig in was on my site before my upgrade to latest VB, now it is not working. How can I get it going again?
--------------- Added 1256359207 at 1256359207 ---------------
// ************************************************** *******************************
// goto users last post -- @M1th
if ($vbulletin->GPC['goto'] == 'lastupost')
{
$threadinfo = verify_id('thread', $threadid, 1, 1);
$uposts = $db->query_first("
SELECT MAX(postid) AS postid
FROM " . TABLE_PREFIX . "post
WHERE threadid = $threadinfo[threadid]
AND userid= " . $vbulletin->userinfo['userid'] ."
AND visible = 1
LIMIT 1
");
if ($uposts['postid'])
{
exec_header_redirect('showthread.php?' . $vbulletin->session->vars['sessionurl_js'] . "p=$uposts[postid]$highlightwords#post$uposts[postid]");
}
else
{
exec_header_redirect('showthread.php?' . $vbulletin->session->vars['sessionurl_js'] . "t=$threadinfo[threadid]&goto=lastpost$highlightwords");
}
}
This plig in was on my site before my upgrade to latest VB, now it is not working. How can I get it going again?
--------------- Added 1256359207 at 1256359207 ---------------
// ************************************************** *******************************
// goto users last post -- @M1th
if ($vbulletin->GPC['goto'] == 'lastupost')
{
$threadinfo = verify_id('thread', $threadid, 1, 1);
$uposts = $db->query_first("
SELECT MAX(postid) AS postid
FROM " . TABLE_PREFIX . "post
WHERE threadid = $threadinfo[threadid]
AND userid= " . $vbulletin->userinfo['userid'] ."
AND visible = 1
LIMIT 1
");
if ($uposts['postid'])
{
exec_header_redirect('showthread.php?' . $vbulletin->session->vars['sessionurl_js'] . "p=$uposts[postid]$highlightwords#post$uposts[postid]");
}
else
{
exec_header_redirect('showthread.php?' . $vbulletin->session->vars['sessionurl_js'] . "t=$threadinfo[threadid]&goto=lastpost$highlightwords");
}
}