MyBB Community Forums

Full Version: Advanced Sidebox Query
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In the Advanced Sidebox I can see where I can the board statistics to the sidebar. Which is pretty awesome.

But can I also add the user statistics to the sidebar.? So, when somebody logins he or she will see their respective profile statistics such as number of likes and number of posts.
(2019-01-17, 12:42 PM)vk_knight Wrote: [ -> ]But can I also add the user statistics to the sidebar.?

There isn't a side box set up with that information, but you could create a custom box with this info by using the $mybb variable.

I don't know about likes, but reputation, post count, and such is readily available.
How can I create custom box for it? I mean I know how to create them because I have already two of them running. But what code to use? Likes may be not happening but atleast post count. along with user title.
Take advantage of the information in $mybb->user (to access any of the listed items, use {$mybb->user['key here']} in your custom box)

[key] => Description
[uid] => User ID
[username] => obvious
[email] => [email protected]
[postnum] => Post count
[threadnum] => Thread Count
[usertitle] => obvious
[website] => obvious
[referrals] => obvious
[reputation] => obvious

[unreadpms] => PM Count

[fid1-?] => Custom fields (different from forum to forum, eg. {$mybb->user['fid3']}

[avatar] => URL

MyAlerts:

[unreadAlerts] => Alert Count



So, to show the post count, use: {$mybb->user['postnum']}
Its working like a charm, thanks. Although I need to do some adjustments.

I am using the Thankyou/like plugin. Will you be able to add that to the stat too? It will be really helpful.
I'm not familiar with that plugin at all.

You would probably have better luck asking in that plugin's support thread.