MyBB Community Forums

Full Version: how to get user id
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am using simple likes plugin and it says to insert
Number of likes received: <a href="{$mybb->settings['burl']}/misc.php?action=post_likes_received_by_user&user_id={$post['id']}">{$post['likes_received']}</a> 

into postbit and postbit_classic
However when i do this and click on the number i get the in mybb error of

Quote:No post ID provided. Are you sure you're accessing this function correctly?
with the url of

There is no number at the end of the select user id
I tried adding {mybb->user['uid']} but then i get my own like list and not the user i selected from the post bit.
Use this:
Number of likes received: <a href="{$mybb->settings['burl']}/misc.php?action=post_likes_received_by_user&user_id={$post['uid']}">{$post['likes_received']}</a>
thanks. That worked. I cant believe i didnt try that one.