MyBB Community Forums

Full Version: How to make an egosearch
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I like "view new posts" and "view todays posts", but what i am looking for is "threads i have posted in"

for example on our old forum

there is a "view your posts" option. This lists out the threads that you have posted in. You can just scan the list, and know if someone else posted after you by seeing if you are the latest poster or not"

This is different than the my posts in the search results because it doesnt show if you are the latest poster or not. So you cant tell if someone posted after you or not, etc.

I think i found what i am looking for in the search section. All you do is select your own name and search. This list is what i want....but i want an menu link that does this in the menu alongside view new "view your posts". Its a pain to have to go into search option, select your own name, then search, every time you want to see if threads you posted in was posted in by another user or not.

So the link (for my user) would be

But i want each user to do their own usernames. At what point in this URL is the username, and how to change it to "the user in which is logged in"? I n that way i can just link this url (changed to the user logged in) to a menu link "view my posts".

I know this is the value to the logged in user, but i dont know how to input that into the url?

I tried adding this the the header_welcomeblock_member, but apparently i didnt input the user correctly in from the manual link
<a href="{$mybb->settings['bburl']}/search.php?action=results&sid={$mybb->user['username']}&sortby=lastpost&order=desc"><strong>View My Posts</strong></a>

After researching.... this search is called an "egosearch". They have it in their search.php file. My posts are not the same thing. And subscriptions are not what i want. Users can replicate this by going to search and input their own username and click search...but most users hit that link numerous time in just a few would be a pain to do that process over and over again. And each user can bookmark their link, but it seems a lot to ask them that they have to do that, instead of providing a menu link for them.

Is there a way in search.php that can automate the process of inputing your own username and searching? in php?

i was thinking of making javascript, which captures the username from php username variable, then inserts that into the username search box, then submits, then redirects the user to that provided link. But i dont know javascript.