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

XF 1.2 Help with node icons

Discussion in 'Styling and Customization Questions' started by Matthew Hawley, Oct 10, 2013.

  1. Matthew Hawley

    Matthew Hawley Well-Known Member

    I can't believe I'm asking this question... :p

    So I'm trying to add font awesome to the node icons and im having trouble doing this.

    For the code, all I see is this:
    Code:
    <span class="nodeIcon" title="{xen:if $forum.hasNew, '{xen:phrase unread_messages}', ''}"></span>
    I'm trying to put this as the node icon:
    Code:
    <i class="icon-comments icon-large"></i>
    Any suggestions? Thanks!
     
    Last edited: Oct 10, 2013
  2. Matthew Hawley

    Matthew Hawley Well-Known Member

    Come on I really need this...
     
  3. Russ

    Russ Well-Known Member

    This code is from our framework, we have an option if users want to enable it:

    Code:
            <xen:if is="@xenBase_node_fontAwesome_icon">
               <span class="nodeIcon" title="{xen:if '{$forum.hasNew} OR !{$visitor.user_id}', '{xen:phrase unread_messages}', ''}"></span>
                 <i class="@xenBase_fontAwesome_nodeIcon @xenBase_fontAwesome_iconSize"></i>
               </span>
             <xen:else />
               <span class="nodeIcon" title="{xen:if '{$forum.hasNew} OR !{$visitor.user_id}', '{xen:phrase unread_messages}', ''}"></span>
             </xen:if>
    
    Then style properties controlling which fontawesome and which size.
     
  4. Jeremy

    Jeremy XenForo Moderator Staff Member

  5. Matthew Hawley

    Matthew Hawley Well-Known Member

    Umm...where do I put this in node_forum_level_2?
     
  6. Russ

    Russ Well-Known Member

    Yes, but you wouldn't of course copy that word for word as it uses our framework style properties, more just to get you an idea.

    I also have a resource in regards to creating simple style properties if you need reference.
     
  7. Matthew Hawley

    Matthew Hawley Well-Known Member

    I replaced the node icon code with:
    Code:
     <span class="nodeIcon" title="{xen:if '{$forum.hasNew} OR !{$visitor.user_id}', '{xen:phrase unread_messages}', ''}"></span>
                 <i class="icon-comments icon-3px"></i>
               </span>
    
    And this came up

    [​IMG]
     
  8. Russ

    Russ Well-Known Member

    Try this in extra:

    Code:
    .node .forumNodeInfo .nodeIcon, .node .categoryForumNodeInfo .nodeIcon, .node .forumNodeInfo.unread .nodeIcon, .node .categoryForumNodeInfo.unread .nodeIcon, .node .linkNodeInfo .nodeIcon, .node .pageNodeInfo .nodeIcon
    {
       background: none;
    }
    
     
  9. Matthew Hawley

    Matthew Hawley Well-Known Member

    Now I get this:

    http://i.imgur.com/d7x9xzh.png
     
  10. Matthew Hawley

    Matthew Hawley Well-Known Member

    I can't get this to work whatsoever....Can you just post the whole node_forum_level_2 template?
     
  11. MattW

    MattW Well-Known Member

    Please? Manners usually go a long way, especially when you are asking people for assistance.
     
  12. Russ

    Russ Well-Known Member

    The template is right, it's actually just CSS past that, I can get it for you. Again our template was simply a reference, you can't paste the entire contents of my code as we use it in our framework.

    I'm away right now and will post later.
     
    Matthew Hawley likes this.
  13. Matthew Hawley

    Matthew Hawley Well-Known Member

Share This Page