XF 1.5 How can I add a "my posts" , "my threads" , "my content" etc. link in forum navigation?

dutchbb

Well-known member
I want to add these links in the forum navigation bar, next to "New Posts". What would be the best way to do this? I know which template to edit, but I'm not sure which URLs best be used. I don't want it to be a very heavy search/query and noticed that in the search menu "Useful Searches" has some of the links, but opening them seems to have a heavy impact on the server since it is very slow.

Any advice is appreciated.
 
The queries/load won't apply unless the links are clicked.
Right, my point is when I click "Your Posts" under useful searches on my forum, it takes about 15 seconds for the results page to appear on my forum. This is much longer than with other searches. So my fear is, making this link easily available to all members could possibly cause high server load if my suspicion is right that this is a heavy query when a user has thousands of posts. The link is kind of hidden under a menu in the default setup, perhaps this is done deliberately to prevent users from clicking it frequently and many users clicking it at the same time?
 
For reference, it takes around a second for my posts on this forum.

Server specification, configuration and other related issues (elasticsearch) will all be factors.
 
Copy the code from the member page at the bottom of the Postings tab: https://xenforo.com/community/members/dutchbb.1492/ or from the useful searches.

I just tried this in the navigation template:

Code:
<xen:if is="{$visitor.user_id}"><li><a href="{xen:link search/member, '', 'user_id={$user.user_id}'}" rel="nofollow">Your Content</a></li></xen:if>

This gives me the following error message:

"The requested member could not be found."

So simply copy paste does not work.

That's something worth checking out as it shouldn't be taking that long. Loading should be instant.
I have almost 65K posts on my forum though, not sure if that is causing this slow loading.
 
Last edited:
We sponsored an add-on for this purpose: https://xenforo.com/community/resources/cmf-activity-your-activity-log.4307/

Check it out. It will allow your members to easily find:

A: Threads their active in
B: Threads they've created
C: Posts they've made

The layout is much more user friendly and way more useful than what you'll find with the default search.

This was present in vBulletin 3.x and the first thing our members started complaining about after making the switch to XF. The "My activity" tab is next to "Unread posts" the one our members most frequently visit :)
 
Last edited:
I just tried this in the navigation template:

Code:
<xen:if is="{$visitor.user_id}"><li><a href="{xen:link search/member, '', 'user_id={$user.user_id}'}" rel="nofollow">Your Content</a></li></xen:if>

This gives me the following error message:

"The requested member could not be found."

So simply copy paste does not work.
Ok fixed, this works:

Code:
<xen:if is="{$visitor.user_id}"><li><a href="{xen:link search/member, '', 'user_id={$visitor.user_id}'}" rel="nofollow">Your Content</a></li></xen:if>
 
Back
Top Bottom