MyBB Community Forums

Full Version: Find my threads / find my posts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Disclaimer: This may be a feature requests, but I think it is also a template editing support request.

Is there a way to incorporate two links in the header template, preferably near the "view today's posts" and "view new posts" links? I would like to add two links from the profile page, "find all threads" and "final all posts" (for the logged in user).

I think this is a handy way to see if anyone has replied to threads I am interested in, without having to use email notification. (Using these searches the same way as Drupal's tracker).

I found the code in the profile template but when I copy it to the header template it shows the dash but not the links. I assume it is because the variables are not picking up on the UID, but I could be wrong.

<span class="smalltext">(<a href="search.php?action=finduserthreads&amp;uid={$uid}">{$lang->find_threads}</a> &mdash; <a href="search.php?action=finduser&amp;uid={$uid}">{$lang->find_posts}</a>)</span>
You're almost there, {$uid} won't work globally because that'll be being defined on the profile page. If you change {$uid} to {$mybb->user['uid']} you'll be good to go.

Also, no links are showing because those language variables won't work globally either, they're defined for the profile too; if you replace the language variables with the text you'd want to show, it'll work.

To get them where you want, you'll need the header_welcomeblock_member template, if you didn't know already Smile
Thank you Matt. I appreciated it so much. I did just as you said and it worked great.

<a href="search.php?action=finduserthreads&amp;uid={$mybb->user['uid']}">My Threads</a>

<a href="search.php?action=finduser&amp;uid={$mybb->user['uid']}">My Posts</a>