Add-on Add 'Your Posts' and 'Your Threads' to Navigation Bar

Amin Sabet

Well-known member
I am looking for an addon that would include "Your Posts" and "Your Threads" in the navigation bar for logged in users.

2015-02-24_0716.webp
 
Edit the navigation template.
Add the code in orange.

Rich (BB code):
<!-- forums -->
<xen:if is="{$tabs.forums}">
    <li class="navTab forums {xen:if $tabs.forums.selected, 'selected', 'Popup PopupControl PopupClosed'}">
  
        <a href="{$tabs.forums.href}" class="navLink">{$tabs.forums.title}</a>
        <a href="{$tabs.forums.href}" class="SplitCtrl" rel="Menu"></a>
      
        <div class="{xen:if {$tabs.forums.selected}, 'tabLinks', 'Menu JsOnly tabMenu'} forumsTabLinks">
            <div class="primaryContent menuHeader">
                <h3>{$tabs.forums.title}</h3>
                <div class="muted">{xen:phrase quick_links}</div>
            </div>
            <ul class="secondaryContent blockLinksList">
            <xen:hook name="navigation_tabs_forums">
                <xen:if is="{$visitor.user_id}"><li><a href="{xen:link 'forums/-/mark-read', $forum, 'date={$serverTime}'}" class="OverlayTrigger">{xen:phrase mark_forums_read}</a></li></xen:if>
                <xen:if is="{$canSearch}"><li><a href="{xen:link search, '', 'type=post'}">{xen:phrase search_forums}</a></li></xen:if>
                <xen:if is="{$visitor.user_id}">
                    <li><a href="{xen:link 'watched/forums'}">{xen:phrase watched_forums}</a></li>
                    <li><a href="{xen:link 'watched/threads'}">{xen:phrase watched_threads}</a></li>
                </xen:if>
                <li><a href="{xen:link 'find-new/posts'}" rel="nofollow">{xen:if $visitor.user_id, {xen:phrase new_posts}, {xen:phrase recent_posts}}</a></li>
                <xen:if is="{$visitor.user_id}">
                    <li><a href="{xen:link search/member, '', 'user_id={$visitor.user_id}', 'content=thread'}">{xen:phrase your_threads}</a></li>
                    <li><a href="{xen:link search/member, '', 'user_id={$visitor.user_id}', 'content=post'}">{xen:phrase your_posts}</a></li>
                </xen:if>
            </xen:hook>
            </ul>
        </div>
    </li>
</xen:if>
 
Based on that, I figured out how to add to the CTA Featured page as well. In case anyone else is wondering:

Edit the cta_featuredthreads_navigation_tab_links template.
Add the code in orange.
Rich (BB code):
<ul class="secondaryContent blockLinksList">
    <xen:if is="{$visitor.user_id}"><li><a href="{xen:link 'forums/-/mark-read', $forum, 'date={$serverTime}'}" class="OverlayTrigger">{xen:phrase mark_forums_read}</a></li></xen:if>
    <xen:if is="{$canSearch}"><li><a href="{xen:link search, '', 'type=post'}">{xen:phrase search_forums}</a></li></xen:if>
    <xen:if is="{$visitor.user_id}">
        <li><a href="{xen:link 'watched/forums'}">{xen:phrase watched_forums}</a></li>
        <li><a href="{xen:link 'watched/threads'}">{xen:phrase watched_threads}</a></li>
    </xen:if>
    <xen:if is="{$xenOptions.ctaFtFeaturedThreadsArchive.enabled}">
        <li><a href="{xen:link 'threads/featured-archive'}">{xen:phrase cta_ft_featured_threads_archive}</a></li>
    </xen:if>
    <xen:comment><xen:if is="{$xenOptions.enableNewsFeed}">
        <li><a href="{xen:link recent-activity}">{xen:phrase recent_activity}</a></li>
    </xen:if></xen:comment>
    <xen:if is="{$visitor.user_id}">
        <li><a href="{xen:link find-new/posts, '', 'recent=1'}" rel="nofollow">{xen:phrase recent_posts}</a></li>
    </xen:if>
    <li><a href="{xen:link 'find-new/posts'}" rel="nofollow">{xen:if $visitor.user_id, {xen:phrase new_posts}, {xen:phrase recent_posts}}</a></li>
    <xen:if is="{$visitor.user_id}">
                <li><a href="{xen:link search/member, '', 'user_id={$visitor.user_id}', 'content=thread'}">{xen:phrase your_threads}</a></li>
                <li><a href="{xen:link search/member, '', 'user_id={$visitor.user_id}', 'content=post'}">{xen:phrase your_posts}</a></li>
        </xen:if>
</ul>
 
Last edited:
Back
Top Bottom