Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 4 Years, 7 Months, 4 Weeks ago Custom userfield in misc_buddypopup_user_online
#1
Solved: 4 Years, 7 Months, 4 Weeks ago
Hi There!,

Im trying to get a users custom field (in this case ['fid5']) into the misc_buddypopup_user_online template,
I've been browsing trough misc.php to find any related {$buddy} code but I'm unable to find any,

Also tried porting some stuff from member.php to get this working but I've only got to manage the result to be {$customfielval}  so my guessing is that some php script is not running to postback the contents of {$customfielval} for the specified user.


So my question in general is:
How can I manage to get a custom profile field in the "misc_buddypopup_user_online" template
and please don't tell me to use a plugin, I REALLY prefer to do core edits instead.

Thank you in advance!
Everything is nothing, With a twist.
Reply
#2
Solved: 4 Years, 7 Months, 4 Weeks ago
Find
		$query = $db->simple_select("users", "*", "uid IN ({$mybb->user['buddylist']})", array('order_by' => 'lastactive'));

Replace:
$query = $db->query("SELECT u.*, uf.* FROM " . TABLE_PREFIX . "users u
LEFT JOIN " . TABLE_PREFIX . "userfields uf ON(u.uid=uf.ufid)
WHERE u.uid IN(" . $mybb->user['buddylist'] . ")
ORDER BY u.lastactive DESC");
Reply
#3
Solved: 4 Years, 7 Months, 4 Weeks ago
Thank you very much!

This did the trick for me!
Everything is nothing, With a twist.
Reply
#4
Solved: 4 Years, 7 Months, 4 Weeks ago
thank you so much
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)