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

How did you get each sub-forum grid item to show its own icon?

Discussion in 'Styling and Customization Questions' started by time, May 26, 2013.

  1. time

    time Active Member

    I'm not proficient enough to know which templates to change and exactly what code to add. Any help appreciated!
    Untitled-5.png
     
  2. Tracy Perry

    Tracy Perry Well-Known Member

    time likes this.
  3. time

    time Active Member

  4. Tracy Perry

    Tracy Perry Well-Known Member

    OK... thought at first those were sub-forms, but it looks like from a custom add-on that keeps up with their win loss ratio? You were not REAL clear in what it was, nor where you found it at. If those are normal nodes (sub-forums) then the code examples given will work but that is NOT the normal display method for a sub-forum(node) under a category - so there would be some additional edits there.
    If those are subforums, then you can refer to http://xenforo.com/community/resources/sub-nodes-in-columns.580/ for that. You will probably have to do a combination of both.

    What site is it from?
     
  5. Shelley

    Shelley Well-Known Member

    This I'm 99% sure can be done via css. I applied "new" indicators after the title that differ from one another so I assume node icons can differ also. I'm sure someone else will jump in with a solution before i do but to cut a long story short, extra css can be used here with the subforum ID used to display specific icons per sub forum. This is CyberAP's subforum add-on correct?

    Basically, if you use a code inspector (firebug) or another apply your ID though if memory recalls you'll have to overide the background-color with a background (image)

    subdifference.png
     
    time likes this.
  6. time

    time Active Member

    (y)

    Can you guide me to do it
     
  7. Bob

    Bob Well-Known Member

    Jeremy and Shelley like this.
  8. Shelley

    Shelley Well-Known Member

    Did you get this working without the template edit and doing it via css by any chance Bob?

    edit: NM - I thought this was CyberAPs subforum manager and I almost have different icons on specific sub nodes displaying with css and extra.css but this is jaxels modification so any solution won't help here since I'm modifying cyberAps subforum code.
     
  9. Shelley

    Shelley Well-Known Member

    For those interested in doing the same using CyberAps subforum add-on via css.

    The node IDs will most certainly differ as will the imagepaths to unread/read icons (you'll use your own custom imagery) and the width and height will almost certainly differ so it's basically adjust accordingly for your forum IDs/paths etc

    All the code goes into EXTRA.CSS (bare in mind this is for CYBERAP's subforum add-on)

    Code:
    body .subForumsPopup .blockLinksList .node_32  .unread .nodeTitle a:before{
        background: url("@imagePath/xenforo/icons/node32-unread.png") no-repeat center transparent !important;
        height: 36px;
        width: 36px;}
     
    body .subForumsPopup .blockLinksList .node_32 .nodeTitle a:before {
            background: url("@imagePath/xenforo/icons/node32-read.png") no-repeat center transparent;
            width: 36px;
            height: 36px;}
     
    body .subForumsPopup .blockLinksList .node_34 .unread .nodeTitle a:before{
        background: url("styles/@imagePath/icons/node34-unread.png") no-repeat center transparent  !important;
        height: 36px;
        width: 36px;}
     
    body .subForumsPopup .blockLinksList .node_34 .nodeTitle a:before {
            background: url("@imagePath/xenforo/icons/node17-read.png") no-repeat center transparent;
            width: 36px;
            height: 36px;}
     
    body .subForumsPopup .blockLinksList .node_30 .unread .nodeTitle a:before{
        background: url("@imagePath/xenforo/icons/node34-unread.png") no-repeat center transparent  !important;
        height: 36px;
        width: 36px;}
     
    body .subForumsPopup .blockLinksList .node_30 .nodeTitle a:before {
            background: url("@imagePath/xenforo/icons/node30-read.png") no-repeat center transparent;
            width: 36px;
            height: 36px;}
    
    subby-read.png
    subby-unread.png
     
    Moddis, IcEWoLF, Bob and 1 other person like this.
  10. time

    time Active Member

    Thanks Shelley
    (y)
     

Share This Page