Quote:
Originally Posted by Noctavia
If there's anyone who has a little knowledge that could help me set up the conditional to only show the thanks box if 2 or more people thank, please PM me. I'm not sure what to write and feel Abe doesn't have the time (or want) to help me. This is the only thing that is stopping this mod from being exactly what I want for my forum...
|
Noctavia, I suggested this in the 3.6 thread, but I don't think you saw it. You're really much better off using the hooks Abe1 placed within the code, instead of using template edits as suggested above, otherwise every time Abe1 updates the mod, you'll have to re-do the template edit above...
Just create a simple plugin for hook location:
post_thanks_function_post_thanks_off_end
Try this:
PHP Code:
$sql = $vbulletin->db->query_first("SELECT COUNT(post_thanks_votenum) AS qty FROM " . TABLE_PREFIX . "post AS post WHERE postid = " . $postinfo['postid'] . " AND qty < 3");
if ($sql['qty'])
{
return true;
}
Within the query, change the 3 to minimum quantity of times a post should be thanked before displaying, and I think it'll give you what you need.