Mark.B |
03-24-2009 08:38 PM |
Problem with showing album link in postbit
I am using THIS mod to try and get a link to show in postbit/postbit legacy if a user has any albums. However, as written the mod does not work for me (3.8.1 PL1). The mod author is not about so I am trying to fix it myself.
The problem is that this conditional is always returning false:
Code:
if (!empty($post['hasalbum']))
So the code does not show up. I can remove the conditional and the code will show fine, but obviously for everyone, even if they have no album.
The sub query being used at hook location showthread_query is this:
Code:
$hook_query_fields .= ",album.userid as hasalbum";
$hook_query_joins .= "LEFT JOIN (SELECT state, userid, MAX(albumid) AS hasalbum FROM " . TABLE_PREFIX . "album GROUP BY userid) album ON(user.userid = album.userid AND album.state = 'public')";
I can't work out why this isn't working for me....looking at the thread it works for some and not others. What's wrong? What other conditional could I replace that conditional with to try and make it work?
|