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

XF 1.3 Duplicate a Conversation Unread Count

bloh

Active member
#1
I tried to duplicate a Conversation Unread Count at the userbar.

I use this code:
Code:
<strong class="itemCount {xen:if {$visitor.conversations_unread}, 'alert'}">
    <span class="Total">
        {xen:number $visitor.conversations_unread}
    </span>
    <span class="arrow"></span>
</strong>
When I press mark as unread for a conversation, the original inbox showed 1 unread count.
But for my user bar, it still show 0. In other words, it didn't update Live.

Any idea?
 

Brogan

XenForo moderator
Staff member
#2
The data (params) must be available in the template.

It will more than likely require an add-on to fetch the data and make it available in the navigation template.
 

Liam W

Well-known member
#3
The data (params) must be available in the template.

It will more than likely require an add-on to fetch the data and make it available in the navigation template.
They are, it isn't updating automatically.

I tried to duplicate a Conversation Unread Count at the userbar.

I use this code:
Code:
<strong class="itemCount {xen:if {$visitor.conversations_unread}, 'alert'}">
    <span class="Total">
        {xen:number $visitor.conversations_unread}
    </span>
    <span class="arrow"></span>
</strong>
When I press mark as unread for a conversation, the original inbox showed 1 unread count.
But for my user bar, it still show 0. In other words, it didn't update Live.

Any idea?
You would require some extra (custom) JavaScript to change your custom count on Ajax load.

Liam
 

bloh

Active member
#5
Did a quick & dirty solution.

I sacrifice "VisitorExtraMenu_ConversationsCounter" to make the new counter at user bar work.