1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Styling and Customization Questions' started by dutchbb, Mar 27, 2016.

  1. dutchbb

    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.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. dutchbb

    dutchbb Well-Known Member

    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?
     
  4. Amaury

    Amaury Well-Known Member

    That's something worth checking out as it shouldn't be taking that long. Loading should be instant.
     
  5. Brogan

    Brogan XenForo Moderator Staff Member

    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.
     
  6. dutchbb

    dutchbb Well-Known Member

    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.

    I have almost 65K posts on my forum though, not sure if that is causing this slow loading.
     
    Last edited: Mar 27, 2016
  7. DroidOne

    DroidOne Well-Known Member

    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: Mar 27, 2016
  8. dutchbb

    dutchbb Well-Known Member

    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>
     

Share This Page