I am trying to prevent the first post of every thread from being displayed. I was going to add to the $hook_query_where string, but that causes the thread to appear locked when there is only one post (i.e. nothing is returned).
I decided that hacking the following top places would be best:
PHP Code:
foreach (explode(',', $cache_postids) AS $id)
{
// get the post from the post array
if (!isset($postarray["$id"]))
{
continue;
}
$post = $postarray["$id"];
if ($tachyuser = in_coventry($post['userid']) AND !can_moderate($thread['forumid']))
{
continue;
}
PHP Code:
while ($post = $db->fetch_array($posts))
{
if ($post['visible'] == 1)
{
// fix to prevent deleted posts that are the last post on the page from not being shown
if ($counter >= $perpage)
{
break;
}
++$counter;
if ($postorder)
{
$post['postcount'] = --$postcount;
}
else
{
$post['postcount'] = ++$postcount;
}
}
if ($tachyuser = in_coventry($post['userid']) AND !can_moderate($thread['forumid']))
{
continue;
}
But there werent any hooks, so I resorted to this hook in class_postbit.php:
PHP Code:
($hook =& vBulletinHook::fetch_hook('postbit_display_start')) ? eval($hook) : false;
However, I cannot use
to get out of it because that just retuns '' for the hook. Any suggestions on how to do this without modifying files by hand?