The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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'])) 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')"; |
#2
|
||||
|
||||
Try looking at your error_logs and seeing if there is something in there about the query.
|
#3
|
|||
|
|||
Thanks Lynne, no, nothing at all in there.
|
#4
|
||||
|
||||
Where are you doing the condition? Are you sure the query is done before that plugin?
|
#5
|
|||
|
|||
I think so....it's showthread_query for the query, followed by postbit_display_start for the conditional.
|
#6
|
||||
|
||||
I believe in postbit_display_start you need to use $this->post, not $post.
|
#7
|
||||
|
||||
Either will work, they are one and the same (by-ref).
|
#8
|
|||
|
|||
Thanks...but still not working.
Got me baffled this... |
#9
|
||||
|
||||
I just tested this on my test site and it works just fine. Are you sure you have an up-to-date postbit (or postbit_legacy) template that has the correct template_hook for it to show?
|
#10
|
|||
|
|||
Thanks Lynne....Yes, definitely. I know this because I have removed the conditional so that the code shows up for everyone, and it's appearing ok.
There are others in the mod thread saying it isn't working for them....I wonder if it's one of those mods that only works under certain server configurations. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|