![]() |
Group Messagebit Plugin Query
Right this one has me totally baffled and I can't fix it.
On vB3 I was able to query custom user fields (at the hook group_messagebit_display_complete) so the data could be used in the template group_message as follows: Code:
$username = $message['username']; Anyway this worked fine on vB3. Now that I have reopened my groups on vB4 I thought I'd use the same code but it simply doesn't work. Some diagnostics have revealed that the hook itself works, the problem seems to be that the variable $message is no longer recognised at this hook. My test for that has been to add the following line: Code:
$template_hook['field15'] = "Test"; But if I try: Code:
$template_hook['field15'] = $message['username']; It can't be a variable registration issue as $message is definitely available in the template, it is already used throughout. Therefore, I'm finally stumped. Anyone got any idea how I can plug this code in? Even if it means editing a file I don't mind. |
Which hook is it you're using?
|
Oops forgot to put that vital information in. :o
group_messagebit_display_complete. I'll edit the first post. |
Try using $this->item in place of $message, like
Code:
$template_hook['field15'] = $this->item['username']; |
Perfect, thank you.
|
All times are GMT. The time now is 05:12 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|