MyBB Community Forums

Full Version: Show all user posts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello Everyone Smile

I want to make a button on user profile page that will redirect to page with all user posts. Unforunately I don't know which hook should I use.

My code look like this:

<li><a href="https://forum.techlipton.pl/search.php?action=finduser&uid={$user['uid']}">Show user posts</a></li>

How to get user id from user profile? 

Redirect will go from :


https://your-site.com/member.php?action=...uid=USERID

My code isn't working, so any ideas? Smile
Use the SQL query: SELECT uid from users WHERE username=putusernamehere
user profile already consists of getting user posts through Find All Posts link (at posts number)

anyway, you can use code like below in member_profile template
<a href="search.php?action=finduser&amp;uid={$uid}">Show user posts</a>
Thanks! That solved my problem Smile