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

What Template is The Alert Counter In?

Discussion in 'XenForo Questions and Support' started by IFeelYourPain13, Dec 31, 2011.

  1. IFeelYourPain13

    IFeelYourPain13 Active Member

    Where is the counter for alerts an inbox stored at?
    where.jpg
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    In the database:

    xf_user.alerts_unread
    xf_user.conversations_unread
     
  3. IFeelYourPain13

    IFeelYourPain13 Active Member

    Is there a template? I would like to attach a conditional to it.
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Admin CP -> Appearance -> Templates -> navigation_visitor_tab
     
  5. IFeelYourPain13

    IFeelYourPain13 Active Member

    Any idea why I can place:
    Code:
    <embed src="alert.mp3" autostart="true" hidden="true" height="0" width="0">
    Inside:
    Code:
    <span class="arrow"></span>
    And it play the Alert MP3 only when I have an alert, but not in Internet Explorer? Works in Firefox, and Chrome, but has issues in IE for some reason?
     
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I found this:

    http://www.sitepoint.com/forums/sho...n-embedded-mp3-to-play-in-both-Firefox-and-IE

     
  7. IFeelYourPain13

    IFeelYourPain13 Active Member

    Sorry, let me further explain. Im trying to get a sound alert for new conversations/alerts.
    After adding <embed src="alert.mp3" autostart="true" hidden="true" height="0" width="0"> to the conversation line in navigation_visitor_tab:

    <a href="{xen:link conversations}" rel="Menu" class="navLink NoPopupGadget">{xen:phrase inbox}
    <strong class="itemCount {xen:if {$visitor.conversations_unread}, '', 'Zero'}"
    id="ConversationsMenu_Counter" data-text="{xen:phrase you_have_x_new_unread_conversations}">
    <span class="Total">{xen:number $visitor.conversations_unread}</span>
    <span class="arrow"><embed src="alert.mp3" autostart="true" hidden="true" height="0" width="0"></span>

    The notification works in Firefox, Chrome, Safari, ect. (IE, the alert will play when I get a new conversation) however in IE no matter if I have a new conversation or not, the sound will play. Whats going on?
     
  8. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Try surrounding your embed code with a condition:

    Code:
    <xen:if is="{$visitor.conversations_unread}">
    
    </xen:if>
    
     
  9. IFeelYourPain13

    IFeelYourPain13 Active Member

    I feel like an idiot.
     

Share This Page